/*
 * FOMA shop: product page (.pdp) and cart page (.cartx).
 * Load after main.css and typography.css.
 */

:root {
    --shop-brand: #ffcc00;
    --shop-brand-hover: #ffb01f;
    --shop-brand-soft: #fff8d6;
    --shop-ink: #3d464d;
    --shop-muted: #6c757d;
    --shop-line: #ebebeb;
    --shop-surface: #fff;
    --shop-surface-alt: #f7f7f7;
    --shop-success: #2e9d55;
    --shop-success-soft: #e8f6ed;
    --shop-warn: #b7791f;
    --shop-warn-soft: #fff4de;
    --shop-danger: #d64545;
    --shop-danger-soft: #fdecec;
    --shop-radius: 12px;
    --shop-radius-sm: 8px;
    --shop-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 24px rgba(0, 0, 0, .06);
}

/* ---------- shared bits ---------- */

.shop-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: var(--fs-meta);
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.shop-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.shop-badge--ok { color: var(--shop-success); background: var(--shop-success-soft); }
.shop-badge--low { color: var(--shop-warn); background: var(--shop-warn-soft); }
.shop-badge--out { color: var(--shop-danger); background: var(--shop-danger-soft); }

.shop-discount {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--shop-danger);
    color: #fff;
    font-size: var(--fs-meta);
    font-weight: 800;
    line-height: 1.3;
}

.qty-stepper {
    display: inline-flex;
    align-items: stretch;
    height: 48px;
    border: 1px solid var(--shop-line);
    border-radius: var(--shop-radius-sm);
    background: var(--shop-surface);
    overflow: hidden;
}

.qty-stepper__btn {
    width: 44px;
    border: 0;
    background: transparent;
    color: var(--shop-ink);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s;
}

.qty-stepper__btn:hover:not(:disabled) { background: var(--shop-surface-alt); }
.qty-stepper__btn:disabled { color: #c4c4c4; cursor: not-allowed; }
.qty-stepper__btn:focus-visible { outline: 2px solid var(--shop-brand); outline-offset: -2px; }

.qty-stepper__input {
    width: 48px;
    border: 0;
    border-left: 1px solid var(--shop-line);
    border-right: 1px solid var(--shop-line);
    text-align: center;
    font-weight: 700;
    font-size: var(--fs-base);
    color: var(--shop-ink);
    -moz-appearance: textfield;
}

.qty-stepper__input::-webkit-outer-spin-button,
.qty-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper__input:focus { outline: none; background: var(--shop-brand-soft); }

.qty-stepper--sm { height: 38px; }
.qty-stepper--sm .qty-stepper__btn { width: 36px; font-size: 18px; }
.qty-stepper--sm .qty-stepper__input { width: 40px; font-size: var(--fs-small); }

.shop-btn-dark {
    border: 1px solid var(--shop-ink);
    background: var(--shop-ink);
    color: #fff;
}

.shop-btn-dark:hover,
.shop-btn-dark:focus { background: #23292e; border-color: #23292e; color: #fff; }

/* Product-card badges (partials/badges.blade.php). Theme already styles --sale/--new/--hot. */
.product-card__badges-list { gap: 4px; z-index: 1; }
.product-card__badge { border-radius: 4px; font-weight: 800; letter-spacing: .02em; }
.product-card__badge--sale { background: #e53935; }
.product-card__badge--hot { background: #ff7a00; }
.product-card__badge--new { background: #2e7dff; }
.product-card__badge--featured { background: var(--shop-brand); color: var(--shop-ink); }
.product-card__badge--out { background: #8a9299; color: #fff; }

/* ---------- product-card add-to-cart (partials/card-cart.blade.php) ---------- */
/* Always visible (no hover needed on phones). Every state has the same height, so cards don't jump. */

.card-cart { display: flex; width: 100%; margin-top: 12px; }
.card-cart__form { display: contents; }

.card-cart__btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: var(--shop-radius-sm);
    font-family: var(--font-body);
    font-size: var(--fs-small);
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .1s;
}

.card-cart__btn > span { overflow: hidden; text-overflow: ellipsis; }
.card-cart__btn svg { flex: none; fill: currentColor; }
.card-cart__btn:active { transform: scale(.98); }
.card-cart__btn:focus-visible { outline: 2px solid var(--shop-ink); outline-offset: 2px; }

.card-cart__btn--add { background: var(--shop-brand); color: var(--shop-ink); }
.card-cart__btn--add:hover { background: var(--shop-brand-hover); color: var(--shop-ink); }
.card-cart__btn--add.is-loading { opacity: .6; cursor: progress; }

.card-cart__btn--choose { border-color: var(--shop-ink); background: var(--shop-surface); color: var(--shop-ink); }
.card-cart__btn--choose:hover { background: var(--shop-surface-alt); color: var(--shop-ink); }

.card-cart__btn--off { background: var(--shop-surface-alt); color: var(--shop-muted); cursor: not-allowed; }

/* Equal card heights in the ФОМА БАРАА carousel and grid lists:
   - the price row is always 2 lines tall, so a discount (old price on its own line) doesn't stretch its column;
   - carousel cells don't grow, so a column with a single card at the end isn't one giant card. */
.block-products-carousel .product-card__prices,
.products-list .product-card__prices { min-height: 32px; min-height: 2lh; align-content: flex-start; }
.block-products-carousel__cell { flex: 0 0 auto; }

/* Home shelves (horizontal cards): name, price and button stacked in the info column. */
.product-card--shelf .product-card__info {
    display: flex;
    flex-direction: column;
    padding: 14px 30px 14px 0;
}

.product-card--shelf .product-card__prices { margin-top: 8px; }
.product-card--shelf .card-cart { margin-top: 10px; }
.product-card--shelf .card-cart__btn { height: 38px; }

/* Narrow cards (6 per row in the carousel, 2 per row on phones, or next to the [🛒 N] link):
   sized by the card, not the screen, so "Сагсанд нэмэх" never gets cut to "Сагсанд нэ…". */
.card-cart { container-type: inline-size; }

@container (max-width: 190px) {
    .card-cart__btn { gap: 6px; padding: 0 8px; font-size: 13px; }
    .card-cart__btn--add svg { display: none; }
}

@container (max-width: 150px) {
    .card-cart__btn { padding: 0 6px; font-size: 12px; }
}

/* With the [🛒 N] cart link beside it (main.css .card-cart__go, 40px + gap) the add button has ~46px less room. */
@container (max-width: 240px) {
    .card-cart:has(.card-cart__go:not([hidden])) .card-cart__btn { gap: 6px; padding: 0 8px; font-size: 13px; }
    .card-cart:has(.card-cart__go:not([hidden])) .card-cart__btn--add svg { display: none; }
}

@container (max-width: 160px) {
    .card-cart:has(.card-cart__go:not([hidden])) .card-cart__btn { padding: 0 5px; font-size: 12px; }
    .card-cart:has(.card-cart__go:not([hidden])) .card-cart__go { flex-basis: 34px; width: 34px; }
}

/* Product page: "✓ Сагсанд N ширхэг байна · Сагс руу очих" */
.pdp__in-cart {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: -6px;
    padding: 12px 14px;
    border-radius: var(--shop-radius-sm);
    background: var(--shop-success-soft);
    color: var(--shop-success);
    font-size: var(--fs-small);
    font-weight: 600;
}

.pdp__in-cart[hidden] { display: none; }
.pdp__in-cart a { color: var(--shop-ink); font-weight: 800; white-space: nowrap; }
.pdp__in-cart.is-pulse { animation: pdp-in-cart-pulse .9s ease-out; }

@keyframes pdp-in-cart-pulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 157, 85, .45); }
    100% { box-shadow: 0 0 0 12px rgba(46, 157, 85, 0); }
}

/* ---------- header "Миний захиалга" (includes/my-orders-indicator.blade.php) ---------- */

.my-orders__icon { position: relative; display: inline-flex; }

.my-orders__badge {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #fff;
    color: var(--shop-ink);
    font-size: 10px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
}

.my-orders__label {
    margin-left: 10px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

/* Narrow desktops: icon only, the nav links need the room. */
@media (max-width: 1099px) {
    .my-orders__label { display: none; }
}

/* Phones: the orders icon only appears once this browser has ordered. The bar is nearly full
   (menu, logo, search, cart, weather), so the weather then shows its icon only. */
@media (max-width: 575px) {
    .mobile-header__indicators:has(.indicator--my-orders) .weather__text { display: none; }
}

@media (max-width: 359px) {
    .mobile-header__indicators:has(.indicator--my-orders) .indicator:has(.weather__text) { display: none; }
}

/* ---------- reading → buying: products under an article, booking offer, product row in the news list ---------- */

.ashop { margin: 28px 0 8px; padding: 18px; border-radius: var(--shop-radius); background: var(--shop-surface-alt); }
.ashop__head, .nshop__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ashop__title, .nshop__title { font-family: var(--font-title); font-size: var(--fs-h5); font-weight: 700; margin: 0; }
.ashop__all, .nshop__all { flex: none; font-size: var(--fs-small); font-weight: 700; color: var(--shop-ink); white-space: nowrap; }
.ashop__all:hover, .nshop__all:hover { color: var(--shop-ink); text-decoration: underline; }
.ashop__list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.ashop__item { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--shop-radius-sm); background: var(--shop-surface); box-shadow: var(--shop-shadow); }
.ashop__img { display: block; aspect-ratio: 1 / 1; padding: 10px; background: #fff; }
.ashop__img img { width: 100%; height: 100%; object-fit: contain; }
.ashop__body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 10px 12px 12px; }
.ashop__name { color: var(--shop-ink); font-size: var(--fs-small); font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ashop__name:hover { color: var(--shop-ink); text-decoration: underline; }
.ashop__body .card-cart { margin-top: auto; }
/* phones: one row you swipe instead of a tall stack */
@media (max-width: 575px) {
    .ashop { margin-left: -15px; margin-right: -15px; border-radius: 0; padding: 16px 15px; }
    .ashop__list { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
    .ashop__item { scroll-snap-align: start; }
}

.abook { display: flex; align-items: center; gap: 14px; margin: 16px 0 8px; padding: 16px 18px; border-radius: var(--shop-radius); background: var(--shop-brand-soft); border: 1px solid #f3e3a1; }
.abook__icon { font-size: 30px; line-height: 1; }
.abook__text { display: flex; flex: 1; flex-direction: column; gap: 2px; font-size: var(--fs-small); }
.abook__text b { font-size: var(--fs-base); }
.abook__btn { flex: none; font-weight: 800; border-radius: var(--shop-radius-sm); }
@media (max-width: 575px) {
    .abook { flex-wrap: wrap; }
    .abook__btn { width: 100%; }
}

.posts-list--layout--grid4 .posts-list__item__4.posts-list__item--wide { width: 100% !important; }
.nshop { padding: 18px; border-radius: var(--shop-radius); background: var(--shop-surface-alt); }
.nshop__list { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nshop__item { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: var(--shop-radius-sm); background: var(--shop-surface); color: var(--shop-ink); transition: box-shadow .15s, transform .15s; }
.nshop__item:hover { color: var(--shop-ink); text-decoration: none; box-shadow: var(--shop-shadow); transform: translateY(-2px); }
.nshop__img { display: block; aspect-ratio: 1 / 1; }
.nshop__img img { width: 100%; height: 100%; object-fit: contain; }
.nshop__name { font-size: var(--fs-small); font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nshop .product-card__prices { font-size: var(--fs-base); font-weight: 800; }
@media (max-width: 767px) {
    .nshop__list { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 42%; overflow-x: auto; scroll-snap-type: x mandatory; }
    .nshop__item { scroll-snap-align: start; }
}

/* ---------- header weather: chip + popover (phones: bottom sheet) ---------- */

.wx { position: relative; }
.wx__chip { border: 0; background: none; padding: 0; cursor: pointer; color: inherit; font: inherit; }
.wx__chip:focus-visible { outline: 2px solid var(--shop-ink); outline-offset: 2px; border-radius: 6px; }
.wx__panel {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 1000; width: 320px;
    padding: 16px; border-radius: var(--shop-radius); background: var(--shop-surface); color: var(--shop-ink);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .05); text-align: left; line-height: 1.4;
}
.wx__head { display: flex; justify-content: space-between; gap: 8px; }
.wx__head small { color: var(--shop-muted); font-size: var(--fs-meta); }
.wx__now { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.wx__now b { font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.wx__now span { display: flex; flex-direction: column; font-size: var(--fs-small); font-weight: 700; }
.wx__now em { font-style: normal; font-weight: 400; color: var(--shop-muted); }
.wx__close { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--shop-surface-alt); color: var(--shop-ink); font-size: 20px; line-height: 1; cursor: pointer; }

.wx__air { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; margin: 12px 0 0; padding: 10px 12px; border-radius: var(--shop-radius-sm); font-size: var(--fs-small); }
.wx__air span { color: inherit; opacity: .8; }
.wx__air b { grid-row: span 2; align-self: center; font-size: var(--fs-base); }
.wx__air small { opacity: .8; }
.wx__air--good { background: #e6f6ea; color: #1d6b34; }
.wx__air--fair { background: #fff6d6; color: #7a5a00; }
.wx__air--poor { background: #ffe9d6; color: #8a4300; }
.wx__air--bad { background: #fde2e2; color: #8f1d1d; }
.wx__air--worse { background: #efe0f5; color: #5d1f74; }
.wx__air--worst { background: #f3dcdc; color: #5c0b0b; }

.wx__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 0; }
.wx__facts div { padding: 8px 10px; border-radius: var(--shop-radius-sm); background: var(--shop-surface-alt); }
.wx__facts dt { font-size: var(--fs-meta); font-weight: 400; color: var(--shop-muted); }
.wx__facts dd { margin: 0; font-weight: 700; }

.wx__days { list-style: none; margin: 10px 0 0; padding: 0; }
.wx__days li { display: grid; grid-template-columns: 1fr 32px 84px; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--shop-line); font-size: var(--fs-small); }
.wx__days li:last-child { border-bottom: 0; }
.wx__day { font-weight: 700; }
.wx__range { text-align: right; color: var(--shop-muted); white-space: nowrap; }
.wx__range b { color: var(--shop-ink); }

.wx__luck { display: flex; justify-content: space-between; margin-top: 12px; padding: 10px 12px; border-radius: var(--shop-radius-sm); background: var(--shop-brand-soft); color: var(--shop-ink); font-size: var(--fs-small); font-weight: 700; }
.wx__luck:hover { background: var(--shop-brand); color: var(--shop-ink); text-decoration: none; }
.wx__src { display: block; margin-top: 10px; text-align: right; font-size: 12px; color: var(--shop-muted); }

@media (max-width: 767px) {
    .wx__panel {
        position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 85vh; overflow-y: auto;
        border-radius: 18px 18px 0 0; padding: 18px max(16px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
        animation: wx-up .2s ease-out;
        /* the dim backdrop is the sheet's own shadow: a body overlay would sit above the sheet,
           which lives inside the sticky header's stacking context */
        box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35), 0 -8px 24px rgba(0, 0, 0, .12);
    }
    body.wx-open .lc, body.wx-open .live-chat, body.wx-open [data-achat], body.wx-open .float-stack { visibility: hidden; }
}
@keyframes wx-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wx__panel { animation: none; } }

/* ---------- partners (banner position D) ---------- */

.partners { margin: 32px 0; }
.partners__title { margin: 0 0 14px; text-align: center; font-size: var(--fs-meta); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--shop-muted); }
.partners__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; list-style: none; margin: 0; padding: 0; }
.partners__item { flex: 0 1 200px; }
.partners__logo { display: flex; align-items: center; justify-content: center; height: 84px; padding: 12px 18px; border: 1px solid var(--shop-line); border-radius: var(--shop-radius); background: var(--shop-surface); transition: border-color .15s, box-shadow .15s, transform .15s; }
.partners__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
a.partners__logo:hover { border-color: #d6d9dc; box-shadow: var(--shop-shadow); transform: translateY(-2px); }
@media (max-width: 575px) {
    /* many logos: one swipeable row instead of a tall stack; few: they still sit centered */
    .partners__list { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
    .partners__list:has(> :nth-child(-n+2):last-child) { justify-content: center; }
    .partners__item { flex: 0 0 44%; scroll-snap-align: start; }
    .partners__logo { height: 72px; }
}

/* ---------- footer: brand / contact / shop / FOMA ---------- */

.ft { display: grid; gap: 28px; padding: 40px 0 28px; }
@media (min-width: 576px) { .ft { grid-template-columns: 1fr 1fr; } .ft__col--brand { grid-column: 1 / -1; } }
@media (min-width: 992px) { .ft { grid-template-columns: 1.5fr 1.2fr 1fr 1fr; gap: 40px; padding: 48px 0 32px; } .ft__col--brand { grid-column: auto; } }

.ft__brand { font-family: var(--font-title); font-size: var(--fs-h4); font-weight: 700; letter-spacing: .2em; margin: 0 0 14px; }
.ft__title { font-size: var(--fs-meta); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--shop-muted); margin: 0 0 14px; }

.ft__info { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; color: var(--shop-ink); font-size: var(--fs-small); line-height: 1.5; }
.ft__info li { display: flex; gap: 10px; }
.ft__info svg, .ft__phone svg, .ft__mail svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--shop-muted); }

.ft__social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ft__social-link { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--shop-surface-alt); color: var(--shop-ink); font-size: 16px; transition: background .15s, color .15s, transform .15s; }
.ft__social-link:hover { background: var(--shop-ink); color: #fff; transform: translateY(-2px); text-decoration: none; }

.ft__phone { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 10px; border-radius: var(--shop-radius); background: var(--shop-brand-soft); color: var(--shop-ink); font-size: var(--fs-h5); font-weight: 800; transition: background .15s; }
.ft__phone svg { width: 22px; height: 22px; margin: 0; color: var(--shop-ink); }
.ft__phone span { display: flex; flex-direction: column; line-height: 1.25; }
.ft__phone small { font-size: var(--fs-meta); font-weight: 600; color: var(--shop-muted); }
.ft__phone:hover { background: var(--shop-brand); color: var(--shop-ink); text-decoration: none; }
.ft__mail { display: inline-flex; align-items: center; gap: 10px; padding: 4px 2px; color: var(--shop-ink); font-size: var(--fs-small); font-weight: 600; word-break: break-all; }
.ft__mail:hover { color: var(--shop-ink); text-decoration: underline; }

.ft__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ft__links a { display: inline-block; padding: 6px 0; color: var(--shop-ink); font-size: var(--fs-small); font-weight: 600; }
.ft__links a:hover { color: var(--shop-ink); text-decoration: underline; text-underline-offset: 3px; }

/* phones: the two link groups side by side, everything else full width */
@media (max-width: 575px) {
    .ft { grid-template-columns: 1fr 1fr; gap: 24px 16px; padding: 32px 0 20px; }
    .ft__col--brand, .ft__col--contact { grid-column: 1 / -1; }
    .ft__links a { padding: 8px 0; } /* bigger tap target */
}

/* ---------- main menu: current section + dropdowns (CSS only: hover and keyboard focus) ---------- */

.nav-links__item { position: relative; }
.nav-links__item.is-current .nav-links__item-body { box-shadow: inset 0 -3px 0 var(--shop-ink); border-radius: 0; }
.nav-dd__arrow { margin-left: 6px; opacity: .55; transition: transform .2s; }
.nav-dd:hover .nav-dd__arrow, .nav-dd:focus-within .nav-dd__arrow { transform: rotate(180deg); }

.nav-dd__menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 120;
    min-width: 230px;
    padding: 8px;
    border-radius: var(--shop-radius);
    background: var(--shop-surface);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .14), 0 0 0 1px rgba(0, 0, 0, .04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .15s, transform .15s, visibility .15s;
    text-transform: none;
    letter-spacing: 0;
}
.nav-dd__menu--wide { min-width: 290px; }
/* hover bridge: the pointer can travel from the item to the menu without it closing */
.nav-dd__menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.nav-dd:hover .nav-dd__menu, .nav-dd:focus-within .nav-dd__menu { opacity: 1; visibility: visible; transform: none; }

.nav-dd__item, .nav-dd__all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    border-radius: var(--shop-radius-sm);
    color: var(--shop-ink);
    font-size: var(--fs-small);
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}
.nav-dd__item:hover, .nav-dd__item:focus-visible { background: var(--shop-brand-soft); color: var(--shop-ink); text-decoration: none; }
.nav-dd__item.is-current { background: var(--shop-surface-alt); box-shadow: inset 3px 0 0 var(--shop-brand-hover); }
.nav-dd__item--service span { display: flex; flex-direction: column; }
.nav-dd__item--service small { color: var(--shop-muted); font-weight: 400; font-size: var(--fs-meta); }
.nav-dd__item--service b { font-size: var(--fs-small); }
.nav-dd__all { margin-top: 4px; border-top: 1px solid var(--shop-line); border-radius: 0 0 var(--shop-radius-sm) var(--shop-radius-sm); color: var(--shop-muted); font-weight: 700; }
.nav-dd__all:hover { color: var(--shop-ink); text-decoration: none; }
.nav-dd__label { display: block; padding: 6px 12px 4px; font-size: var(--fs-meta); font-weight: 700; color: var(--shop-muted); text-transform: uppercase; letter-spacing: .04em; }

@media (prefers-reduced-motion: reduce) { .nav-dd__menu, .nav-dd__arrow { transition: none; } }

/* ---------- product page ---------- */

/* Gallery: swipeable track, thumbnail rail (left on desktop, strip below on phones), full-size zoom. */
.pdp-gallery { display: flex; flex-direction: column; gap: 10px; }

.pdp-gallery__stage {
    position: relative;
    border: 1px solid var(--shop-line);
    border-radius: var(--shop-radius);
    background: var(--shop-surface);
    overflow: hidden;
}

.pdp-gallery__track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    outline: none;
}
.pdp-gallery__track::-webkit-scrollbar { display: none; }
.pdp-gallery__track:focus-visible { box-shadow: inset 0 0 0 2px var(--shop-brand); }

.pdp-gallery__slide {
    flex: 0 0 100%;
    aspect-ratio: 1 / 1;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    cursor: zoom-in;
}
.pdp-gallery__slide img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; }

.pdp-gallery__zoom,
.pdp-gallery__nav {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--shop-ink);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 2px 10px rgba(0, 0, 0, .1);
    cursor: pointer;
    transition: opacity .2s, background .2s;
}
.pdp-gallery__zoom { top: 12px; right: 12px; width: 38px; height: 38px; fill: currentColor; }
.pdp-gallery__zoom:hover,
.pdp-gallery__nav:hover { background: var(--shop-brand); }

.pdp-gallery__nav {
    top: 50%;
    width: 42px;
    height: 42px;
    margin-top: -21px;
    font-size: 28px;
    line-height: 1;
    padding-bottom: 3px;
    opacity: 0;
}
.pdp-gallery__nav--prev { left: 12px; }
.pdp-gallery__nav--next { right: 12px; }
.pdp-gallery__stage:hover .pdp-gallery__nav,
.pdp-gallery__nav:focus-visible { opacity: 1; }
.pdp-gallery__nav:disabled { opacity: 0 !important; pointer-events: none; }

.pdp-gallery__count {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: var(--fs-meta);
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.pdp-gallery__thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    padding: 2px;
}

.pdp-gallery__thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    padding: 4px;
    border: 1px solid var(--shop-line);
    border-radius: var(--shop-radius-sm);
    background: var(--shop-surface);
    scroll-snap-align: start;
    cursor: pointer;
    opacity: .7;
    transition: opacity .15s, border-color .15s, box-shadow .15s;
}
.pdp-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }
.pdp-gallery__thumb:hover { opacity: 1; }
.pdp-gallery__thumb.is-active { opacity: 1; border-color: var(--shop-ink); box-shadow: 0 0 0 1px var(--shop-ink); }
.pdp-gallery__thumb:focus-visible { outline: 2px solid var(--shop-brand); outline-offset: 2px; }

/* Desktop/tablet: thumbnails in a vertical rail left of the image, gallery stays in view while the info column scrolls. */
@media (min-width: 768px) {
    .pdp-gallery { position: sticky; top: 72px; }
    .pdp-gallery--multi { flex-direction: row-reverse; align-items: flex-start; }
    .pdp-gallery--multi .pdp-gallery__stage { flex: 1; min-width: 0; }
    .pdp-gallery--multi .pdp-gallery__thumbs {
        flex: 0 0 72px;
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: auto;
        scroll-snap-type: y proximity;
        /* Rail is exactly as tall as the image: contain:size stops its content from growing the row, stretch fills it. */
        contain: size;
        align-self: stretch;
    }
    .pdp-gallery--multi .pdp-gallery__thumb { flex-basis: 72px; width: 72px; height: 72px; }
}

/* Touch screens have no hover: arrows stay hidden, swipe instead; the counter tells there is more. */
@media (hover: none) {
    .pdp-gallery__nav { display: none; }
}

@media (max-width: 767px) {
    .pdp-gallery__slide { padding: 8px; }
    .pdp-gallery__thumb { flex-basis: 56px; width: 56px; height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
    .pdp-gallery__track { scroll-behavior: auto; }
}

.pdp {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.pdp__category {
    align-self: flex-start;
    font-size: var(--fs-meta);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--shop-muted);
}

.pdp__category:hover { color: var(--shop-ink); }

.pdp .product__name.pdp__title { margin: -8px 0 0; }

.pdp__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: -8px;
    font-size: var(--fs-small);
    color: var(--shop-muted);
}

.pdp__meta b { color: var(--shop-ink); font-weight: 600; }

.pdp__price-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 16px 18px;
    border-radius: var(--shop-radius);
    background: var(--shop-surface-alt);
}

.pdp__price {
    font-family: var(--font-title);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--shop-ink);
}

.pdp__old-price {
    font-size: var(--fs-base);
    color: var(--shop-muted);
    text-decoration: line-through;
}

.pdp__price-card .shop-badge { margin-left: auto; }

.pdp__short {
    font-size: var(--fs-base);
    line-height: var(--lh-body);
    color: #5a6268;
}

.pdp__short p:last-child { margin-bottom: 0; }

.pdp__form { display: flex; flex-direction: column; gap: 18px; margin: 0; }

.pdp__field { margin: 0; padding: 0; border: 0; min-width: 0; }

.pdp__label {
    display: block;
    margin-bottom: 10px;
    font-size: var(--fs-small);
    font-weight: 700;
    color: var(--shop-ink);
}

.pdp__label span { font-weight: 400; color: var(--shop-muted); }

.pdp__swatches { display: flex; flex-wrap: wrap; gap: 10px; }

.pdp-swatch { position: relative; margin: 0; cursor: pointer; }

.pdp-swatch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pdp-swatch span {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--swatch, #ccc);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), 0 0 0 3px var(--shop-surface), 0 0 0 4px transparent;
    transition: box-shadow .15s;
}

.pdp-swatch:hover span { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), 0 0 0 3px var(--shop-surface), 0 0 0 4px #c9c9c9; }
.pdp-swatch input:checked + span { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), 0 0 0 3px var(--shop-surface), 0 0 0 5px var(--shop-ink); }
.pdp-swatch input:focus-visible + span { outline: 2px solid var(--shop-brand); outline-offset: 6px; }

.pdp__buy { display: flex; gap: 12px; }

.pdp__add {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    border-radius: var(--shop-radius-sm);
    font-weight: 700;
}

.pdp__add svg { fill: currentColor; }

@media (max-width: 400px) {
    .pdp__buy { gap: 8px; }
    .pdp__add { padding-left: 12px; padding-right: 12px; white-space: nowrap; }
    .pdp__add svg { display: none; }
}

.pdp__buy-now {
    height: 48px;
    border-radius: var(--shop-radius-sm);
    font-weight: 700;
}

.pdp__perks {
    display: grid;
    gap: 12px;
    margin: 4px 0 0;
    padding: 16px 18px;
    border: 1px solid var(--shop-line);
    border-radius: var(--shop-radius);
    list-style: none;
}

.pdp__perk { display: flex; align-items: center; gap: 14px; font-size: var(--fs-small); line-height: 1.45; }

.pdp__perk-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--shop-brand-soft);
}

.pdp__perk-icon svg { width: 22px; height: 22px; fill: var(--shop-ink); }
.pdp__perk b { display: block; color: var(--shop-ink); }
.pdp__perk span { color: var(--shop-muted); }
.pdp__perk a { color: inherit; font-weight: 700; }

/* Mobile: price + add-to-cart pinned to the bottom once the main button scrolls away. */
.pdp-sticky { display: none; }

@media (max-width: 767px) {
    .pdp__price { font-size: 26px; }

    .pdp-sticky {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: var(--shop-surface);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, .08);
        transform: translateY(110%);
        transition: transform .2s ease;
    }

    .pdp-sticky.is-visible { transform: none; }

    .pdp-sticky__price { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
    .pdp-sticky__price small { font-size: var(--fs-meta); color: var(--shop-muted); }
    .pdp-sticky__price b { font-size: var(--fs-h5); white-space: nowrap; }
    .pdp-sticky .btn { flex: 1; height: 46px; border-radius: var(--shop-radius-sm); font-weight: 700; }
}

/* ---------- cart page ---------- */

.cartx { padding-bottom: 64px; }

.cartx__head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 8px 0 24px;
}

.cartx__head h1 { margin: 0; font-size: var(--fs-h2); }
.cartx__head span { color: var(--shop-muted); font-size: var(--fs-base); }

.cartx__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

#cart-root { transition: opacity .15s; }

.cartx__toolbar { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.cartx__toolbar form { margin: 0; }

.cartx__clear {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--shop-muted);
    font-size: var(--fs-small);
    font-weight: 600;
    cursor: pointer;
}

.cartx__clear:hover { background: var(--shop-danger-soft); color: var(--shop-danger); }
.cartx__clear:focus-visible { outline: 2px solid var(--shop-ink); outline-offset: 2px; }
#cart-root.is-loading { opacity: .55; pointer-events: none; }

.cartx__alert {
    margin-bottom: 14px;
    padding: 12px 16px;
    border-radius: var(--shop-radius-sm);
    background: var(--shop-danger-soft);
    color: var(--shop-danger);
    font-size: var(--fs-small);
    font-weight: 600;
}

.cartx__list {
    border: 1px solid var(--shop-line);
    border-radius: var(--shop-radius);
    background: var(--shop-surface);
}

.cartx-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    grid-template-areas: "img info total" "img ctrl total";
    gap: 6px 18px;
    padding: 18px;
}

.cartx-item + .cartx-item { border-top: 1px solid var(--shop-line); }
.cartx-item--blocked .cartx-item__img img { opacity: .45; filter: grayscale(1); }

.cartx-item__img {
    grid-area: img;
    display: block;
    width: 96px;
    height: 96px;
    border-radius: var(--shop-radius-sm);
    background: var(--shop-surface-alt);
    overflow: hidden;
}

.cartx-item__img img { width: 100%; height: 100%; object-fit: cover; }

.cartx-item__info { grid-area: info; min-width: 0; }

.cartx-item__name {
    display: block;
    font-weight: 700;
    color: var(--shop-ink);
    line-height: 1.35;
}

.cartx-item__name:hover { color: var(--shop-ink); text-decoration: underline; }

.cartx-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin-top: 6px;
    font-size: var(--fs-small);
    color: var(--shop-muted);
}

/* Colour of a line: a clear chip in the text and a swatch on the photo (same photo for every colour). */
.cartx-color {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 4px;
    border-radius: 999px;
    background: var(--shop-surface-alt);
    color: var(--shop-ink);
    font-size: var(--fs-small);
    line-height: 1.3;
}

.cartx-color i {
    flex: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--swatch, #ccc);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25);
}

.cartx-color b { font-weight: 700; }

.cartx-item__img { position: relative; }

.cartx-item__img-swatch {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--swatch, #ccc);
    box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0, 0, 0, .3), inset 0 0 0 1px rgba(0, 0, 0, .2);
}

.cartx-item__unit s { margin-left: 4px; }

.cartx-item__ctrl {
    grid-area: ctrl;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.cartx-item__ctrl form { margin: 0; }

.cartx-item__remove {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--shop-muted);
    font-size: var(--fs-small);
    cursor: pointer;
}

.cartx-item__remove:hover { background: var(--shop-danger-soft); color: var(--shop-danger); }
.cartx-item__remove svg { fill: currentColor; }

.cartx-item__total {
    grid-area: total;
    text-align: right;
    font-weight: 800;
    font-size: var(--fs-h5);
    white-space: nowrap;
}

.cartx-item__total s {
    display: block;
    font-weight: 400;
    font-size: var(--fs-meta);
    color: var(--shop-muted);
}

.cartx__summary {
    position: sticky;
    top: 20px;
    padding: 22px;
    border-radius: var(--shop-radius);
    background: var(--shop-surface);
    box-shadow: var(--shop-shadow);
    border: 1px solid var(--shop-line);
}

.cartx__summary h2 { margin: 0 0 16px; font-size: var(--fs-h4); }

.cartx__row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
    font-size: var(--fs-base);
}

.cartx__row span:first-child { color: var(--shop-muted); }
.cartx__row--save span:last-child { color: var(--shop-success); font-weight: 700; }

.cartx__row--total {
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px dashed var(--shop-line);
    align-items: baseline;
}

.cartx__row--total span:first-child { color: var(--shop-ink); font-weight: 700; }
.cartx__row--total span:last-child { font-family: var(--font-title); font-size: 26px; font-weight: 700; }

.cartx__free {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: var(--shop-radius-sm);
    background: var(--shop-success-soft);
    color: var(--shop-success);
    font-size: var(--fs-small);
    line-height: 1.45;
}

.cartx__note {
    margin: 8px 0 18px;
    font-size: var(--fs-meta);
    color: var(--shop-muted);
    line-height: 1.5;
}

.cartx__checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    border-radius: var(--shop-radius-sm);
    font-weight: 800;
    font-size: var(--fs-base);
}

.cartx__checkout.disabled,
.cartx__checkout:disabled { opacity: .5; pointer-events: none; }

.cartx__continue {
    display: block;
    margin-top: 12px;
    text-align: center;
    font-size: var(--fs-small);
    font-weight: 600;
    color: var(--shop-muted);
}

.cartx__continue:hover { color: var(--shop-ink); }

.cartx__trust {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--shop-line);
    list-style: none;
    font-size: var(--fs-meta);
    color: var(--shop-muted);
}

.cartx__trust li { display: flex; align-items: center; gap: 10px; }
.cartx__trust svg { flex: none; width: 22px; height: 22px; fill: var(--shop-ink); }
.cartx__trust a { color: var(--shop-ink); font-weight: 700; }

/* ---------- empty state (components/empty-state.blade.php) ---------- */
/* Quiet and centred: no box, no border, no coloured alert. Used by the cart, product and news lists. */

.empty-state {
    flex: 1 0 100%;
    grid-column: 1 / -1;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 48px 16px 56px;
    text-align: center;
}

.empty-state__icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--shop-brand-soft);
    color: var(--shop-ink);
}

.empty-state__icon svg { width: 32px; height: 32px; }

.empty-state__title {
    margin: 0;
    font-family: var(--font-title);
    font-size: var(--fs-h4);
    font-weight: 700;
    line-height: var(--lh-title);
    color: var(--shop-ink);
}

.empty-state__text {
    margin: 8px 0 0;
    font-size: var(--fs-base);
    line-height: var(--lh-body);
    color: var(--shop-muted);
}

.empty-state__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.empty-state__actions .btn {
    min-width: 160px;
    padding-left: 22px;
    padding-right: 22px;
    border-radius: var(--shop-radius-sm);
    font-weight: 700;
}

.empty-state__actions .btn-light {
    border: 1px solid var(--shop-line);
    background: var(--shop-surface);
    color: var(--shop-ink);
}

.empty-state__actions .btn-light:hover,
.empty-state__actions .btn-light:focus { background: var(--shop-surface-alt); border-color: #d9d9d9; }

/* Inside a tab or a card */
.empty-state--sm { padding: 28px 16px 32px; }
.empty-state--sm .empty-state__icon { width: 56px; height: 56px; margin-bottom: 12px; }
.empty-state--sm .empty-state__icon svg { width: 26px; height: 26px; }
.empty-state--sm .empty-state__title { font-size: var(--fs-h5); }
.empty-state--sm .empty-state__text { font-size: var(--fs-small); }

/* Mobile checkout bar on the cart page */
.cartx-bar { display: none; }

@media (max-width: 991px) {
    .cartx__grid { grid-template-columns: minmax(0, 1fr); }
    .cartx__summary { position: static; }
}

@media (max-width: 575px) {
    .cartx { padding-bottom: 96px; }
    .cartx__head h1 { font-size: var(--fs-h3); }

    .cartx-item {
        grid-template-columns: 76px minmax(0, 1fr);
        grid-template-areas: "img info" "img total" "ctrl ctrl";
        gap: 4px 14px;
        padding: 14px;
    }

    .cartx-item__img { width: 76px; height: 76px; }
    .cartx-item__total { text-align: left; font-size: var(--fs-base); }
    .cartx-item__total s { display: inline; margin-left: 6px; }
    .cartx-item__ctrl { justify-content: space-between; margin-top: 10px; }

    .cartx-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: var(--shop-surface);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, .08);
    }

    .cartx-bar__total { display: flex; flex-direction: column; line-height: 1.2; }
    .cartx-bar__total small { font-size: var(--fs-meta); color: var(--shop-muted); }
    .cartx-bar__total b { font-size: var(--fs-h5); white-space: nowrap; }
    .cartx-bar .btn { flex: 1; height: 46px; border-radius: var(--shop-radius-sm); font-weight: 800; }
}

/* Cart line: collapse on remove, flash on undo */
.cartx-item.is-removing {
    height: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateX(16px);
    transition: height .25s ease, padding .25s ease, opacity .18s ease, transform .18s ease;
}

.cartx-item.is-restored { animation: cartx-flash 1.6s ease-out; }

@keyframes cartx-flash {
    0%, 30% { background: var(--shop-brand-soft); }
    100% { background: transparent; }
}

/* ---------- snackbar (cart-snack.blade.php) ---------- */

.snack {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom));
    z-index: 1045; /* above .float-stack (1040), below modals (1050) */
    width: min(480px, calc(100% - 32px));
    border-radius: var(--shop-radius);
    background: #23292e;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    overflow: hidden;
    opacity: 0;
    transform: translate(-50%, 16px);
    transition: opacity .2s ease, transform .2s ease;
}

.snack.is-open { opacity: 1; transform: translate(-50%, 0); }

.snack__body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px 12px 14px;
}

.snack__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--shop-success);
}

.snack__icon svg { fill: #fff; }

.snack__text {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: var(--fs-small);
    line-height: 1.4;
    /* Long product names: up to 2 lines, then "…" */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.snack__text b { font-weight: 700; }

.snack__text b::before { content: "«"; }
.snack__text b::after { content: "»"; }

.snack__form { margin: 0; }
.snack__link:not([hidden]) { display: inline-block; white-space: nowrap; text-decoration: none !important; }

.snack__action {
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--shop-brand);
    font-weight: 800;
    font-size: var(--fs-small);
    cursor: pointer;
}

.snack__action:hover,
.snack__action:focus-visible { background: rgba(255, 204, 0, .14); outline: none; }

.snack__close {
    flex: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.snack__close svg { fill: rgba(255, 255, 255, .6); }
.snack__close:hover svg { fill: #fff; }
.snack__close:focus-visible { outline: 2px solid var(--shop-brand); }

.snack__progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--shop-brand);
    transform-origin: left;
}

@keyframes snack-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* Lift the floating cart / back-to-top buttons (main.css .float-stack) above the bottom bars. */
@media (max-width: 767px) {
    body:has(.pdp-sticky.is-visible) .float-stack { bottom: calc(86px + env(safe-area-inset-bottom)); }

    /* Product tabs: fit the phone width instead of overflowing. */
    .product-tabs__list-container { display: flex; overflow-x: auto; scrollbar-width: none; }
    .product-tabs__item { flex: 1 0 auto; padding: 14px 20px; font-size: var(--fs-h5); text-align: center; }
}

@media (max-width: 575px) {
    body:has(.cartx-bar) .float-stack,
    body:has(.cartx-bar) .snack,
    body:has(.pdp-sticky.is-visible) .snack { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
    .pdp-sticky, #cart-root, .qty-stepper__btn, .snack, .card-cart__btn { transition: none; }
    .pdp__in-cart.is-pulse { animation: none; }
    .cartx-item.is-restored { animation: none; }
}

/* Footer social: Font Awesome 5.13.0 has no fa-tiktok glyph (added in 5.13.1); draw it with a mask. */
.social-links__link--type--tiktok { background: #000; color: #fff; }
.social-links__link--type--tiktok .fa-tiktok {
    display: inline-block;
    width: 1em;
    height: 1em;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M448 209.91a210.06 210.06 0 0 1-122.77-39.25v178.72A162.55 162.55 0 1 1 185 188.31v89.89a74.62 74.62 0 1 0 52.23 71.18V0h88a121.18 121.18 0 0 0 1.86 22.17A122.18 122.18 0 0 0 381 102.39a121.43 121.43 0 0 0 67 20.14z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M448 209.91a210.06 210.06 0 0 1-122.77-39.25v178.72A162.55 162.55 0 1 1 185 188.31v89.89a74.62 74.62 0 1 0 52.23 71.18V0h88a121.18 121.18 0 0 0 1.86 22.17A122.18 122.18 0 0 0 381 102.39a121.43 121.43 0 0 0 67 20.14z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Floating buttons (live chat bottom-left, cart / back-to-top bottom-right) must not cover the last footer line. */
body:has(.live-chat) .site-footer__bottom { margin-bottom: 76px; } /* fixed 54px height in the theme: margin, not padding */

@media (max-width: 575px) {
    /* cart page: the total bar (66px) plus the live chat button lifted above it */
    body:has(.cartx-bar) .site-footer__bottom { margin-bottom: 150px; }
}

/* ---------- "Бүх мэдээ / Бүх бараа" links under home sections (blog.blade.php, featured.blade.php) ----------
   A quiet secondary action: outlined pill with an arrow, so it doesn't compete with the yellow
   "Сагсанд нэмэх" buttons. The arrow is ::after because main.js rewrites .news-tabs__all with .text(). */
.section-more-wrap {
    display: flex;
    justify-content: center;
    margin: 28px 0 12px;
    padding: 0 16px;
}

.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 200px;
    height: 46px;
    padding: 0 26px;
    border: 1.5px solid var(--shop-ink);
    border-radius: 999px;
    background: var(--shop-surface);
    color: var(--shop-ink) !important;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background-color .15s, color .15s;
}

.section-more::after {
    content: "";
    flex: none;
    width: 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .2s ease;
}

.section-more:hover,
.section-more:focus-visible { background: var(--shop-ink); color: #fff !important; }
.section-more:hover::after,
.section-more:focus-visible::after { transform: translateX(4px); }
.section-more:focus-visible { outline: 3px solid var(--shop-brand); outline-offset: 2px; }
.section-more:active { transform: scale(.98); }

/* Each module its own look (icon via ::before, again because of main.js .text()):
   news = calm, dark outline + document icon; shop = brand yellow + bag icon + how many products. */
.section-more--news::before,
.section-more--shop::before {
    content: "";
    flex: none;
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: var(--section-more-icon) center / contain no-repeat;
    mask: var(--section-more-icon) center / contain no-repeat;
}

.section-more--news { --section-more-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2.5'/%3E%3Cpath d='M8 8h8M8 12h8M8 16h5'/%3E%3C/svg%3E"); }

.section-more--shop {
    --section-more-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8h14l-1 12H6z'/%3E%3Cpath d='M9 8V6.5a3 3 0 0 1 6 0V8'/%3E%3C/svg%3E");
    border-color: var(--shop-brand);
    background: var(--shop-brand-soft);
}

.section-more--shop:hover,
.section-more--shop:focus-visible { border-color: var(--shop-brand); background: var(--shop-brand); color: var(--shop-ink) !important; }
.section-more--shop:focus-visible { outline-color: var(--shop-ink); }

.section-more__count {
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--shop-ink);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

@media (max-width: 575px) {
    .section-more-wrap { margin: 20px 0 8px; }
    .section-more { width: 100%; max-width: 360px; }
}

@media (prefers-reduced-motion: reduce) {
    .section-more, .section-more::after { transition: none; }
}
