/* ============================================
   GLACIER STORE - Cart Styles
   Shopping cart UI styles
   ============================================ */

/* Cart Icon in Header */
.cart-icon-btn {
    position: relative;
    background: transparent;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-primary, #1e293b);
    transition: all 0.3s ease;
    margin-right: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cart-icon-btn:hover {
    transform: scale(1.1);
    color: var(--primary-color, #3b82f6);
}

/* Ensure proper display in header */
.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-icon-wrapper {
    display: inline-flex;
    align-items: center;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--primary-color, #3b82f6);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 20px rgba(0,0,0,0.1);
    z-index: 10000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Cart Header */
.cart-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    margin: 0;
}

.cart-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cart-close:hover {
    color: var(--text-primary, #1e293b);
    transform: scale(1.1);
}

/* Cart Items */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty {
    text-align: center;
    color: #64748b;
    padding: 40px 20px;
    font-size: 1.1rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.cart-item:hover {
    background: #f1f5f9;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin: 0 0 5px 0;
}

.cart-item-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color, #3b82f6);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border-radius: 8px;
    padding: 5px;
}

.cart-item-quantity .quantity-btn {
    background: transparent;
    border: none;
    width: 28px;
    height: 28px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s ease;
}

.cart-item-quantity .quantity-btn:hover {
    background: #f1f5f9;
    color: var(--text-primary, #1e293b);
    border-radius: 4px;
}

.cart-item-quantity span {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1rem;
    padding: 8px;
    transition: all 0.2s ease;
}

.cart-item-remove:hover {
    transform: scale(1.1);
    color: #dc2626;
}

/* Cart Footer */
.cart-footer {
    padding: 20px;
    border-top: 2px solid #e5e7eb;
    background: white;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.25rem;
    font-weight: 700;
}

.cart-total span:first-child {
    color: #64748b;
}

.cart-total-price {
    color: var(--text-primary, #1e293b);
    font-size: 1.5rem;
}

.btn-checkout {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* Success Message */
.cart-added-message {
    position: fixed;
    top: 100px;
    right: -400px;
    background: #10b981;
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    z-index: 10001;
    transition: right 0.3s ease;
}

.cart-added-message.show {
    right: 20px;
}

.cart-added-message i {
    font-size: 1.25rem;
}

/* Product Page Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.quantity-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.quantity-btn {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
}

.quantity-btn:hover {
    background: #f8fafc;
    color: var(--text-primary, #1e293b);
}

#quantity {
    border: none;
    width: 60px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
}

/* Upsell Buttons */
.btn-add-upsell {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.btn-add-upsell:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.btn-add-upsell i {
    font-size: 1.1rem;
}

/* Bundle Button */
.btn-add-bundle {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: 20px;
    width: 100%;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.btn-add-bundle:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 215, 0, 0.5);
}

.btn-add-bundle i {
    font-size: 1.25rem;
}

/* Bundle Badge in Cart */
.bundle-badge {
    background: #FFD700;
    color: #333;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
    display: inline-block;
}

/* Upsell Success Message */
.upsell-added {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Zoom 75% Responsive (viewport ~1000px) */
@media (max-width: 1100px) and (min-width: 769px) {
    .cart-sidebar {
        width: 320px;
        right: -320px;
    }

    .cart-added-message {
        right: -320px;
        width: auto;
        max-width: 300px;
    }

    .cart-added-message.show {
        right: 10px;
    }

    .cart-header {
        padding: 18px;
    }

    .cart-items {
        padding: 18px;
    }

    .cart-footer {
        padding: 18px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .cart-header {
        padding: 15px;
    }

    .cart-items {
        padding: 15px;
    }

    .cart-item {
        padding: 12px;
        gap: 12px;
    }

    .cart-item-image {
        width: 50px;
        height: 50px;
    }

    .cart-footer {
        padding: 15px;
    }

    .cart-added-message {
        right: -100%;
        left: auto;
        top: auto;
        bottom: 20px;
        width: calc(100% - 40px);
    }

    .cart-added-message.show {
        right: 20px;
    }

    .btn-add-upsell {
        width: 100%;
        justify-content: center;
    }

    .btn-add-bundle {
        padding: 14px 24px;
        font-size: 1rem;
    }
}