/* =========================================================
   STORE PAGE — 2026 PREMIUM REDESIGN (scoped to .store-v2)
   8px spacing system · light neutral surfaces · brand green
========================================================= */
.store-v2 {
    --brand: #3BB77E;
    --brand-dark: #2A4A11;
    --brand-soft: rgba(59, 183, 126, 0.10);
    --ink: #253D4E;
    --muted: #687182;
    --muted-2: #9aa4b2;
    --bg: #FAFAFA;
    --card: #ffffff;
    --line: #eef1f4;
    --line-2: #e6eaef;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.08);
    --shadow-lg: 0 16px 40px rgba(16, 24, 40, 0.12);
    --r-md: 16px;
    --r-lg: 20px;
    --r-xl: 24px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);

    background: var(--bg);
    color: var(--ink);
    padding-bottom: 64px;
    overflow-x: clip;
}

.store-v2 * { box-sizing: border-box; }
.store-v2 > .container,
.store-v2 .store-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------------- HERO ---------------- */
.store-hero {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-sm);
    padding: 28px 32px;
    margin: 24px 0 32px;
}

.store-hero__top {
    display: flex;
    align-items: flex-start;
    gap: 28px;
}

.store-hero__logo {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 24px;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    padding: 8px;
}
.store-hero__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    background: #f4f6f8;
}
.store-hero__logo--fallback img {
    object-fit: contain;
    padding: 10px;
    background: #fff;
}

.store-hero__main { flex: 1; min-width: 0; }

.store-hero__name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.store-hero__name {
    margin: 0;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.store-verified {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 700;
    border-radius: 50px;
}
.store-verified i { color: var(--brand); font-size: 14px; line-height: 1; }

.store-hero__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 18px;
}
.store-hero__meta span { display: inline-flex; align-items: center; gap: 6px; }
.store-hero__meta i { color: var(--brand); font-size: 15px; }
.store-hero__meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); }

.store-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}
.store-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 18px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    min-width: 96px;
}
.store-stat__value {
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1.1;
}
.store-stat__value .star { color: #FFB800; font-size: 16px; }
.store-stat__label { font-size: 12.5px; color: var(--muted); font-weight: 500; }

.store-hero__desc {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
    max-width: 680px;
}

.store-hours-pop {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
}
.store-hours-pop > summary {
    list-style: none;
    cursor: pointer;
}
.store-hours-pop > summary::-webkit-details-marker { display: none; }
.store-hours-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}
.store-hours-status.is-open { color: var(--brand); }
.store-hours-status.is-closed { color: #c0392b; }
.store-hours-status__today {
    color: var(--muted);
    font-weight: 500;
    margin-inline-start: 2px;
}
.store-hours-pop__chevron {
    font-size: 14px;
    opacity: .7;
    transition: transform .15s ease;
}
.store-hours-pop[open] .store-hours-pop__chevron {
    transform: rotate(180deg);
}
.store-hours-pop__panel {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-start: 0;
    z-index: 40;
    width: min(280px, 78vw);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: 0 10px 28px rgba(16, 24, 40, .12);
}
.store-hours-pop__title {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    margin: 0 0 6px;
    padding: 0 6px;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.store-hours-pop__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 2px;
}
.store-hours-pop__list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 6px;
    border-radius: 7px;
    font-size: 12.5px;
    line-height: 1.2;
}
.store-hours-pop__list li.is-today {
    background: var(--brand-soft);
    font-weight: 700;
}
.store-hours-pop__day { color: var(--ink); }
.store-hours-pop__time {
    color: var(--muted);
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}
.store-closed-banner {
    margin-top: 12px;
    max-width: 680px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(192, 57, 43, .18);
    background: rgba(192, 57, 43, .06);
    color: #8e2a21;
}
.store-closed-banner i {
    margin-top: 2px;
    flex-shrink: 0;
}
.store-closed-banner strong {
    display: block;
    font-size: 13.5px;
    margin-bottom: 2px;
}
.store-closed-banner span {
    display: block;
    font-size: 12.5px;
    line-height: 1.45;
    opacity: .92;
}

/* Hero aside: QR + actions */
.store-hero__aside {
    flex-shrink: 0;
    width: 268px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Buttons */
.store-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
    line-height: 1.2;
}
.store-btn:active { transform: scale(0.98); }
.store-btn--primary { background: var(--brand); color: #fff; }
.store-btn--primary:hover { background: #33a06e; color: #fff; box-shadow: var(--shadow-md); }
.store-btn--wa { background: #25D366; color: #fff; }
.store-btn--wa:hover { background: #1eb959; color: #fff; box-shadow: var(--shadow-md); }
.store-btn--ghost { background: var(--card); color: var(--ink); border-color: var(--line-2); }
.store-btn--ghost:hover { border-color: var(--brand); color: var(--brand-dark); }
.store-btn--block { width: 100%; }
.store-btn.copied { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
.store-btn .wa-ic { width: 18px; height: 18px; flex-shrink: 0; }

/* Hero search */
.store-hero__search { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.store-search {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--line-2);
    border-radius: 14px;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.store-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); background: #fff; }
.store-search i.search-ic {
    position: absolute;
    inset-inline-start: 18px;
    color: var(--muted-2);
    font-size: 18px;
    pointer-events: none;
}
.store-search input {
    flex: 1;
    border: none;
    background: transparent;
    height: 54px;
    padding: 0 20px;
    padding-inline-start: 50px;
    font-size: 15px;
    color: var(--ink);
    outline: none;
    width: 100%;
}
.store-search button {
    margin: 6px;
    border: none;
    background: var(--brand-dark);
    color: #fff;
    height: 42px;
    padding: 0 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s var(--ease);
    white-space: nowrap;
}
.store-search button:hover { background: #1d3310; }

/* ---------------- LAYOUT ---------------- */
.store-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.store-sidebar {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.store-main {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

.s-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}
.s-card__title {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}
.s-card__title i { color: var(--brand); font-size: 16px; }

/* Categories */
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list > li { border-radius: 12px; }
.cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.cat-link {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    padding: 9px 10px;
    border-radius: 10px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.cat-link:hover { background: var(--bg); color: var(--brand-dark); }
.cat-link.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.cat-link img { width: 18px; height: 18px; opacity: 0.85; }
.cat-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    background: var(--bg);
    border: 1px solid var(--line);
    min-width: 26px;
    height: 22px;
    padding: 0 7px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cat-link.active + div .cat-count,
.cat-list li:hover > .cat-row .cat-count { color: var(--brand-dark); }
.cat-toggle {
    cursor: pointer;
    color: var(--muted-2);
    font-size: 14px;
    padding: 6px;
    transition: transform 0.25s var(--ease), color 0.2s var(--ease);
}
.cat-toggle:hover { color: var(--brand); }
.cat-toggle.open { transform: rotate(180deg); }
.subcat {
    list-style: none;
    margin: 2px 0 8px !important;
    padding-inline-start: 16px !important;
    border-inline-start: 2px solid var(--brand-soft);
    margin-inline-start: 18px !important;
}
.subcat li { padding: 0; }
.subcat .cat-link { font-size: 13px; padding: 7px 10px; color: var(--muted); }
.subcat .cat-link:hover { color: var(--brand-dark); }
.subcat .cat-link.active { color: var(--brand-dark); }

/* Price filter */
.price-fields { display: flex; align-items: center; gap: 10px; }
.price-fields .fld { flex: 1; position: relative; }
.price-fields input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--line-2);
    border-radius: 12px;
    padding: 0 14px;
    font-size: 14px;
    color: var(--ink);
    background: var(--bg);
    outline: none;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.price-fields input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); background: #fff; }
.price-sep { color: var(--muted-2); font-weight: 600; }
.s-card .store-btn { margin-top: 14px; }

/* Share / QR (used in hero aside) */
.qr-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}
.qr-box .qr-img { background: #fff; padding: 6px; border-radius: 10px; border: 1px solid var(--line); line-height: 0; flex-shrink: 0; }
.qr-box .qr-img svg, .qr-box .qr-img img { width: 84px; height: 84px; display: block; }
.qr-box__text h6 { margin: 0 0 3px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.qr-box__text p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.4; }

/* ---------------- TOOLBAR ---------------- */
.store-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    padding: 14px 18px;
    margin-bottom: 16px;
    position: sticky;
    top: 20px;
    z-index: 20;
}
.store-toolbar__count { font-size: 14px; color: var(--muted); }
.store-toolbar__count strong { color: var(--ink); font-weight: 800; }
.store-toolbar__right { display: flex; align-items: center; gap: 10px; }

.sort-select {
    appearance: none;
    border: 1px solid var(--line-2);
    background: var(--card);
    color: var(--ink);
    height: 42px;
    padding: 0 38px 0 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23687182' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: border-color 0.2s var(--ease);
}
[dir="rtl"] .sort-select { padding: 0 14px 0 38px; background-position: left 14px center; }
.sort-select:focus { border-color: var(--brand); }

.view-toggle { display: inline-flex; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.view-toggle button {
    width: 42px;
    height: 42px;
    border: none;
    background: var(--card);
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.view-toggle button + button { border-inline-start: 1px solid var(--line-2); }
.view-toggle button.active { background: var(--brand-soft); color: var(--brand-dark); }

/* Active filter chips */
.active-filters { display: none; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    background: var(--card);
    border: 1px solid var(--line-2);
    color: var(--ink);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.18s var(--ease), color 0.18s var(--ease), background 0.18s var(--ease);
}
.chip:hover { border-color: #f2b8b5; color: #d92d20; background: #fff5f4; }
.chip i { font-size: 12px; }
.chip--clear { background: var(--brand-soft); border-color: transparent; color: var(--brand-dark); font-weight: 600; }
.chip--clear:hover { background: var(--brand); color: #fff; border-color: transparent; }

/* ---------------- PRODUCT GRID (scoped overrides) ---------------- */
.store-v2 .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
    margin: 0;
}
.store-v2 .product-grid > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: none;
    padding: 0;
}

.store-v2 .product-cart-wrap {
    margin: 0;
    /* height: 100%; */
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    overflow: visible;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.store-v2 .product-cart-wrap:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-soft);
}

.store-v2 .product-img-action-wrap {
    position: relative;
    padding: 0;
    margin: 0;
    background: #fff;
    overflow: hidden;
    border-radius: var(--r-md) var(--r-md) 0 0;
}
.store-v2 .product-img { border-radius: 0; }

/* Hover action buttons */
.store-v2 .product-action-1 {
    position: absolute;
    top: 12px;
    left: auto;
    right: auto;
    inset-inline-end: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
    width: fit-content;
    background: transparent;
    border: 0;
    box-shadow: none;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
[dir="rtl"] .store-v2 .product-action-1 { transform: translateX(-8px); }
.store-v2 .product-cart-wrap:hover .product-action-1 { opacity: 1; transform: translateX(0); }
.store-v2 .product-action-1 .action-btn {
    width: 38px;
    height: 38px;
    margin: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(4px);
    border: 1px solid var(--line);
    border-right: 0;
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    transition: background 0.18s var(--ease), color 0.18s var(--ease), transform 0.15s var(--ease);
}
.store-v2 .product-action-1 .action-btn:hover { background: var(--brand); color: #fff; transform: scale(1.06); }
.store-v2 .product-action-1 .action-btn.active { background: var(--brand); color: #fff; }

/* Badges */
.store-v2 .product-badges {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    margin: 0;
    z-index: 2;
}
.store-v2 .product-badges span {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}
.store-v2 .product-badges span.hot { background: #f2545b; }
.store-v2 .product-badges span.sale { background: var(--brand); }

/* Content */
.store-v2 .product-content-wrap { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; gap: 4px; }
.store-v2 .product-category { margin: 0; }
.store-v2 .product-category a { font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; text-decoration: none; }
.store-v2 .product-content-wrap h2 { margin: 0; font-size: 14px; line-height: 1.35; font-weight: 600; }
.store-v2 .product-content-wrap h2 a {
    color: var(--ink);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.18s var(--ease);
}
.store-v2 .product-content-wrap h2 a:hover { color: var(--brand-dark); }
.store-v2 .product-rate-cover { display: flex; align-items: center; gap: 4px; margin: 0; }
.store-v2 .product-content-wrap .product-card-bottom {
    margin-top: 8px;
    padding-top: 8px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid var(--line);
}
.store-v2 .product-price { display: flex; align-items: baseline; gap: 4px 6px; flex-wrap: wrap; flex: 1; min-width: 0; margin: 0; }
.store-v2 .product-price > span:first-child { font-size: 16px; font-weight: 800; color: var(--brand-dark); }
.store-v2 .product-price .old-price { font-size: 11px; }
.store-v2 .add-cart { width: auto; flex-shrink: 0; }
.store-v2 .product-card-bottom .add-cart .add,
.store-v2 .product-card-bottom .add-cart .add-disabled {
    display: inline-flex;
    width: auto;
    height: 40px;
    min-width: 40px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    background-color: var(--brand);
    background-image: none;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(59, 183, 126, 0.22);
    transition: background-color 0.2s var(--ease), transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
}
.store-v2 .product-card-bottom .add-cart .add span { color: inherit; }
.store-v2 .product-card-bottom .add-cart .add i,
.store-v2 .product-card-bottom .add-cart .add-disabled i { color: #fff; margin: 0 !important; font-size: 15px; flex-shrink: 0; }
.store-v2 .product-card-bottom .add-cart .add:hover {
    background-color: var(--brand-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(42, 74, 17, 0.24);
}
.store-v2 .product-card-bottom .add-cart .add:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(59, 183, 126, 0.22); }
.store-v2 .product-card-bottom .add-cart .add-disabled {
    background: #eef1f4;
    color: #9aa4b2;
    cursor: not-allowed;
    box-shadow: none;
}

/* ---------------- LIST VIEW ---------------- */
#products-container.view-list .product-grid { grid-template-columns: 1fr; gap: 14px; }
#products-container.view-list .product-cart-wrap { flex-direction: row; align-items: stretch; }
#products-container.view-list .product-img-action-wrap { width: 240px; flex-shrink: 0; }
#products-container.view-list .product-img a.product-img-canvas { height: 100%; min-height: 200px; }
#products-container.view-list .product-content-wrap { flex: 1; }
#products-container.view-list .product-content-wrap h2 { min-height: 0; font-size: 18px; }
#products-container.view-list .product-card-bottom { flex-direction: row; align-items: center; justify-content: space-between; }
#products-container.view-list .add-cart { width: auto; }
#products-container.view-list .add-cart .add,
#products-container.view-list .add-cart .add-disabled { width: auto; padding: 0 12px; }

/* ---------------- SKELETON ---------------- */
.sk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
}
.sk-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.sk-img { aspect-ratio: 800 / 430; }
.sk-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.sk-line { height: 12px; border-radius: 6px; }
.sk-line.w-40 { width: 40%; }
.sk-line.w-80 { width: 80%; }
.sk-line.w-60 { width: 60%; }
.sk-btn { height: 40px; border-radius: 12px; margin-top: 6px; }
.sk-shimmer {
    background: linear-gradient(100deg, #eef1f4 30%, #f6f8fa 50%, #eef1f4 70%);
    background-size: 200% 100%;
    animation: sk-move 1.3s var(--ease) infinite;
}
@keyframes sk-move { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Empty state */
.store-empty {
    text-align: center;
    padding: 64px 24px;
    background: var(--card);
    border: 1px dashed var(--line-2);
    border-radius: var(--r-lg);
}
.store-empty i { font-size: 44px; color: var(--muted-2); }
.store-empty h4 { margin: 16px 0 6px; font-size: 18px; color: var(--ink); }
.store-empty p { margin: 0; color: var(--muted); }

/* Pagination */
.store-v2 .pagination-area { margin-top: 28px; }
.store-v2 .pagination { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.store-v2 .pagination .page-link {
    min-width: 36px;
    text-align: center;
}

/* ---------------- MOBILE FILTER DRAWER (hidden on desktop) ---------------- */
.store-filters-btn { display: none; }
.store-drawer-overlay { display: none; }
.store-drawer-header { display: none; }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1100px) {
    .store-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 20px; }
}

@media (max-width: 991px) {
    .store-layout {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    .store-main {
        order: 1;
        width: 100%;
    }
    .store-sidebar {
        order: 2;
    }
    .store-toolbar { position: static; }

    .store-hero__top { flex-wrap: wrap; }
    .store-hero__main { flex: 1 1 0; min-width: min(100%, 280px); }
    .store-hero__aside {
        flex: 1 1 100%;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    .store-hero__aside .qr-box { display: none; }
    .store-hero__aside .store-btn { flex: 1; min-width: 140px; }

    /* Filter toggle button in the toolbar */
    .store-filters-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        height: 42px;
        padding: 0 16px;
        border: 1px solid var(--line-2);
        background: var(--card);
        color: var(--ink);
        border-radius: 12px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        order: 1;
    }
    .store-filters-btn i { color: var(--brand); }
    .store-toolbar__right { order: 2; margin-inline-start: auto; }
    .store-toolbar__count { order: 3; width: 100%; }

    /* Sidebar becomes an off-canvas drawer (above sticky header) */
    .store-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        inset-inline-start: 0;
        width: min(88vw, 360px);
        max-width: 360px;
        z-index: 100020;
        background: var(--bg);
        padding: 16px;
        padding-top: max(16px, env(safe-area-inset-top));
        overflow-y: auto;
        overflow-x: hidden;
        gap: 14px;
        transform: translateX(-100%);
        transition: transform 0.3s var(--ease), visibility 0.3s var(--ease);
        box-shadow: var(--shadow-lg);
        visibility: hidden;
        pointer-events: none;
        flex: none;
        min-height: 0;
    }
    [dir="rtl"] .store-sidebar { transform: translateX(100%); }
    .store-sidebar.open {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .store-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 2px;
    }
    .store-drawer-header h5 { margin: 0; font-size: 18px; font-weight: 800; color: var(--ink); }
    .store-drawer-close {
        width: 38px;
        height: 38px;
        border: 1px solid var(--line-2);
        background: var(--card);
        border-radius: 10px;
        color: var(--ink);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        cursor: pointer;
    }

    .store-drawer-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(16, 24, 40, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
        z-index: 100010;
    }
    .store-drawer-overlay.open { opacity: 1; visibility: visible; }
    body.drawer-open { overflow: hidden; }
}

@media (max-width: 768px) {
    .store-v2 { padding-bottom: 36px; }
    .store-v2 > .container,
    .store-v2 .store-container { padding: 0 12px; }

    /* ---- Compact hero: logo + name on one row, stats/desc/actions full width ---- */
    .store-hero { padding: 16px; margin: 12px 0 14px; border-radius: 18px; }
    .store-hero__top {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "logo head"
            "stats stats"
            "desc desc"
            "aside aside";
        column-gap: 12px;
        row-gap: 12px;
        align-items: center;
    }
    @supports (display: contents) {
        .store-hero__main { display: contents; }
    }
    @supports not (display: contents) {
        .store-hero__main {
            grid-column: 1 / -1;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .store-hero__head {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr);
            column-gap: 12px;
            align-items: center;
        }
        .store-hero__logo { display: none; }
        .store-hero__top > .store-hero__logo { display: block; }
    }
    .store-hero__logo { grid-area: logo; width: 60px; height: 60px; border-radius: 14px; padding: 4px; align-self: center; }
    .store-hero__head { grid-area: head; min-width: 0; }
    .store-stats { grid-area: stats; gap: 8px; }
    .store-hero__desc { grid-area: desc; }
    .store-hero__aside { grid-area: aside; }

    .store-hero__name-row { gap: 8px; margin-bottom: 4px; }
    .store-hero__name { font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
    .store-verified { padding: 3px 9px; font-size: 11px; }
    .store-hero__meta { font-size: 12px; margin-bottom: 0; gap: 4px 10px; }
    .store-hero__meta .dot { display: none; }

    .store-stat { flex: 1; min-width: 0; padding: 8px 6px; align-items: center; text-align: center; }
    .store-stat__value { font-size: 16px; }
    .store-stat__label { font-size: 11px; }

    .store-hero__desc {
        font-size: 12.5px;
        line-height: 1.55;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Actions: hide QR, WhatsApp + Share side by side */
    .store-hero__aside { flex-direction: row; gap: 8px; }
    .store-hero__aside .qr-box { display: none; }
    .store-hero__aside .store-btn { flex: 1; padding: 11px 12px; font-size: 13px; min-width: 0; }

    .store-hero__search { margin-top: 14px; padding-top: 14px; }

    .store-search {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 0;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .store-search:focus-within {
        border: none;
        box-shadow: none;
        background: transparent;
    }

    .store-search:focus-within input {
        border-color: var(--brand);
        box-shadow: 0 0 0 4px var(--brand-soft);
        background: #fff;
    }

    .store-search i.search-ic {
        top: 23px;
        transform: translateY(-50%);
        inset-inline-start: 16px;
        font-size: 16px;
    }

    .store-search input {
        flex: none;
        width: 100%;
        height: 46px;
        padding-inline-start: 44px;
        padding-inline-end: 12px;
        font-size: 14px;
        box-sizing: border-box;
        background: var(--bg);
        border: 1px solid var(--line-2);
        border-radius: 14px;
    }

    .store-search button {
        width: 100%;
        margin: 0;
        height: 44px;
        padding: 0 16px;
        border-radius: 12px;
        font-size: 14px;
        font-weight: 700;
    }

    /* ---- Compact filters + sort bar (grid like shop page) ---- */
    .store-toolbar {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "count count"
            "filters view"
            "sort sort";
        gap: 8px;
        padding: 12px;
        margin-bottom: 12px;
        align-items: center;
    }
    .store-toolbar__count {
        grid-area: count;
        order: unset;
        width: auto;
        font-size: 13px;
        line-height: 1.45;
        text-align: start;
    }
    .store-filters-btn {
        grid-area: filters;
        order: unset;
        flex: none;
        width: auto;
        min-width: 0;
        justify-content: center;
        padding-inline: 14px;
    }
    .store-toolbar__right {
        display: contents;
        order: unset;
        flex: none;
        margin-inline-start: 0;
    }
    .store-toolbar__right .sort-select {
        grid-area: sort;
        width: 100%;
        min-width: 0;
        height: 42px;
        font-size: 13px;
    }
    .store-toolbar__right .view-toggle {
        grid-area: view;
        justify-self: end;
    }
    .view-toggle button { width: 40px; height: 42px; }

    /* ---- 2 products per row + tighter card ---- */
    .store-v2 .product-grid,
    .sk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

    .store-v2 .product-content-wrap { padding: 10px; gap: 4px; }
    .store-v2 .product-category a { font-size: 10px; }
    .store-v2 .product-content-wrap h2 { font-size: 13px; min-height: 34px; line-height: 1.3; }
    .store-v2 .product-rate-cover { gap: 4px; font-size: 11px; }
    /* Hide redundant "By vendor" line to reduce card height */
    .store-v2 .product-content-wrap > div:not([class]) { display: none; }
    .store-v2 .product-content-wrap .product-card-bottom { padding-top: 8px; gap: 8px; }
    .store-v2 .product-price > span:first-child { font-size: 15px; }
    .store-v2 .product-card-bottom .add-cart .add,
    .store-v2 .product-card-bottom .add-cart .add-disabled { height: 36px; padding: 0 10px; font-size: 12px; }
    .store-v2 .product-card-bottom .add-cart .add i,
    .store-v2 .product-card-bottom .add-cart .add-disabled i { font-size: 13px; }
    .store-v2 .product-action-1 { top: 8px; inset-inline-end: 8px; gap: 6px; }
    .store-v2 .product-action-1 .action-btn { width: 32px; height: 32px; }

    /* Keep list view single-column & stacked on phones */
    #products-container.view-list .product-grid { grid-template-columns: 1fr; }
    #products-container.view-list .product-cart-wrap { flex-direction: column; }
    #products-container.view-list .product-img-action-wrap { width: 100%; }
    #products-container.view-list .product-img a.product-img-canvas { height: 200px; min-height: 0; aspect-ratio: auto; }
    #products-container.view-list .product-card-bottom { flex-direction: row; align-items: center; }
    #products-container.view-list .add-cart { width: auto; }
    #products-container.view-list .add-cart .add,
    #products-container.view-list .add-cart .add-disabled { width: auto; }

    .store-v2 .pagination-area {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-inline: -12px;
        padding-inline: 12px;
    }
    .store-v2 .pagination {
        flex-wrap: nowrap;
        justify-content: flex-start;
        width: max-content;
        max-width: none;
        margin-inline: auto;
    }
}

@media (max-width: 360px) {
    .store-v2 .product-grid, .sk-grid { gap: 10px; }
    .store-v2 .product-content-wrap h2 { font-size: 12.5px; }
}

/* ---------------- CATEGORY CATALOG ---------------- */
.store-cats { margin-bottom: 12px; }

.store-cats__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 28px;
    margin-bottom: 14px;
}
.store-cats__eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.store-cats__title {
    margin: 0 0 6px;
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--ink);
}
.store-cats__subtitle {
    margin: 0;
    max-width: 46ch;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}
.store-cats__search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 1 320px;
    min-height: 48px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--line-2);
    border-radius: 14px;
    background: var(--card);
    box-shadow: var(--shadow-sm);
}
.store-cats__search:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
}
.store-cats__search i { color: var(--muted-2); font-size: 16px; }
.store-cats__search input {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 46px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: 14px;
    outline: none;
}
.store-cats__summary {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}
.store-cats__summary strong { color: var(--ink); font-weight: 800; }
.store-cats__empty {
    margin: 18px 0 0;
    padding: 28px 16px;
    text-align: center;
    color: var(--muted);
    background: var(--card);
    border: 1px dashed var(--line-2);
    border-radius: var(--r-lg);
}

.store-cats__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.scat {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.scat:hover {
    transform: translateY(-3px);
    border-color: #d7efe4;
    box-shadow: var(--shadow-md);
}
.scat__link {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
    text-decoration: none;
}
.scat__link:hover { color: inherit; text-decoration: none; }
.scat__link:focus-visible,
.scat__subs a:focus-visible,
.store-pill:focus-visible,
.store-browse__back:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.scat__media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #f3f6f4;
    overflow: hidden;
}
.scat__img,
.scat__mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s var(--ease);
}
.scat:hover .scat__img,
.scat:hover .scat__mosaic img { transform: scale(1.04); }
.scat__mosaic {
    display: grid;
    width: 100%;
    height: 100%;
    gap: 3px;
    background: #fff;
}
.scat__mosaic--2 { grid-template-columns: 1fr 1fr; }
.scat__mosaic--3 {
    grid-template-columns: 1.35fr 1fr;
    grid-template-rows: 1fr 1fr;
}
.scat__mosaic--3 img:first-child { grid-row: 1 / span 2; }
.scat__placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--brand-dark);
    font-size: 42px;
    background:
        radial-gradient(circle at 18% 20%, rgba(59, 183, 126, 0.28), transparent 46%),
        linear-gradient(160deg, #eef8f3, #f7f8f9);
}
.scat__badge {
    position: absolute;
    inset-inline-end: 12px;
    bottom: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(37, 61, 78, 0.88);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.scat__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    padding: 16px 16px 14px;
}
.scat__name {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--ink);
}
.scat__meta {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}
.scat__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
    color: var(--brand-dark);
    font-size: 14px;
    font-weight: 700;
}
.scat__cta i { font-size: 16px; line-height: 1; }
.scat:hover .scat__cta { color: var(--brand); }

.scat__subs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 16px;
}
.scat__subs a {
    max-width: 100%;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.scat__subs a:hover,
.scat__more {
    color: var(--brand-dark);
    border-color: #b7e4cc;
    background: var(--brand-soft);
}

/* Category context on the product view */
.store-browse {
    margin-bottom: 16px;
    padding: 18px 20px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}
.store-browse__back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}
.store-browse__back:hover { color: var(--brand); }
.store-browse__title {
    margin: 0;
    font-size: clamp(22px, 2.2vw, 28px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--ink);
}
.store-browse__sub {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}
.store-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.store-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: var(--bg);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}
.store-pill:hover {
    border-color: var(--brand);
    color: var(--brand-dark);
    background: #fff;
}
.store-pill.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.store-pill__count {
    font-size: 11px;
    font-weight: 700;
    opacity: 0.75;
}
.store-pill.is-active .store-pill__count { opacity: 0.9; }

@media (max-width: 1100px) {
    .store-cats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .store-cats__head { flex-direction: column; align-items: stretch; }
    .store-cats__search { flex-basis: auto; width: 100%; }
}
@media (max-width: 640px) {
    .store-cats__grid { grid-template-columns: 1fr; gap: 12px; }
    .store-cats__title { font-size: 22px; }
    .scat__name { font-size: 16px; }
    .store-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .store-pill { flex: 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
    .scat,
    .scat__img,
    .scat__mosaic img { transition: none; }
    .scat:hover { transform: none; }
    .scat:hover .scat__img,
    .scat:hover .scat__mosaic img { transform: none; }
}
