/**
 * Shop V2 Page Styles
 * Extracted from inline styles for better caching and performance
 */

/* Base Styles */
body {
    font-family: 'Barlow', sans-serif;
}

/* Scrollbar Utilities */
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;     /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;             /* Chrome, Safari, Opera */
}

/* Top Bar Filter Pills - Active States */
.category-pill.active-filter,
.dietary-pill.active-filter {
    border-color: #4A7C59 !important;
    background-color: #4A7C59 !important;
    color: white !important;
}

.price-pill.active-filter {
    background-color: #4A7C59 !important;
    color: white !important;
}

/* Top Bar Filter - Smooth Horizontal Scroll */
#desktop-filters .overflow-x-auto {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Smooth horizontal scroll */
#bought-before-container {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Subscriber Badge */
.subscriber-badge {
    background: linear-gradient(135deg, #4A7C59 0%, #3d6548 100%);
    animation: subtle-pulse 3s ease-in-out infinite;
}

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

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* Product Cards */
.product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border-color: #4A7C59;
}

/* Product image with white background */
.product-card img {
    background: white;
    border-radius: 8px;
    padding: 8px;
}

/* Fresh Talk Featured Product - Stands Out! */
.product-card.fresh-talk-featured {
    background: linear-gradient(180deg, #4A7C59 0%, #3d6548 100%);
    border: 3px solid #4A7C59;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(74, 124, 89, 0.3),
                0 0 0 1px rgba(74, 124, 89, 0.1);
    position: relative;
    transform: scale(1.05);
    z-index: 10;
    overflow: visible;
}

.product-card.fresh-talk-featured:hover {
    transform: scale(1.08) translateY(-4px);
    box-shadow: 0 12px 32px rgba(74, 124, 89, 0.4),
                0 0 0 2px #5d9970;
    border-color: #5d9970;
}

.product-card.fresh-talk-featured .product-title,
.product-card.fresh-talk-featured .product-description,
.product-card.fresh-talk-featured .product-price {
    color: white !important;
}

.product-card.fresh-talk-featured .fresh-talk-label {
    position: absolute;
    top: 25px;
    left: -25px;
    background: linear-gradient(135deg, #4A7C59 0%, #5d9970 100%);
    color: white;
    padding: 6px 40px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: rotate(-45deg);
    z-index: 20;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    border-bottom: 2px solid rgba(0, 0, 0, 0.2);
}

.product-card.fresh-talk-featured .fresh-talk-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-card.fresh-talk-featured img {
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Back to Top Button */
.back-to-top.visible {
    opacity: 1 !important;
    pointer-events: auto !important;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.back-to-top:hover {
    transform: translateY(-4px) !important;
}

.back-to-top:active {
    transform: translateY(-2px) !important;
}

/* Equal height cards for CTA alignment */
#products-grid > * {
    display: flex;
}

/* Sticky Header */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Floating Action Button Animations */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

/* FAB Quick Jump CSS Removed - Redundant with mobile bottom nav */

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Mobile Menu & Footer Overlap Fix */
@media (max-width: 1024px) {
    footer {
        position: relative;
        z-index: 1001 !important;
    }
    
    #mobile-menu {
        padding-bottom: 120px !important;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    footer a,
    footer button,
    footer input {
        position: relative;
        z-index: 1002 !important;
    }
}
