/**
 * Shop page — layout, header, hero, filters, grid
 * Scoped with body.shop-page; loads after style.css
 */

/* ---- Page shell ---- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body.shop-page {
    overflow-x: hidden;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.shop-page .shop-main {
    flex: 1 0 auto;
}

body.shop-page .footer {
    flex-shrink: 0;
}

body.shop-page .header .container-fluid {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    overflow: visible;
}

/* ---- Fixed header ---- */
body.shop-page .header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99999;
    height: 80px;
}

body.shop-page .header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    padding: 0 20px;
    max-width: 1400px;
    margin: 0 auto;
}

body.shop-page .header__logo a img {
    height: 50px;
    width: auto;
    max-width: none;
}

body.shop-page .shop-main {
    padding-top: 0;
    background: #fff;
}

/* ---- Shop hero (shared ep-about-hero layout + brand overlay) ----
   NOTE: ep-pages.css loads AFTER this file and sets `center 30%` +
   scale(1.02) on .ep-about-hero__bg, which crops the model's head.
   Use higher specificity so these shop rules always win. */
body.ep-store.shop-page .ep-about-hero {
    min-height: clamp(420px, 56vh, 600px);
    overflow: hidden;
}

body.ep-store.shop-page .ep-about-hero__bg {
    background-size: cover;
    background-position: center top !important;
    background-repeat: no-repeat;
    transform: none !important;
}

body.shop-page .ep-about-hero__overlay {
    background: linear-gradient(
        135deg,
        rgba(53, 100, 79, 0.88) 0%,
        rgba(20, 20, 20, 0.72) 52%,
        rgba(20, 20, 20, 0.55) 100%
    );
}

body.shop-page .ep-about-hero__content {
    max-width: 720px;
}

body.shop-page .ep-about-hero__title {
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

body.shop-page .ep-about-hero__lead {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Shop layout (desktop: 2-col grid, mobile: single col) ---- */
body.shop-page .shop-products-section {
    padding: 40px 0;
}

body.shop-page .shop-products-section .container {
    max-width: 1400px;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    overflow: visible !important;
}

body.shop-page .shop-products-section,
body.shop-page .shop-main {
    overflow: visible !important;
}

body.shop-page .shop-layout {
    display: grid !important;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: start !important;
    width: 100%;
    padding-top: 30px;
    overflow: visible !important;
}

body.shop-page .products-content.shop-products {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
}

/* ---- Desktop filter sidebar (≥992px) ---- */
@media (min-width: 992px) {

    /* Sidebar shell — stays in grid column; inner panel sticks while scrolling */
    body.shop-page .shop-layout > aside.filter-sidebar {
        display: block !important;
        width: 300px !important;
        min-width: 300px !important;
        max-width: 300px !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        overflow: visible !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        align-self: start !important;
        z-index: 20;
    }

    body.shop-page .filter-sidebar__static {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        width: 100%;
        position: -webkit-sticky;
        position: sticky !important;
        top: 24px !important;
        max-height: none !important;
        overflow: visible !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        background: #ffffff;
        border-radius: 16px;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
        border: 1px solid rgba(212, 175, 55, 0.1);
        padding: 16px;
        box-sizing: border-box;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    body.shop-page .filter-sidebar__static::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    /* Prevent flex children from shrinking (fixes clipped Size section) */
    body.shop-page .filter-sidebar__static > * {
        flex: 0 0 auto !important;
        flex-shrink: 0 !important;
        min-height: auto !important;
    }

    body.shop-page .filter-sidebar .filter-drawer-card,
    body.shop-page .filter-sidebar .filter-drawer-card-body,
    body.shop-page .filter-sidebar .ep-lux-price-filter,
    body.shop-page .filter-sidebar .ep-lux-price-body,
    body.shop-page .filter-sidebar .desktop-filter-actions {
        overflow: visible !important;
        width: 100%;
    }

    /* Filter header — dark gradient bar */
    body.shop-page .filter-sidebar__static > .filter-header {
        margin: 0;
        border-radius: 12px;
    }

    /* Hide mobile-only elements */
    body.shop-page .filter-sidebar .filter-close {
        display: none !important;
    }
    body.shop-page .filter-sidebar .mobile-filter-actions {
        display: none !important;
    }
    body.shop-page .mobile-filter-toggle,
    body.shop-page .filter-drawer,
    body.shop-page .filter-overlay#filterOverlay {
        display: none !important;
    }

    /* Desktop action buttons */
    body.shop-page .filter-sidebar .desktop-filter-actions {
        display: flex;
        gap: 10px;
        padding: 4px 0 0;
    }
    body.shop-page .filter-sidebar .desktop-filter-actions .reset-filters-btn,
    body.shop-page .filter-sidebar .desktop-filter-actions .apply-filters-btn {
        flex: 1;
        padding: 12px 16px;
        border-radius: 10px;
        font-size: 0.85rem;
    }

    /* Drawer-style cards inside sidebar */
    body.shop-page .filter-sidebar .filter-drawer-card {
        margin-bottom: 0;
    }
    body.shop-page .filter-sidebar .filter-drawer-card-header {
        padding: 12px 14px;
    }
    body.shop-page .filter-sidebar .filter-drawer-card-title {
        font-size: 0.78rem;
    }
    body.shop-page .filter-sidebar .filter-drawer-card-body {
        padding: 10px 14px 12px;
    }

    body.shop-page .filter-sidebar .filter-category-item {
        padding: 10px 0;
    }
    body.shop-page .filter-sidebar .filter-category-text {
        font-size: 0.82rem;
    }
    body.shop-page .filter-sidebar .filter-category-count {
        font-size: 0.72rem;
    }
    body.shop-page .filter-sidebar .filter-category-radio {
        width: 16px;
        height: 16px;
    }

    body.shop-page .filter-sidebar .filter-size-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
    body.shop-page .filter-sidebar .filter-size-btn {
        padding: 10px 8px;
        font-size: 0.75rem;
        min-height: 40px;
    }

    /* Luxury price filter card */
    body.shop-page .filter-sidebar .ep-lux-price-filter {
        background: #fafafa;
        border-radius: 12px;
        border: 1px solid #eee;
        overflow: visible;
        margin-bottom: 0;
    }
    body.shop-page .filter-sidebar .ep-lux-price-header {
        padding: 12px 14px;
        background: #f5f5f5;
    }
    body.shop-page .filter-sidebar .ep-lux-price-body {
        padding: 14px;
    }
    body.shop-page .filter-sidebar .ep-lux-selected-range {
        font-size: 13px;
        padding: 8px;
        margin-bottom: 12px;
    }
    body.shop-page .filter-sidebar .ep-lux-price-chips {
        gap: 5px;
        margin-bottom: 12px;
    }
    body.shop-page .filter-sidebar .ep-lux-chip {
        font-size: 11px;
        padding: 5px 10px;
    }
    body.shop-page .filter-sidebar .ep-lux-apply-btn {
        padding: 10px 14px;
        font-size: 12px;
    }

    body.shop-page .filter-sidebar .filter-size-grid {
        min-height: auto;
    }

    body.shop-page .filter-sidebar .desktop-filter-actions {
        display: flex !important;
        flex-direction: row;
        margin-top: 4px;
        padding-top: 8px;
        border-top: 1px solid #eee;
    }
}

/* Mobile filter toggle — hidden on desktop by default */
body.shop-page .mobile-filter-toggle {
    display: none;
}

body.shop-page .shop-mobile-bar {
    display: contents;
}

/* ---- Mobile (<992px): single column, sidebar hidden, toggle shown ---- */
@media (max-width: 991px) {

    body.ep-store.shop-page .ep-about-hero {
        min-height: clamp(300px, 42vh, 420px);
    }

    body.ep-store.shop-page .ep-about-hero__bg {
        background-position: center top !important;
    }

    body.shop-page .shop-layout {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 20px;
        padding: 20px 0 0;
        width: 100%;
        min-height: 0;
    }

    body.shop-page .shop-layout > aside.filter-sidebar {
        display: none !important;
        position: absolute !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    body.shop-page .shop-layout > .products-content,
    body.shop-page .shop-layout > .shop-products {
        grid-column: 1 / -1;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    body.shop-page #productsGrid.is-single-result {
        grid-template-columns: minmax(0, 1fr) !important;
        max-width: min(440px, 100%);
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }

    body.shop-page #productsGrid.is-single-result > .product-card {
        width: 100%;
        max-width: 100%;
    }

    body.shop-page .shop-mobile-bar {
        display: flex;
        align-items: stretch;
        gap: 10px;
        position: sticky;
        top: 0;
        z-index: 500;
        background: #fff;
        padding: 12px 0 16px;
        margin-bottom: 4px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    body.shop-page .mobile-filter-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex: 1;
        min-width: 0;
        padding: 12px 16px;
        margin: 0;
        background: var(--ep-brand-green, #35644f);
        color: #fff;
        border: none;
        border-radius: 10px;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 4px 14px rgba(53, 100, 79, 0.28);
        transition: background 0.2s ease, transform 0.2s ease;
    }

    body.shop-page .mobile-filter-toggle:hover,
    body.shop-page .mobile-filter-toggle:focus-visible {
        background: #2a503d;
        outline: none;
    }

    body.shop-page .mobile-filter-toggle i {
        color: var(--ep-gold-light, #e8d5a3);
        font-size: 1rem;
    }

    body.shop-page .shop-mobile-bar .shop-toolbar {
        flex: 1;
        min-width: 0;
        margin-bottom: 0;
        justify-content: flex-end;
    }

    body.shop-page .shop-mobile-bar .sort-dropdown {
        width: 100%;
    }

    body.shop-page .shop-mobile-bar .sort-dropdown select {
        width: 100%;
        min-height: 48px;
        padding: 10px 12px;
        border-radius: 10px;
        border: 1px solid #ddd;
        font-size: 0.875rem;
        background: #fff;
    }

    /* Mobile filter drawer slides in from left */
    body.shop-page .filter-drawer {
        display: flex !important;
    }
}

@media (max-width: 576px) {
    body.ep-store.shop-page .ep-about-hero {
        min-height: clamp(280px, 40vh, 360px);
    }
}

/* ---- Filter overlay & drawer (mobile) ---- */
body.shop-page .filter-overlay#filterOverlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10040;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.shop-page .filter-overlay#filterOverlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.shop-page .filter-drawer {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: min(380px, 92vw);
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    background: #fff;
    z-index: 10050;
    overflow: hidden;
    transform: translateX(-105%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s ease, visibility 0.3s ease;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

body.shop-page .filter-drawer.active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

body.shop-page.shop-filter-open {
    overflow: hidden;
}

body.shop-page .filter-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    flex-shrink: 0;
}

body.shop-page .filter-drawer-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

body.shop-page .filter-drawer-title i {
    color: #d4af37;
    font-size: 1rem;
}

body.shop-page .filter-drawer-title h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
}

body.shop-page .filter-drawer-close {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #d4af37;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

body.shop-page .filter-drawer-close:hover {
    background: rgba(212, 175, 55, 0.2);
    color: #fff;
}

body.shop-page .filter-drawer-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}

body.shop-page .filter-drawer-card {
    background: #fafafa;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid #eee;
}

body.shop-page .filter-drawer-card-header {
    padding: 14px 16px;
    background: #f5f5f5;
    border-bottom: 1px solid #eee;
}

body.shop-page .filter-drawer-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1a1a1a;
}

body.shop-page .filter-drawer-card-title i {
    color: #d4af37;
}

body.shop-page .filter-drawer-card-body {
    padding: 14px 16px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

body.shop-page .filter-category-item,
body.shop-page .filter-size-btn,
body.shop-page .ep-lux-chip,
body.shop-page .filter-sidebar .reset-filters-btn,
body.shop-page .filter-sidebar .apply-filters-btn,
body.shop-page .ep-lux-apply-btn,
body.shop-page .filter-reset-btn,
body.shop-page .filter-apply-btn {
    cursor: pointer;
}

body.shop-page .filter-category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

body.shop-page .filter-category-item:last-child {
    border-bottom: none;
}

body.shop-page .filter-category-item input {
    display: none;
}

body.shop-page .filter-category-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.shop-page .filter-category-radio {
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    flex-shrink: 0;
}

body.shop-page .filter-category-item.active .filter-category-radio {
    border-color: #d4af37;
    background: radial-gradient(circle, #d4af37 40%, transparent 42%);
}

body.shop-page .filter-size-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}

body.shop-page .filter-size-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: 100%;
    padding: 10px 8px;
    text-align: center;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #fff;
    color: #1a1a1a;
    cursor: pointer;
    white-space: normal;
    line-height: 1.25;
    word-break: keep-all;
    overflow-wrap: anywhere;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

body.shop-page .filter-size-btn.active {
    border-color: #d4af37;
    background: #d4af37;
    color: #1a1a1a;
}

/* Luxury price filter (moved from legacy style.css) */
body.shop-page .ep-lux-price-filter {
    background: linear-gradient(135deg, #ffffff, #faf9f6);
    border: 1px solid #f0e6d2;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.08);
    margin-bottom: 16px;
}

body.shop-page .ep-lux-price-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid #f5e6d0;
    background: linear-gradient(135deg, #fefaf0, #ffffff);
}

body.shop-page .ep-lux-rupee-icon {
    color: #d4af37;
    font-size: 18px;
    font-weight: 700;
}

body.shop-page .ep-lux-price-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: #2c2c2c;
    margin: 0;
    letter-spacing: 0.5px;
}

body.shop-page .ep-lux-price-body {
    padding: 20px;
}

body.shop-page .ep-lux-selected-range {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #d4af37;
    margin-bottom: 20px;
    padding: 12px;
    background: linear-gradient(135deg, #fefaf0, #ffffff);
    border-radius: 12px;
    border: 1px solid #f0e6d2;
}

body.shop-page .ep-lux-slider-wrap {
    position: relative;
    height: 32px;
    margin: 16px 0 24px;
}

body.shop-page .ep-lux-slider-wrap input[type='range'] {
    position: absolute;
    width: 100%;
    height: 4px;
    top: 14px;
    left: 0;
    background: transparent !important;
    pointer-events: none;
    appearance: none;
    -webkit-appearance: none;
    z-index: 2;
    margin: 0;
}

body.shop-page .ep-lux-slider-track {
    position: absolute;
    top: 14px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #f0e6d2, #d4af37, #f0e6d2);
    border-radius: 50px;
    z-index: 1;
}

body.shop-page .ep-lux-slider-wrap input[type='range']::-webkit-slider-thumb {
    pointer-events: auto;
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #d4af37;
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    cursor: pointer;
}

body.shop-page .ep-lux-slider-wrap input[type='range']::-moz-range-thumb {
    pointer-events: auto;
    width: 18px;
    height: 18px;
    background: #d4af37;
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    cursor: pointer;
}

body.shop-page .ep-lux-price-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

body.shop-page .ep-lux-chip {
    background: #ffffff;
    border: 1px solid #f0e6d2;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

body.shop-page .ep-lux-chip:hover {
    background: #fefaf0;
    border-color: #d4af37;
    color: #d4af37;
}

body.shop-page .ep-lux-apply-btn {
    width: 100%;
    border: none;
    background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-transform: uppercase;
}

body.shop-page .ep-lux-apply-btn:hover {
    background: linear-gradient(135deg, #d4af37, #b8941f);
}

body.shop-page .ep-loading {
    color: #888;
    font-size: 0.875rem;
    margin: 0;
    padding: 8px 0;
}

body.shop-page .ep-lux-chip.active {
    background: linear-gradient(135deg, #d4af37 0%, #b8952e 100%);
    border-color: #b8952e;
    color: #fff;
    box-shadow: 0 4px 14px rgba(184, 149, 46, 0.28);
}

body.shop-page #productsGrid.is-single-result {
    grid-template-columns: minmax(280px, 380px) !important;
    justify-content: start;
    justify-items: stretch;
    width: 100%;
    max-width: 100%;
}

body.shop-page #productsGrid.is-single-result > .product-card {
    width: 100%;
    max-width: 380px;
    min-width: 280px;
}

body.shop-page .shop-filter-empty {
    width: 100%;
    margin: 24px 0 0;
    padding: 28px 20px;
    text-align: center;
    color: #6d6d6d;
    background: #f7f4ef;
    border: 1px dashed #e5e0d6;
    border-radius: 12px;
    font-size: 0.9375rem;
}

body.shop-page .filter-drawer-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

body.shop-page .filter-reset-btn {
    flex: 1;
    padding: 14px;
    background: #f5f5f5;
    color: #333;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

body.shop-page .filter-apply-btn {
    flex: 2;
    padding: 14px;
    background: #d4af37;
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

body.shop-page .mobile-price-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

body.shop-page .price-slider-container {
    position: relative;
    height: 40px;
    margin: 10px 0;
    width: 100%;
    box-sizing: border-box;
}

/* ---- Toolbar & product grid ---- */
body.shop-page .shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    width: 100%;
}

/* Filter script — must override product-cards-premium display:flex !important */
body.shop-page #productsGrid > .product-card.is-filter-hidden,
body.shop-page #productsGrid.products-grid > .product-card.is-filter-hidden,
body.shop-page #productsGrid .product-card.is-filter-hidden[hidden] {
    display: none !important;
    visibility: hidden !important;
}

/* Ensure filter panel receives clicks */
body.shop-page .filter-sidebar,
body.shop-page .filter-sidebar__static,
body.shop-page .filter-sidebar label,
body.shop-page .filter-sidebar button,
body.shop-page .filter-sidebar input {
    pointer-events: auto !important;
}

body.shop-page #productsGrid.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    align-items: stretch;
}

/* Hide any malformed nodes that escaped <article> (broken markup safety) */
body.shop-page #productsGrid > :not(.product-card) {
    display: none;
}

/* ===== Product cards (shop grid) ===== */
body.shop-page #productsGrid > .product-card {
    display: flex;
    flex-direction: column;
    height: auto;
    min-width: 0;
    background: #fff;
    border-radius: 16px;
    overflow: visible;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.shop-page #productsGrid .product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(26, 26, 26, 0.12);
}

/* Image */
body.shop-page #productsGrid .product-card__image {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 3 / 4;
    min-height: 260px;
    overflow: hidden;
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
}

body.shop-page #productsGrid .product-card__image > a {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
}

body.shop-page #productsGrid .product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

body.shop-page #productsGrid .product-card:hover .product-card__image img {
    transform: scale(1.05);
}

/* Badges (direct children of image, not __badges wrapper) */
body.shop-page #productsGrid .product-card__image .badge-new,
body.shop-page #productsGrid .product-card__image .badge-sale,
body.shop-page #productsGrid .product-card__image .badge-trending {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 4;
    margin: 0;
    pointer-events: none;
}

/* Quick view overlay */
body.shop-page #productsGrid .product-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 12px;
    background: transparent;
    opacity: 1;
    pointer-events: none;
    z-index: 3;
    transition: background 0.3s ease;
}

body.shop-page #productsGrid .product-card:hover .product-card__overlay {
    background: rgba(26, 26, 26, 0.2);
}

body.shop-page #productsGrid .product-card__quick-view {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    opacity: 0;
    transform: scale(0.9);
    pointer-events: auto;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

body.shop-page #productsGrid .product-card:hover .product-card__quick-view {
    opacity: 1;
    transform: scale(1);
}

body.shop-page #productsGrid .product-card__quick-view:hover {
    background: #d4af37;
    color: #1a1a1a;
    transform: scale(1.05);
}

/* Card body */
body.shop-page #productsGrid .product-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 16px 16px 18px;
    gap: 0;
    background: #fff;
    overflow: visible;
    min-width: 0;
}

body.shop-page #productsGrid .product-card__brand {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #d4af37;
    margin: 0 0 6px;
}

body.shop-page #productsGrid .product-card__body h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    color: #1a1a1a;
    margin: 0 0 10px;
    display: block;
    overflow: visible;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    min-height: auto;
    min-width: 0;
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

body.shop-page #productsGrid .product-card__body h3 a {
    display: inline;
    white-space: normal;
    overflow: visible;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

body.shop-page #productsGrid .product-card__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0 0 4px;
}

body.shop-page #productsGrid .price-current {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* Action buttons */
body.shop-page #productsGrid .shop-card-actions {
    margin-top: auto;
    padding-top: 14px;
    width: 100%;
}

body.shop-page #productsGrid .shop-card-actions .product-buttons {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
}

body.shop-page #productsGrid .shop-card-actions .view-btn,
body.shop-page #productsGrid .shop-card-actions .add-btn,
body.shop-page #productsGrid .shop-card-actions .order-btn,
body.shop-page #productsGrid .shop-card-actions .whatsapp-btn,
body.shop-page #productsGrid .shop-card-actions .product-card__quick-add {
    position: static;
    transform: none;
    opacity: 1;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 12px 16px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    box-sizing: border-box;
    transform: none;
    opacity: 1;
    flex: none;
    max-width: none;
}

body.shop-page #productsGrid .product-card:hover .shop-card-actions,
body.shop-page #productsGrid .product-card:hover .shop-card-actions .view-btn,
body.shop-page #productsGrid .product-card:hover .shop-card-actions .add-btn,
body.shop-page #productsGrid .product-card:hover .shop-card-actions .order-btn,
body.shop-page #productsGrid .product-card:hover .shop-card-actions .whatsapp-btn,
body.shop-page #productsGrid .product-card:hover .shop-card-actions .product-card__quick-add {
    transform: none;
}

body.shop-page #productsGrid .shop-card-actions .view-btn {
    background: #142b52;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(20, 43, 82, 0.2);
}

body.shop-page #productsGrid .shop-card-actions .view-btn:hover {
    background: #0d6efd;
    color: #fff;
    transform: none;
}

body.shop-page #productsGrid .shop-card-actions .product-card__quick-add,
body.shop-page #productsGrid .shop-card-actions .add-btn {
    background: #fff;
    color: #111;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
}

body.shop-page #productsGrid .shop-card-actions .product-card__quick-add:hover,
body.shop-page #productsGrid .shop-card-actions .add-btn:hover {
    background: #f5f5f5;
    border-color: #d4af37;
    color: #111;
    transform: none;
}

body.shop-page #productsGrid .shop-card-actions .order-btn,
body.shop-page #productsGrid .shop-card-actions .whatsapp-btn {
    background: #25d366;
    color: #000;
    border: none;
    text-decoration: none;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.25);
}

body.shop-page #productsGrid .shop-card-actions .order-btn i,
body.shop-page #productsGrid .shop-card-actions .whatsapp-btn i {
    color: #000;
    font-size: 1.1rem;
}

body.shop-page #productsGrid .shop-card-actions .order-btn:hover,
body.shop-page #productsGrid .shop-card-actions .whatsapp-btn:hover {
    background: #20bd5a;
    color: #000;
    transform: none;
}

body.shop-page .shop-products__actions {
    text-align: center;
    margin-top: 40px;
    padding-bottom: 12px;
    width: 100%;
}

body.shop-page .shop-products__actions[hidden] {
    display: none !important;
}

body.shop-page .ep-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 240px;
    padding: 14px 40px;
    background: transparent;
    border: 2px solid var(--ep-black, #141414);
    border-radius: 999px;
    font-family: var(--ep-font-body, 'Poppins', sans-serif);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ep-black, #141414);
    cursor: pointer;
    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

body.shop-page .ep-load-more:hover {
    background: var(--ep-black, #141414);
    color: #fff;
    border-color: var(--ep-black, #141414);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(20, 20, 20, 0.18);
}

body.shop-page .ep-load-more .fa {
    font-size: 0.75rem;
    transition: transform 0.25s ease;
}

body.shop-page .ep-load-more:hover .fa {
    transform: translateY(2px);
}

/* ---- Product grid breakpoints ---- */
@media (max-width: 1199px) {
    body.shop-page #productsGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 767px) {
    body.shop-page #productsGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    body.shop-page #productsGrid .product-card__body {
        padding: 12px;
    }

    body.shop-page #productsGrid .product-card__body h3 {
        font-size: 0.85rem;
        min-height: 2.4em;
    }

    body.shop-page #productsGrid .price-current {
        font-size: 1rem;
    }

    body.shop-page #productsGrid .shop-card-actions .view-btn,
    body.shop-page #productsGrid .shop-card-actions .add-btn,
    body.shop-page #productsGrid .shop-card-actions .order-btn,
    body.shop-page #productsGrid .shop-card-actions .whatsapp-btn,
    body.shop-page #productsGrid .shop-card-actions .product-card__quick-add {
        min-height: 44px;
        font-size: 0.78rem;
        padding: 10px 12px;
    }

    body.shop-page #productsGrid .product-card__image .badge-new,
    body.shop-page #productsGrid .product-card__image .badge-sale,
    body.shop-page #productsGrid .product-card__image .badge-trending {
        top: 8px;
        left: 8px;
        font-size: 0.6rem;
        padding: 4px 8px;
    }

    body.shop-page .sort-dropdown label {
        display: none;
    }
}

@media (max-width: 575px) {
    body.shop-page #productsGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    body.shop-page #productsGrid .shop-card-actions .view-btn,
    body.shop-page #productsGrid .shop-card-actions .add-btn,
    body.shop-page #productsGrid .shop-card-actions .order-btn,
    body.shop-page #productsGrid .shop-card-actions .whatsapp-btn,
    body.shop-page #productsGrid .shop-card-actions .product-card__quick-add {
        font-size: 0.82rem;
    }
}

/* ---- Quick-add popup ---- */
/* —— Quick view modal (hidden until opened) —— */
body.shop-page .quick-view-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10060;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

body.shop-page .quick-view-modal.show {
    display: flex !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.shop-page .quick-view-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

body.shop-page .quick-view-content {
    position: relative;
    z-index: 2;
    background: #fff;
    border-radius: 16px;
    max-width: 720px;
    width: 92%;
    max-height: 88vh;
    overflow: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
}

body.shop-page .quick-view-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f5f5f5;
    color: #666;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
}

body.shop-page .quick-add-popup.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

body.shop-page .quick-add-popup-content {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 20px;
    max-width: 400px;
    width: calc(100% - 40px);
}

body.shop-page .quick-add-popup.show .quick-add-popup-content {
    transform: none;
    opacity: 1;
}

/* ---- Footer mobile ---- */
@media (max-width: 768px) {
    body.shop-page .footer__about {
        margin-bottom: 30px;
        text-align: center;
    }

    body.shop-page .footer__logo {
        display: flex;
        justify-content: center;
    }

    body.shop-page .footer__social {
        justify-content: center;
    }

    body.shop-page .footer .row {
        margin-left: -15px;
        margin-right: -15px;
    }
}
