/* Tintin Bazar storefront.
   Red and white come straight from the logo (#BD2026). Headings borrow the
   logo's bold-italic lettering. Layout: white header with a red navigation
   band, and a category sidebar down the left of the Home and Product List
   pages. */
:root {
  --brand-red: #BD2026;
  --brand-red-dark: #961A1F;
  --brand-red-tint: #FBEEEE;
  --brand-dark: #1F2126;
  --brand-cream: #F3F4F6; /* page background */
  --ink: #1F2328;
  --muted: #646B74;
  --border: #E2E4E8;
  --line: #EEF0F2;
  --success: #2F7D4F;
  --warn: #B8842C;
  --danger: #B8342C;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--brand-cream); color: var(--ink); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 11px 22px; background: var(--brand-red); color: #fff; border-radius: 6px; font-weight: 700; border: 2px solid var(--brand-red); cursor: pointer; font-size: 14.5px; font-family: inherit; line-height: 1.2; }
.btn:hover { background: var(--brand-red-dark); border-color: var(--brand-red-dark); }
.btn.secondary { background: transparent; border-color: var(--brand-dark); color: var(--brand-dark); }
.btn.secondary:hover { background: var(--brand-dark); color: #fff; }
.btn.light { background: #fff; border-color: #fff; color: var(--brand-red); }
.btn.light:hover { background: var(--brand-red-tint); border-color: var(--brand-red-tint); }
.btn.outline-light { background: transparent; border-color: rgba(255,255,255,0.85); color: #fff; }
.btn.outline-light:hover { background: rgba(255,255,255,0.14); }

/* ---------- Top strip ---------- */
.topbar { background: var(--brand-dark); color: rgba(255,255,255,0.82); font-size: 12.5px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 7px; padding-bottom: 7px; }
.topbar-contact { display: flex; gap: 18px; white-space: nowrap; }
.topbar-contact a:hover { color: #fff; text-decoration: underline; }

/* ---------- Header ---------- */
.site-header { background: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 var(--border); }
.site-header .bar { display: flex; align-items: center; gap: 28px; padding: 10px 20px; max-width: 1180px; margin: 0 auto; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 66px; max-width: 220px; object-fit: contain; }
.brand-text { font-size: 24px; font-weight: 800; font-style: italic; color: var(--brand-red); letter-spacing: -0.5px; text-transform: uppercase; }
.brand-text span { color: var(--brand-dark); margin-left: 4px; }

.header-search { display: flex; flex: 1; max-width: 560px; margin: 0 auto; border: 2px solid var(--brand-red); border-radius: 999px; overflow: hidden; background: #fff; }
.header-search input { flex: 1; min-width: 0; border: none; outline: none; padding: 10px 18px; font-size: 14.5px; font-family: inherit; background: transparent; }
.header-search button { border: none; background: var(--brand-red); color: #fff; padding: 0 22px; font-weight: 700; font-size: 14px; font-family: inherit; cursor: pointer; }
.header-search button:hover { background: var(--brand-red-dark); }

.header-right { display: flex; align-items: center; gap: 18px; flex-shrink: 0; margin-left: auto; }
.cta-quote { border: 2px solid var(--brand-red); color: var(--brand-red) !important; padding: 8px 16px; border-radius: 6px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.cta-quote:hover { background: var(--brand-red); color: #fff !important; }
.cart-link { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14.5px; color: var(--ink); white-space: nowrap; padding: 6px 2px; }
.cart-link:hover { color: var(--brand-red); }
.cart-badge { display: inline-block; min-width: 20px; text-align: center; background: var(--brand-red); color: #fff; font-size: 11px; font-weight: 700; border-radius: 20px; padding: 2px 6px; }

/* Hamburger — hidden on desktop, shown only under the mobile breakpoint below. */
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 36px; height: 36px; padding: 7px; background: none; border: none; cursor: pointer; }
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.15s, opacity 0.15s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Red navigation band (desktop). On phones this same block is the dropdown
   opened by the hamburger — see the media query near the end. */
.nav-band { background: var(--brand-red); color: #fff; }
.nav-band .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.main-nav { display: flex; gap: 30px; font-weight: 700; font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.5px; }
.main-nav a { padding: 11px 0; border-bottom: 3px solid transparent; }
.main-nav a:hover { border-bottom-color: #fff; }
.nav-band-note { font-size: 13px; font-style: italic; opacity: 0.9; text-align: right; }
.nav-mobile-only { display: none !important; }

/* ---------- Shared bits ---------- */
.breadcrumb { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.breadcrumb a:hover { color: var(--brand-red); }
.hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
.empty-note { color: var(--muted); }

.section { padding: 36px 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.section-title h2, .shelf-head h2 { font-size: 20px; margin: 0; font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: 0.3px; border-left: 5px solid var(--brand-red); padding-left: 12px; }
.section-title a { color: var(--brand-red); font-weight: 600; font-size: 14px; }

/* Page banner (About Us / Contact) */
.page-banner { width: 100%; max-height: 280px; overflow: hidden; border-bottom: 1px solid var(--border); }
.page-banner img { width: 100%; height: 280px; object-fit: cover; display: block; }

/* ---------- Sidebar layout (Home + Product List) ---------- */
.shop-layout { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 28px; align-items: start; padding-top: 24px; padding-bottom: 20px; }
.shop-sidebar { position: sticky; top: 132px; max-height: calc(100vh - 148px); overflow-y: auto; scrollbar-width: thin; border-radius: 8px; }

.cat-menu { background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.cat-menu-head { background: var(--brand-dark); color: #fff; font-size: 13px; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: 0.6px; padding: 10px 14px; }
.cat-menu-item { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 11px; font-size: 13px; line-height: 1.25; border-top: 1px solid var(--line); border-left: 3px solid transparent; }
.cat-menu-item img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--brand-cream); flex-shrink: 0; }
.cat-menu-name { flex: 1; min-width: 0; }
.cat-menu-count { font-size: 11.5px; color: var(--muted); background: var(--brand-cream); border-radius: 20px; padding: 1px 8px; }
.cat-menu-item:hover { background: var(--brand-red-tint); color: var(--brand-red); }
.cat-menu-item.active { background: var(--brand-red-tint); border-left-color: var(--brand-red); color: var(--brand-red); font-weight: 700; }
.cat-menu-all { font-weight: 700; padding-top: 8px; padding-bottom: 8px; }

/* Phone-only swipeable category row on the Home page. */
.cat-scroller { display: none; }
.cat-bubble { flex: 0 0 76px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.2; }
.cat-bubble img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; background: #fff; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.16); }

/* The category dropdown button only appears under the mobile breakpoint. */
.category-filter-toggle { display: none; width: 100%; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 11px 14px; font-size: 14.5px; font-weight: 700; color: var(--ink); cursor: pointer; font-family: inherit; }
.category-filter-toggle .chevron { flex-shrink: 0; transition: transform 0.15s; color: var(--muted); }
.category-filter-toggle.open .chevron { transform: rotate(180deg); }

/* ---------- Home: hero ---------- */
.hero-panel { position: relative; overflow: hidden; display: flex; align-items: center; gap: 32px; min-height: 300px; padding: 40px 44px; border-radius: 10px; color: #fff; background: linear-gradient(120deg, var(--brand-red) 0%, var(--brand-red) 45%, var(--brand-red-dark) 100%); }
.hero-copy { position: relative; z-index: 1; flex: 1; min-width: 0; }
.eyebrow { font-size: 12.5px; font-weight: 700; font-style: italic; text-transform: uppercase; letter-spacing: 1.6px; opacity: 0.9; margin-bottom: 12px; }
.hero-copy h1 { font-size: 34px; font-weight: 800; font-style: italic; margin: 0 0 14px; max-width: 560px; }
.hero-copy p { font-size: 15.5px; margin: 0 0 22px; max-width: 520px; opacity: 0.93; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-mark { position: absolute; right: -36px; bottom: -22px; width: 430px; max-width: none; opacity: 0.13; pointer-events: none; }
.hero-image { position: relative; z-index: 1; flex: 0 0 40%; }
.hero-image img { width: 100%; height: 240px; object-fit: cover; border-radius: 8px; }

.fact-strip { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--border); border-radius: 8px; margin-top: 16px; }
.fact { padding: 15px 18px; border-left: 1px solid var(--line); }
.fact:first-child { border-left: none; }
.fact strong { display: block; font-size: 20px; font-weight: 800; font-style: italic; color: var(--brand-red); }
.fact span { font-size: 12.5px; color: var(--muted); }

/* ---------- Home: product rows ---------- */
.shelf { margin-top: 34px; }
.shelf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.shelf-controls { display: flex; align-items: center; gap: 8px; }
.shelf-controls a { color: var(--brand-red); font-weight: 700; font-size: 13.5px; margin-left: 8px; white-space: nowrap; }
.shelf-controls a:hover { text-decoration: underline; }
.rail-btn { width: 32px; height: 32px; border: 1px solid var(--border); background: #fff; border-radius: 6px; font-size: 20px; line-height: 1; color: var(--ink); cursor: pointer; }
.rail-btn:hover { border-color: var(--brand-red); color: var(--brand-red); }
.product-rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 42px) / 4); gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 10px; scrollbar-width: thin; }
.product-rail .product-card { scroll-snap-align: start; }

/* ---------- Product tiles ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.related-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.product-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s; }
.product-card:hover { border-color: var(--brand-red); box-shadow: 0 4px 14px rgba(31,33,38,0.10); }
.product-card .thumb { aspect-ratio: 1; background: #fff; padding: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-card .info { padding: 10px 12px 13px; border-top: 1px solid var(--line); flex: 1; display: flex; flex-direction: column; }
.brand-tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-card .name { font-weight: 600; font-size: 13.5px; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .price { font-weight: 800; font-size: 15px; margin: 6px 0 6px; }
.stock-dot { margin-top: auto; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stock-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.stock-dot.badge-instock::before { background: var(--success); }
.stock-dot.badge-lowstock::before { background: var(--warn); }
.stock-dot.badge-outofstock::before { background: var(--danger); }
.stock-dot.badge-preorder::before { background: #3163B8; }

.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.badge.badge-instock { background: #E5F4EA; color: var(--success); }
.badge.badge-lowstock { background: #FBF0DC; color: var(--warn); }
.badge.badge-outofstock { background: #FBE6E4; color: var(--danger); }
.badge.badge-preorder { background: #E6EEFC; color: #3163B8; }

/* ---------- Product List page ---------- */
.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.list-head h1 { font-size: 26px; font-weight: 800; font-style: italic; margin: 0; }
.list-count { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.list-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.list-tools input, .list-tools select { padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-family: inherit; background: #fff; }
.list-tools input { width: 220px; }
.list-tools .btn { padding: 8px 16px; }

/* ---------- Product detail ---------- */
.pd-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 28px; margin: 4px 0 10px; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.pd-gallery-main { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: #fff; margin-bottom: 12px; }
.pd-gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.pd-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-thumbs img { width: 66px; height: 66px; object-fit: cover; border-radius: 6px; border: 2px solid var(--border); cursor: pointer; }
.pd-thumbs img.active { border-color: var(--brand-red); }
.pd-info h1 { font-size: 26px; font-weight: 800; margin: 0 0 10px; }
.pd-price { font-size: 28px; font-weight: 800; color: var(--brand-red); margin: 14px 0; }
.pd-bulk-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #EAF6EE; border: 1px solid #B9E3C6; color: #1F6B3A; font-size: 13.5px; font-weight: 600; padding: 8px 12px; border-radius: 6px; margin: -6px 0 16px; }
.pd-bulk-note.applied { background: #DFF2E5; border-color: #8FD1A7; }
.pd-bulk-note .pd-bulk-save { background: #1F6B3A; color: #fff; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.3px; }
.cart-bulk-tag { color: #1F6B3A; font-weight: 700; font-size: 12px; margin-top: 2px; }
.pd-meta { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.variant-group { margin: 18px 0; }
.variant-group label { font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); display: block; margin-bottom: 8px; }
.variant-options { display: flex; gap: 8px; flex-wrap: wrap; }
.variant-option { border: 1.5px solid var(--border); padding: 8px 14px; border-radius: 4px; cursor: pointer; font-weight: 600; font-size: 14px; background: #fff; }
.variant-option:hover { border-color: var(--ink); }
.variant-option.selected { border-color: var(--brand-red); background: var(--brand-red-tint); color: var(--brand-red); }
.pd-specs { margin-top: 28px; border-top: 1px solid var(--border); padding-top: 20px; }
.pd-specs table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pd-specs td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.pd-specs td:first-child { color: var(--muted); width: 40%; }
.pd-description ul { padding-left: 20px; }

/* ---------- Inquiry cart ---------- */
.cart-table-wrap { width: 100%; overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); padding: 12px; border-bottom: 2px solid var(--ink); }
.cart-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14.5px; }
.cart-inquiry-form { max-width: 480px; margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--border); }

/* ---------- Contact + forms ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 24px 0 40px; }
.contact-info div { margin-bottom: 20px; }
.contact-info h4 { margin: 0 0 6px; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 5px; }
.form-field input, .form-field textarea, .form-field select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-family: inherit; background: #fff; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus, .list-tools input:focus { outline: 2px solid var(--brand-red); outline-offset: -1px; }
.map-embed iframe { width: 100%; height: 260px; border: 0; border-radius: 8px; }
.alert-success { background: #E5F4EA; color: var(--success); padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-dark); color: #C9CCD1; margin-top: 56px; padding-bottom: 24px; font-size: 13.5px; }
.footer-cta { background: var(--brand-red); color: #fff; }
.footer-cta .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.footer-cta strong { font-size: 18px; font-style: italic; font-weight: 800; margin-right: 10px; }
.footer-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.6fr; gap: 36px; padding-top: 38px; padding-bottom: 8px; }
.footer-logo { width: 84px; height: 84px; object-fit: contain; margin-bottom: 14px; }
.footer-brand p { max-width: 300px; }
.site-footer h5 { color: #fff; font-size: 12.5px; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 12px; }
.site-footer p { margin: 0 0 8px; }
.footer-grid a:hover { color: #fff; text-decoration: underline; }
.footer-link { color: #fff; font-weight: 600; }
.footer-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: #8E939B; }
.site-footer .copyright { text-align: center; margin-top: 22px; font-size: 12.5px; color: #8E939B; }

/* "Switch to Desktop/Mobile Site" toggle — see middleware/siteView.js. */
.site-view-switch { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.site-view-switch-label { font-size: 12.5px; color: #8E939B; }
.site-view-pill { font-size: 12.5px; font-weight: 600; padding: 5px 14px; border-radius: 20px; border: 1px solid #555A63; color: #C9CCD1 !important; }
.site-view-pill.active { background: #fff; color: var(--brand-dark) !important; border-color: #fff; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 100; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 10px; padding: 28px; width: 420px; max-width: 90vw; }
.modal h3 { margin-top: 0; }
.modal-close { float: right; cursor: pointer; font-size: 20px; color: var(--muted); }

/* ---------- Tablet / phone ---------- */
@media (max-width: 900px) {
  .topbar-note { display: none; }
  .topbar .container { justify-content: center; }

  .site-header .bar { gap: 14px; padding: 8px 16px; }
  .brand-logo { height: 52px; }
  .header-search, .cta-quote, .cart-link-label { display: none; }
  .nav-toggle { display: flex; }

  /* The red band becomes a white dropdown under the header, opened by the
     hamburger. Cart stays visible in the bar the whole time. */
  .nav-band { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; color: var(--ink); border-top: 1px solid var(--border); box-shadow: 0 12px 20px rgba(0,0,0,0.10); }
  .nav-band.open { display: block; }
  .nav-band .container { flex-direction: column; align-items: stretch; gap: 14px; padding-top: 14px; padding-bottom: 18px; }
  .main-nav { flex-direction: column; gap: 0; font-size: 14.5px; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .main-nav a:hover { border-bottom-color: var(--line); color: var(--brand-red); }
  .nav-mobile-only { display: flex !important; }
  .nav-search { border: 2px solid var(--brand-red); border-radius: 999px; overflow: hidden; }
  .nav-search input { flex: 1; min-width: 0; border: none; outline: none; padding: 10px 16px; font-size: 15px; font-family: inherit; }
  .nav-search button { border: none; background: var(--brand-red); color: #fff; padding: 0 18px; font-weight: 700; font-family: inherit; }
  .nav-band-note { text-align: left; color: var(--muted); opacity: 1; }

  /* Sidebar layout collapses to one column. */
  .shop-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 16px; }
  .shop-sidebar { position: static; top: auto; max-height: none; overflow: visible; }
  .home-layout .shop-sidebar { display: none; }
  .cat-scroller { display: flex; gap: 12px; overflow-x: auto; padding: 14px 16px 6px; scrollbar-width: none; }
  .cat-scroller::-webkit-scrollbar { display: none; }

  /* Product List: category list tucks behind a dropdown button. */
  .category-filter { position: relative; top: auto; }
  .category-filter-toggle { display: flex; }
  .category-panel { display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40; max-height: 60vh; overflow-y: auto; border-radius: 8px; box-shadow: 0 12px 24px rgba(0,0,0,0.14); }
  .category-panel.open { display: block; }

  .hero-panel { flex-direction: column; align-items: stretch; padding: 30px 24px; min-height: 0; }
  .hero-image { flex: none; }
  .hero-mark { width: 300px; right: -40px; bottom: -16px; }
  .fact-strip { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { border-left: none; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }

  .product-grid, .related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-rail { grid-auto-columns: calc((100% - 28px) / 3); }
  .pd-wrap, .contact-grid { grid-template-columns: 1fr; }
  .pd-wrap { padding: 18px; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 640px) {
  .hero-copy h1 { font-size: 26px; }
  .hero-copy p { font-size: 15px; }

  .list-head { align-items: stretch; }
  .list-tools { width: 100%; }
  .list-tools input { flex: 1; width: auto; min-width: 0; }

  .product-grid, .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .section-title h2, .shelf-head h2 { font-size: 17px; }
  .product-rail { grid-auto-columns: 46%; gap: 10px; }
  .rail-btn { display: none; }

  .cart-inquiry-form { max-width: none; }

  /* Qty input + Add to Inquiry button need to wrap rather than overflow
     on a narrow phone. */
  .pd-actions { flex-wrap: wrap; }

  .footer-cta .container { flex-direction: column; align-items: flex-start; }
  .footer-cta strong { display: block; margin: 0 0 2px; }
}

@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; }
}
