/* ==========================================================================
   ملاية و كوباية — OpenCart theme layer (loaded after main.css)
   main.css is the approved mockup stylesheet, unchanged. This file holds only:
     A. OpenCart adapters (.mk-*): markup OpenCart needs that the static mockup did not have
        (cart wrapper, logo fallback, language/currency switchers, nested sub-categories in the mega menu,
        OpenCart's alert region, cookie notice, stock pages that still use Bootstrap).
     B. The home page's page-scoped rules (.p-home-*), copied verbatim from design/mockup/index.html <style>.
     C. Shared page parts used by several routes (page hero, not-found page).
   Rules: tokens only, logical properties only, no letter-spacing / text-transform on Arabic (DESIGN_SYSTEM §1, §7).
   ========================================================================== */

/* ---------- A1. Header cart wrapper: #cart is OpenCart's reload target, the button inside is the design's ---------- */
.mk-cart { display: contents; }

/* ---------- A2. Logo fallback (no logo in System > Settings > Image): brand mark + store name ---------- */
.c-header__logo, .c-footer__logo { gap: var(--sp-2); text-decoration: none; }
.mk-logo-mark { inline-size: auto; block-size: 2.625rem; }
.mk-logo-text { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: var(--fw-semibold); line-height: var(--lh-tight); color: var(--color-text); white-space: nowrap; }
.c-footer .mk-logo-text { color: var(--color-text-inverse); }
.mk-drawer-brand { display: inline-flex; align-items: center; gap: var(--sp-2); }
.mk-drawer-brand img { block-size: 2.5rem; inline-size: auto; }
/* store logo reused on the dark footer when no white footer logo is set */
.mk-logo-invert { filter: brightness(0) invert(1); }

/* ---------- A3. Mega menu / drawer: OpenCart sub-categories under their parent ---------- */
.mk-mega-sublist { list-style: none; margin: 0 0 var(--sp-1); padding: 0; padding-inline-start: var(--sp-4); border-inline-start: 2px solid var(--fam-100, var(--color-border-subtle)); }
.c-mega__list .mk-mega-sublist a { min-block-size: 2.25rem; font-size: var(--fs-sm); color: var(--color-text-muted); }
.c-mega__list .mk-mega-sublist a:hover { color: var(--color-text); }
/* the promo card keeps its own height when a group lists many sub-categories */
.c-mega__promo { align-self: start; }

/* ---------- A4. Language / currency switchers (announcement bar ≥768px, drawer) ---------- */
.mk-switch-form { margin: 0; }
.mk-switch { position: relative; }
.mk-switch__toggle { display: inline-flex; align-items: center; gap: var(--sp-1); min-block-size: var(--tap); padding-inline: var(--sp-1); cursor: pointer; list-style: none; font-weight: var(--fw-medium); border-radius: var(--r-sm); }
.mk-switch__toggle::-webkit-details-marker { display: none; }
.mk-switch__toggle .c-icon { inline-size: 1rem; block-size: 1rem; transition: transform var(--dur-fast) var(--ease-out); }
.mk-switch[open] > .mk-switch__toggle .c-icon { transform: rotate(180deg); }
.mk-switch__menu { position: absolute; inset-block-start: calc(100% + var(--sp-1)); inset-inline-end: 0; z-index: var(--z-dropdown); min-inline-size: 11rem; margin: 0; padding: var(--sp-1); list-style: none; background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); border-radius: var(--r-md); box-shadow: var(--shadow-lg); }
.mk-switch__item { display: flex; align-items: center; gap: var(--sp-2); inline-size: 100%; min-block-size: var(--tap); padding-inline: var(--sp-3); border: 0; border-radius: var(--r-sm); background: none; color: inherit; font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-medium); text-align: start; cursor: pointer; }
.mk-switch__item:hover { background: var(--n-50); }
.mk-switch__item[aria-current="true"] { background: var(--yellow-50); }
.c-announce .mk-switch__toggle { color: var(--color-text-inverse); }
.c-announce .mk-switch__toggle:hover { color: var(--yellow-500); }
.mk-drawer-switchers { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin-block-start: var(--sp-4); padding-block-start: var(--sp-4); border-block-start: 1px solid var(--color-border-subtle); }
.mk-drawer-switchers .mk-switch__menu { inset-inline-end: auto; inset-inline-start: 0; inset-block-start: auto; inset-block-end: calc(100% + var(--sp-1)); }

/* ---------- A5. OpenCart alert region (#alert): stock pages' AJAX messages, styled as toasts ---------- */
.mk-alerts { position: fixed; inset-block-start: var(--sp-4); inset-inline: var(--gutter); z-index: var(--z-toast); display: grid; gap: var(--sp-2); justify-items: center; pointer-events: none; }
.mk-alerts > * { pointer-events: auto; max-inline-size: 36rem; }
.mk-alerts .alert { display: flex; align-items: center; gap: var(--sp-2); margin: 0; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--color-info-border); border-radius: var(--r-md); background: var(--color-info-bg); color: var(--color-text); box-shadow: var(--shadow-md); font-size: var(--fs-sm); }
.mk-alerts .alert-success { border-color: var(--color-success-border); background: var(--color-success-bg); }
.mk-alerts .alert-danger { border-color: var(--color-danger-border); background: var(--color-danger-bg); }
/* core's close button (<button class="btn-close" data-bs-dismiss="alert">, labelled by main.js initAlerts) drawn like
   the design's icon button with the sprite's i-close shape; same look with or without Bootstrap's CSS */
.mk-alerts .btn-close {
  position: relative; display: inline-grid; place-items: center; flex-shrink: 0;
  inline-size: var(--tap); block-size: var(--tap); margin-block: calc(var(--sp-2) * -1); margin-inline: auto calc(var(--sp-2) * -1); padding: 0;
  border: 0; border-radius: var(--r-md); background: transparent; color: var(--color-text); opacity: 1; box-shadow: none; cursor: pointer;
}
.mk-alerts .btn-close::before {
  content: ""; inline-size: 1.25rem; block-size: 1.25rem; 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='%23000' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%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='%23000' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mk-alerts .btn-close:hover { background: rgb(0 0 0 / 0.06); }
.mk-alerts .btn-close:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
/* core prefixes the message with a Font Awesome <i>, which the theme does not load */
.mk-alerts .alert > i[class*="fa-"]:empty { display: none; }

/* ---------- A6. Cookie notice (common/cookie keeps OpenCart's markup and JS hook #cookie button) ---------- */
#cookie { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: var(--z-sticky-bar); padding: var(--sp-4) var(--gutter); background: var(--color-surface); border-block-start: 1px solid var(--color-border); box-shadow: var(--shadow-up); text-align: center; font-size: var(--fs-sm); }
#cookie p { margin-block-end: var(--sp-3); }
#cookie button { min-block-size: var(--tap); margin: var(--sp-1); padding-inline: var(--sp-5); border: 1px solid var(--color-border-strong); border-radius: var(--r-md); background: var(--color-surface); color: var(--color-text); font: inherit; font-weight: var(--fw-medium); cursor: pointer; }
#cookie button:first-of-type { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-on-primary); }

/* ---------- A7. Home layout extras ---------- */
.mk-promos--single { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .mk-promos--single { grid-template-columns: minmax(0, 1fr); } }
.mk-home-columns { display: grid; gap: var(--sp-6); }
@media (min-width: 768px) { .mk-home-columns { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); } }
/* trust strip + brand row share one sunken block in the mockup (l-stack--lg between them) */
.l-section--sunken + .l-section--sunken:has(.p-home-brands) { padding-block-start: 0; margin-block-start: calc(var(--space-section) * -1 + var(--sp-8)); }
/* Banner module, one image per view */
.mk-banner-slider .c-scroller__track > li { scroll-snap-align: start; }
.mk-banner-controls { justify-content: center; margin-block-start: var(--sp-3); }
.mk-banner-section .c-banner img { aspect-ratio: auto; }

/* ---------- A8. Stock OpenCart pages not ported yet (body.is-legacy: Bootstrap is loaded before main.css) ---------- */
.is-legacy #main { padding-block: var(--sp-6) var(--space-section); }
.is-legacy #main > .container { max-inline-size: var(--container); padding-inline: var(--gutter); }
.is-legacy .breadcrumb { font-size: var(--fs-sm); }
.is-legacy #main h1, .is-legacy #main h2, .is-legacy #main h3 { font-family: var(--font-display); font-weight: var(--fw-semibold); line-height: var(--lh-tight); }
.is-legacy .btn-primary { --bs-btn-bg: var(--color-primary); --bs-btn-border-color: var(--color-primary); --bs-btn-color: var(--color-on-primary); --bs-btn-hover-bg: var(--color-primary-hover); --bs-btn-hover-border-color: var(--color-primary-hover); --bs-btn-hover-color: var(--color-on-primary); --bs-btn-active-bg: var(--color-primary-hover); --bs-btn-active-color: var(--color-on-primary); font-weight: var(--fw-medium); }
.is-legacy .c-header a, .is-legacy .c-nav a, .is-legacy .c-footer a, .is-legacy .c-drawer a, .is-legacy .c-bottom-nav a, .is-legacy .c-announce a { text-decoration: none; }
.is-legacy .c-footer ul, .is-legacy .c-drawer ul, .is-legacy .c-nav ul { padding-inline-start: 0; margin-block-end: 0; }
.is-legacy .c-footer p { margin-block-end: 0; }
/* OpenCart's stylesheet.css pins its footer with position:absolute (sticky-footer layout) and sets body height */
.is-legacy { block-size: auto; }
.is-legacy footer.c-footer { position: static; inset: auto; inline-size: auto; border: 0; padding-block-start: 0; background-color: var(--color-surface-inverse); }
.is-legacy .c-footer h2, .is-legacy .c-footer a { color: inherit; }
.is-legacy .c-header h1, .is-legacy .c-header h2, .is-legacy .c-drawer h2 { color: inherit; }

/* ---------- A9. Directional icons: templates draw the RTL glyph (DESIGN_SYSTEM §5 "Arrows don't auto-flip":
   forward = i-chevron-left / i-arrow-left, back = i-chevron-right); .c-icon--dir mirrors it on LTR pages.
   `scale`, not `transform`, so it composes with main.css hover nudges; the individual property applies after
   `transform`, so the LTR nudge is written with the RTL sign to still move toward inline-end. ---------- */
.c-icon--dir:dir(ltr) { scale: -1 1; }
.c-mega__list a:hover .c-icon--dir:dir(ltr),
.c-section-head__more:hover .c-icon--dir:dir(ltr) { transform: translateX(-3px); }

/* ---------- A10. Product card wishlist: add-only action (no remove on cards), so no aria-pressed; saved state =
   .is-saved (server-rendered for the visitor's wishlist, added by main.js after a save) + the "in wishlist" label ---------- */
.c-product-card__wish.is-saved .c-icon--off { display: none; }
.c-product-card__wish.is-saved .c-icon--on { display: block; }
.c-product-card__wish[data-saved-now] .c-icon--on { animation: mk-bump var(--dur-slow) var(--ease-spring); }

/* ---------- A11. Category product counts (System > Settings > Option "Category Product Count") ---------- */
.c-mega__list .u-num, .c-accordion .u-num { color: var(--color-text-muted); font-size: var(--fs-sm); }

/* ---------- A12. Invalid selects / textareas: OpenCart's common.js puts .is-invalid on the field itself (the select inside
   .c-select, the textarea.c-textarea); main.css covers .c-input and .c-select.is-invalid ---------- */
.c-select select.is-invalid, .c-select select[aria-invalid="true"], .c-textarea.is-invalid, .c-textarea[aria-invalid="true"] { border-color: var(--red-500); }
.c-select select.is-invalid:focus, .c-select select[aria-invalid="true"]:focus, .c-select.is-invalid select:focus,
.c-textarea.is-invalid:focus, .c-textarea[aria-invalid="true"]:focus { border-color: var(--red-500); box-shadow: 0 0 0 3px var(--red-100); }

/* ---------- A13. Column modules (common/column_left / column_right): one <aside> each, modules stacked. The page
   template places them (listing sidebar / filter drawer, account side nav, a row under the content) ---------- */
.mk-column { display: grid; gap: var(--sp-6); align-content: start; min-inline-size: 0; }
.c-drawer .mk-column { gap: var(--sp-5); }

/* ---------- A14. Policy dialog (main.js initInfoLinks: .modal-link → information/information.info) ---------- */
.mk-info-body { overflow-wrap: anywhere; line-height: var(--lh-body); }
.mk-info-body > * + * { margin-block-start: var(--sp-3); }
.mk-info-body ul, .mk-info-body ol { padding-inline-start: var(--sp-5); }
.mk-info-body img { max-inline-size: 100%; block-size: auto; }
a.modal-link[aria-busy="true"] { cursor: progress; opacity: 0.7; }

/* ---------- A15. Product cards fill their grid / scroller cell, so the card body (flex column, main.css) pushes
   price + button to the bottom of every card in a row whatever the name length, rating or category line ---------- */
:where(.l-products, .c-scroller__track) > li:has(> .c-product-card) { display: flex; flex-direction: column; }
:where(.l-products, .c-scroller__track) > li > .c-product-card { flex: 1 0 auto; }

/* ---------- A16. Prices (Price::split() markup). Every symbol runs in the direction of the run it sits in
   (<bdi dir="ltr"> inside the number's LTR isolate, a <span> in the page direction after it), so inline-start /
   -end always face the number. A symbol the formatted text already pads with a space gets no extra gap;
   an unpadded one ("--gap") gets the same small gap as the current price (main.css .c-price__cur). ---------- */
.c-price__cur, .c-price__sym, .p-checkout-cur { unicode-bidi: isolate; }
.c-price__cur--left { margin-inline: 0 2px; }
.c-price__cur:not(.c-price__cur--gap) { margin-inline: 0; }
.c-price__sym--gap.c-price__sym--left, .p-checkout-cur--gap.p-checkout-cur--left { margin-inline-end: .2em; }
.c-price__sym--gap.c-price__sym--right, .p-checkout-cur--gap.p-checkout-cur--right { margin-inline-start: .2em; }

/* ==========================================================================
   B. Home page — page-scoped rules from design/mockup/index.html (verbatim)
   ========================================================================== */
    /* Page-scoped rules for the home page only (.p-home-). Tokens only, logical properties only. */

    /* ---------- Hero ---------- */
    /* ---------- Hero banner (owner decision 2026-09-16: «الهيروسيكشن خليها بانر والازرار عادي») ----------
       No real 16:5 photo exists in the store except the BACK TO SCHOOL artwork, which is already used as the
       promo banner further down and carries its own painted Arabic headline — so the banner surface is built
       from brand tokens (warm yellow gradient + the four-square motif) with one real product photo inside it. */
    .p-home-hero { padding-block: var(--sp-5) var(--sp-8); }
    @media (min-width: 1024px) { .p-home-hero { padding-block: var(--sp-8) var(--sp-10); } }
    .p-home-hero__banner {
      position: relative; overflow: hidden; isolation: isolate;
      display: grid; gap: var(--sp-5);
      padding: var(--sp-6) var(--sp-5);
      border: 1px solid var(--yellow-200); border-radius: var(--r-xl);
      background: linear-gradient(155deg, var(--yellow-100) 0%, var(--yellow-50) 45%, var(--color-surface) 100%);
    }
    @media (min-width: 768px) {
      .p-home-hero__banner { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); align-items: center; gap: var(--sp-8); padding: var(--sp-8); min-block-size: 20rem; }
    }
    @media (min-width: 1024px) { .p-home-hero__banner { gap: var(--sp-10); padding: var(--sp-10) var(--sp-12); min-block-size: 25rem; } } /* ≈ 16:5 inside the 1320 container */
    .p-home-hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-4); }
    .p-home-hero__title { font-size: var(--fs-4xl); line-height: var(--lh-display); } /* weight 600 from the base heading rule (TYPOGRAPHY_SPEC H1) */
    .p-home-hero__title em { font-style: normal; text-decoration: underline; text-decoration-color: var(--yellow-500); text-decoration-thickness: 0.14em; text-underline-offset: 0.28em; text-decoration-skip-ink: none; }
    .p-home-hero__lead { max-inline-size: 34rem; font-size: var(--fs-md); color: var(--n-700); }
    .p-home-hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); inline-size: 100%; margin-block-start: var(--sp-2); }
    .p-home-hero__actions > .c-btn { flex: 1 1 auto; }
    @media (min-width: 480px) { .p-home-hero__actions > .c-btn { flex: 0 0 auto; } }
    /* photo sits above the text on phones (nothing is ever printed over a busy area of the shot) */
    .p-home-hero__art { order: -1; display: grid; place-items: center; }
    .p-home-hero__art img { inline-size: 100%; max-inline-size: 15rem; aspect-ratio: 1; object-fit: contain; mix-blend-mode: multiply; }
    @media (min-width: 768px) { .p-home-hero__art { order: 0; } .p-home-hero__art img { max-inline-size: 24rem; } }
    .p-home-hero__quad { position: absolute; inset-block-start: var(--sp-4); inset-inline-start: var(--sp-4); opacity: 0.9; }
    @media (min-width: 768px) { .p-home-hero__quad { inset-block-start: var(--sp-6); inset-inline-start: var(--sp-6); } }
    .p-home-hero__facts { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-6); margin-block-start: var(--sp-4); padding-inline: var(--sp-1); list-style: none; font-size: var(--fs-sm); color: var(--color-text-muted); }
    .p-home-hero__facts li { display: flex; align-items: center; gap: var(--sp-2); }
    .p-home-hero__facts .c-icon { inline-size: 1.25rem; block-size: 1.25rem; color: var(--color-text); }

    /* ---------- Categories ---------- */

    /* ---------- Category promos ---------- */
    .p-home-promos { display: grid; gap: var(--sp-4); }
    @media (min-width: 1024px) { .p-home-promos { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--sp-5); } }
    .p-home-promo-bts { aspect-ratio: 16 / 9; }
    /* physical "right": the current artwork (White Friday, 2026-11-21) paints the Arabic headline and button on its RIGHT edge; narrow crops must keep that side. Match this to the artwork when the banner changes. */
    .p-home-promo-bts img { object-position: right center; }
    @media (min-width: 768px) { .p-home-promo-bts { aspect-ratio: 3 / 1; } }
    @media (min-width: 1024px) { .p-home-promo-bts { aspect-ratio: auto; min-block-size: 17rem; } .p-home-promo-bts img { position: absolute; inset: 0; } }
    .p-home-promo { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--sp-4); padding: var(--sp-5); overflow: hidden; border-radius: var(--r-xl); background: var(--fam-100); color: var(--color-text); text-decoration: none; }
    .p-home-promo:hover { color: var(--color-text); }
    .p-home-promo:focus-visible { outline-offset: 3px; border-radius: var(--r-xl); }
    .p-home-promo__eyebrow { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--fam-700); }
    .p-home-promo__title { font-size: var(--fs-lg); font-weight: var(--fw-medium); }
    .p-home-promo__text { font-size: var(--fs-sm); color: var(--n-700); }
    .p-home-promo .c-btn { align-self: flex-start; margin-block-start: var(--sp-2); }
    .p-home-promo__media { inline-size: 5.5rem; aspect-ratio: 1; }
    @media (min-width: 480px) { .p-home-promo__media { inline-size: 10rem; } }
    @media (min-width: 1024px) { .p-home-promo { padding: var(--sp-6); } .p-home-promo__media { inline-size: 9rem; } }
    .p-home-promo__media img { inline-size: 100%; block-size: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform var(--dur-slow) var(--ease-out); }
    @media (hover: hover) { .p-home-promo:hover .p-home-promo__media img { transform: scale(1.05); } }

    /* ---------- Deals grid: keep full rows at every column count ---------- */
    @media (min-width: 768px) and (max-width: 1023.98px) { .p-home-deals > li:nth-child(n+10) { display: none; } }
    @media (min-width: 1024px) and (max-width: 1279.98px) { .p-home-deals > li:nth-child(n+9) { display: none; } }

    /* ---------- Shop by need ---------- */
    .p-home-needs { display: grid; gap: var(--sp-4); }
    @media (min-width: 768px) { .p-home-needs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
    @media (min-width: 1024px) { .p-home-needs { gap: var(--sp-5); } }
    .p-home-needs > * { min-inline-size: 0; }
    .p-home-need { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-5); block-size: 100%; padding: var(--sp-6) var(--sp-5); border: 1px solid var(--fam-100); border-radius: var(--r-xl); background: var(--fam-50); text-align: center; transition: transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) ease; }
    @media (min-width: 1024px) { .p-home-need { padding: var(--sp-8) var(--sp-6); } }
    /* stretched link: the title link covers the whole card (same pattern as .c-product-card__name a) */
    .p-home-need__title a { color: var(--color-text); text-decoration: none; }
    .p-home-need__title a::after { content: ""; position: absolute; inset: 0; z-index: var(--z-card-link); border-radius: inherit; }
    .p-home-need__title a:focus-visible { outline: none; }
    .p-home-need:has(.p-home-need__title a:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 3px; }
    .p-home-need__thumbs { inline-size: 100%; }
    .p-home-need__photo img { transition: scale var(--dur-slow) var(--ease-out); }
    @media (hover: hover) {
      .p-home-need:hover { transform: translateY(-3px); border-color: var(--fam-200); box-shadow: var(--shadow-md); }
      .p-home-need:hover .p-home-need__photo img { scale: calc(var(--cat-zoom, 1.2) * 1.05); }
    }
    /* Circles = same language as .c-cat-tile--photo: family gradient ring (3px) + white gap (2px) + zoomed cover photo */
    .p-home-need__thumbs { display: flex; justify-content: center; gap: var(--sp-3); }
    .p-home-need__thumb { flex: 1 1 0; min-inline-size: 0; max-inline-size: 6.5rem; aspect-ratio: 1; padding: 3px; border-radius: 50%; background: linear-gradient(145deg, var(--fam-500), var(--fam-200) 70%, var(--fam-100)); box-shadow: var(--shadow-sm); }
    .p-home-need__photo { display: block; inline-size: 100%; block-size: 100%; overflow: hidden; border: 2px solid var(--color-surface); border-radius: 50%; background: var(--color-surface); }
    .p-home-need__photo img { inline-size: 100%; block-size: 100%; object-fit: cover; scale: var(--cat-zoom, 1.2); }
    .p-home-need__title { font-size: var(--fs-lg); font-weight: var(--fw-medium); }

    /* ---------- Brands ---------- */
    .p-home-brands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
    .p-home-brands > li:last-child { grid-column: 1 / -1; }
    @media (min-width: 768px) { .p-home-brands { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-4); } .p-home-brands > li:last-child { grid-column: auto; } }
    .p-home-brand { --p-home-logo-w: min(100%, 10rem); position: relative; display: block; block-size: 5rem; padding: var(--sp-3) var(--sp-4); overflow: hidden; border: 1px solid var(--color-border-subtle); border-radius: var(--r-lg); background: var(--color-surface); transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease; }
    .p-home-brand:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-sm); }
    /* geometric centring of an oversized logo: inline-start 50% + a shift of half its width back towards the start
       (translateX(-50%) in LTR, +50% in RTL), same position in both directions */
    .p-home-brand img { position: absolute; inset-block-start: 50%; inset-inline-start: 50%; inline-size: var(--p-home-logo-w); max-inline-size: none; transform: translate(-50%, -50%); mix-blend-mode: multiply; }
    [dir="rtl"] .p-home-brand img { transform: translate(50%, -50%); }
    /* these source PNGs carry wide transparent padding around a small mark */
    .p-home-brand--zoom { --p-home-logo-w: 15rem; }
    .p-home-brand--zoom-lg { --p-home-logo-w: 17rem; }
    @media (min-width: 1024px) { .p-home-brand--zoom { --p-home-logo-w: 18rem; } .p-home-brand--zoom-lg { --p-home-logo-w: 21rem; } }
    @media (min-width: 1024px) { .p-home-brand { block-size: 6rem; } }

  

/* ==========================================================================
   C. Shared page parts (several routes)
   ========================================================================== */

/* ---------- C1. Page hero (.c-page-hero): information, contact and site map pages — surface band with breadcrumbs,
   title + lead and the brand mark (was .p-info-hero in each page's stylesheet) ---------- */
.c-page-hero { background: var(--color-surface); border-block-end: 1px solid var(--color-border-subtle); padding-block-end: var(--sp-8); }
.c-page-hero__inner { display: grid; gap: var(--sp-6); align-items: center; }
@media (min-width: 768px) { .c-page-hero__inner { grid-template-columns: minmax(0, 1fr) auto; } }
.c-page-hero__titles { display: flex; flex-direction: column; gap: var(--sp-2); min-inline-size: 0; }
.c-page-hero__lead { max-inline-size: 42rem; color: var(--color-text-muted); font-size: var(--fs-md); }
.c-page-hero__mark { inline-size: 5.5rem; block-size: 5.5rem; }
@media (min-width: 768px) { .c-page-hero__mark { inline-size: 7.5rem; block-size: 7.5rem; } }

/* ---------- C2. Page not found (error/not_found, design/mockup/404.html). Core renders this view for any missing page
   (product, category, information, brand, unknown route, empty cart…), so its rules live here, not in a page file. ---------- */
.p-notfound { padding-block: var(--sp-8) var(--space-section); }
.p-notfound :is(h1, h2, p) { margin: 0; }
.p-notfound__hero { display: grid; gap: var(--sp-6); align-items: center; justify-items: center; text-align: center; }
@media (min-width: 1024px) { .p-notfound__hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); justify-items: start; text-align: start; gap: var(--sp-12); } }
.p-notfound__copy { display: flex; flex-direction: column; gap: var(--sp-4); max-inline-size: 34rem; align-items: center; min-inline-size: 0; }
@media (min-width: 1024px) { .p-notfound__copy { align-items: flex-start; } }
.p-notfound__code { display: inline-flex; align-items: center; gap: var(--sp-2); padding: var(--sp-1) var(--sp-3); border-radius: var(--r-pill); background: var(--red-50); color: var(--color-danger); font-family: var(--font-display); font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.p-notfound__text { color: var(--color-text-muted); font-size: var(--fs-md); }
.p-notfound__search { display: flex; inline-size: 100%; gap: var(--sp-2); margin: 0; }
.p-notfound__field { flex: 1; min-inline-size: 0; }
.p-notfound__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); }
@media (min-width: 1024px) { .p-notfound__actions { justify-content: flex-start; } }
.p-notfound__art { inline-size: min(100%, 26rem); }
@media (min-width: 1024px) { .p-notfound__art { order: -1; inline-size: 100%; max-inline-size: 32rem; justify-self: end; } }
.p-notfound__art svg { inline-size: 100%; block-size: auto; overflow: visible; }
.p-notfound__floor { fill: var(--n-100); }
.p-notfound__puddle { fill: var(--blue-100); }
.p-notfound__mug { fill: var(--yellow-500); }
.p-notfound__mug-shade, .p-notfound__rim { fill: var(--yellow-600); }
.p-notfound__handle { fill: none; stroke: var(--yellow-600); stroke-width: 12; stroke-linecap: round; }
.p-notfound__inside { fill: var(--n-800); }
.p-notfound__sq-y { fill: var(--yellow-500); }
.p-notfound__sq-b { fill: var(--blue-500); }
.p-notfound__sq-g { fill: var(--green-500); }
.p-notfound__sq-r { fill: var(--red-500); }
.p-notfound__drop { fill: var(--blue-300); }
/* legacy layer (theme.css A8 pads #main for Bootstrap pages): this page brings its own spacing */
.is-legacy #main:has(> .p-notfound-page) { padding-block: 0; }
.is-legacy .p-notfound-page a.c-btn, .is-legacy .p-notfound-page .c-section-head__more, .is-legacy .p-notfound-page .c-cat-tile { text-decoration: none; }
