/* ============================================================================
   shop.css — storefront shopping pages (category, product, cart, checkout,
   wishlist, account orders). Builds on the brand CSS variables defined in
   storefront.css (:root --brand-*). No Tailwind — matches the existing system.
   ============================================================================ */

:root {
    --shop-gap: 22px;
    --shop-radius: var(--brand-radius, 10px);
    --shop-radius-lg: 16px;
    --shop-success: #16a34a;
    --shop-danger: #dc2626;
    --shop-warn: #d97706;
    --shop-star: #f59e0b;
}

/* ── Shared buttons ──────────────────────────────────────────────────────── */
.btn-shop {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-weight: 600; line-height: 1; cursor: pointer;
    padding: 11px 18px; border-radius: var(--shop-radius);
    border: 1px solid var(--brand-border); background: #fff; color: var(--brand-text);
    transition: background .15s, color .15s, border-color .15s, transform .05s, box-shadow .15s;
}
.btn-shop:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.btn-shop:active { transform: translateY(1px); }
.btn-shop:disabled { opacity: .55; cursor: not-allowed; }
.btn-shop--primary { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.btn-shop--primary:hover { background: #024a04; border-color: #024a04; color: #fff; box-shadow: 0 6px 18px rgba(0,54,0,.18); }
.btn-shop--accent { background: var(--brand-accent); border-color: var(--brand-accent); color: #fff; }
.btn-shop--accent:hover { filter: brightness(.95); color: #fff; }
.btn-shop--ghost { background: transparent; }
.btn-shop--block { width: 100%; }
.btn-shop--lg { padding: 14px 22px; font-size: 1.02rem; }

/* ── Header badges + search autocomplete ─────────────────────────────────── */
.sf-cart { position: relative; }
.sf-badge {
    position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand-accent); color: #fff; font-size: .72rem; font-weight: 700;
    border-radius: 999px; line-height: 1; box-shadow: 0 0 0 2px #fff;
}
.sf-badge.is-empty { display: none; }
.sf-wish-count { display: inline-block; margin-left: 4px; min-width: 16px; padding: 0 4px; font-size: .68rem; font-weight: 700; line-height: 16px; text-align: center; background: var(--brand-accent); color: #fff; border-radius: 999px; }
.sf-wish-count.is-empty { display: none; }

.sf-search { position: relative; }
.sf-suggest {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
    background: #fff; border: 1px solid var(--brand-border); border-radius: var(--shop-radius);
    box-shadow: 0 14px 40px rgba(0,0,0,.14); overflow: hidden; max-height: 70vh; overflow-y: auto;
}
.sf-suggest a {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--brand-text);
    border-bottom: 1px solid var(--brand-bg);
}
.sf-suggest a:last-child { border-bottom: 0; }
.sf-suggest a:hover, .sf-suggest a.is-active { background: var(--brand-bg); }
.sf-suggest img { width: 42px; height: 42px; object-fit: contain; border-radius: 6px; background: #fff; flex: 0 0 auto; }
.sf-suggest__name { font-weight: 600; font-size: .9rem; }
.sf-suggest__meta { color: var(--brand-muted); font-size: .78rem; }
.sf-suggest__price { margin-left: auto; font-weight: 700; color: var(--brand-primary); white-space: nowrap; }

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */
.sf-breadcrumb { background: #fff; border-bottom: 1px solid var(--brand-border); }
.sf-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 12px 0; font-size: .85rem; }
.sf-breadcrumb li { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-muted); }
.sf-breadcrumb a { color: var(--brand-muted); }
.sf-breadcrumb a:hover { color: var(--brand-accent); }
.sf-breadcrumb i { font-size: .62rem; color: var(--brand-border); }
.sf-breadcrumb [aria-current] { color: var(--brand-text); font-weight: 600; }

/* ── Page shell ──────────────────────────────────────────────────────────── */
.shop-wrap { padding: 26px 0 56px; }
.shop-head { margin-bottom: 18px; }
.shop-head h1 { font-size: 1.7rem; font-weight: 800; margin: 0 0 4px; color: var(--brand-charcoal); }
.shop-head p { color: var(--brand-muted); margin: 0; }

.shop-layout { display: grid; grid-template-columns: 264px 1fr; gap: var(--shop-gap); align-items: start; }
@media (max-width: 991px) { .shop-layout { grid-template-columns: 1fr; } }

/* Subcategory chips */
.shop-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.shop-chips a {
    padding: 7px 14px; border: 1px solid var(--brand-border); border-radius: 999px;
    font-size: .85rem; font-weight: 600; color: var(--brand-text); background: #fff;
}
.shop-chips a:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.shop-chips a.is-active { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }

/* ── Filter sidebar ──────────────────────────────────────────────────────── */
.shop-filters {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: var(--shop-radius-lg);
    padding: 18px;
    position: relative;
    top: 14px;
}
.shop-filters__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.shop-filters__head h2 { font-size: 1.05rem; font-weight: 800; margin: 0; }
.shop-filters__clear { font-size: .78rem; color: var(--brand-accent); font-weight: 600; }
.shop-filters__group { padding: 16px 0; border-top: 1px solid var(--brand-bg); }
.shop-filters__group h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-muted); margin: 0 0 10px; }
.shop-filters__price { display: flex; gap: 10px; }
.shop-filters__price label { flex: 1; font-size: .72rem; color: var(--brand-muted); display: flex; flex-direction: column; gap: 4px; }
.shop-filters__price input { width: 100%; padding: 8px 10px; border: 1px solid var(--brand-border); border-radius: 8px; font: inherit; }
.shop-filters__hint { font-size: .76rem; color: var(--brand-muted); margin: 8px 0 0; }
.shop-filters__list { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.shop-filters__opt { display: flex; align-items: center; gap: 9px; font-size: .88rem; cursor: pointer; padding: 3px 0; }
.shop-filters__opt input { accent-color: var(--brand-primary); width: 16px; height: 16px; }
.shop-filters__count { margin-left: auto; font-size: .78rem; color: var(--brand-muted); }
/* Deferred (AJAX) sidebar loading skeleton */
.shop-filters__skeleton { display: flex; flex-direction: column; gap: 12px; padding: 12px 0; }
.shop-filters__skel { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--brand-bg) 25%, #eef0f2 37%, var(--brand-bg) 63%); background-size: 400% 100%; animation: shop-skel 1.2s ease-in-out infinite; }
.shop-filters__skel:nth-child(3n) { width: 60%; }
.shop-filters__skel:nth-child(3n+2) { width: 85%; }
@keyframes shop-skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.shop-filters__catlink { display: flex; align-items: center; gap: 9px; font-size: .88rem; color: var(--brand-text); padding: 4px 0; }
.shop-filters__catlink:hover { color: var(--brand-primary); }
.shop-filters__catlink.is-active { color: var(--brand-primary); font-weight: 700; }
.shop-filters__ratings { display: flex; flex-direction: column; gap: 6px; }
.shop-filters__rating {
    display: flex; align-items: center; gap: 8px; background: none; border: 1px solid transparent;
    border-radius: 8px; padding: 6px 8px; cursor: pointer; font: inherit; font-size: .85rem; color: var(--brand-text); text-align: left;
}
.shop-filters__rating:hover { background: var(--brand-bg); }
.shop-filters__rating.is-active { background: var(--brand-bg); border-color: var(--brand-border); font-weight: 600; }
.shop-filters__rating .stars i { font-size: .82rem; }
.shop-filters__apply { width: 100%; margin-top: 16px; }

/* ── Toolbar (count + sort + view toggle) ────────────────────────────────── */
.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.shop-toolbar__count { color: var(--brand-muted); font-size: .9rem; }
.shop-toolbar__count strong { color: var(--brand-text); }
.shop-toolbar__right { display: flex; align-items: center; gap: 10px; }
.shop-sort select { padding: 9px 30px 9px 12px; border: 1px solid var(--brand-border); border-radius: 8px; font: inherit; background: #fff; cursor: pointer; }
.shop-viewtoggle { display: inline-flex; border: 1px solid var(--brand-border); border-radius: 8px; overflow: hidden; }
.shop-viewtoggle button { border: 0; background: #fff; padding: 9px 12px; cursor: pointer; color: var(--brand-muted); }
.shop-viewtoggle button.is-active { background: var(--brand-primary); color: #fff; }
.shop-filters-toggle { display: none; }
@media (max-width: 991px) {
    .shop-filters-toggle { display: inline-flex; }
    .shop-filters { display: none; position: static; }
    .shop-filters.is-open { display: block; margin-bottom: 16px; }
}

/* ── Product grid + cards ────────────────────────────────────────────────── */
.shop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--shop-gap); }
@media (max-width: 1199px) { .shop-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px)  { .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (max-width: 420px)  { .shop-grid { grid-template-columns: 1fr; } }

/* Legacy-style product card — shared by grids AND homepage carousels (_ProductCard). */
.pcard {
    display: flex; flex-direction: column; background: #fff; border: 1px solid var(--brand-border);
    border-radius: var(--shop-radius-lg); overflow: hidden; position: relative; height: 100%;
    transition: box-shadow .18s, transform .18s, border-color .18s;
}
.pcard:hover { box-shadow: 0 12px 30px rgba(0,0,0,.10); transform: translateY(-3px); border-color: #d4d9e0; }
.pcard__imgwrap { position: relative; aspect-ratio: 1/1; background: #fff; }
.pcard__badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; z-index: 2; }
.pcard__label {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--brand-primary); color: #fff;
    font-size: .68rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
    padding: 4px 9px; border-radius: 999px; line-height: 1.1; box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.pcard__label i { font-size: .64rem; }
.pcard__img { display: flex; align-items: center; justify-content: center; height: 100%; padding: 18px; }
.pcard__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pcard.is-oos .pcard__img img { opacity: .5; }
.pcard__badge { display: inline-flex; align-items: center; background: var(--brand-accent); color: #fff; font-size: .72rem; font-weight: 800; padding: 4px 9px; border-radius: 999px; line-height: 1.1; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.pcard__wish {
    position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--brand-border); background: rgba(255,255,255,.92); color: var(--brand-muted);
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all .15s; z-index: 2; opacity: 0;
}
.pcard:hover .pcard__wish, .pcard__wish.is-saved, .pcard__wish:focus-visible { opacity: 1; }
.pcard__wish:hover { color: var(--brand-accent); border-color: var(--brand-accent); transform: scale(1.08); }
.pcard__wish.is-saved { color: var(--brand-accent); border-color: var(--brand-accent); }
.pcard__body { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px 16px; flex: 1; }
.pcard__brand { font-size: .8rem; color: var(--brand-text); text-decoration: underline; font-weight: 500; width: fit-content; }
.pcard__brand:hover { color: var(--brand-accent); }
.pcard__title {
    font-size: .95rem; font-weight: 700; color: var(--brand-charcoal); line-height: 1.3; margin-top: 2px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em;
}
.pcard__title:hover { color: var(--brand-primary); }
.pcard__cat, .pcard__sku { font-size: .78rem; color: var(--brand-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard__condition { font-size: .82rem; font-weight: 700; color: var(--brand-charcoal); margin-top: 4px; }
.pcard__condition span { color: var(--brand-primary); }
.pcard__pricerow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.pcard__prices { display: flex; flex-direction: column; line-height: 1.05; }
.pcard__price { font-size: 1.85rem; font-weight: 800; color: var(--brand-charcoal); white-space: nowrap; letter-spacing: -.01em; }
.pcard__was { font-size: .84rem; color: var(--brand-muted); text-decoration: line-through; }
.pcard__cart {
    flex: 0 0 auto; width: 46px; height: 46px; border: 0; border-radius: 10px; cursor: pointer;
    background: var(--brand-primary); color: #fff; font-size: 1.05rem; display: inline-flex; align-items: center; justify-content: center;
    transition: filter .15s, transform .05s;
}
.pcard__cart:hover { filter: brightness(1.25); }
.pcard__cart:active { transform: translateY(1px); }
.pcard__cart:disabled { background: var(--brand-border); cursor: not-allowed; }
.pcard__stock { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--brand-text); margin-top: 8px; }
.pcard__stock i { color: var(--brand-primary); }
.pcard__stock.out, .pcard__stock.out i { color: var(--shop-danger); }
.pcard__delivery { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--brand-muted); margin-top: 2px; }
.pcard__delivery i { color: #2563eb; }

/* List view */
.shop-grid.is-list { grid-template-columns: 1fr; }
.shop-grid.is-list .pcard { flex-direction: row; }
.shop-grid.is-list .pcard__imgwrap { width: 220px; flex: 0 0 220px; aspect-ratio: auto; }
.shop-grid.is-list .pcard__body { padding: 18px 22px; }
.shop-grid.is-list .pcard__pricerow { max-width: 380px; }
@media (max-width: 575px) { .shop-grid.is-list .pcard { flex-direction: column; } .shop-grid.is-list .pcard__imgwrap { width: 100%; flex: none; aspect-ratio: 1/1; } }

/* Stars */
.stars { display: inline-flex; align-items: center; gap: 2px; color: var(--shop-star); }
.stars i { font-size: .9rem; }
.stars .fa-regular { color: #d8dbe0; }
.stars__count { color: var(--brand-muted); font-size: .78rem; margin-left: 5px; }

/* Pagination */
.shop-pager { display: flex; justify-content: center; gap: 6px; margin-top: 30px; flex-wrap: wrap; }
.shop-pager a, .shop-pager span {
    min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--brand-border); border-radius: 8px; background: #fff; color: var(--brand-text); font-weight: 600; font-size: .9rem;
}
.shop-pager a:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.shop-pager .is-active { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.shop-pager .is-disabled { opacity: .4; pointer-events: none; }

/* Empty states */
.shop-empty { text-align: center; padding: 70px 20px; background: #fff; border: 1px solid var(--brand-border); border-radius: var(--shop-radius-lg); }
.shop-empty i { font-size: 3rem; color: var(--brand-border); margin-bottom: 14px; }
.shop-empty h2 { font-size: 1.3rem; font-weight: 800; margin: 0 0 6px; }
.shop-empty p { color: var(--brand-muted); margin: 0 0 18px; }

/* ── Product detail (PDP) ────────────────────────────────────────────────── */
.pdp { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; padding: 28px 0 12px; }
@media (max-width: 900px) { .pdp { grid-template-columns: 1fr; gap: 26px; } }
.pdp-gallery { position: sticky; top: 14px; align-self: start; }
.pdp-gallery__main { position: relative; background: #fff; border: 1px solid var(--brand-border); border-radius: var(--shop-radius-lg); aspect-ratio: 1/1; overflow: hidden; cursor: zoom-in; }
.pdp-gallery__main img { width: 100%; height: 100%; object-fit: contain; padding: 24px; transition: transform .25s; }
.pdp-gallery__main.is-zoomed img { transform: scale(2); cursor: zoom-out; }
.pdp-gallery__badge { position: absolute; top: 14px; left: 14px; background: var(--brand-accent); color: #fff; font-weight: 800; font-size: .8rem; padding: 5px 10px; border-radius: 7px; z-index: 2; }
.pdp-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.pdp-thumbs button { width: 70px; height: 70px; border: 1px solid var(--brand-border); border-radius: 10px; background: #fff; padding: 6px; cursor: pointer; }
.pdp-thumbs button.is-active { border-color: var(--brand-primary); box-shadow: 0 0 0 1px var(--brand-primary); }
.pdp-thumbs img { width: 100%; height: 100%; object-fit: contain; }

.pdp-info h1 { font-size: 1.7rem; font-weight: 800; color: var(--brand-charcoal); margin: 0 0 10px; line-height: 1.25; }
.pdp-brandline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; color: var(--brand-muted); font-size: .88rem; }
.pdp-brandline a { color: var(--brand-primary); font-weight: 600; }
.pdp-rating-line { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.pdp-rating-line a { font-size: .82rem; color: var(--brand-muted); }
.pdp-price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.pdp-price__now { font-size: 2rem; font-weight: 800; color: var(--brand-primary); }
.pdp-price__was { font-size: 1.1rem; color: var(--brand-muted); text-decoration: line-through; }
.pdp-price__save { background: #fde7ef; color: var(--brand-accent); font-weight: 700; font-size: .82rem; padding: 4px 9px; border-radius: 7px; }
.pdp-tax { color: var(--brand-muted); font-size: .8rem; margin-bottom: 18px; }

.pdp-stock { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: .9rem; padding: 6px 12px; border-radius: 999px; margin-bottom: 20px; }
.pdp-stock.in { background: #e8f7ee; color: var(--shop-success); }
.pdp-stock.low { background: #fff3e0; color: var(--shop-warn); }
.pdp-stock.out { background: #fdecea; color: var(--shop-danger); }

.pdp-variants { margin-bottom: 20px; }
.pdp-variants__label { font-weight: 700; font-size: .85rem; margin-bottom: 8px; }
.pdp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pdp-chip { padding: 9px 16px; border: 1px solid var(--brand-border); border-radius: 8px; background: #fff; cursor: pointer; font: inherit; font-weight: 600; font-size: .88rem; }
.pdp-chip:hover { border-color: var(--brand-primary); }
.pdp-chip.is-active { border-color: var(--brand-primary); background: var(--brand-primary); color: #fff; }

.pdp-buy { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--brand-border); border-radius: var(--shop-radius); overflow: hidden; }
.qty-stepper button { width: 42px; height: 46px; border: 0; background: #fff; cursor: pointer; font-size: 1.1rem; color: var(--brand-text); }
.qty-stepper button:hover { background: var(--brand-bg); }
.qty-stepper input { width: 52px; height: 46px; border: 0; border-left: 1px solid var(--brand-border); border-right: 1px solid var(--brand-border); text-align: center; font: inherit; font-weight: 700; -moz-appearance: textfield; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-buy .btn-shop { flex: 1; min-width: 160px; }
.pdp-wishbtn { width: 46px; height: 46px; border-radius: var(--shop-radius); border: 1px solid var(--brand-border); background: #fff; cursor: pointer; color: var(--brand-muted); }
.pdp-wishbtn.is-saved, .pdp-wishbtn:hover { color: var(--brand-accent); border-color: var(--brand-accent); }

.pdp-meta { border-top: 1px solid var(--brand-border); margin-top: 8px; padding-top: 16px; font-size: .88rem; color: var(--brand-muted); display: grid; gap: 6px; }
.pdp-meta strong { color: var(--brand-text); }

/* PDP sections */
.pdp-section { padding: 30px 0; border-top: 1px solid var(--brand-border); }
.pdp-section h2 { font-size: 1.3rem; font-weight: 800; margin: 0 0 16px; color: var(--brand-charcoal); }
.pdp-desc { color: var(--brand-text); line-height: 1.7; }
.pdp-desc img { max-width: 100%; height: auto; }

/* Lazy CMS block skeletons */
.cms-lazy { padding: 26px 0; }
.cms-skeleton__head { height: 26px; width: 240px; max-width: 60%; border-radius: 7px; margin: 0 0 22px; background: #eef0f4; }
.cms-skeleton__rail { display: flex; gap: 18px; overflow: hidden; }
.cms-skeleton__rail span { flex: 0 0 auto; width: 210px; height: 270px; border-radius: 12px; background: linear-gradient(100deg, #eef0f4 30%, #f6f7f9 50%, #eef0f4 70%); background-size: 200% 100%; animation: cms-shimmer 1.3s ease-in-out infinite; }
@keyframes cms-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (max-width: 768px) { .cms-skeleton__rail span { width: 150px; height: 210px; } }

/* Specifications table */
.pdp-specs { width: 100%; border-collapse: collapse; }
.pdp-specs th, .pdp-specs td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--brand-line, #e5e7eb); vertical-align: top; }
.pdp-specs th { width: 34%; font-weight: 700; color: var(--brand-charcoal); }
.pdp-specs td { color: var(--brand-text); }
.pdp-specs tr:last-child th, .pdp-specs tr:last-child td { border-bottom: none; }

/* Reviews */
.reviews-head { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 20px; }
.reviews-score { text-align: center; }
.reviews-score__num { font-size: 2.6rem; font-weight: 800; color: var(--brand-charcoal); line-height: 1; }
.review-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 26px; }
.review { background: #fff; border: 1px solid var(--brand-border); border-radius: var(--shop-radius); padding: 16px 18px; }
.review__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.review__author { font-weight: 700; }
.review__date { color: var(--brand-muted); font-size: .8rem; }
.review__title { font-weight: 700; margin: 6px 0 4px; }
.review__body { color: var(--brand-text); line-height: 1.6; }
.review-form { background: #fff; border: 1px solid var(--brand-border); border-radius: var(--shop-radius-lg); padding: 22px; max-width: 640px; }
.review-form h3 { font-size: 1.1rem; font-weight: 800; margin: 0 0 14px; }
.rating-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rating-input input { position: absolute; opacity: 0; pointer-events: none; }
.rating-input label { font-size: 1.6rem; color: #d8dbe0; cursor: pointer; transition: color .1s; }
.rating-input label:hover, .rating-input label:hover ~ label,
.rating-input input:checked ~ label { color: var(--shop-star); }

/* ── Forms (shared) ──────────────────────────────────────────────────────── */
.shop-field { margin-bottom: 14px; }
.shop-field label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 6px; color: var(--brand-text); }
.shop-field input, .shop-field select, .shop-field textarea {
    width: 100%; padding: 11px 13px; border: 1px solid var(--brand-border); border-radius: var(--shop-radius);
    font: inherit; background: #fff; color: var(--brand-text);
}
.shop-field input:focus, .shop-field select:focus, .shop-field textarea:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(0,54,0,.08); }
.shop-field .field-error, .field-validation-error { color: var(--shop-danger); font-size: .8rem; margin-top: 4px; display: block; }
.input-validation-error { border-color: var(--shop-danger) !important; }
.shop-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 575px) { .shop-grid2 { grid-template-columns: 1fr; } }

/* ── Cart ────────────────────────────────────────────────────────────────── */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: var(--shop-gap); align-items: start; }
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-card { background: #fff; border: 1px solid var(--brand-border); border-radius: var(--shop-radius-lg); overflow: hidden; }
.cart-line { display: grid; grid-template-columns: 92px 1fr auto; gap: 16px; padding: 18px; border-bottom: 1px solid var(--brand-bg); align-items: center; }
.cart-line:last-child { border-bottom: 0; }
.cart-line__img { width: 92px; height: 92px; border: 1px solid var(--brand-border); border-radius: 10px; padding: 6px; background: #fff; }
.cart-line__img img { width: 100%; height: 100%; object-fit: contain; }
.cart-line__name { font-weight: 600; color: var(--brand-text); }
.cart-line__name:hover { color: var(--brand-primary); }
.cart-line__meta { color: var(--brand-muted); font-size: .82rem; margin-top: 3px; }
.cart-line__actions { display: flex; gap: 14px; margin-top: 10px; }
.cart-line__actions button { background: none; border: 0; padding: 0; color: var(--brand-muted); font: inherit; font-size: .82rem; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.cart-line__actions button:hover { color: var(--brand-accent); }
.cart-line__right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cart-line__price { font-weight: 800; font-size: 1.05rem; color: var(--brand-primary); }
.cart-line .qty-stepper button { height: 38px; width: 36px; }
.cart-line .qty-stepper input { height: 38px; width: 44px; }
.cart-section-title { font-size: 1.05rem; font-weight: 800; margin: 26px 0 12px; }

.cart-summary { background: #fff; border: 1px solid var(--brand-border); border-radius: var(--shop-radius-lg); padding: 20px; position: sticky; top: 14px; }
.cart-summary h2 { font-size: 1.15rem; font-weight: 800; margin: 0 0 14px; }
.cart-summary__row { display: flex; justify-content: space-between; padding: 7px 0; color: var(--brand-text); font-size: .92rem; }
.cart-summary__row.muted { color: var(--brand-muted); }
.cart-summary__row.discount { color: var(--shop-success); font-weight: 600; }
.cart-summary__total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--brand-border); margin-top: 10px; padding-top: 14px; font-weight: 800; font-size: 1.25rem; }
.cart-summary__total span:last-child { color: var(--brand-primary); }
.cart-summary .btn-shop { margin-top: 16px; }
.cart-coupon { display: flex; gap: 8px; margin: 14px 0 4px; }
.cart-coupon input { flex: 1; padding: 10px 12px; border: 1px solid var(--brand-border); border-radius: var(--shop-radius); font: inherit; text-transform: uppercase; }
.cart-coupon-applied { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #e8f7ee; color: var(--shop-success); border-radius: var(--shop-radius); padding: 9px 13px; font-size: .85rem; font-weight: 600; margin: 12px 0 0; }
.cart-coupon-applied button { background: none; border: 0; color: var(--shop-success); cursor: pointer; font-size: .95rem; }
.cart-freeship { background: var(--brand-bg); border-radius: var(--shop-radius); padding: 10px 13px; font-size: .82rem; color: var(--brand-muted); margin-top: 12px; }
.cart-freeship b { color: var(--brand-primary); }

/* ── Checkout ────────────────────────────────────────────────────────────── */
.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: var(--shop-gap); align-items: start; }
@media (max-width: 900px) { .checkout-layout { grid-template-columns: 1fr; } }
.checkout-steps { display: flex; gap: 8px; margin-bottom: 22px; counter-reset: step; flex-wrap: wrap; }
.checkout-steps li { list-style: none; display: flex; align-items: center; gap: 8px; color: var(--brand-muted); font-weight: 600; font-size: .88rem; }
.checkout-steps li::before { counter-increment: step; content: counter(step); width: 26px; height: 26px; border-radius: 50%; background: var(--brand-bg); border: 1px solid var(--brand-border); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
.checkout-steps li.is-active { color: var(--brand-primary); }
.checkout-steps li.is-active::before { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.checkout-steps li.is-done::before { background: var(--shop-success); border-color: var(--shop-success); color: #fff; content: "\2713"; }
.checkout-steps .sep { flex: 0 0 26px; height: 1px; background: var(--brand-border); align-self: center; }

.checkout-card { background: #fff; border: 1px solid var(--brand-border); border-radius: var(--shop-radius-lg); padding: 24px; }
.checkout-panel { display: none; }
.checkout-panel.is-active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.checkout-panel h2 { font-size: 1.25rem; font-weight: 800; margin: 0 0 18px; }
.checkout-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }

.opt-card { display: flex; align-items: center; gap: 14px; border: 1px solid var(--brand-border); border-radius: var(--shop-radius); padding: 14px 16px; cursor: pointer; margin-bottom: 10px; transition: border-color .15s, box-shadow .15s; }
.opt-card:hover { border-color: var(--brand-primary); }
.opt-card.is-active { border-color: var(--brand-primary); box-shadow: 0 0 0 1px var(--brand-primary); background: rgba(0,54,0,.02); }
.opt-card input { accent-color: var(--brand-primary); width: 18px; height: 18px; }
.opt-card__icon { width: 42px; height: 42px; border-radius: 10px; background: var(--brand-bg); display: inline-flex; align-items: center; justify-content: center; color: var(--brand-primary); font-size: 1.1rem; }
.opt-card__body { flex: 1; }
.opt-card__title { font-weight: 700; }
.opt-card__sub { color: var(--brand-muted); font-size: .82rem; }
.opt-card__price { font-weight: 800; color: var(--brand-primary); }
.opt-card__details { display: none; flex-direction: column; gap: 2px; margin-top: 8px; font-size: .82rem; }
.opt-card.is-active .opt-card__details { display: flex; }
.opt-card__detail { color: var(--brand-text); }

.checkout-summary { background: #fff; border: 1px solid var(--brand-border); border-radius: var(--shop-radius-lg); padding: 20px; position: sticky; top: 14px; }
.checkout-summary h2 { font-size: 1.1rem; font-weight: 800; margin: 0 0 14px; }
.checkout-summary__items { display: flex; flex-direction: column; gap: 12px; max-height: 280px; overflow-y: auto; margin-bottom: 14px; }
.checkout-summary__item { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; }
.checkout-summary__item img { width: 52px; height: 52px; object-fit: contain; border: 1px solid var(--brand-border); border-radius: 8px; padding: 4px; }
.checkout-summary__item .nm { font-size: .84rem; font-weight: 600; line-height: 1.3; }
.checkout-summary__item .qt { color: var(--brand-muted); font-size: .78rem; }
.checkout-summary__item .pr { font-weight: 700; font-size: .88rem; white-space: nowrap; }
.checkout-review-box { background: var(--brand-bg); border-radius: var(--shop-radius); padding: 14px 16px; font-size: .88rem; line-height: 1.6; }
.checkout-review-box h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--brand-muted); margin: 0 0 6px; }

/* ── Account orders + tracking ───────────────────────────────────────────── */
.orders-table { width: 100%; background: #fff; border: 1px solid var(--brand-border); border-radius: var(--shop-radius-lg); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.orders-table th, .orders-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--brand-bg); font-size: .9rem; }
.orders-table th { background: var(--brand-bg); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-muted); }
.orders-table tr:last-child td { border-bottom: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.status-pill.pending { background: #fff3e0; color: var(--shop-warn); }
.status-pill.paid, .status-pill.confirmed { background: #e8f7ee; color: var(--shop-success); }
.status-pill.cancelled, .status-pill.refunded { background: #fdecea; color: var(--shop-danger); }
.status-pill.completed { background: #e7f0fe; color: #2563eb; }

.order-track { display: flex; align-items: flex-start; margin: 20px 0 6px; }
.order-track__step { flex: 1; text-align: center; position: relative; color: var(--brand-muted); font-size: .82rem; }
.order-track__step::before { content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 3px; background: var(--brand-border); z-index: 0; }
.order-track__step:first-child::before { display: none; }
.order-track__dot { width: 38px; height: 38px; border-radius: 50%; background: #fff; border: 3px solid var(--brand-border); display: inline-flex; align-items: center; justify-content: center; margin: 0 auto 8px; position: relative; z-index: 1; color: var(--brand-muted); }
.order-track__step.done .order-track__dot { background: var(--shop-success); border-color: var(--shop-success); color: #fff; }
.order-track__step.done { color: var(--brand-text); font-weight: 600; }
.order-track__step.done::before { background: var(--shop-success); }
.order-track__step.current .order-track__dot { border-color: var(--brand-primary); color: var(--brand-primary); }
.order-track.cancelled .order-track__dot { background: #fdecea; border-color: var(--shop-danger); color: var(--shop-danger); }

/* ── Toasts ──────────────────────────────────────────────────────────────── */
.toast-stack { position: fixed; top: 84px; right: 18px; z-index: 2147483647; display: flex; flex-direction: column; gap: 10px; max-width: min(360px, calc(100vw - 36px)); pointer-events: none; }
.toast-stack .toast { pointer-events: auto; }
.toast {
    display: flex; align-items: flex-start; gap: 11px; background: #fff; border: 1px solid var(--brand-border);
    border-left: 4px solid var(--brand-primary); border-radius: var(--shop-radius); padding: 13px 15px;
    box-shadow: 0 12px 34px rgba(0,0,0,.16); transform: translateX(120%); opacity: 0; transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .28s;
}
.toast.is-shown { transform: none; opacity: 1; }
.toast.success { border-left-color: var(--shop-success); }
.toast.error { border-left-color: var(--shop-danger); }
.toast__icon { font-size: 1.25rem; margin-top: 1px; }
.toast.success .toast__icon { color: var(--shop-success); }
.toast.error .toast__icon { color: var(--shop-danger); }
.toast__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.toast__title { font-size: .92rem; font-weight: 800; color: var(--brand-text); line-height: 1.25; }
.toast__msg { font-size: .85rem; color: var(--brand-muted); line-height: 1.4; word-break: break-word; }
.toast__action {
    align-self: flex-start; margin-top: 7px; display: inline-flex; align-items: center; gap: 6px;
    font-size: .8rem; font-weight: 800; color: var(--shop-success); text-decoration: none;
    padding: 5px 11px; border: 1px solid color-mix(in srgb, var(--shop-success) 35%, transparent);
    border-radius: 999px; background: color-mix(in srgb, var(--shop-success) 10%, transparent);
    transition: background .15s, border-color .15s, transform .05s;
}
.toast__action:hover { background: color-mix(in srgb, var(--shop-success) 18%, transparent); border-color: var(--shop-success); }
.toast__action:active { transform: translateY(1px); }
.toast__action i { font-size: .72rem; }
.toast__close { background: none; border: 0; color: var(--brand-muted); cursor: pointer; font-size: .95rem; padding: 0; line-height: 1; }
.toast__close:hover { color: var(--brand-text); }
/* subtle pop-in on the cart-add icon */
.toast.cart .toast__icon { animation: toastPop .4s cubic-bezier(.2,.9,.3,1.4); }
@keyframes toastPop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
