/* Cart Button and Sidebar Styling */
/* Brand Gold Color */
:root {
    --brand-gold: #D4AF37;
}

/* Cart Button Styling */
.cartButton {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    background: linear-gradient(45deg, #D4AF37, #F4D03F);
    border: none;
    color: #1a1a1a;
    border-radius: 50px;
    padding: 12px 20px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.cartButton:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.4);
    background: linear-gradient(45deg, #F4D03F, #D4AF37);
}

.cart-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    transform: scale(0);
    transition: transform 0.3s ease;
    border: 2px solid #1a1a1a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cart-count.show {
    transform: scale(1);
}

.cartButton svg {
    display: block;
    margin: 0 auto;
}

/* Cart Sidebar Styling */
.cart-offcanvas {
    width: 400px !important;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
}

.cart-offcanvas .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

.cart-offcanvas .offcanvas-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.empty-cart {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
}

.empty-cart-icon {
    opacity: 0.5;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.cart-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.cart-item-title {
    font-weight: 600;
    color: var(--brand-gold);
    margin: 0;
    flex: 1;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #ff4757;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cart-item-remove:hover {
    background: rgba(255, 71, 87, 0.1);
    transform: scale(1.1);
}

.cart-item-plan {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 0.5rem;
}

.cart-item-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-qty-btn {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--brand-gold);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-qty-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--brand-gold);
}

.cart-qty-display {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item-price {
    font-weight: 700;
    color: var(--brand-gold);
    font-size: 1.1rem;
}

.cart-summary {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    margin-top: auto;
}

.cart-total-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.checkout-btn {
    background: linear-gradient(45deg, #D4AF37, #F4D03F);
    border: none;
    color: #1a1a1a;
    font-weight: 600;
    border-radius: 50px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    background: linear-gradient(45deg, #F4D03F, #D4AF37);
}

/* Quantity Selector Styles */
.quantity-selector {
    margin: 1.5rem 0;
}

.quantity-selector .form-label {
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 150px;
    margin: 0 auto;
}

.quantity-btn {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--brand-gold);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.quantity-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--brand-gold);
    transform: scale(1.05);
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-btn.minus {
    border-radius: 8px 0 0 8px;
}

.quantity-btn.plus {
    border-radius: 0 8px 8px 0;
}

.quantity-input {
    background: transparent;
    border: none;
    color: white;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    width: 60px;
    height: 40px;
    outline: none;
    border-left: 1px solid rgba(212, 175, 55, 0.3);
    border-right: 1px solid rgba(212, 175, 55, 0.3);
}

.quantity-input:focus {
    background: rgba(255, 255, 255, 0.05);
}

/* Cart Success Toast */
.cart-success-toast {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    background: linear-gradient(45deg, #22c55e, #16a34a);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 350px;
}

.cart-success-toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast-message {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Live Data Indicators */
.live-data-indicator {
    margin: 1rem 0;
    padding: 0.75rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    font-size: 0.85rem;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand-gold);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--brand-gold);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.product-id {
    color: #ccc;
    font-size: 0.75rem;
    font-family: monospace;
}

/* Inventory Status */
.inventory-status {
    margin: 1rem 0;
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.stock-status.in-stock {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.stock-status.out-of-stock {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.stock-status.in-stock .stock-dot {
    background: #22c55e;
    animation: pulse-dot 2s ease-in-out infinite;
}

.stock-status.out-of-stock .stock-dot {
    background: #ef4444;
}

/* Loading States */
.add-to-cart-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.add-to-cart-btn:disabled:hover {
    transform: none !important;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3) !important;
}

/* Product Error Alert */
.alert-warning {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    border-radius: 15px;
    padding: 1.5rem;
}

.alert-warning h5 {
    color: #fbbf24;
    margin-bottom: 0.75rem;
}

.btn-outline-warning {
    border-color: #fbbf24;
    color: #fbbf24;
    background: transparent;
}

.btn-outline-warning:hover {
    background: #fbbf24;
    color: #1a1a1a;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-offcanvas {
        width: 100% !important;
    }
    
    .cart-success-toast {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .cart-success-toast.show {
        transform: translateY(0);
    }
    
    .live-data-indicator,
    .inventory-status {
        margin: 0.75rem 0;
    }
    
    .stock-status {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .quantity-controls {
        max-width: 130px;
    }
    
    .quantity-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .quantity-input {
        width: 50px;
        height: 35px;
        font-size: 1rem;
    }
}