:root { --primary: #243447; --accent: #d99b2b; --ink: #17202a; --muted: #68727d; --line: #e4e7eb; --surface: #f6f7f8; --white: #fff; --danger: #a93226; --radius: 14px; }
* { box-sizing: border-box; }
html { color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
body { margin: 0; background: var(--white); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
.container { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.narrow { width: min(680px, calc(100% - 32px)); }
.narrow-wide { width: min(860px, calc(100% - 32px)); }
.site-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.nav-wrap { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; flex-shrink: 0; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 1.15rem; }
.brand img { width: 71px; height: 71px; object-fit: contain; }
.nav-right { display: flex; min-width: 0; align-items: center; gap: 18px; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
nav a, .link-button { color: var(--ink); font-weight: 600; }
.nav-icon { position: relative; display: inline-flex; align-items: center; }
.nav-icon svg { width: 23px; height: 23px; }
/* Sits on top of the icon rather than beside it, so a filled cart is no
   wider in the header than an empty one. */
.cart-count { position: absolute; top: -5px; right: -8px; min-width: 17px; padding: 0 4px; border-radius: 9px; background: var(--primary); color: #fff; font-size: .68rem; font-weight: 800; line-height: 17px; text-align: center; }
.nav-form { display: inline; margin: 0; }
.currency-form { margin: 0; }
.currency-form select { width: auto; padding: 5px 25px 5px 8px; border-radius: 6px; font-size: .82rem; font-weight: 750; }
/* Collapsed to the active flag in the header; the names only appear in the
   open panel, where the width costs no header space. */
.language-menu { position: relative; flex-shrink: 0; }
.language-menu summary { display: flex; align-items: center; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; list-style: none; }
.language-menu summary::-webkit-details-marker { display: none; }
.language-menu[open] summary { background: var(--surface); }
.language-flag { font-size: 1.05rem; line-height: 1; }
.language-panel { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; display: grid; gap: 2px; min-width: 165px; margin: 0; padding: 6px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 12px 32px rgba(0,0,0,.14); }
.language-option { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); font-size: .9rem; font-weight: 600; text-align: left; cursor: pointer; }
.language-option:hover { background: var(--surface); }
.language-option.active { color: var(--primary); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.link-button { padding: 0; border: 0; background: none; cursor: pointer; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border: 1px solid var(--primary); border-radius: 9px; background: var(--primary); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; }
.button:hover { filter: brightness(1.08); text-decoration: none; }
.button-small { min-height: 36px; padding: 7px 13px; }
.button-wide { width: 100%; }
.button-secondary { border-color: var(--line); background: var(--white); color: var(--ink); }
.offline-page { padding-block: 64px; text-align: center; }
.offline-page p { color: var(--muted); margin-bottom: 24px; }
.install-app-button:not([hidden]) { display: inline-flex; align-items: center; gap: 6px; }
.install-app-button svg { width: 17px; height: 17px; }
.header-search { position: relative; flex: 1 1 280px; max-width: 540px; margin: 0; }
.header-search input { height: 42px; padding: 0 48px 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); transition: background .15s, border-color .15s; }
.header-search input:hover { border-color: #cbd0d5; }
.header-search input:focus { background: #fff; }
.header-search input::-webkit-search-cancel-button { cursor: pointer; }
.header-search button { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: var(--primary); color: #fff; cursor: pointer; }
.header-search button:hover { filter: brightness(1.15); }
.header-search svg { width: 17px; height: 17px; }
.hero { padding-block: 22px 24px; color: #fff; background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #000)); text-align: center; }
.hero h1 { margin: 2px 0 0; font-size: clamp(1.15rem, 2.6vw, 2rem); line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.eyebrow { margin: 0; color: var(--accent); font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.shop-layout { display: grid; grid-template-columns: 210px 1fr; gap: 44px; padding-block: 52px 84px; }
.categories, .category-list { display: flex; flex-direction: column; gap: 6px; }
.app-back.category-back { display: none; }
.categories h2 { font-size: 1rem; margin: 0 0 10px; }
.categories a { padding: 9px 11px; border-radius: 8px; color: var(--ink); }
.categories a.active { background: var(--surface); font-weight: 750; }
.categories a.parent-active { font-weight: 700; }
.subcategories { display: flex; flex-direction: column; gap: 4px; margin-left: 11px; padding-left: 9px; border-left: 1px solid var(--line); }
.categories a.subcategory { padding: 7px 10px; font-size: .93rem; color: var(--muted); }
.categories a.subcategory.active { color: var(--ink); }
.tab-bar { display: none; }
.section-heading-side { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; }
/* A long category name wraps rather than pushing the filter button off screen. */
.section-heading h2 { min-width: 0; overflow-wrap: anywhere; }
.result-count { color: var(--muted); font-weight: 600; white-space: nowrap; }
.filter-button { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; cursor: pointer; }
.filter-button:hover { border-color: #cbd0d5; }
.filter-button svg { width: 18px; height: 18px; }
.filter-count { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--primary); color: #fff; font-size: .72rem; line-height: 20px; text-align: center; }
/* Filter panel: a native <dialog>, docked right on wide screens and as a bottom sheet on phones. */
.filter-sheet { width: min(420px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; padding: 0; border: 0; background: #fff; color: var(--ink); }
.filter-sheet::backdrop { background: rgba(15, 20, 25, .45); }
.filter-sheet form { display: grid; grid-template-rows: auto 1fr auto; height: 100%; margin: 0; }
.filter-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.filter-sheet-head h2 { margin: 0; font-size: 1.15rem; }
.filter-close { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; }
.filter-close svg { width: 20px; height: 20px; }
.filter-sheet-body { display: grid; align-content: start; gap: 22px; padding: 18px; overflow-y: auto; }
.filter-sheet fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.filter-sheet legend { margin-bottom: 10px; padding: 0; font-weight: 750; }
.filter-sheet .choice-chip { position: relative; font-size: .92rem; }
.filter-sheet .choice-chip input { position: absolute; opacity: 0; pointer-events: none; }
.filter-sheet .choice-chip:has(input:checked) { border-color: var(--primary); background: var(--primary); color: #fff; }
.filter-sheet .choice-chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.price-range { display: flex; align-items: end; gap: 10px; }
.price-range label { display: grid; flex: 1; gap: 4px; color: var(--muted); font-size: .82rem; }
.price-range input { width: 100%; min-width: 0; }
.price-range > span { padding-bottom: 10px; color: var(--muted); }
.filter-sheet-foot { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.app-page { padding-block: 32px 64px; }
.app-page-title { margin: 0 0 18px; font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -.02em; }
.app-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; color: var(--muted); font-weight: 600; }
.app-back svg { width: 18px; height: 18px; }
.category-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.category-tile { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 100px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-weight: 750; line-height: 1.25; overflow-wrap: normal; word-break: normal; hyphens: none; }
.category-tile:hover { border-color: #cbd0d5; text-decoration: none; }
.category-tile span { flex: 1 1 auto; min-width: min-content; }
.category-tile img { flex: 0 1 64px; min-width: 0; width: 64px; height: auto; aspect-ratio: 1; border-radius: 10px; background: #fff; object-fit: contain; }
.menu-list { display: grid; border-top: 1px solid var(--line); }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 4px; border-bottom: 1px solid var(--line); color: var(--ink); }
.menu-row:hover { background: var(--surface); text-decoration: none; }
.menu-row-text { display: grid; gap: 2px; }
.menu-row-text small { color: var(--muted); font-size: .88rem; }
.menu-chevron { flex-shrink: 0; width: 9px; height: 9px; margin-right: 6px; border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: rotate(45deg); }
.menu-heading { margin: 28px 0 10px; font-size: 1rem; }
.choice-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.choice-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; cursor: pointer; }
.choice-chip.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.account-guest { display: grid; gap: 12px; }
.account-guest p { margin: 0; }
.menu-logout { margin-top: 32px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.section-heading h1, .section-heading h2 { margin: 0; }
.section-heading > span { color: var(--muted); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.product-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: transform .18s ease, box-shadow .18s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(20, 30, 40, .09); }
.product-image { display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface); color: var(--muted); }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding: 18px; }
.product-card h3 { margin: 3px 0 15px; font-size: 1.08rem; }
.product-card h3 a { color: var(--ink); }
.muted { margin: 0; color: var(--muted); }
.price-row, .summary-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.stock { color: #24734b; font-size: .82rem; }
.product-card .price-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.product-card .price-row > :last-child { justify-self: end; text-align: right; }
.wishlist-form { display: contents; }
.wishlist-toggle { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; margin: -8px 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; transition: color .15s, background .15s, transform .15s; }
.wishlist-toggle svg { width: 22px; height: 22px; fill: transparent; transition: fill .15s; }
.wishlist-toggle:hover { background: var(--surface); color: var(--danger); }
.wishlist-toggle:active { transform: scale(.88); }
.wishlist-toggle[aria-pressed="true"] { color: var(--danger); }
.wishlist-toggle[aria-pressed="true"] svg { fill: currentColor; }
.wishlist-toggle:disabled { opacity: .6; }
.detail-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.detail-title .wishlist-toggle { width: 46px; height: 46px; margin: 4px -6px 0 0; }
.detail-title .wishlist-toggle svg { width: 26px; height: 26px; }
.toast { position: fixed; z-index: 40; left: 50%; bottom: 24px; display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px); padding: 11px 18px; border-radius: 999px; background: var(--ink); color: var(--white); font-size: .92rem; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.18); opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.toast a { color: var(--accent); white-space: nowrap; }
.menu-list-guest { margin-bottom: 20px; }
.out-stock, .error-text, .danger { color: var(--danger); }
.page-section { min-height: 62vh; padding-block: 48px 80px; }
.product-detail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: 62px; padding-block: 52px 84px; }
.gallery { display: grid; gap: 12px; align-content: start; }
.gallery-main, .image-placeholder { width: 100%; border-radius: var(--radius); background: var(--surface); }
.gallery-main { max-height: 480px; object-fit: contain; }
.image-placeholder { display: grid; place-items: center; min-height: 320px; color: var(--muted); }
.gallery-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.gallery-thumb { width: 72px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: calc(var(--radius) - 4px); background: var(--surface); cursor: pointer; overflow: hidden; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--primary); }
.product-info { position: sticky; top: 104px; align-self: start; }
.product-info h1 { margin: 9px 0; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.15; }
.detail-price { margin: 18px 0; color: var(--primary); font-size: 1.3rem; font-weight: 800; }
.prose { color: #3c4650; }
.stack-form p { display: grid; gap: 6px; margin: 0 0 17px; }
.stack-form label, .cart-controls label { font-weight: 700; }
input, select, textarea { width: 100%; padding: 11px 12px; border: 1px solid #cbd0d5; border-radius: 8px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 28%, transparent); border-color: var(--accent); }
.helptext { color: var(--muted); font-size: .82rem; }
.errorlist { margin: 3px 0; padding-left: 20px; color: var(--danger); }
.add-form { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.panel, .order-summary { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.panel h1, .panel h2, .order-summary h2 { margin-top: 0; }
.form-footer { margin: 22px 0 0; text-align: center; }
.alerts { padding-top: 14px; }
.alert { padding: 12px 15px; border-radius: 8px; background: #e9f2fc; }
.alert-success { background: #e6f5ed; }
.alert-error { background: #fdebea; color: #7d2119; }
.empty-state { grid-column: 1 / -1; padding: 62px 24px; border: 1px dashed #cbd0d5; border-radius: var(--radius); text-align: center; }
.two-column { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.order-summary { position: sticky; top: 100px; background: var(--surface); }
.order-summary .summary-row { padding: 12px 0 20px; font-size: 1.15rem; }
.cart-list { display: grid; gap: 14px; }
.cart-item { display: grid; grid-template-columns: 100px minmax(170px, 1fr) 120px 110px; align-items: center; gap: 18px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.cart-item h2 { margin: 0; font-size: 1rem; }
.cart-item p { margin: 4px 0; color: var(--muted); }
.cart-thumb { height: 88px; border-radius: 8px; background: var(--surface); overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-controls { display: grid; gap: 6px; }
.cart-controls label { font-size: .78rem; }
.cart-controls input { padding: 7px; }
.cart-controls .button { min-height: 34px; padding: 5px; font-size: .82rem; }
.notice { padding: 14px 16px; border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, #fff); }
.top-gap { margin-top: 22px; }
address { font-style: normal; line-height: 1.75; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 18px; border-bottom: 1px solid var(--line); text-align: left; }
th { background: var(--surface); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
.status { display: inline-block; padding: 4px 9px; border-radius: 999px; background: #edf0f2; font-size: .8rem; font-weight: 750; }
.status-confirmed, .status-completed { background: #dff3e8; color: #19623d; }
.status-rejected, .status-cancelled { background: #fae4e2; color: #8c2921; }
.order-title { margin-top: 26px; }
.order-line { display: flex; justify-content: space-between; gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.order-line p { margin: 3px 0; color: var(--muted); }
.total-row { padding-top: 22px; font-size: 1.15rem; }
.conversation-list { display: grid; gap: 10px; }
.conversation-card { display: flex; justify-content: space-between; gap: 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.conversation-card:hover { border-color: var(--accent); text-decoration: none; }
.conversation-card div:first-child { display: grid; }
.conversation-card span { color: var(--muted); }
.conversation-meta { display: grid; text-align: right; color: var(--muted); font-size: .85rem; }
.chat-page { width: min(860px, calc(100% - 32px)); padding-block: 34px 60px; }
.chat-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; }
.chat-header h1 { margin: 7px 0 0; }
.message-stream { height: min(58vh, 600px); overflow-y: auto; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; background: var(--surface); }
.message { width: min(78%, 620px); margin-bottom: 13px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 4px 13px 13px 13px; background: #fff; }
.message-mine { margin-left: auto; border: 0; border-radius: 13px 4px 13px 13px; background: var(--primary); color: #fff; }
.message-shop { border-left: 4px solid var(--accent); }
.message > div { display: flex; justify-content: space-between; gap: 12px; font-size: .78rem; }
.message time { opacity: .72; }
.message p { margin: 6px 0 0; white-space: pre-wrap; }
.empty-chat { display: grid; place-items: center; height: 100%; color: var(--muted); }
.chat-compose { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; padding: 14px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
.chat-compose textarea { resize: vertical; }
.site-footer { padding: 38px 0; border-top: 1px solid var(--line); background: var(--surface); }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; }
.footer-grid p { margin: 6px 0; color: var(--muted); }
@media (max-width: 900px) {
  /* Search drops to its own full-width row under the logo line. */
  .nav-wrap { flex-wrap: wrap; row-gap: 0; }
  .nav-right { flex: 1 1 0; justify-content: flex-end; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; margin-bottom: 10px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-detail, .two-column { grid-template-columns: 1fr; }
  .product-info, .order-summary { position: static; }
  .cart-item { grid-template-columns: 80px 1fr; }
  .cart-item > :nth-child(n+3) { grid-column: 2; }
}
@media (max-width: 660px) {
  /* The 71px logo drives the header height, so it comes down on phones to
     keep the single line shallow. */
  .nav-wrap { min-height: 0; padding-block: 7px; gap: 12px; }
  .brand img { width: 46px; height: 46px; }
  /* One header line on phones: the nav scrolls sideways instead of wrapping.
     The language menu stays outside that scroller, pinned to the right. */
  .nav-right { gap: 10px; }
  nav { flex-wrap: nowrap; min-width: 0; gap: 14px; padding-block: 6px; overflow-x: auto; scrollbar-width: none; font-size: .88rem; white-space: nowrap; }
  nav::-webkit-scrollbar { display: none; }
  .brand span { display: none; }
  .nav-wrap { row-gap: 0; }
  .header-search { margin-block: 3px 4px; }
  .header-search input { height: 40px; }
  .header-search button { width: 32px; height: 32px; }
  .shop-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 20px; }
  /* Phones: the bottom tab bar's Categories page replaces the sidebar; inside a
     category only a back link to the list it was picked from remains. */
  .categories { display: none; }
  .app-back.category-back { display: inline-flex; margin-bottom: 6px; }
  /* Inside the heading row the back link replaces the title, with the filter button on its right. */
  .section-heading .category-back { min-width: 0; margin: 0; gap: 5px; color: var(--ink); font-size: 1.1rem; font-weight: 750; line-height: 1.25; }
  .section-heading .category-back svg { flex: 0 0 auto; }
  /* A long name stops after two lines with "…"; the count stays visible beside it. */
  .category-back-name { display: -webkit-box; min-width: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
  .section-heading .category-back .result-count { flex: 0 0 auto; align-self: flex-end; }
  .app-page-title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .section-heading .category-back + h2 { display: none; }
  .filter-sheet { width: 100%; height: auto; max-height: 88dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .filter-sheet form { height: auto; max-height: 88dvh; }
  .section-heading h2 { font-size: 1.35rem; }
  /* App shell: logo + search on top, everything else in the fixed bottom tab bar. */
  .nav-wrap { flex-wrap: nowrap; }
  /* Only the language flag and the install button stay next to the search. */
  .nav-right { flex: 0 0 auto; gap: 8px; }
  .nav-right nav { display: none; }
  .install-app-button { min-height: 34px; padding: 6px 8px; }
  .install-app-button span { display: none; }
  .install-app-button svg { width: 19px; height: 19px; }
  .language-menu summary { padding: 7px 8px; }
  /* Screen space is scarce in the app, so the tagline banner goes. */
  .hero { display: none; }
  .brand img { width: 42px; height: 42px; }
  .header-search { order: 0; flex: 1 1 auto; margin: 0; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  /* The app shell never scrolls sideways, whatever a long translation does. */
  html, body { overflow-x: clip; }
  /* Fixed-width tabs: minmax(0, 1fr) keeps a long label (Georgian "Categories")
     from stretching its column past the screen; it ellipsizes instead. */
  .tab-bar { position: fixed; z-index: 25; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); backdrop-filter: blur(10px); }
  .tab-bar a { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 2px; min-width: 0; padding: 5px 1px; border-radius: 14px; color: var(--muted); font-size: .68rem; font-weight: 600; line-height: 1.2; }
  .tab-bar a > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* Georgian script runs wider than Latin; a smaller size lets its labels fit whole. */
  .tab-bar a:lang(ka) { font-size: .6rem; letter-spacing: -.01em; }
  .tab-bar a:hover { text-decoration: none; }
  /* Float the wishlist toast above the fixed tab bar. */
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .tab-bar a.active { background: var(--surface); color: var(--primary); }
  .tab-bar svg { width: 25px; height: 25px; }
  .tab-icon { position: relative; display: block; }
  .tab-badge { position: absolute; top: -5px; right: -10px; min-width: 18px; padding: 0 5px; border: 2px solid #fff; border-radius: 10px; background: var(--danger); color: #fff; font-size: .66rem; font-weight: 800; line-height: 14px; text-align: center; }
  /* The tab bar already covers what the footer offered, so it only costs space here. */
  .site-footer { display: none; }
  .app-page { padding-block: 18px 36px; }
  /* One category per row: room for a readable picture and a two-line name. */
  .category-tiles { grid-template-columns: 1fr; gap: 10px; }
  .category-tile { min-height: 76px; padding: 10px 12px 10px 16px; gap: 14px; font-size: .98rem; }
  .category-tile img { flex: 0 0 56px; width: 56px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-detail { padding-top: 28px; gap: 30px; }
  .message { width: 92%; }
  .chat-compose { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; }
}
/* Georgian script runs wider than Latin: the heading left of the filter button
   comes down 2px and the button label 1px, so the row fits on phones. */
html:lang(ka) .section-heading h2 { font-size: 22px; }
html:lang(ka) .filter-button { font-size: 15px; }
@media (max-width: 660px) {
  html:lang(ka) .section-heading h2 { font-size: calc(1.35rem - 2px); }
}
