/* Advanced Animations */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced Page Header with Search & Filter */
.page-header {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 60px 20px 80px;
    text-align: center;
    position: relative;
    overflow: visible;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.header-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.header-search {
    flex: 1;
    min-width: 280px;
    position: relative;
}

.header-search input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.header-search input:focus {
    outline: none;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.header-search i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    pointer-events: none;
    z-index: 2;
}

.btn-filter-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-filter-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Inline Filter Panel - Compact */
.filter-panel {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-top: 1rem;
    animation: slideDown 0.2s ease-out;
    text-align: left;
    position: absolute;
    width: 100%;
    left: 0;
    z-index: 99;
    box-shadow: var(--shadow-lg);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: flex-start;
}

.filter-column {
    flex: 1;
    min-width: 200px;
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.filter-column h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.filter-header-mobile {
    display: none;
}

/* Category List Compact & 3D Chip Styling */
.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 4px 2px;
}

.checkbox-container {
    margin: 0;
    padding: 8px 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    background: #ffffff;
    color: var(--text-color);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateY(0);
    position: relative;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.checkbox-container:hover {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 5px 0 rgba(0, 0, 0, 0.08), 0 6px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.checkbox-container:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.checkbox-container input:checked+.checkmark {
    display: none;
}

/* Custom Tag Style for Categories */
.checkbox-container input:checked~span {
    color: #ffffff !important;
    font-weight: 700;
}

.checkbox-container:has(input:checked) {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-color: #047857 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 0 #047857, 0 6px 12px rgba(16, 185, 129, 0.25) !important;
}

.checkbox-container:has(input:checked):hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    box-shadow: 0 5px 0 #047857, 0 8px 16px rgba(16, 185, 129, 0.3) !important;
    transform: translateY(-1px);
}

.checkbox-container:has(input:checked):active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #047857, 0 2px 4px rgba(16, 185, 129, 0.1) !important;
}

.checkmark {
    display: none;
    /* Hide box, use pill style */
}

/* Sort Box Compact */
.sort-box-inline select {
    padding: 8px;
    font-size: 0.9rem;
}

.btn-reset-inline {
    margin-top: 10px;
    padding: 8px;
    font-size: 0.9rem;
}

/* Shop Layout - Full Width now */
.shop-layout {
    display: block;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .filter-panel {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: white;
        z-index: 2000;
        margin: 0;
        padding: 0;
        overflow-y: auto;
    }

    .filter-container {
        padding: 20px;
    }

    .filter-header-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
        padding-bottom: 15px;
        border-bottom: 1px solid #eee;
    }

    .filter-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .btn-close-filter {
        background: #f0f0f0;
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
}

/* Hide the old filter toggle if it exists */
.filter-toggle {
    display: none !important;
}

/* Remove old search box styles from sidebar */
.filter-group .search-box {
    display: none;
}

.btn-reset {
    background: transparent;
    border: none;
    color: #888;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s;
}

.btn-reset:hover {
    color: #ff6b6b;
    background: #fff0f0;
}

.btn-reset i {
    width: 14px;
    height: 14px;
}

.filter-group {
    margin-bottom: 2.5rem;
}

.filter-group h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group h3 i {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

/* Modern Search Box */
.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 14px 45px 14px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    /* Softer radius */
    font-size: 0.95rem;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.search-box input:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.1);
    outline: none;
}

.search-box::after {
    /* Icon handled via CSS mask or background image - kept from previous but adjusted position */
    right: 20px;
}

/* Modern Checkboxes */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #555;
    transition: all 0.2s;
    padding: 6px 0;
}

.checkbox-container:hover {
    color: var(--primary-color);
    transform: translateX(4px);
    background: transparent;
    /* Removed hover background block */
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 6px;
    position: relative;
    transition: all 0.2s;
    background: white;
}

.checkbox-container input:checked+.checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.checkmark::after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
}

/* Modern Range Slider */
.price-range {
    padding: 10px 5px;
}

#price-range {
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
}

#price-range::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

#price-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.price-labels {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Enhanced Shop Controls */
.shop-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    gap: 1rem;
    border: 1px solid var(--border-color);
}

#result-count {
    font-size: 1.1rem;
    color: #444;
    font-weight: 500;
}

.sort-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-box select {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: var(--bg-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 45px;
    color: var(--text-primary);
}

.sort-box select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Enhanced Product Grid */
.product-grid {
    display: grid;
    /* Desktop: 4 columns */
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    perspective: 1000px;
}

/* Medium Desktop / Tablet Landscape: 3 columns */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Tablet Portrait: 2 columns */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--space-2) !important;
        padding: var(--space-1) !important;
    }

    .product-card {
        border-radius: var(--radius-md) !important;
        box-shadow: var(--shadow-sm) !important;
    }

    .product-info {
        padding: var(--space-2) !important;
        gap: 6px !important;
    }

    .product-name {
        font-size: var(--text-sm) !important;
        min-height: 2.4em !important;
        margin-bottom: 2px !important;
        color: var(--text-main) !important;
    }

    .price {
        font-size: var(--text-base) !important;
        color: var(--primary) !important;
    }

    .original-price {
        font-size: var(--text-xs) !important;
        color: var(--text-muted) !important;
        margin-left: 4px;
    }

    .product-img-wrapper {
        height: auto !important;
        aspect-ratio: 1 / 1;
        padding: var(--space-1);
    }

    .add-to-cart-btn-premium {
        width: 30px !important;
        height: 30px !important;
        padding: 0 !important;
        border-radius: var(--radius-md) !important;
    }
    
    .add-to-cart-btn-premium svg {
        width: 16px !important;
        height: 16px !important;
    }
}

/* Mobile */
@media (max-width: 500px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--space-1) !important;
        padding: 0 !important;
    }

    .product-img-wrapper {
        aspect-ratio: 1 / 1;
        padding: var(--space-1);
    }
}

/* Modern Badge System */
.badge-group {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 15;
}

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.70rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.badge-sale {
    background: #ef4444;
    color: white;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(239,68,68,0.25);
}

.badge-best {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: white;
    box-shadow: 0 4px 10px rgba(245,158,11,0.3);
}

.badge-organic {
    background: linear-gradient(135deg, #2C6E2A, #1E4D1D);
    color: white;
    box-shadow: 0 4px 10px rgba(44,110,42,0.25);
}

.badge-new {
    background: linear-gradient(135deg, #5A1E06, #832C0A);
    color: white;
    box-shadow: 0 4px 10px rgba(90,30,6,0.25);
}

/* Dynamic Badges for JS Rendering */
.badge-fast {
    background: linear-gradient(135deg, #c2410c, #ea580c);
    color: white;
    box-shadow: 0 4px 10px rgba(194,65,12,0.25);
}
.badge-premium {
    background: linear-gradient(135deg, #5A1E06, #832C0A);
    color: white;
    box-shadow: 0 4px 10px rgba(90,30,6,0.25);
}
.badge-limited {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    color: white;
    box-shadow: 0 4px 10px rgba(185,28,28,0.3);
    animation: hmPulseBadge 2s infinite;
}
.badge-featured {
    background: linear-gradient(135deg, #D48806, #AA6819);
    color: white;
    box-shadow: 0 4px 10px rgba(212,136,6,0.25);
}
.badge-trending {
    background: linear-gradient(135deg, #f43f5e, #be123c);
    color: white;
    box-shadow: 0 4px 10px rgba(244,63,94,0.25);
}
.badge-fresh {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    box-shadow: 0 4px 10px rgba(5,150,105,0.25);
}
.badge-top-rated,
.plp-card-badge.badge-top-rated {
    background: linear-gradient(135deg, #F59E0B, #D97706) !important;
    color: #FFFFFF !important;
    display: inline-flex !important;
    align-items: center !important;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.35) !important;
    opacity: 1 !important;
    visibility: visible !important;
}
.plp-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #FFFFFF;
    z-index: 4;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.2px;
    line-height: 1.2;
}

@keyframes hmPulseBadge {
    0% { transform: scale(1); }
    50% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

/* Premium Rating Chips & Trust Info */
.hm-rating-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    flex-wrap: wrap;
}
.hm-rating-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #10b981;
    color: white;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}
.hm-rating-chip-star {
    font-size: 0.65rem;
}
.hm-reviews-count {
    font-size: 0.75rem;
    color: #888;
    font-weight: 600;
}
.hm-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: #059669;
    font-weight: 800;
    background: rgba(16, 185, 129, 0.05);
    padding: 3px 8px;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.1);
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
}
.hm-fomo-row {
    display: none !important;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.hm-fomo-urgency {
    font-size: 0.78rem;
    font-weight: 700;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 4px;
}
.hm-fomo-sales {
    font-size: 0.78rem;
    font-weight: 700;
    color: #d97706;
    display: flex;
    align-items: center;
    gap: 4px;
}
.hm-fomo-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
    animation: hmFomoPulse 1.5s infinite;
}

@keyframes hmFomoPulse {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

.out-of-stock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(2px);
}

.out-of-stock-badge {
    background: #000;
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Product Card Core - Premium */
.product-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
    will-change: transform, box-shadow;
}

/* Hover Effects */
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Subtle Image Zoom on Hover */
.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-weight-tag {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #F39C12;
    font-weight: 600;
    margin-bottom: 4px;
    /* 8px grid spacing logic */
}

/* ── Wishlist Heart Animation Keyframes ────────────────────────── */
@keyframes wl-pop {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.55); }
    55%  { transform: scale(0.85); }
    75%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes wl-shrink {
    0%   { transform: scale(1); opacity: 1; }
    40%  { transform: scale(0.6); opacity: 0.6; }
    70%  { transform: scale(1.1); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

/* Wishlist Button in Card - Top Right Minimal */
.wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}

.wishlist-btn:hover {
    transform: scale(1.05);
    color: #ef4444;
    border-color: #ef4444;
}

.wishlist-btn.active {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

.wishlist-btn i {
    width: 16px;
    height: 16px;
}

.wishlist-btn:active i {
    transform: scale(1.2);
}

/* Ensure heart SVG fill is correct on state changes */
.wishlist-btn:not(.active) svg {
    fill: none;
    stroke: currentColor;
    transition: fill 0.2s ease, stroke 0.2s ease;
}

.wishlist-btn.active svg {
    fill: #fff;
    stroke: #fff;
    transition: fill 0.2s ease, stroke 0.2s ease;
}

/* Wishlist animations shared */
.wishlist-btn.wl-anim-add {
    animation: wl-pop 0.42s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.wishlist-btn.wl-anim-remove {
    animation: wl-shrink 0.38s ease-in-out forwards;
}

.product-info {
    padding: 16px;
    /* 8px grid (2*8) */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* 8px grid */
}

.product-cat-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.product-name {
    font-size: 1.15rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--primary-color);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
    margin: 0;
    transition: color 0.2s ease;
}

.product-card:hover .product-name {
    color: #10b981;
}

.product-price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.price {
    font-size: 1.15rem;
    font-weight: 800;
    color: #10b981 !important;
}

.original-price {
    font-size: 0.85rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.product-card-cta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    gap: 8px;
}

.add-to-cart-btn-premium {
    width: auto !important;
    height: 36px !important;
    padding: 0 16px !important;
    border-radius: 20px !important;
    background: #10b981 !important;
    color: white !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-weight: 800 !important;
    font-size: 0.8rem !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15) !important;
}

.add-to-cart-btn-premium svg,
.add-to-cart-btn-premium i {
    width: 15px !important;
    height: 15px !important;
}

.add-to-cart-btn-premium:hover {
    background: #059669 !important;
    transform: translateY(-2px) scale(1.03) !important;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35) !important;
}

.add-to-cart-btn-premium:active {
    transform: translateY(0) !important;
}

/* Optional Quick Actions Overlay on Hover for Desktop */
.quick-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 50%);
    opacity: 0;
    display: flex;
    gap: 12px;
    z-index: 20;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (min-width: 1024px) {
    .product-card:hover .quick-actions {
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    .product-card:hover .product-img-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.4);
        pointer-events: none;
        z-index: 15;
    }
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--primary-color);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.add-to-cart-btn-premium:hover:not(:disabled) {
    background: var(--primary-light);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 20px rgba(90, 30, 6, 0.25);
    letter-spacing: 0.8px;
}

.add-to-cart-btn-premium:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
}

.add-to-cart-btn-premium i {
    width: 16px;
    height: 16px;
}


.product-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1;
}

.product-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-organic {
    background: rgba(232, 245, 233, 0.9);
    color: #2E7D32;
    backdrop-filter: blur(5px);
}

.badge-new {
    background: rgba(255, 243, 224, 0.9);
    color: #ef6c00;
    backdrop-filter: blur(5px);
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-name {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.4;
    min-height: 55px;
}

.product-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-weight {
    font-size: 0.9rem;
    color: #888;
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 15px;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-top: 20px;
}

.btn-quick-view {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-quick-view:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-secondary);
    transform: translateY(-2px);
}

/* Mobile Filter Toggle */
.filter-toggle {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: linear-gradient(135deg, var(--primary-color), #4CAF50);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    display: none;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}

.filter-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(76, 175, 80, 0.4);
}

@media (max-width: 1024px) {
    .filter-toggle {
        display: flex;
    }
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.view-btn {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-secondary);
}

.view-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Grid view vs List view */
.product-grid.list-view {
    grid-template-columns: 1fr;
}

.product-grid.list-view .product-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    height: 200px;
}

.product-grid.list-view .product-image {
    height: 100%;
}

@media (max-width: 768px) {
    .product-grid.list-view .product-card {
        grid-template-columns: 1fr;
        height: auto;
    }
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 20px;
}

/* ── Premium 3D Pagination ──────────────────────────────────────── */

/* Container that holds the whole pagination card */
#pagination-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

/* Base button */
.p-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1.5px solid var(--border, #e5e7eb);
    background: var(--bg-card, #fff);
    color: var(--text-primary, #1a1a1a);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(.4, 0, .2, 1);
    position: relative;
    box-shadow: 0 2px 8px -2px rgba(0,0,0,0.07),
                inset 0 -3px 0 rgba(0,0,0,0.07);
    text-decoration: none;
    user-select: none;
    letter-spacing: 0.02em;
}

.p-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.p-btn:hover:not([disabled]) {
    background: linear-gradient(135deg, var(--primary-color, #2d6a4f) 0%, #1a4535 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 24px -6px rgba(45, 106, 79, 0.42),
                0 4px 8px -2px rgba(45, 106, 79, 0.28),
                inset 0 -3px 0 rgba(0,0,0,0.15);
}

/* Active (current page) */
.p-btn.active {
    background: linear-gradient(135deg, var(--primary-color, #2d6a4f) 0%, #1a4535 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 20px -4px rgba(45, 106, 79, 0.48),
                0 3px 8px -2px rgba(45, 106, 79, 0.3),
                inset 0 -4px 0 rgba(0,0,0,0.18);
    transform: translateY(-1px);
    pointer-events: none;
    cursor: default;
}

.p-btn.active::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 11px;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 100%);
}

/* Prev / Next nav buttons */
.p-btn.p-nav {
    min-width: 90px;
    padding: 0 16px;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 50px;
    background: var(--bg-card, #fff);
    color: var(--primary-color, #2d6a4f);
    border: 1.5px solid rgba(45, 106, 79, 0.3);
    box-shadow: 0 3px 10px -3px rgba(45, 106, 79, 0.15),
                inset 0 -3px 0 rgba(45, 106, 79, 0.1);
}

.p-btn.p-nav:hover:not([disabled]) {
    background: linear-gradient(135deg, var(--primary-color, #2d6a4f) 0%, #1a4535 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -8px rgba(45, 106, 79, 0.45),
                inset 0 -4px 0 rgba(0,0,0,0.18);
}

/* Disabled state */
.p-btn[disabled] {
    opacity: 0.38;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    transform: none;
}

/* Ellipsis dots */
.p-dots {
    min-width: 36px;
    height: 44px;
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
    color: var(--text-secondary, #888);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 2px;
    pointer-events: none;
    user-select: none;
}

/* Pagination wrapper card */
.pagination-wrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px 28px;
    background: var(--bg-card, #fff);
    border: 1.5px solid var(--border, #e5e7eb);
    border-radius: 20px;
    box-shadow: 0 4px 20px -6px rgba(0,0,0,0.08),
                inset 0 -4px 0 rgba(0,0,0,0.05);
    max-width: 100%;
}

.pagination-info {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary, #888);
    letter-spacing: 0.03em;
}

.pagination-info strong {
    color: var(--primary-color, #2d6a4f);
}

/* Dark mode */
body.dark-mode .p-btn {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    color: #e5e7eb;
    box-shadow: 0 2px 8px -2px rgba(0,0,0,0.3),
                inset 0 -3px 0 rgba(0,0,0,0.3);
}

body.dark-mode .p-btn.p-nav {
    background: rgba(255,255,255,0.06);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
    box-shadow: 0 3px 10px -3px rgba(16, 185, 129, 0.15),
                inset 0 -3px 0 rgba(0,0,0,0.2);
}

body.dark-mode .p-btn:hover:not([disabled]) {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 10px 24px -6px rgba(16, 185, 129, 0.5),
                inset 0 -3px 0 rgba(0,0,0,0.2);
}

body.dark-mode .p-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 8px 20px -4px rgba(16, 185, 129, 0.55),
                inset 0 -4px 0 rgba(0,0,0,0.2);
}

body.dark-mode .pagination-wrapper {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 4px 20px -6px rgba(0,0,0,0.4);
}

/* Mobile */
@media (max-width: 600px) {
    #pagination-container {
        padding: 0 12px;
    }
    .pagination {
        gap: 4px;
    }
    .p-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.82rem;
        border-radius: 10px;
    }
    .p-btn.p-nav {
        min-width: auto;
        padding: 0 10px;
        font-size: 0.78rem;
        border-radius: 50px;
    }
    .pagination-wrapper {
        padding: 14px 12px;
        border-radius: 16px;
        width: 100%;
    }
    .pagination-info {
        font-size: 0.78rem;
    }
}

/* Quick View Modal */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    opacity: 0;
}

.quick-view-content {
    background: white;
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
}

/* No Results */
.no-results {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 20px;
}

.no-results i {
    width: 80px;
    height: 80px;
    color: #ccc;
    margin-bottom: 20px;
}

/* Category Filter Chips */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-chip {
    padding: 8px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-chip.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Floating Cart Button (Hidden on mobile <768px as bottom nav includes Cart) */
.cart-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #4CAF50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.3);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
}

@media (max-width: 767.98px) {
    .cart-fab {
        display: none !important;
    }
}

.cart-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 30px rgba(76, 175, 80, 0.4);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff6b6b;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    cursor: pointer;
    z-index: 998;
    transition: all 0.3s ease;
    opacity: 0;
}

.back-to-top:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-5px);
}

/* Filter Chips Rendering */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 2rem;
    align-items: center;
    min-height: 40px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInScale 0.3s ease-out;
}

.filter-chip:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.filter-chip span {
    color: var(--text-primary);
}

.filter-chip button {
    background: #f1f5f9;
    border: none;
    color: #64748b;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.filter-chip button:hover {
    background: #ef4444;
    color: white;
}

.btn-clear-all {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 50px;
    transition: all 0.2s;
}

.btn-clear-all:hover {
    background: rgba(239, 68, 68, 0.1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Dark Mode Visibility Fixes for Chips */
[data-theme="dark"] .filter-chip,
body.dark-mode .filter-chip {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .filter-chip button,
body.dark-mode .filter-chip button {
    background: #3a3a3a;
    color: #94a3b8;
}

[data-theme="dark"] .filter-chip button:hover,
body.dark-mode .filter-chip button:hover {
    background: #ef4444;
    color: white;
}

/* Selected Filter Pills in Panel High Contrast */
.checkbox-container:has(input:checked) {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.checkbox-container input:checked~span {
    color: white !important;
    font-weight: 700 !important;
}

[data-theme="dark"] .checkbox-container:has(input:checked),
body.dark-mode .checkbox-container:has(input:checked) {
    background: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
}

[data-theme="dark"] .checkbox-container input:checked~span,
body.dark-mode .checkbox-container input:checked~span {
    color: black !important;
}