/* Floating Cart - Active styles used by template page */
.cart-icon-container.floating-cart {
    position: fixed;
    top: 10px; /* sit within the 60px white header */
    right: 16px;
    z-index: 9999;
    margin-left: 0;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    color: #223e29;
    font-size: 1.2rem;
    transition: color 0.2s;
    border-radius: 6px;
}

.cart-icon-container.floating-cart .cart-icon {
    padding: 0.5rem;
    background: #ff5722;
    color: white;
    border-radius: 50%;
    width: 40px; /* smaller so it doesn't overlap hero */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.cart-icon:hover {
    color: #4CAF50;
}

.cart-icon-container.floating-cart .cart-icon:hover {
    background: #e64a19;
    transform: scale(1.05);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff5722;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.cart-icon-container.floating-cart .cart-count {
    top: -6px;
    right: -6px;
    background: #4CAF50;
    border: 2px solid white;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    font-weight: 700;
}

.cart-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 350px;
    max-height: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: hidden;
    overflow-x: hidden; /* Prevent horizontal scrollbar */
}

.cart-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cart-header {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    color: #223e29;
    font-size: 1.1rem;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-items {
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scrollbar */
    padding: 0.5rem;
}

.empty-cart {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
    margin: 0;
}

.cart-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    min-width: 0; /* Prevent flex items from overflowing */
    overflow: hidden; /* Prevent content overflow */
}

.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.cart-item-info {
    flex: 1;
    min-width: 0; /* Allow text truncation */
    overflow: hidden; /* Prevent text overflow */
}

.cart-item-title {
    font-weight: 600;
    color: #223e29;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.cart-item-variant {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.subscription-info {
    font-size: 0.8rem;
    color: #4CAF50;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-quantity,
.cart-item-price {
    font-size: 0.8rem;
    color: #666;
    font-weight: 600;
}

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

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn, .remove-btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.qty-btn:hover, .remove-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.remove-btn {
    color: #dc3545;
    border-color: #dc3545;
}

.remove-btn:hover {
    background: #dc3545;
    color: white;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
}

.discounted-price {
    color: #4CAF50;
    font-weight: 700;
}

.savings {
    background: #4CAF50;
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.5rem;
    text-transform: uppercase;
}

.cart-footer {
    padding: 1rem;
    border-top: 1px solid #e9ecef;
}

.btn-checkout {
    width: 100%;
    padding: 0.75rem;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-checkout:hover {
    background: #45a049;
}

/* Modern Subscription Selector - Active styles used by template page */

/* Modern Subscription Selector */
.modern-subscription-selector {
    margin-bottom: 24px;
}

.subscription-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.subscription-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px 0;
    letter-spacing: -0.01em;
}

.subscription-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.subscription-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.purchase-option {
    position: relative;
}

.popular-badge {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff6b35;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
    animation: popularPulse 2s ease-in-out infinite;
}

@keyframes popularPulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
    }
    50% {
        transform: translateX(-50%) scale(1.05);
    }
}

.option-card {
    position: relative;
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 100px;
}

/* Default card state */
.option-card {
    border: 2px solid #e8e8e8;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover states */
.option-card:hover {
    border-color: #ff6b35;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.12);
}

.option-card.selected:hover {
    border-color: #16a34a;
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(22, 163, 74, 0.25);
}

.purchase-option.popular .option-card:hover {
    border-color: #ff6b35;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.15);
}

/* Popular option (highlighted but not necessarily selected) */
.purchase-option.popular .option-card {
    border-color: #ff6b35;
    background: white;
    box-shadow: 0 1px 4px rgba(255, 107, 53, 0.05);
    position: relative;
    border-width: 1px;
}


/* Selected option (the one that will be added to cart) */
.option-card.selected {
    border: 3px solid #22c55e;
    background: linear-gradient(135deg, #f0fdf4 0%, #fff 100%);
    box-shadow: 0 12px 30px rgba(34, 197, 94, 0.2);
    transform: translateY(-3px);
    position: relative;
    z-index: 5;
}

/* Popular AND selected option (most popular option chosen) */
.purchase-option.popular .option-card.selected {
    border: 3px solid #16a34a;
    background: linear-gradient(135deg, #f0fdf4 0%, #fff 100%);
    box-shadow: 0 15px 35px rgba(22, 163, 74, 0.25);
    transform: translateY(-4px);
    z-index: 6;
}

.card-content {
    flex: 1;
    margin-right: 16px;
}

.option-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 16px;
}

.option-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.pricing-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.current-price {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.savings-tag {
    background: #ff6b35;
    color: white;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.option-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.delivery-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.delivery-frequency {
    font-size: 13px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cancel-anytime {
    font-size: 12px;
    color: #22c55e;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.radio-indicator-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin-top: 4px;
    position: relative;
}

.radio-indicator-modern input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    width: 0;
    height: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.option-card:hover .radio-indicator-modern {
    border-color: #ff6b35;
    background: #fff8f6;
}

/* Radio indicator styling */
.radio-indicator-modern {
    border-color: #ddd;
    background: white;
}

.option-card:hover .radio-indicator-modern {
    border-color: #ff6b35;
    background: #fff8f6;
}

.option-card.selected .radio-indicator-modern {
    border-color: #22c55e;
    background: #22c55e;
}

.option-card.selected:hover .radio-indicator-modern {
    border-color: #16a34a;
    background: #16a34a;
}

/* Popular option radio indicator (highlighted but not selected) */
.purchase-option.popular .option-card .radio-indicator-modern {
    border-color: #ff6b35;
    background: #fff8f6;
}

/* Popular option radio indicator when selected */
.purchase-option.popular .option-card.selected .radio-indicator-modern {
    border-color: #16a34a;
    background: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

/* Radio dot animation - only show on selected option */
.radio-indicator-modern .radio-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
}

.option-card.selected .radio-dot {
    transform: scale(1);
    opacity: 1;
}

/* Popular options should not show radio dot unless selected */
.purchase-option.popular .option-card:not(.selected) .radio-dot {
    transform: scale(0);
    opacity: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .option-card {
        padding: 16px;
        min-height: 90px;
    }

    .option-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .pricing-info {
        align-items: flex-start;
    }

    .current-price {
        font-size: 16px;
    }
}

/* Dark mode support - DISABLED to match white site design */
/* Site uses white theme, so cart should always be white regardless of system preference */

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-cart {
        right: 10px;
    }

    .cart-dropdown {
        width: 300px;
        right: -10px;
    }

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

    .cart-item img {
        width: 40px;
        height: 40px;
    }

    .subscription-purchase-option {
        padding: 12px 16px;
    }
}