/* Product Cards CSS - Luxury Premium Design for Clutch Cams */

/* Brand Gold Color - Premium Luxury Palette */
:root {
    --brand-gold: #D4AF37;
    --luxury-gold: #F4D03F;
    --dark-bg: #0a0a0a;
    --card-bg: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #999999;
    --border-subtle: rgba(212, 175, 55, 0.2);
    --border-active: rgba(212, 175, 55, 0.6);
    --shadow-luxury: 0 20px 60px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 30px 80px rgba(0, 0, 0, 0.6);
    --error-red: #dc3545;
    --warning-orange: #fd7e14;
    --success-green: #28a745;
}

/* Section Heading - Luxury Typography */
.section-heading h2 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand-gold), var(--luxury-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.section-heading p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Product Card Styles - Premium Luxury Design */
.product-card {
    background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-luxury);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand-gold), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-active);
}

.product-card:hover::before {
    opacity: 1;
}

/* Product Images - Dynamic API Images */
.product-images {
    margin-bottom: 2.5rem;
}

.main-image {
    margin-bottom: 1.5rem;
}

.product-main-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 200px;
    object-fit: contain;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
}

.product-main-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.product-thumbnail {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 50px;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
}

.product-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Image Modal Styles */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-modal.show {
    opacity: 1;
    visibility: visible;
}

.image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
}

.image-modal-close:hover {
    background: var(--brand-gold);
    color: #000;
    transform: scale(1.1);
}

.modal-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}

.modal-title {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--brand-gold);
}

/* Product Info - Premium Typography */
.product-title {
    color: var(--brand-gold);
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.2);
}

.product-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.3px;
}

/* Subscription Plans - Luxury Card Design */
.subscription-plans {
    margin-bottom: 2.5rem;
}

.plan-option {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.08));
    border: 2px solid rgba(212, 175, 55, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backdrop-filter: blur(10px);
}

.plan-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 14px;
    padding: 2px;
    background: linear-gradient(135deg, transparent, var(--brand-gold), transparent);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.plan-option:hover {
    border-color: rgba(212, 175, 55, 0.4);
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.05), rgba(212, 175, 55, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
}

.plan-option:hover::before {
    opacity: 1;
}

.plan-option.active {
    border-color: var(--brand-gold);
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.12));
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
    transform: translateY(-1px);
}

.plan-option.active::before {
    opacity: 0.7;
}

.plan-option.active .plan-name {
    color: var(--brand-gold);
}

.plan-option.active .plan-price {
    color: var(--luxury-gold);
}

.plan-option.plan-highlighted {
    position: relative;
}

.plan-option.plan-highlighted::after {
    content: 'MOST POPULAR';
    position: absolute;
    top: -8px;
    right: 1.5rem;
    background: linear-gradient(135deg, var(--luxury-gold), var(--brand-gold));
    color: #000;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(244, 208, 63, 0.3);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.plan-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.2rem;
    letter-spacing: 0.3px;
}

.plan-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-gold);
    text-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

.plan-total {
    font-size: 0.95rem;
    color: #22c55e;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Stock Badge Styles */
.stock-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    white-space: nowrap;
}

.stock-badge.out-of-stock {
    background: linear-gradient(135deg, var(--error-red), #b91c1c);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.stock-badge.low-stock {
    background: linear-gradient(135deg, var(--warning-orange), #ea580c);
    color: white;
    box-shadow: 0 2px 8px rgba(253, 126, 20, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Out of Stock Plan Styles */
.plan-option.plan-out-of-stock {
    opacity: 0.6;
    cursor: not-allowed;
    background: linear-gradient(145deg, rgba(100, 100, 100, 0.1), rgba(120, 120, 120, 0.15));
    border-color: rgba(150, 150, 150, 0.3);
}

.plan-option.plan-out-of-stock:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(150, 150, 150, 0.3);
    background: linear-gradient(145deg, rgba(100, 100, 100, 0.1), rgba(120, 120, 120, 0.15));
}

.plan-option.plan-out-of-stock::before {
    display: none;
}

.plan-option.plan-out-of-stock .plan-name {
    color: var(--text-muted);
}

.plan-option.plan-out-of-stock .plan-price {
    color: var(--text-muted);
}

/* Quantity Section - Premium Controls */
.quantity-section {
    margin-bottom: 2.5rem;
}

.quantity-label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 160px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.quantity-btn {
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.2));
    border: none;
    color: var(--brand-gold);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
}

.quantity-btn:hover {
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.3));
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

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

.quantity-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    text-align: center;
    width: 72px;
    height: 44px;
    font-weight: 700;
    font-size: 1.2rem;
    outline: none;
}

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

.quantity-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.quantity-note {
    text-align: center;
    margin-top: 0.5rem;
}

.quantity-note small {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Subscribe Button - Simple Luxury Design */
.subscribe-now-btn {
    background: linear-gradient(135deg, var(--brand-gold) 0%, var(--luxury-gold) 100%);
    border: none;
    color: #000000;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    transition: all 0.3s ease;
    border-radius: 50px;
    padding: 18px 36px;
    font-size: 1.1rem;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.subscribe-now-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.5);
    background: linear-gradient(135deg, #B8941F 0%, #D4AF37 100%);
    color: #000000;
}

.subscribe-now-btn:disabled {
    background: linear-gradient(135deg, #666666, #555555);
    color: #999999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Cart Styles - Premium Design */
.cart-offcanvas {
    width: 420px !important;
    background: linear-gradient(145deg, #0a0a0a 0%, #1a1a1a 100%);
    color: var(--text-primary);
    border-left: 1px solid var(--border-subtle);
}

.cart-offcanvas .offcanvas-header {
    border-bottom: 1px solid var(--border-subtle);
    padding: 2rem;
    background: rgba(212, 175, 55, 0.05);
}

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

.cartButton {
    background: linear-gradient(135deg, var(--brand-gold), var(--luxury-gold));
    border: none;
    color: #000000;
    border-radius: 50px;
    padding: 14px 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
    font-weight: 600;
}

.cartButton:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, var(--luxury-gold), var(--brand-gold));
}

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

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

.cart-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.08));
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
}

.cart-item:hover {
    border-color: var(--border-active);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

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

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

.cart-item-remove {
    background: none;
    border: none;
    color: #ff4757;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    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.2);
}

.cart-item-plan {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

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

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

.cart-qty-btn {
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.2));
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--brand-gold);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    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: linear-gradient(145deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.3));
    border-color: var(--brand-gold);
    transform: scale(1.1);
}

.cart-qty-display {
    font-weight: 700;
    min-width: 24px;
    text-align: center;
    font-size: 1.1rem;
}

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

.cart-summary {
    border-top: 1px solid var(--border-subtle);
    padding-top: 1.5rem;
    margin-top: auto;
}

.cart-total-section {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.08));
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-subtle);
}

.checkout-btn {
    background: linear-gradient(135deg, var(--brand-gold), var(--luxury-gold));
    border: none;
    color: #000000;
    font-weight: 700;
    border-radius: 50px;
    padding: 18px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.checkout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, var(--luxury-gold), var(--brand-gold));
}

/* Error Toast - Premium Design */
.inventory-error-toast {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(239, 68, 68, 0.3);
    transform: translateX(400px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 380px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.inventory-error-toast.show {
    transform: translateX(0);
}

.error-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.error-content i {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.error-content span {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4;
}

/* Responsive Styles - Mobile Optimization */
@media (max-width: 768px) {
    .cart-offcanvas {
        width: 100% !important;
    }
    
    .product-card {
        padding: 2rem;
    }
    
    .product-placeholder {
        height: 180px;
        font-size: 1rem;
    }
    
    .thumbnail-placeholder {
        height: 50px;
        font-size: 0.6rem;
    }
    
    .product-title {
        font-size: 1.6rem;
    }
    
    .section-heading h2 {
        font-size: 2.2rem;
    }
    
    .section-heading p {
        font-size: 1rem;
    }
    
    .plan-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .quantity-controls {
        max-width: 140px;
    }
    
    .quantity-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .quantity-input {
        width: 60px;
        height: 40px;
        font-size: 1rem;
    }
    
    .subscribe-now-btn {
        padding: 16px 28px;
        font-size: 1rem;
    }
    
    .inventory-error-toast {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .inventory-error-toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 576px) {
    .product-card {
        padding: 1.5rem;
    }
    
    .product-title {
        font-size: 1.4rem;
    }
    
    .product-description {
        font-size: 0.9rem;
    }
    
    .plan-option {
        padding: 1.25rem;
    }
    
    .subscribe-now-btn {
        padding: 14px 24px;
        font-size: 0.95rem;
    }
    
    .section-heading h2 {
        font-size: 1.8rem;
    }
}

/* Premium Loading Animation */
@keyframes luxuryPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.02);
    }
}

.loading-luxury {
    animation: luxuryPulse 2s ease-in-out infinite;
}