/* ==========================================================================
   MLB LOYAL FAN v3.0.0 — SHOP PAGE
   Archive layout, shop header, sidebar filters, toolbar, product cards,
   pagination, empty state
   ========================================================================== */

/* ==========================================================================
   1. SHOP HEADER BANNER
   ========================================================================== */
.mlb-v3-shop-header {
    position: relative;
    background: linear-gradient(135deg, var(--mlb-navy) 0%, var(--mlb-navy-light) 70%, var(--mlb-navy-dark) 100%);
    color: #fff;
    padding: 64px 0 120px;
    overflow: hidden;
    isolation: isolate;
}
.mlb-v3-shop-header-bg {
    position: absolute; inset: 0;
    z-index: -1;
}
.mlb-v3-shop-header-pattern {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    opacity: 0.85;
}
.mlb-v3-shop-header-glow {
    position: absolute;
    top: -120px; right: -120px;
    width: 520px; height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(225, 29, 46, 0.35) 0%, rgba(225, 29, 46, 0) 65%);
    pointer-events: none;
}

/* Breadcrumbs */
.mlb-v3-breadcrumbs {
    margin-bottom: 24px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.04em;
}
.mlb-v3-breadcrumbs a {
    color: rgba(255, 255, 255, 0.85);
    transition: color var(--mlb-t);
}
.mlb-v3-breadcrumbs a:hover { color: var(--mlb-red-light); }
.mlb-v3-crumb-sep {
    color: rgba(255, 255, 255, 0.35);
    margin: 0 4px;
}
.mlb-v3-breadcrumbs .woocommerce-breadcrumb,
.mlb-v3-breadcrumbs .mlb-v3-crumb-list {
    display: inline-flex; align-items: center; flex-wrap: wrap;
}

/* Inner content */
.mlb-v3-shop-header-inner {
    max-width: 720px;
}
.mlb-v3-shop-header-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mlb-font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--mlb-red-light);
    text-transform: uppercase;
    padding: 6px 14px;
    background: rgba(225, 29, 46, 0.14);
    border: 1px solid rgba(225, 29, 46, 0.35);
    border-radius: var(--mlb-radius-pill);
    margin-bottom: 20px;
}
.mlb-v3-pulse-dot {
    width: 8px; height: 8px;
    background: var(--mlb-red);
    border-radius: 50%;
    animation: mlbPulseDot 1.5s ease-in-out infinite;
}
@keyframes mlbPulseDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 46, 0.7); }
    50%      { box-shadow: 0 0 0 8px rgba(225, 29, 46, 0); }
}

.mlb-v3-shop-header-title {
    font-family: var(--mlb-font-display);
    font-size: clamp(44px, 6vw, 88px);
    line-height: 0.95;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin: 0 0 20px;
    color: #fff;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}
.mlb-v3-shop-header-sub {
    font-size: 18px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.8);
    max-width: 560px;
    margin: 0 0 28px;
}
.mlb-v3-shop-header-meta {
    display: flex; flex-wrap: wrap; gap: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.mlb-v3-shop-header-stat {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}
.mlb-v3-shop-header-stat strong {
    display: block;
    font-family: var(--mlb-font-display);
    font-size: 28px;
    line-height: 1;
    color: #fff;
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}

/* Wave */
.mlb-v3-shop-header-wave {
    position: absolute;
    left: 0; bottom: -1px;
    width: 100%; height: 60px;
    display: block;
}

/* ==========================================================================
   2. SHOP LAYOUT (sidebar + main)
   ========================================================================== */
.mlb-v3-shop-wrap {
    background: var(--mlb-cream);
    padding: 48px 0 96px;
    margin-top: -60px; /* overlap wave */
    position: relative;
    z-index: 1;
}
.mlb-v3-container {
    width: 100%;
    max-width: var(--mlb-container);
    margin: 0 auto;
    padding: 0 24px;
}
.mlb-v3-shop-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}
.mlb-v3-shop-sidebar { position: sticky; top: calc(var(--mlb-header-h) + 16px); }
.mlb-v3-shop-main { min-width: 0; }

/* ==========================================================================
   3. SIDEBAR — FILTER CARD
   ========================================================================== */
.mlb-v3-filter-card {
    background: #fff;
    border-radius: var(--mlb-radius-lg);
    box-shadow: var(--mlb-shadow-md);
    overflow: hidden;
    border: 1px solid var(--mlb-gray-100);
}

/* Mobile head — hidden on desktop */
.mlb-v3-filter-mobile-head {
    display: none;
    align-items: center; justify-content: space-between;
    padding: 18px 22px;
    background: var(--mlb-navy);
    color: #fff;
}
.mlb-v3-filter-mobile-title {
    font-family: var(--mlb-font-display);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.mlb-v3-filter-close {
    width: 40px; height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: grid; place-items: center;
    color: #fff;
    transition: background var(--mlb-t);
}
.mlb-v3-filter-close:hover { background: var(--mlb-red); }

/* Filter head */
.mlb-v3-filter-head {
    padding: 22px 22px 18px;
    border-bottom: 1px solid var(--mlb-gray-100);
    position: relative;
}
.mlb-v3-filter-head::before {
    content: '';
    position: absolute; top: 0; left: 0;
    height: 4px; width: 48px;
    background: linear-gradient(90deg, var(--mlb-red), var(--mlb-red-dark));
}
.mlb-v3-filter-eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--mlb-font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: var(--mlb-red);
    text-transform: uppercase;
    margin-bottom: 6px;
}
.mlb-v3-filter-eyebrow .mlb-v3-pulse-dot { width: 6px; height: 6px; }
.mlb-v3-filter-title {
    font-family: var(--mlb-font-display);
    font-size: 24px;
    line-height: 1.1;
    font-weight: 700;
    color: var(--mlb-navy);
    text-transform: uppercase;
    letter-spacing: 0.01em;
    margin: 0;
}
.mlb-v3-filter-reset {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--mlb-gray-500);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--mlb-t);
}
.mlb-v3-filter-reset:hover { color: var(--mlb-red); }

/* Filter form */
.mlb-v3-filter-form {
    padding: 8px 0;
}

/* Filter group (collapsible) */
.mlb-v3-filter-group {
    border-bottom: 1px solid var(--mlb-gray-100);
}
.mlb-v3-filter-group:last-of-type { border-bottom: 0; }

.mlb-v3-filter-group-toggle {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 22px;
    font-family: var(--mlb-font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--mlb-navy);
    text-transform: uppercase;
    transition: color var(--mlb-t);
}
.mlb-v3-filter-group-toggle:hover { color: var(--mlb-red); }
.mlb-v3-filter-group-toggle svg {
    transition: transform var(--mlb-t);
}
.mlb-v3-filter-group-toggle[aria-expanded="false"] svg {
    transform: rotate(-90deg);
}
.mlb-v3-filter-group-body {
    padding: 0 22px 18px;
    animation: mlbFadeIn 0.2s ease;
}
.mlb-v3-filter-group-toggle[aria-expanded="false"] + .mlb-v3-filter-group-body {
    display: none;
}
@keyframes mlbFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Radio buttons (product type) */
.mlb-v3-filter-radio {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--mlb-gray-200);
    border-radius: var(--mlb-radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all var(--mlb-t);
}
.mlb-v3-filter-radio:hover {
    border-color: var(--mlb-red);
    background: rgba(225, 29, 46, 0.03);
}
.mlb-v3-filter-radio input { position: absolute; opacity: 0; }
.mlb-v3-filter-radio-dot {
    flex-shrink: 0;
    width: 18px; height: 18px;
    border: 2px solid var(--mlb-gray-300);
    border-radius: 50%;
    position: relative;
    margin-top: 2px;
    transition: border-color var(--mlb-t);
}
.mlb-v3-filter-radio input:checked + .mlb-v3-filter-radio-dot {
    border-color: var(--mlb-red);
}
.mlb-v3-filter-radio input:checked + .mlb-v3-filter-radio-dot::after {
    content: '';
    position: absolute; inset: 3px;
    background: var(--mlb-red);
    border-radius: 50%;
}
.mlb-v3-filter-radio-label {
    flex: 1;
    font-size: 14px;
    color: var(--mlb-gray-700);
    line-height: 1.3;
}
.mlb-v3-filter-radio-label strong {
    display: block;
    font-weight: 600;
    color: var(--mlb-navy);
    margin-bottom: 2px;
}
.mlb-v3-filter-radio-label em {
    display: block;
    font-size: 12px;
    color: var(--mlb-gray-500);
    font-style: normal;
}
.mlb-v3-filter-radio input:checked ~ .mlb-v3-filter-radio-label strong { color: var(--mlb-red); }
.mlb-v3-filter-radio:has(input:checked) {
    border-color: var(--mlb-red);
    background: rgba(225, 29, 46, 0.04);
}

/* Category list */
.mlb-v3-filter-cat-list li { margin-bottom: 2px; }
.mlb-v3-filter-cat-link {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--mlb-gray-700);
    border-radius: var(--mlb-radius);
    transition: all var(--mlb-t);
}
.mlb-v3-filter-cat-link em {
    font-style: normal;
    font-size: 12px;
    color: var(--mlb-gray-400);
    background: var(--mlb-gray-100);
    padding: 2px 8px;
    border-radius: var(--mlb-radius-pill);
    font-weight: 600;
}
.mlb-v3-filter-cat-link:hover {
    background: var(--mlb-cream);
    color: var(--mlb-navy);
}
.mlb-v3-filter-cat-link.is-active {
    background: var(--mlb-navy);
    color: #fff;
    font-weight: 600;
}
.mlb-v3-filter-cat-link.is-active em {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.mlb-v3-filter-cat-children {
    padding-left: 12px;
    margin-top: 2px;
    border-left: 2px solid var(--mlb-gray-100);
    margin-left: 12px;
}
.mlb-v3-filter-cat-child {
    font-size: 13px;
    color: var(--mlb-gray-500);
}

/* Team search */
.mlb-v3-filter-search {
    position: relative;
    margin-bottom: 12px;
}
.mlb-v3-filter-search svg {
    position: absolute; top: 50%; left: 12px;
    transform: translateY(-50%);
    color: var(--mlb-gray-400);
    pointer-events: none;
}
.mlb-v3-filter-search-input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid var(--mlb-gray-200);
    border-radius: var(--mlb-radius-md);
    font-size: 13px;
    font-family: inherit;
    background: var(--mlb-gray-50);
    transition: all var(--mlb-t);
}
.mlb-v3-filter-search-input:focus {
    outline: 0;
    border-color: var(--mlb-red);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.12);
}

/* Team list (scroll) */
.mlb-v3-filter-team-list {
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--mlb-gray-300) transparent;
}
.mlb-v3-filter-team-list::-webkit-scrollbar { width: 6px; }
.mlb-v3-filter-team-list::-webkit-scrollbar-thumb { background: var(--mlb-gray-300); border-radius: 3px; }
.mlb-v3-filter-team-chip {
    display: flex; justify-content: space-between; align-items: center;
    padding: 7px 12px;
    font-size: 13px;
    color: var(--mlb-gray-700);
    border-radius: var(--mlb-radius);
    margin-bottom: 2px;
    transition: all var(--mlb-t);
}
.mlb-v3-filter-team-chip em {
    font-style: normal; font-size: 11px;
    color: var(--mlb-gray-400);
}
.mlb-v3-filter-team-chip:hover {
    background: var(--mlb-cream);
    color: var(--mlb-navy);
}
.mlb-v3-filter-team-chip.is-active {
    background: var(--mlb-red);
    color: #fff;
    font-weight: 600;
}
.mlb-v3-filter-team-chip.is-active em { color: rgba(255, 255, 255, 0.8); }
.mlb-v3-filter-team-chip.is-hidden { display: none; }

/* Price */
.mlb-v3-filter-price {
    display: flex; align-items: flex-end; gap: 8px;
    margin-bottom: 14px;
}
.mlb-v3-filter-price-input { flex: 1; }
.mlb-v3-filter-price-input label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--mlb-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}
.mlb-v3-filter-price-wrap {
    position: relative;
    display: flex; align-items: center;
    border: 1px solid var(--mlb-gray-200);
    border-radius: var(--mlb-radius-md);
    background: var(--mlb-gray-50);
    padding: 0 10px;
    transition: all var(--mlb-t);
}
.mlb-v3-filter-price-wrap:focus-within {
    border-color: var(--mlb-red);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.12);
}
.mlb-v3-filter-price-wrap span {
    color: var(--mlb-gray-500);
    font-weight: 600;
    font-size: 14px;
    margin-right: 4px;
}
.mlb-v3-filter-price-wrap input {
    flex: 1;
    border: 0; outline: 0; background: transparent;
    padding: 9px 0;
    font-size: 14px;
    font-family: inherit;
    color: var(--mlb-navy);
    width: 100%;
    min-width: 0;
    -moz-appearance: textfield;
}
.mlb-v3-filter-price-wrap input::-webkit-outer-spin-button,
.mlb-v3-filter-price-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mlb-v3-filter-price-sep {
    color: var(--mlb-gray-400);
    padding-bottom: 10px;
}
.mlb-v3-filter-price-chips {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.mlb-v3-filter-price-chip {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--mlb-gray-700);
    background: var(--mlb-gray-100);
    border-radius: var(--mlb-radius-pill);
    transition: all var(--mlb-t);
}
.mlb-v3-filter-price-chip:hover {
    background: var(--mlb-navy);
    color: #fff;
}
.mlb-v3-filter-price-chip.is-active {
    background: var(--mlb-red);
    color: #fff;
}

/* Apply button */
.mlb-v3-filter-apply {
    margin: 16px 22px 22px;
    width: calc(100% - 44px);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}

/* Promo card */
.mlb-v3-filter-promo {
    margin: 0 22px 22px;
    padding: 20px;
    background: linear-gradient(135deg, var(--mlb-navy) 0%, var(--mlb-navy-light) 100%);
    border-radius: var(--mlb-radius-md);
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.mlb-v3-filter-promo::before {
    content: '';
    position: absolute; top: -30px; right: -30px;
    width: 100px; height: 100px;
    background: radial-gradient(circle, rgba(225, 29, 46, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.mlb-v3-filter-promo-badge {
    width: 40px; height: 40px;
    background: var(--mlb-red);
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 20px;
    margin: 0 auto 10px;
    box-shadow: 0 4px 12px rgba(225, 29, 46, 0.4);
}
.mlb-v3-filter-promo h4 {
    font-family: var(--mlb-font-display);
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 6px;
}
.mlb-v3-filter-promo p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
    margin: 0;
}

/* ==========================================================================
   4. TOOLBAR
   ========================================================================== */
.mlb-v3-shop-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 16px;
    background: #fff;
    padding: 14px 20px;
    border-radius: var(--mlb-radius-lg);
    box-shadow: var(--mlb-shadow-sm);
    margin-bottom: 24px;
    border: 1px solid var(--mlb-gray-100);
}

.mlb-v3-toolbar-left { display: flex; align-items: center; gap: 16px; }
.mlb-v3-toolbar-count {
    font-size: 14px;
    color: var(--mlb-gray-600);
}
.mlb-v3-toolbar-count strong {
    color: var(--mlb-navy);
    font-weight: 700;
}

.mlb-v3-toolbar-filter-toggle {
    display: none;
    align-items: center; gap: 6px;
    padding: 8px 14px;
    background: var(--mlb-navy);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--mlb-font-display);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: var(--mlb-radius-md);
    transition: background var(--mlb-t);
}
.mlb-v3-toolbar-filter-toggle:hover { background: var(--mlb-red); color: #fff; }

.mlb-v3-toolbar-right { display: flex; align-items: center; gap: 12px; }

/* Sort select (custom) */
.mlb-v3-toolbar-sort {
    position: relative;
    display: inline-flex;
}
.mlb-v3-sort-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 9px 36px 9px 14px;
    background: var(--mlb-gray-50);
    border: 1px solid var(--mlb-gray-200);
    border-radius: var(--mlb-radius-md);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--mlb-navy);
    cursor: pointer;
    transition: all var(--mlb-t);
    min-width: 160px;
}
.mlb-v3-sort-select:hover { border-color: var(--mlb-navy); }
.mlb-v3-sort-select:focus { outline: 0; border-color: var(--mlb-red); box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.12); }
.mlb-v3-sort-caret {
    position: absolute; right: 10px; top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--mlb-gray-500);
}

/* View toggle */
.mlb-v3-toolbar-view {
    display: inline-flex;
    background: var(--mlb-gray-50);
    border: 1px solid var(--mlb-gray-200);
    border-radius: var(--mlb-radius-md);
    padding: 3px;
    gap: 2px;
}
.mlb-v3-view-btn {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: var(--mlb-radius-sm);
    color: var(--mlb-gray-500);
    transition: all var(--mlb-t);
}
.mlb-v3-view-btn:hover { color: var(--mlb-navy); }
.mlb-v3-view-btn.is-active {
    background: var(--mlb-navy);
    color: #fff;
}

/* ==========================================================================
   5. PRODUCTS GRID
   ========================================================================== */
.mlb-v3-products-grid {
    display: grid;
    gap: 24px;
}
.mlb-v3-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mlb-v3-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mlb-v3-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* List view override */
.mlb-v3-products-grid.mlb-v3-view-list {
    grid-template-columns: 1fr !important;
    gap: 16px;
}
.mlb-v3-products-grid.mlb-v3-view-list .mlb-v3-product-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    padding-right: 20px;
}
.mlb-v3-products-grid.mlb-v3-view-list .mlb-v3-card-media-inner {
    aspect-ratio: 1 / 1;
}
.mlb-v3-products-grid.mlb-v3-view-list .mlb-v3-card-body {
    padding: 20px 0 20px 4px;
    align-self: center;
}
.mlb-v3-products-grid.mlb-v3-view-list .mlb-v3-card-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   6. PRODUCT CARD
   ========================================================================== */
.mlb-v3-product-card {
    position: relative;
    background: #fff;
    border-radius: var(--mlb-radius-lg);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform var(--mlb-t), box-shadow var(--mlb-t);
    box-shadow: var(--mlb-shadow-sm);
    border: 1px solid var(--mlb-gray-100);
    isolation: isolate;
}
.mlb-v3-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--mlb-shadow-lg);
    border-color: transparent;
}

/* Badges stack */
.mlb-v3-card-badges {
    position: absolute; top: 12px; left: 12px;
    z-index: 3;
    display: flex; flex-direction: column; gap: 6px;
    pointer-events: none;
}
.mlb-v3-card-badges > * { pointer-events: auto; }

.mlb-v3-sale-badge,
.mlb-v3-badge-featured,
.mlb-v3-badge-new {
    display: inline-flex; align-items: center;
    padding: 4px 10px;
    font-family: var(--mlb-font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: var(--mlb-radius-sm);
    white-space: nowrap;
    box-shadow: var(--mlb-shadow-sm);
}
.mlb-v3-sale-badge {
    background: var(--mlb-red);
    color: #fff;
}
.mlb-v3-badge-featured {
    background: var(--mlb-navy);
    color: #fff;
}
.mlb-v3-badge-new {
    background: #fff;
    color: var(--mlb-red);
    border: 1px solid var(--mlb-red);
}

/* Wishlist button */
.mlb-v3-card-wishlist {
    position: absolute; top: 12px; right: 12px;
    z-index: 3;
    width: 36px; height: 36px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    color: var(--mlb-gray-500);
    box-shadow: var(--mlb-shadow-sm);
    transition: all var(--mlb-t);
    backdrop-filter: blur(4px);
}
.mlb-v3-card-wishlist:hover {
    background: var(--mlb-red);
    color: #fff;
    transform: scale(1.08);
}
.mlb-v3-card-wishlist.is-active {
    background: var(--mlb-red);
    color: #fff;
}
.mlb-v3-card-wishlist.is-active svg { fill: currentColor; }

/* Media */
.mlb-v3-card-media {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--mlb-gray-50);
}
.mlb-v3-card-media-inner {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
}
.mlb-v3-card-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--mlb-ease), opacity var(--mlb-t);
}
.mlb-v3-card-img-hover {
    opacity: 0;
}
.mlb-v3-product-card:hover .mlb-v3-card-img-main {
    transform: scale(1.05);
    opacity: 0;
}
.mlb-v3-product-card:hover .mlb-v3-card-img-hover {
    opacity: 1;
    transform: scale(1.05);
}
/* Fallback if no hover image */
.mlb-v3-product-card:not(:has(.mlb-v3-card-img-hover)):hover .mlb-v3-card-img-main {
    opacity: 1;
    transform: scale(1.08);
}

/* Quick actions (hover overlay) */
.mlb-v3-card-quick {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(12, 24, 41, 0.85) 0%, transparent 100%);
    display: flex; justify-content: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--mlb-t);
    pointer-events: none;
}
.mlb-v3-product-card:hover .mlb-v3-card-quick {
    opacity: 1;
    transform: translateY(0);
}
.mlb-v3-card-quick-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    background: #fff;
    color: var(--mlb-navy);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: var(--mlb-radius-pill);
    box-shadow: var(--mlb-shadow-md);
}

/* Body */
.mlb-v3-card-body {
    padding: 18px 18px 20px;
    display: flex; flex-direction: column;
    flex: 1;
    gap: 10px;
}
.mlb-v3-card-typeline {
    display: flex; gap: 6px; flex-wrap: wrap;
}
.mlb-v3-type-label {
    display: inline-block;
    font-family: var(--mlb-font-display);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--mlb-radius-sm);
}
.mlb-v3-type-rug {
    background: rgba(225, 29, 46, 0.1);
    color: var(--mlb-red);
}
.mlb-v3-type-wallet {
    background: rgba(12, 24, 41, 0.08);
    color: var(--mlb-navy);
}

.mlb-v3-card-title {
    font-family: var(--mlb-font-display);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--mlb-navy);
    margin: 0;
    letter-spacing: 0.01em;
    /* 2-line clamp */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}
.mlb-v3-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--mlb-t);
}
.mlb-v3-card-title a:hover { color: var(--mlb-red); }

.mlb-v3-card-excerpt {
    font-size: 13px;
    line-height: 1.45;
    color: var(--mlb-gray-500);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Rating stars */
.mlb-v3-card-rating {
    display: flex; align-items: center; gap: 6px;
}
.mlb-v3-stars {
    position: relative;
    display: inline-block;
    font-size: 14px;
    line-height: 1;
    color: var(--mlb-gray-200);
    letter-spacing: 1px;
}
.mlb-v3-stars > span {
    position: absolute; top: 0; left: 0;
    width: var(--mlb-rating, 0%);
    overflow: hidden;
    color: #f7b500;
    white-space: nowrap;
}
.mlb-v3-card-rating em {
    font-style: normal;
    font-size: 12px;
    color: var(--mlb-gray-500);
}

/* Foot (price + CTA) */
.mlb-v3-card-foot {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 4px;
}
.mlb-v3-card-price {
    font-family: var(--mlb-font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--mlb-navy);
    letter-spacing: 0.01em;
    line-height: 1;
}
.mlb-v3-card-price del {
    font-size: 14px;
    font-weight: 400;
    color: var(--mlb-gray-400);
    text-decoration: line-through;
    margin-right: 6px;
}
.mlb-v3-card-price ins {
    text-decoration: none;
    color: var(--mlb-red);
}
.mlb-v3-card-price .woocommerce-Price-amount { color: inherit; }

.mlb-v3-card-cta {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 14px;
    background: var(--mlb-navy);
    color: #fff;
    font-family: var(--mlb-font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: var(--mlb-radius-md);
    transition: all var(--mlb-t);
    white-space: nowrap;
}
.mlb-v3-card-cta:hover {
    background: var(--mlb-red);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(225, 29, 46, 0.3);
}
.mlb-v3-card-cta.added { background: var(--mlb-success); }
.mlb-v3-card-cta.loading { opacity: 0.7; pointer-events: none; }
.mlb-v3-card-cta.is-disabled {
    background: var(--mlb-gray-200);
    color: var(--mlb-gray-500);
    cursor: not-allowed;
}
.mlb-v3-card-cta.is-disabled:hover { background: var(--mlb-gray-200); transform: none; box-shadow: none; }

/* Out of stock card */
.mlb-v3-product-card.mlb-v3-out-of-stock .mlb-v3-card-media-inner {
    filter: grayscale(0.5) opacity(0.8);
}

/* Flatsome reset — remove default woo loop list styling */
.mlb-v3-products-grid ul.products,
.mlb-v3-products-grid li.product { all: unset; }
.mlb-v3-products-grid .added_to_cart.wc-forward { display: none; }

/* ==========================================================================
   7. PAGINATION
   ========================================================================== */
.mlb-v3-pagination-wrap {
    margin-top: 48px;
}
.mlb-v3-pagination {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 16px;
    background: #fff;
    padding: 20px 24px;
    border-radius: var(--mlb-radius-lg);
    box-shadow: var(--mlb-shadow-sm);
    border: 1px solid var(--mlb-gray-100);
}
.mlb-v3-pagination-info {
    font-size: 14px;
    color: var(--mlb-gray-600);
}
.mlb-v3-pagination-info strong { color: var(--mlb-navy); font-weight: 700; }

.mlb-v3-pagination-list {
    display: inline-flex; gap: 6px;
    list-style: none; padding: 0; margin: 0;
}
.mlb-v3-pagination-item .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px;
    padding: 0 10px;
    font-family: var(--mlb-font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--mlb-navy);
    background: var(--mlb-gray-50);
    border: 1px solid var(--mlb-gray-200);
    border-radius: var(--mlb-radius-md);
    transition: all var(--mlb-t);
    text-decoration: none;
}
.mlb-v3-pagination-item .page-numbers:hover {
    background: var(--mlb-navy);
    color: #fff;
    border-color: var(--mlb-navy);
    transform: translateY(-1px);
}
.mlb-v3-pagination-item .page-numbers.current {
    background: var(--mlb-red);
    color: #fff;
    border-color: var(--mlb-red);
    box-shadow: 0 4px 12px rgba(225, 29, 46, 0.3);
}
.mlb-v3-pagination-item .page-numbers.dots {
    background: transparent;
    border-color: transparent;
    pointer-events: none;
}

/* ==========================================================================
   8. EMPTY STATE
   ========================================================================== */
.mlb-v3-empty-state {
    text-align: center;
    padding: 80px 24px;
    background: #fff;
    border-radius: var(--mlb-radius-lg);
    box-shadow: var(--mlb-shadow-sm);
    border: 1px solid var(--mlb-gray-100);
}
.mlb-v3-empty-state-art {
    display: inline-block;
    margin-bottom: 24px;
    animation: mlbFloatSoft 3s ease-in-out infinite;
}
@keyframes mlbFloatSoft {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
.mlb-v3-empty-state-title {
    font-family: var(--mlb-font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--mlb-navy);
    text-transform: uppercase;
    letter-spacing: 0.01em;
    margin: 0 0 12px;
}
.mlb-v3-empty-state-sub {
    font-size: 16px;
    line-height: 1.5;
    color: var(--mlb-gray-500);
    max-width: 480px;
    margin: 0 auto 32px;
}
.mlb-v3-empty-state-cta {
    display: inline-flex; gap: 12px; flex-wrap: wrap;
    justify-content: center;
}

/* ==========================================================================
   9. SIDEBAR OVERLAY (mobile)
   ========================================================================== */
.mlb-v3-shop-overlay {
    position: fixed; inset: 0;
    background: rgba(12, 24, 41, 0.6);
    backdrop-filter: blur(4px);
    z-index: calc(var(--mlb-z-drawer) - 1);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--mlb-t);
}
.mlb-v3-shop-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================================================
   10. RESPONSIVE
   ========================================================================== */
@media (max-width: 1200px) {
    .mlb-v3-shop-layout {
        grid-template-columns: 260px minmax(0, 1fr);
        gap: 24px;
    }
    .mlb-v3-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
    .mlb-v3-shop-header { padding: 48px 0 100px; }
    .mlb-v3-shop-header-meta { gap: 16px; }
    .mlb-v3-shop-header-stat strong { font-size: 22px; }

    /* Sidebar becomes drawer */
    .mlb-v3-shop-layout {
        grid-template-columns: 1fr;
    }
    .mlb-v3-shop-sidebar {
        position: fixed;
        top: 0; left: 0;
        width: 320px;
        max-width: 90vw;
        height: 100vh;
        background: #fff;
        z-index: var(--mlb-z-drawer);
        transform: translateX(-100%);
        transition: transform var(--mlb-t-slow);
        overflow-y: auto;
        box-shadow: var(--mlb-shadow-xl);
    }
    .mlb-v3-shop-sidebar.is-open { transform: translateX(0); }
    .mlb-v3-filter-card {
        border-radius: 0;
        border: 0;
        box-shadow: none;
        min-height: 100%;
    }
    .mlb-v3-filter-mobile-head { display: flex; }
    .mlb-v3-toolbar-filter-toggle { display: inline-flex; }
}

@media (max-width: 768px) {
    .mlb-v3-shop-header { padding: 40px 0 90px; }
    .mlb-v3-shop-header-title { font-size: clamp(36px, 10vw, 56px); }
    .mlb-v3-shop-header-sub { font-size: 15px; }
    .mlb-v3-shop-wrap { padding: 32px 0 64px; }

    .mlb-v3-shop-toolbar {
        padding: 12px 14px;
    }
    .mlb-v3-toolbar-left {
        width: 100%;
        justify-content: space-between;
    }
    .mlb-v3-toolbar-right {
        width: 100%;
        justify-content: space-between;
    }
    .mlb-v3-sort-select { min-width: 0; flex: 1; }
    .mlb-v3-toolbar-view { display: none; }

    .mlb-v3-products-grid,
    .mlb-v3-grid-3,
    .mlb-v3-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
    .mlb-v3-card-body { padding: 14px 14px 16px; gap: 8px; }
    .mlb-v3-card-title { font-size: 15px; min-height: 36px; }
    .mlb-v3-card-excerpt { display: none; }
    .mlb-v3-card-price { font-size: 18px; }
    .mlb-v3-card-cta-label { display: none; }
    .mlb-v3-card-cta { padding: 9px 11px; }

    .mlb-v3-pagination {
        padding: 16px;
        flex-direction: column;
    }
    .mlb-v3-pagination-info { order: 2; font-size: 13px; }
}

@media (max-width: 480px) {
    .mlb-v3-container { padding: 0 16px; }
    .mlb-v3-shop-header-meta { gap: 12px; }
    .mlb-v3-shop-header-stat { font-size: 12px; }
    .mlb-v3-shop-header-stat strong { font-size: 18px; }

    .mlb-v3-products-grid {
        grid-template-columns: 1fr !important;
    }
    .mlb-v3-card-excerpt { display: -webkit-box; }
    .mlb-v3-card-cta-label { display: inline; }
    .mlb-v3-empty-state-title { font-size: 28px; }
    .mlb-v3-empty-state { padding: 48px 16px; }
}
