/* Darwish Hardware Store. Layout based on the AutoParts template, written fresh with no framework. */
@font-face { font-family: Rubik; src: url(../fonts/store/rubik-latin-wght-normal.woff2) format("woff2"); font-weight: 300 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Rubik; src: url(../fonts/store/rubik-arabic-wght-normal.woff2) format("woff2"); font-weight: 300 900; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

:root {
    --yellow: #ffb900;
    --yellow-dark: #e5a600;
    --black: #0d0d0d;
    /* Same colors as the app (app/lib/theme.dart). */
    --ink: #151515;
    --muted: #6e6e6a;
    --line: #ecebe6;
    --bg: #f3f2ee;
    --canvas: #f6f5f1;
    --card: #fff;
    --white: #fff;
    --green: #128c4b;
    --red: #c9252c;
    --radius: 10px;
    --shadow: 0 8px 24px rgb(0 0 0 / 6%);
    --radius-card: 24px;
    --radius-photo: 20px;
    /* Page side margin: 16 on phones, wider on tablets and desktops (set below). All spacing is on a 4px grid. */
    --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 15px/1.55 Rubik, system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--yellow-dark); outline-offset: 2px; }
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.back { transform: scaleX(-1); }
[dir="rtl"] .back { transform: none; }
.container { width: min(1280px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }
.skip-link { position: absolute; inset-block-start: -60px; inset-inline-start: 8px; z-index: 100; padding: 8px 16px; background: var(--yellow); color: #000; border-radius: 6px; }
.skip-link:focus { inset-block-start: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 20px; border: 1px solid transparent; border-radius: 999px; font-weight: 500; text-align: center; transition: background .15s, color .15s, border-color .15s, transform .12s ease-out; }
.btn:active, .round:active, .tool:active, .chip:active, .tabbar a:active { transform: scale(.96); }
.btn--primary { background: var(--yellow); color: #111; }
.btn--primary:hover { background: var(--yellow-dark); }
.btn--dark { background: var(--black); color: #fff; }
.btn--dark:hover { background: #333; }
.btn--outline { background: #fff; border-color: #d4d4d0; color: #111; }
.btn--outline:hover { border-color: #111; }
.btn--whatsapp { background: var(--green); color: #fff; }
.btn--whatsapp:hover { background: #0e743d; }
.btn--danger { background: var(--red); color: #fff; }
.btn--disabled { background: #ececea; color: #666; cursor: default; }
.btn--block { display: flex; width: 100%; }
.btn--large { min-height: 52px; font-size: 16px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.text-tool { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 2px; border: 0; background: none; color: var(--muted); font-weight: 500; }
.text-tool:hover { color: var(--ink); }
.text-tool.is-active { color: var(--red); }
.text-tool.is-active .icon { fill: currentColor; }
.link-muted { color: var(--muted); text-decoration: underline; }
.round { position: relative; display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid transparent; border-radius: 50%; background: none; color: inherit; }
.round--text { font-size: 14px; font-weight: 700; }
.round--cart { background: var(--yellow); color: #111; }
.round--plain { border-color: #d4d4d0; color: #111; }
.round--plain:hover { border-color: #111; }
.round--dark { background: var(--black); color: #fff; }
.round--dark:hover { background: var(--yellow); color: #111; }

/* Header */
.header { position: sticky; inset-block-start: 0; z-index: 40; padding-block: 12px; pointer-events: none; }
.header__bar { position: relative; display: flex; align-items: center; gap: 20px; min-height: 64px; padding-inline: 20px 12px; background: rgb(13 13 13 / 82%); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); color: #fff; border-radius: 20px; view-transition-name: header; box-shadow: 0 8px 24px rgb(0 0 0 / 18%); pointer-events: auto; }
.logo { flex: none; }
.logo img { width: 158px; height: auto; }
.header__nav { display: flex; flex: 1; justify-content: center; gap: 4px; font-size: 14.5px; }
.header__nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 8px; border-radius: 8px; color: #c9c9c9; white-space: nowrap; }
.header__nav a:hover { color: #fff; }
.header__nav a.is-active { color: var(--yellow); font-weight: 600; }
.header__actions { display: flex; align-items: center; gap: 8px; flex: none; margin-inline-start: auto; }
.header__actions .round:not(.round--cart):hover { background: #2a2a2a; color: var(--yellow); }
.round--cart:hover { background: var(--yellow-dark); }
.badge { position: absolute; inset-block-start: -3px; inset-inline-end: -3px; display: grid; place-items: center; min-width: 18px; height: 18px; padding-inline: 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.tabbar__icon { position: relative; display: inline-flex; }
.tabbar__icon .badge { inset-block-start: -8px; inset-inline-end: -12px; }
.header__search { position: absolute; inset-block-start: calc(100% + 8px); inset-inline-end: 0; display: none; width: min(560px, 100%); padding: 8px; background: #fff; border-radius: 16px; box-shadow: 0 12px 30px rgb(0 0 0 / 22%); }
.header__search.is-open { display: block; }
.search { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 2px; padding-inline-start: 16px; background: #fff; border: 1px solid #d9d9d5; border-radius: 999px; color: var(--ink); }
.search__icon { color: #777; }
.search input[type="search"] { flex: 1; min-width: 0; height: 44px; border: 0; background: none; outline: none; font-size: 15px; }
.search:focus-within { border-color: #111; }
.search .btn { min-height: 44px; padding-inline: 20px; }
.search__results { position: absolute; inset-block-start: calc(100% + 8px); inset-inline: 0; z-index: 50; overflow: hidden; background: #fff; border-radius: 16px; box-shadow: 0 10px 32px rgb(0 0 0 / 25%); }
.search__results a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-block-end: 1px solid var(--line); }
.search__results a:hover, .search__results a:focus { background: var(--bg); }
.search__results img { width: 46px; height: 46px; object-fit: contain; flex: none; }
.search__name { flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 14px; }
.search__results b { flex: none; }
.search__results .search__all { justify-content: center; font-weight: 600; border: 0; }
.search__none { padding: 16px; color: var(--muted); }
.mobile-menu { display: none; }
.mobile-menu summary { display: grid; place-items: center; width: 44px; height: 44px; list-style: none; cursor: pointer; font-size: 18px; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu__panel { position: absolute; inset-inline: 0; inset-block-start: calc(100% + 8px); z-index: 45; max-height: 70vh; overflow-y: auto; padding-block: 8px; background: #fff; color: var(--ink); border-radius: 16px; box-shadow: 0 12px 30px rgb(0 0 0 / 28%); }
.mobile-menu__panel a { display: block; padding: 12px 20px; font-weight: 600; }
.mobile-menu__panel .mobile-menu__sub { padding-inline-start: 36px; font-weight: 400; color: #444; }

.flash { display: flex; align-items: center; gap: 12px; margin-block-start: 16px; padding: 12px 16px; border-radius: 12px; background: #e6f6ec; color: #0b5b30; font-weight: 500; }
.flash--float { position: fixed; inset-block-start: 92px; inset-inline: 16px; z-index: 39; width: fit-content; max-width: min(620px, calc(100vw - 32px)); margin: 0 auto; box-shadow: 0 8px 24px rgb(0 0 0 / 18%); }
.flash--error { background: #fdecec; color: #93181d; }
.flash--warn { flex-wrap: wrap; background: #fff5d6; color: #6a4e00; }
.flash--warn span { flex: 1; min-width: 200px; }

/* Home */
.hero { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; margin-block-start: 12px; }
.hero__menu { min-width: 0; }
.hero__banner { display: block; overflow: hidden; border-radius: var(--radius-card); }
.hero__banner img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.side-title { margin-block-end: 12px; font-size: 19px; font-weight: 600; }
.side-nav { display: grid; gap: 4px; font-size: 14px; }
.side-nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; border-radius: 10px; }
.side-nav a span { flex: 1; min-width: 0; }
.side-nav__top { padding: 8px 12px; font-weight: 500; }
.side-nav__top:hover { background: var(--bg); }
.side-nav__top.is-active { background: var(--bg); }
.side-nav__top .icon { color: #555; }
.count { min-width: 26px; padding: 1px 8px; border-radius: 8px; background: var(--yellow); color: #111; font-weight: 700; font-size: 12px; text-align: center; }
.side-nav__tree { display: grid; gap: 2px; margin-inline-start: 20px; padding-inline-start: 12px; border-inline-start: 1px solid #d9d9d5; }
.side-nav__tree a { padding: 8px 12px; color: #444; }
.side-nav__tree a:hover { background: var(--bg); color: #111; }
.side-nav__tree a.is-active { background: #fff3cc; color: #111; font-weight: 600; }
.side-nav__tree small { color: #8a8a86; }

.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-block-start: 24px; }
.services > div { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.services .icon { width: 36px; height: 36px; padding: 8px; border-radius: 50%; background: var(--yellow); color: #111; }
.services span { font-size: 13px; color: var(--muted); }
.services b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; }

.section { padding-block-start: 48px; }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-block-end: 24px; }
.section__head h2 { font-size: 30px; font-weight: 600; letter-spacing: -.01em; }
.section__link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 500; font-size: 14px; }
.section__link:hover { color: #9a6f00; }
.rail__arrows { display: flex; gap: 8px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 60px) / 4); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block-end: 4px; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat-tile { display: flex; align-items: center; gap: 16px; padding: 12px; background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow); font-weight: 500; transition: background .15s; }
.cat-tile:hover { background: #fff3cc; }
.cat-tile img { width: 60px; height: 60px; object-fit: contain; flex: none; mix-blend-mode: multiply; }

.cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-block-start: 48px; padding: 36px; border-radius: var(--radius-card); background: linear-gradient(180deg, #2c2c2c, #0d0d0d); color: #fff; }
.cta__main h2 { max-width: 13em; margin-block-end: 20px; font-size: 36px; font-weight: 500; line-height: 1.2; }
.cta__side { max-width: 340px; font-size: 14px; color: #c9c9c9; }
.cta__side h3 { margin-block-end: 8px; color: #fff; font-size: 14px; font-weight: 600; }

/* Product cards */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.grid--shop { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 8px 8px 12px; background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.card > :not(.tile) { margin-inline: 8px; }
/* The photo tile has nothing on it; everything else sits in the rows below. */
.tile { display: block; aspect-ratio: 1; padding: 12px; overflow: hidden; background: var(--bg); border-radius: var(--radius-photo); }
.tile img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .25s; }
.card:hover .tile img { transform: scale(1.04); }
/* Under the photo: one small line, the name, then the price beside one round button (like the app). */
.card__meta { display: flex; align-items: center; gap: 8px; margin-block: 8px 0; color: var(--muted); font-size: 12px; }
.card__category { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__rating { display: inline-flex; align-items: center; gap: 2px; color: var(--ink); font-weight: 600; }
.card__rating .icon { width: 13px; height: 13px; color: var(--yellow-dark); }
.card__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-block-start: auto; padding-block-start: 8px; }
.card__price { min-width: 0; }
.card__out { color: var(--red); font-size: 12px; font-weight: 600; }
.round--off { background: #eae9e4; color: var(--muted); cursor: default; }
.tool { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #deded9; border-radius: 50%; background: #fff; color: #333; }
/* An invisible 44px touch area around the 36px circle. */
.tool::after { content: ""; position: absolute; inset: -4px; }
.tool:hover { border-color: #111; }
.tool.is-active { background: var(--black); border-color: var(--black); color: var(--yellow); }
.tool.is-active .icon { fill: currentColor; }
.card__name { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; min-height: 2.8em; font-size: 15px; font-weight: 600; line-height: 1.4; }
.card__name a:hover { color: #9a6f00; }
/* The name's touch area is the whole two-line block (44px or more), not just the words. */
.card__name { position: relative; }
.card__name a::after { content: ""; position: absolute; inset: -4px 0; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.price__current { font-size: 19px; font-weight: 600; }
.price__old { color: #8b8b8b; font-size: 14px; }
.card__price { flex-direction: column; align-items: flex-start; gap: 0; }
.card__price .price__old { font-size: 13px; }
.price__was { display: inline-flex; align-items: center; gap: 4px; }
.price__off { padding: 2px 8px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; }

/* Shop */
.shop-hero { position: relative; height: 340px; margin-block-start: -88px; overflow: hidden; background: var(--black); }
.shop-hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shop-hero__word { position: absolute; inset-inline: 0; inset-block-end: -.1em; color: #fff; font-size: clamp(90px, 21vw, 300px); font-weight: 700; line-height: 1; letter-spacing: -.03em; text-align: center; white-space: nowrap; }
[dir="rtl"] .shop-hero__word { letter-spacing: 0; inset-block-end: .02em; }
.shop-hero__wrap { position: absolute; inset-block-end: 0; inset-inline: 0; }
.shop-hero__card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 16px 20px 16px; background: #fff; border-start-start-radius: 16px; border-start-end-radius: 16px; }
.shop-hero__card h1 { min-width: 0; font-size: 24px; font-weight: 600; }
.shop-hero__card .search { flex: 0 1 460px; }
.shop { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; padding-block-start: 24px; }
.side-filter { margin-block-start: 16px; font-size: 14px; }
.side-filter summary { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; font-weight: 500; cursor: pointer; list-style: none; }
.side-filter summary::-webkit-details-marker { display: none; }
.side-filter summary:hover { background: var(--bg); }
.filters { display: grid; gap: 12px; padding: 12px 12px; }
.filters__prices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.filters label { font-size: 13px; }
.filters input[type="number"] { display: block; width: 100%; height: 44px; margin-block-start: 4px; padding-inline: 8px; border: 1px solid #ccc; border-radius: 8px; background: #fff; }
.filters .link-muted { padding-block: 12px; font-size: 13px; text-align: center; }
.check { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--yellow-dark); }
.shop__chips { display: none; gap: 8px; margin-block-end: 12px; padding-block-end: 4px; overflow-x: auto; scrollbar-width: none; }
/* Sideways rows run to the screen edges and scroll under them, instead of being cut at the page margin. */
.shop__chips, .rail { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
.shop__chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; flex: none; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid #deded9; border-radius: 999px; font-size: 13px; font-weight: 500; }
.chip.is-active { background: var(--yellow); border-color: var(--yellow); }
.shop__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-block-end: 16px; }
.shop__count { color: var(--muted); font-size: 14px; }
.page h1 { font-size: 26px; font-weight: 600; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.sort select { height: 44px; padding-inline: 12px; border: 1px solid #d4d4d0; border-radius: 999px; background: #fff; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-block-start: 28px; padding-block-start: 16px; border-block-start: 1px solid var(--line); font-size: 14px; }
.pagination__step { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 500; }
.pagination__step.is-off { color: #b3b3ae; }
.pagination__pages { display: flex; gap: 4px; }
.pagination__pages > * { display: grid; place-items: center; min-width: 44px; height: 44px; border-radius: 8px; }
.pagination__pages a:hover, .pagination__pages .is-current { background: var(--bg); font-weight: 600; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-block: 0 8px; color: var(--muted); font-size: 13px; }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .icon { width: 13px; height: 13px; }
.breadcrumb span { overflow: hidden; max-width: 60ch; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 48px 20px; background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow); text-align: center; }
.empty > .icon { width: 44px; height: 44px; color: #b9b9b4; }
.empty h1, .empty h2 { font-size: 21px; font-weight: 600; }
.empty .btn { margin-block-start: 8px; }

/* Product page */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; }
.gallery__main { position: relative; aspect-ratio: 1; border-radius: var(--radius-card); padding: 24px; background: var(--card); box-shadow: var(--shadow); }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.gallery__thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 12px; }
.gallery__thumbs button { width: 76px; height: 76px; padding: 8px; border: 2px solid transparent; border-radius: 12px; background: var(--card); }
.gallery__thumbs button.is-active { border-color: var(--yellow); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.product__info { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.product__info h1 { font-size: 26px; font-weight: 600; line-height: 1.3; }
.product__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.stock { color: var(--green); font-weight: 600; }
.stock--out { color: var(--red); }
.price--large { margin-block-start: 0; padding-block-start: 0; }
.price--large .price__current { font-size: 32px; font-weight: 600; }
.price--large .price__old { font-size: 18px; }
.options { margin: 0; padding: 0; border: 0; }
.options legend { margin-block-end: 8px; font-weight: 600; }
.option { display: inline-block; margin-block-end: 8px; margin-inline-end: 8px; cursor: pointer; }
.option input { position: absolute; opacity: 0; }
.option span { display: flex; align-items: center; min-height: 44px; padding: 0 20px; border: 2px solid var(--line); border-radius: 999px; }
.option input:checked + span { border-color: var(--yellow); background: #fff8e1; font-weight: 600; }
.option input:focus-visible + span { outline: 3px solid var(--yellow-dark); outline-offset: 2px; }
.option--out { opacity: .45; cursor: not-allowed; }
.option--out span { text-decoration: line-through; }
.buy { display: grid; gap: 16px; }
.buy__row { display: flex; flex-wrap: wrap; gap: 12px; }
.buy__add { flex: 1; min-height: 52px; min-width: 130px; font-size: 15.5px; }
.qty { display: inline-flex; align-items: stretch; height: 52px; overflow: hidden; border: 1px solid #d4d4d0; border-radius: 999px; background: #fff; }
.qty button { width: 44px; border: 0; background: none; }
.qty button:hover { background: var(--bg); }
.qty input { width: 48px; border: 0; background: none; text-align: center; font-weight: 600; appearance: textfield; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.product__tools { display: flex; gap: 20px; }
.product__notes { display: grid; gap: 8px; margin: 0; padding: 16px 0 0; border-block-start: 1px solid var(--line); list-style: none; color: var(--muted); font-size: 14px; }
.panel { margin-block-start: 20px; padding: 24px 24px; background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow); }
.panel p a { font-weight: 600; text-decoration: underline; }
.panel > h2, .panel > summary { margin-block-end: 12px; font-size: 19px; font-weight: 700; }
.panel > summary { cursor: pointer; margin: 0; }
.prose { overflow-wrap: anywhere; }
.prose > * + * { margin-block-start: 12px; }
.prose ul, .prose ol { padding-inline-start: 24px; margin-block-end: 0; }
.prose h2, .prose h3 { margin-block-start: 24px; font-size: 18px; font-weight: 700; }
.prose a { color: #8a6400; text-decoration: underline; }
.prose img { height: auto; }
.prose table { width: 100%; border-collapse: collapse; }
.prose td, .prose th { padding: 8px 12px; border: 1px solid var(--line); }
.prose--short { color: #444; font-size: 14.5px; }

/* Cart and checkout */
.page { padding-block: 12px 20px; }
.page > h1 { margin-block-end: 16px; }
.page--narrow { width: min(820px, 100%); }
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.cart-lines { display: grid; gap: 12px; justify-items: start; }
.line { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; width: 100%; padding: 16px; background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow); }
.line__image img { width: 96px; height: 96px; object-fit: contain; }
.line h2 { font-size: 15px; font-weight: 500; line-height: 1.4; }
.line__variant, .line__unit { color: var(--muted); font-size: 13px; }
.line__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-block-start: 8px; }
.line__controls .qty { height: 44px; }
.line__controls .qty input { width: 40px; }
.line__controls .qty button { width: 44px; }
.line__total { font-size: 16px; }
.summary { position: sticky; inset-block-start: 100px; display: grid; gap: 16px; padding: 20px; background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow); }
.summary > h2 { font-size: 18px; font-weight: 700; }
.summary__terms { color: var(--muted); font-size: 12.5px; }
.summary__terms a { text-decoration: underline; }
.totals { display: grid; gap: 8px; margin: 0; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 500; text-align: end; }
.totals__discount dd { color: var(--green); }
.totals__grand { padding-block-start: 12px; border-block-start: 1px solid var(--line); font-size: 19px; }
.totals__grand dt { color: var(--ink); font-weight: 700; }
.totals__grand dd { font-weight: 800; }
.coupon { display: flex; gap: 8px; }
.coupon input { flex: 1; min-width: 0; height: 44px; padding-inline: 16px; border: 1px solid #d4d4d0; border-radius: 999px; background: #fff; }
.coupon-applied { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 8px; background: #e6f6ec; font-weight: 600; }
.form-panel { display: grid; gap: 16px; min-width: 0; padding: 24px; background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow); align-content: start; }
.form-panel h1 { font-size: 24px; font-weight: 800; }
.form-panel h2 { font-size: 17px; font-weight: 700; }
.form-panel > h2 ~ h2 { margin-block-start: 8px; padding-block-start: 16px; border-block-start: 1px solid var(--line); }
.form-panel__hint { padding: 12px 16px; border-radius: 8px; background: var(--bg); font-size: 14px; }
.form-panel__hint a, .auth a, .form-panel p a { font-weight: 600; text-decoration: underline; }
.field { display: grid; gap: 4px; min-width: 0; }
.field label { font-size: 14px; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 12px 12px; border: 1px solid #bbb; border-radius: 8px; background: #fff; font-size: 16px; }
[dir="rtl"] .field input[dir="ltr"] { text-align: end; }
.field [aria-invalid="true"] { border-color: var(--red); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-error { color: var(--red); font-size: 13.5px; font-weight: 500; }
.field-hint { margin-block-start: -8px; color: var(--muted); font-size: 13px; }
.pay-method { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 2px solid var(--yellow); border-radius: 8px; background: #fff8e1; font-size: 14px; }
.pay-method .icon { width: 24px; height: 24px; }
.pay-method b { display: block; }
.mini-lines { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.mini-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.mini-lines small { display: block; color: var(--muted); }
.mini-lines .field-error { grid-column: 1 / -1; }
.placed { display: grid; justify-items: center; gap: 8px; margin-block-end: 20px; padding: 28px 20px; background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow); text-align: center; }
.placed__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: #fff; font-size: 24px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 20px; padding: 20px 8px; background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow); list-style: none; font-size: 13px; text-align: center; }
.steps li { position: relative; display: grid; justify-items: center; gap: 8px; color: var(--muted); }
.steps li + li::before { content: ""; position: absolute; inset-block-start: calc(16px - 1.5px); inset-inline-end: 50%; width: 100%; height: 3px; background: var(--line); }
.steps li.is-done + li.is-done::before { background: var(--yellow); }
.steps__dot { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--line); color: transparent; }
.is-done .steps__dot { background: var(--yellow); color: #111; }
.is-done { color: var(--ink); font-weight: 500; }
.is-current { font-weight: 700; }
.order-address { overflow-wrap: anywhere; }

/* Account */
.auth { display: grid; justify-items: center; padding-block: 36px 52px; }
.auth .form-panel { width: min(440px, 100%); }
.auth__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.auth__row a { display: inline-flex; align-items: center; min-height: 44px; }
.auth__switch { text-align: center; font-size: 14px; }
.account__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.account__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-block-start: 20px; }
.page > .account__grid:first-of-type { margin-block-start: 0; }
.orders { display: grid; }
.orders__row { display: grid; grid-template-columns: 100px 100px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 8px; border-block-end: 1px solid var(--line); }
.orders__row:hover { background: var(--bg); }
.status { justify-self: start; padding: 3px 12px; border-radius: 12px; background: #fff1c6; color: #6a4e00; font-size: 12.5px; font-weight: 600; }
.status--delivered { background: #e6f6ec; color: #0b5b30; }
.status--cancelled { background: #fdecec; color: #93181d; }
.danger summary { color: var(--red); font-size: 15px; font-weight: 600; }
.danger form { display: grid; gap: 12px; justify-items: start; margin-block-start: 12px; }
.danger .field { width: min(360px, 100%); }
.contact-info a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); font-weight: 500; }
.contact-info a:hover { background: #fff8e1; }
.hp { position: absolute; inset-inline-start: -9999px; }
.compare-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow); }
.compare { width: 100%; min-width: 640px; border-collapse: collapse; }
.compare th { width: 130px; background: var(--bg); text-align: start; font-size: 14px; }
.compare th, .compare td { padding: 12px 16px; border: 1px solid var(--line); vertical-align: top; }
.compare td { min-width: 170px; font-size: 14px; }
.compare img { width: 120px; height: 120px; margin-block-end: 8px; object-fit: contain; }
.compare__text { color: var(--muted); }

/* Options, specifications and reviews */
.price__from { color: var(--muted); font-size: 13px; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; }
.price .rating { margin-inline-start: auto; }
.rating .icon { width: 14px; height: 14px; color: var(--yellow-dark); }
.rating small { color: var(--muted); font-weight: 400; }
.stock--low { color: #a35a00; font-weight: 600; }
.product__meta a { text-decoration: underline; }
.side-title--next { margin-block-start: 24px; }
.side-nav__flat { display: grid; gap: 2px; }
.side-nav__flat a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; color: #444; }
.side-nav__flat a:hover { background: var(--bg); color: #111; }
.side-nav__flat a.is-active { background: #fff3cc; color: #111; font-weight: 600; }
.side-nav__flat small { color: #8a8a86; }
.specs { width: 100%; max-width: 640px; border-collapse: collapse; font-size: 14.5px; }
.specs th, .specs td { padding: 8px 12px; border-block-end: 1px solid var(--line); text-align: start; }
.specs th { width: 40%; color: var(--muted); font-weight: 500; }
.reviews__summary { margin-block-end: 12px; }
.reviews__none { color: var(--muted); }
.reviews__login { margin-block-start: 16px; }
.reviews__login a { font-weight: 600; text-decoration: underline; }
.review { padding-block: 12px; border-block-end: 1px solid var(--line); }
.review header { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-block-end: 4px; font-size: 14px; }
.review__stars { color: var(--yellow-dark); }
.review__verified { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-size: 13px; }
.review-form { display: grid; gap: 12px; max-width: 560px; margin-block-start: 20px; }
.review-form h3 { font-size: 17px; font-weight: 600; }
.review-form .btn { justify-self: start; }
.review__report { margin-inline-start: auto; }
.review__report .text-tool { font-size: 12.5px; font-weight: 400; }
.review-form .check a { text-decoration: underline; }
.delete-request { max-width: 460px; margin-block-start: 24px; }

/* Footer */
.footer { margin-block-start: 48px; font-size: 14px; color: #555; }
.footer__grid { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 28px; padding-block-end: 32px; }
.footer h2 { margin-block-end: 12px; color: var(--ink); font-size: 16px; font-weight: 600; }
.footer__grid a:not(.round) { display: flex; align-items: center; min-height: 44px; }
.footer__grid a:not(.round):hover { color: #000; text-decoration: underline; }
.footer__contact { justify-self: end; }
.footer__icons { display: flex; gap: 8px; margin-block-start: 12px; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 20px; padding-block: 8px; border-block-start: 1px solid var(--line); font-size: 13px; color: #777; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 0 20px; color: #222; }
.footer__legal a { display: inline-flex; align-items: center; min-height: 44px; }
.footer__legal a:hover { text-decoration: underline; }
.tabbar { display: none; }
.toast { position: fixed; inset-block-end: 24px; inset-inline-start: 50%; z-index: 70; display: flex; align-items: center; gap: 16px; max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 12px; background: #111; color: #fff; box-shadow: 0 8px 26px rgb(0 0 0 / 35%); font-weight: 500; transform: translateX(-50%); }
[dir="rtl"] .toast { transform: translateX(50%); }
.toast--error { background: var(--red); }
.toast a { color: var(--yellow); font-weight: 700; text-decoration: underline; white-space: nowrap; }
.error-page { display: grid; justify-items: center; align-content: center; gap: 16px; min-height: 100vh; padding: 24px; background: var(--black); color: #fff; text-align: center; }
.error-page h1 { font-size: 28px; }

/* Tablets (standard breakpoints: phones under 768, tablets under 1024) */
@media (max-width: 1023px) {
    .hero { grid-template-columns: minmax(0, 1fr); }
    .hero__menu { display: none; }
    .logo img { width: 140px; }
    /* The text links don't fit beside 44px buttons here, so tablets get the menu button instead. */
    .header__nav { display: none; }
    .mobile-menu { display: block; }
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid--shop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rail { grid-auto-columns: calc((100% - 40px) / 3); }
    .tiles { grid-template-columns: repeat(3, 1fr); }
    .services { grid-template-columns: repeat(2, 1fr); }
    .checkout { grid-template-columns: minmax(0, 1fr) 320px; }
}

/* Phones */
@media (max-width: 767px) {
    body { padding-block-end: calc(88px + env(safe-area-inset-bottom)); }
    .header { padding-block: 8px; }
    .header__bar { flex-wrap: wrap; gap: 8px; padding: 8px 12px 12px; border-radius: 20px; }
    .header__nav, .header__desktop, [data-search-toggle] { display: none; }
    .mobile-menu { display: block; }
    .logo { flex: 1; }
    .logo img { width: 138px; }
    .header__search { position: static; display: block; order: 3; flex-basis: 100%; width: auto; padding: 0; background: none; box-shadow: none; }
    .search input[type="search"] { font-size: 16px; }
    .header__search .btn { display: none; }
    .flash--float { inset-block-start: 144px; }
    .hero { margin-block-start: 4px; gap: 12px; }
    .services { margin-block-start: 12px; gap: 8px; }
    .services > div { padding: 12px; gap: 8px; }
    .services b { font-size: 13px; }
    .services span { font-size: 12px; }
    .services .icon { width: 32px; height: 32px; padding: 8px; }
    .section { padding-block-start: 32px; }
    .section__head { margin-block-end: 16px; }
    .section__head h2 { font-size: 23px; }
    .grid, .grid--shop { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .rail { grid-auto-columns: 62%; gap: 12px; }
    .rail__arrows { display: none; }
    .card__name { font-size: 13.5px; }
    .price__current { font-size: 17px; }
    .tiles { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .cat-tile { gap: 8px; padding: 8px; font-size: 13px; }
    .cat-tile img { width: 46px; height: 46px; }
    .cta { margin-block-start: 32px; padding: 24px; align-items: flex-start; }
    .cta__main h2 { font-size: 27px; }
    .shop-hero { height: 236px; margin-block-start: -136px; }
    .shop-hero__word { font-size: 92px; inset-block-end: 24px; }
    [dir="rtl"] .shop-hero__word { inset-block-end: 32px; }
    .shop-hero__card { padding: 12px 16px; }
    .shop-hero__card h1 { font-size: 19px; }
    .shop-hero__card .search { display: none; }
    .shop { grid-template-columns: minmax(0, 1fr); gap: 0; padding-block-start: 12px; }
    .side-title, .side-nav { display: none; }
    .side-filter { margin: 0 0 12px; }
    .side-filter summary { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); }
    .shop__chips { display: flex; }
    .pagination__pages { display: none; }
    .page h1 { font-size: 21px; }
    .product { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .product__info h1 { font-size: 19px; }
    .price--large .price__current { font-size: 28px; }
    .checkout, .account__grid, .field-row { grid-template-columns: minmax(0, 1fr); }
    .summary { position: static; }
    .line { grid-template-columns: 72px minmax(0, 1fr); padding: 12px; }
    .line__image img { width: 72px; height: 72px; }
    .line__total { grid-column: 2; }
    .form-panel, .panel { padding: 16px; }
    .orders__row { grid-template-columns: 1fr auto; gap: 4px 12px; }
    .orders__row .icon { display: none; }
    .steps { font-size: 11.5px; padding-inline: 2px; }
    .footer { margin-block-start: 32px; }
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .footer__contact { grid-column: 1 / -1; justify-self: start; }
    .toast { inset-block-end: calc(88px + env(safe-area-inset-bottom)); width: max-content; }
    .tabbar { position: fixed; inset-inline: 16px; inset-block-end: calc(8px + env(safe-area-inset-bottom)); z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr); height: 64px; padding: 4px; border: 1px solid rgb(255 255 255 / 60%); border-radius: 32px; background: rgb(255 255 255 / 72%); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: 0 12px 32px rgb(0 0 0 / 12%); view-transition-name: tabbar; }
    /* The tab number comes from data-tab (the security policy blocks inline styles). */
    .tabbar[data-tab="1"] { --tab: 1; } .tabbar[data-tab="2"] { --tab: 2; } .tabbar[data-tab="3"] { --tab: 3; } .tabbar[data-tab="4"] { --tab: 4; }
    .tabbar__pill { position: absolute; inset-block: 4px; inset-inline-start: calc(4px + var(--tab, 0) * (100% - 8px) / 5); width: calc((100% - 8px) / 5); border-radius: 28px; background: rgb(0 0 0 / 7%); view-transition-name: tabbar-pill; }
    .tabbar a { position: relative; display: grid; place-content: center; justify-items: center; gap: 4px; border-radius: 28px; color: rgb(21 21 21 / 80%); font-size: 11px; font-weight: 500; transition: transform .12s ease-out; }
    .tabbar .icon { font-size: 18px; }
    .tabbar a.is-active { color: var(--ink); font-weight: 600; }
}


/* Pages fade into each other like app screens; the header and tab bar stay put, and the tab pill slides to its new place. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 120ms ease-in both page-out; }
::view-transition-new(root) { animation: 240ms cubic-bezier(.2, .8, .2, 1) both page-in; }
::view-transition-group(tabbar-pill) { animation-duration: 380ms; animation-timing-function: cubic-bezier(.34, 1.4, .64, 1); }
@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
html { -webkit-tap-highlight-color: transparent; }
a, button, summary, label, select { touch-action: manipulation; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
