/* Readable type and comfortable controls for phones and tablets. */
@media (max-width: 900px) {
  body { font-size: 1rem; line-height: 1.5; }
  .intro, .primary, .secondary, .tabs button, .search input,
  .category-row select, .detail-house, .size-box, .stepper span,
  .bag-item h3, .sticky-bar button { font-size: 1rem; }
  .eyebrow, .price-note, .image-caption, .how, h2 span,
  .section-heading > p, .category-row, .card-house, .code,
  .detail-note, .bag-item p, .order-note, .message-preview,
  .message-label, .remove, footer, footer p, .toast,
  .sticky-bar small { font-size: .875rem; }
  .card-title { font-size: 1rem; line-height: 1.45; min-height: 2.9em; overflow-wrap: anywhere; }
  .card-house { line-height: 1.5; min-height: 3em; color: #5c6357; }
  .code { display: block; line-height: 1.5; color: #5c6357; overflow-wrap: anywhere; }
  .card-price { font-size: 1.125rem; font-weight: 550; }
  .card-price small { font-size: .875rem; color: #5c6357; }
  .card-bottom { gap: 8px; flex-wrap: wrap; }
  .tag { font-size: .75rem; padding: 6px 8px; }
  .add { width: 44px; height: 44px; flex-shrink: 0; }
  .primary, .secondary, .tabs button, .bag, .category-row select,
  .category-row button, .remove, .message-label { min-height: 44px; }
  .stepper button, .bag-controls .stepper button { width: 44px; height: 44px; }
  .search { min-height: 50px; height: auto; }
  .search input { min-width: 0; }
  .tools { flex-wrap: wrap; }
  .category-row { flex-wrap: wrap; gap: 8px 12px; }
  .category-row select { max-width: 100%; }
  .section-heading { gap: 20px; flex-wrap: wrap; }
  .section-heading > p { text-align: left; margin: 0; }
  .bag-item { grid-template-columns: 60px minmax(0, 1fr); gap: 14px; }
  .bag-item img { width: 60px; height: 80px; }
  .bag-item h3, .detail-title { overflow-wrap: anywhere; }
  .bag-controls { flex-wrap: wrap; justify-content: flex-start; gap: 12px; }
  .bag-controls b { margin-left: auto; }
  .bag-controls .remove { padding: 8px 0; flex-basis: 100%; text-align: left; }
  .message-preview { overflow-wrap: anywhere; }
  .message-label { display: list-item; padding: 12px 0; }
  .detail-note, .order-note, .bag-item p, footer { color: #5c6357; }
  .size-box, .qty-row { gap: 12px; flex-wrap: wrap; }
  .sticky-bar { gap: 12px; padding: 14px 16px; max-height: none; bottom: max(12px, env(safe-area-inset-bottom)); }
  .sticky-bar > span { min-width: 0; }
  .sticky-bar b { font-size: .9375rem; }
  .sticky-bar button { min-height: 48px; flex-shrink: 0; padding: 12px 14px; }
  .sticky-bar button span { display: none; }
  body:has(.sticky-bar:not([hidden])) { padding-bottom: calc(130px + env(safe-area-inset-bottom)); }
  footer a { overflow-wrap: anywhere; }
}
@media (max-width: 600px) {
  header { min-height: 96px; height: auto; gap: 12px; padding: 18px 20px; flex-wrap: wrap; }
  .wordmark { font-size: 1.25rem; letter-spacing: 4px; }
  .wordmark span { font-size: .625rem; letter-spacing: 1px; }
  .bag { font-size: .875rem; padding: 8px 0; }
  .bag span { width: 28px; height: 28px; }
  .hero-copy { padding: 36px 20px 30px; }
  h1 { font-size: clamp(2.25rem, 9vw, 3rem); line-height: 1.12; letter-spacing: -1.5px; }
  .intro { line-height: 1.65; }
  .primary, .secondary { line-height: 1.5; padding: 14px 18px; }
  .eyebrow { letter-spacing: 1.5px; }
  .price-note { letter-spacing: 1px; line-height: 1.6; }
  .image-caption { bottom: 16px; left: 20px; letter-spacing: 0; }
  .how { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 20px; }
  .how b { font-size: .875rem; margin-right: 12px; }
  .collection { padding: 36px 20px 44px; }
  .section-heading { display: block; }
  .section-heading h2, .help h2 { font-size: 1.875rem; line-height: 1.2; }
  h2 span { margin: 12px 0 0; }
  .section-heading > p { margin-top: 18px; line-height: 1.6; }
  .tabs { flex-wrap: wrap; }
  .tabs button { padding: 12px 8px; white-space: nowrap; }
  .category-row { align-items: center; }
  .category-row label { flex-basis: 100%; }
  .category-row select { flex: 1; min-width: 0; max-width: 100%; }
  .category-row button { margin-left: 0; }
  .grid { gap: 30px 16px; }
  .card-info { padding-top: 14px; }
  .card-price small { display: block; margin-left: 0; font-weight: 400; }
  .card-bottom { align-items: center; }
  .help { padding: 32px 20px; }
  .help p:not(.eyebrow) { font-size: 1rem; line-height: 1.65; }
  footer { padding: 32px 20px 44px; line-height: 1.65; }
  footer .wordmark { font-size: 1.125rem; }
  footer p { font-size: .875rem; line-height: 1.6; }
  dialog { padding: 22px; width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
  .detail-image { width: calc(100% + 44px); margin: -22px -22px 24px; }
  .detail-title, .drawer-head h2 { font-size: 1.75rem; line-height: 1.2; }
  .drawer-head { gap: 8px; }
  .sticky-bar { width: calc(100% - 24px); }
  .sticky-bar button { font-size: .9375rem; }
  .toast { width: max-content; max-width: calc(100% - 32px); text-align: center; }
}
@media (max-width: 359px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .card-house, .card-title { min-height: 0; }
  .sticky-bar { flex-wrap: wrap; }
  .sticky-bar button { flex: 1 1 100%; }
  body:has(.sticky-bar:not([hidden])) { padding-bottom: 180px; }
}
/* App navigation replaces the floating selection bar on mobile. */
.mobile-nav { display: none; }
#specials-browse { margin-top: 16px; }
@media (max-width: 900px) {
  body, body:has(.sticky-bar:not([hidden])) { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .sticky-bar { display: none !important; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    position: fixed; z-index: 6; bottom: 0; left: 0; right: 0;
    background: #faf9f6; border-top: 1px solid #d7dccf;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -3px 16px #22282008;
  }
  .mobile-nav > a, .mobile-nav > button {
    border: 0; border-radius: 6px; background: transparent; color: #47533e;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 5px; padding: 8px 2px; min-width: 0; min-height: 64px;
    font-size: .875rem; font-weight: 500; line-height: 1.3;
  }
  .mobile-nav > :hover, .mobile-nav > .nav-active { background: #e9eddf; color: #263b25; }
  .nav-icon { position: relative; display: block; width: 25px; height: 25px; }
  .nav-icon svg { width: 100%; height: 100%; display: block; }
  .nav-badge {
    position: absolute; top: -8px; right: -15px; min-width: 20px; height: 20px;
    border-radius: 10px; padding: 0 4px; background: #283729; color: white;
    display: grid; place-items: center; font-size: .6875rem; font-weight: 600;
  }
  #nav-checkout { color: #263b25; }
  #specials-dialog p:not(.eyebrow) { line-height: 1.65; }
}
.header-menu { display: flex; align-items: center; gap: 9px; background: none; border: 0; padding: 10px; min-height: 44px; color: #283729; font-size: 1rem; margin-left: auto; margin-right: 20px; }
.header-menu .nav-icon { display: block; width: 24px; height: 24px; }
.header-menu svg { width: 100%; height: 100%; }
#range-menu { width: min(100%, 620px); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-radius: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; }
.range-menu-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 16px; background: #faf9f6; padding: 28px 24px 22px; border-bottom: 1px solid #d7dccf; }
.range-menu-head .eyebrow { margin-bottom: 10px; }
.range-menu-head h2 { font-size: 1.75rem; line-height: 1.25; }
#range-menu-content { padding: 22px 24px calc(32px + env(safe-area-inset-bottom)); }
.range-intro { color: #5c6357; font-size: 1rem; line-height: 1.65; margin: 0 0 24px; }
.range-group { border-top: 1px solid #d7dccf; }
.range-group summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 18px 0; font-size: 1.0625rem; font-weight: 500; }
.range-group summary::-webkit-details-marker { display: none; }
.range-chevron { width: 9px; height: 9px; flex-shrink: 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: 0 5px 5px; }
.range-group[open] > summary .range-chevron { transform: rotate(225deg); margin-top: 8px; }
.range-children { padding: 0 0 16px 16px; border-left: 1px solid #dce1d4; margin-bottom: 8px; }
.range-children .range-group summary { font-size: 1rem; min-height: 54px; }
.range-leaf { display: flex; justify-content: space-between; gap: 16px; text-align: left; width: 100%; border: 0; background: transparent; color: #35452e; font-size: 1rem; line-height: 1.5; min-height: 48px; padding: 13px 4px; }
.range-leaf:hover, .range-leaf:focus-visible { background: #e9eddf; }
.range-leaf span { color: #758167; }
.range-back { background: transparent; border: 0; padding: 14px 0; margin-bottom: 24px; font-size: 1rem; color: #35452e; min-height: 48px; }
.range-breadcrumb { line-height: 1.7; overflow-wrap: anywhere; }
.range-selection-title { font-size: 1.75rem; font-weight: 450; line-height: 1.3; margin: 0 0 20px; }
@media(max-width:900px) { .header-menu { display: none; } }
@media(max-width:600px) { #range-menu { width: 100%; } .range-menu-head { padding-top: max(24px, env(safe-area-inset-top)); } }
/* Native dialog stays open until its exit animation completes. */
#range-menu[open] { animation: range-slide-in 280ms cubic-bezier(.22, 1, .36, 1) both; }
#range-menu[open]::backdrop { animation: range-backdrop-in 280ms ease-out both; }
#range-menu[open].is-closing { animation: range-slide-out 240ms ease-in both; pointer-events: none; }
#range-menu[open].is-closing::backdrop { animation: range-backdrop-out 240ms ease-in both; }
#range-menu-content > nav > .range-group > summary { font-size: 1.125rem; font-weight: 600; }
@keyframes range-slide-in { from { transform: translate3d(100%, 0, 0); opacity: .7; } to { transform: translate3d(0, 0, 0); opacity: 1; } }
@keyframes range-slide-out { from { transform: translate3d(0, 0, 0); opacity: 1; } to { transform: translate3d(100%, 0, 0); opacity: .7; } }
@keyframes range-backdrop-in { from { background-color: transparent; backdrop-filter: blur(0); } to { background-color: #19201780; backdrop-filter: blur(3px); } }
@keyframes range-backdrop-out { from { background-color: #19201780; backdrop-filter: blur(3px); } to { background-color: transparent; backdrop-filter: blur(0); } }
@media (prefers-reduced-motion: reduce) {
  #range-menu[open], #range-menu[open]::backdrop, #range-menu[open].is-closing, #range-menu[open].is-closing::backdrop { animation: none; }
}
/* Equal archive cards: reserve consistent text slots and anchor every action row. */
.grid { align-items: stretch; grid-auto-rows: 1fr; }
.card { display: flex; flex-direction: column; height: 100%; }
.card-image { aspect-ratio: 1 / 1; flex: 0 0 auto; }
.card-image img { display: block; object-fit: cover; }
.card-info { display: flex; flex-direction: column; flex: 1; gap: 0; }
.card-house { line-height: 1.5; min-height: 3em; margin: 0 0 10px; }
.card-title { line-height: 1.45; min-height: 4.35em; margin: 0 0 10px; width: 100%; overflow-wrap: anywhere; }
.code { display: block; line-height: 1.5; min-height: 3em; margin: 0 0 16px; overflow-wrap: anywhere; }
.card-bottom { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: auto; padding-top: 0; min-height: 44px; }
.card-price { min-width: 0; line-height: 1.4; }
.card-price small { display: block; margin: 3px 0 0; }
.card-bottom .add { width: 44px; height: 44px; justify-self: end; }
@media (max-width: 900px) {
  .card-house { min-height: 3em; }
  .card-title { min-height: 4.35em; }
  .code { min-height: 3em; }
}
/* WhatsApp confirmation popup */
#kay-dialog { width: min(94%, 420px); text-align: center; }
#kay-dialog h2 { font-size: 1.5rem; font-weight: 450; line-height: 1.3; margin: 0 0 10px; }
#kay-dialog .order-note { margin: 0 0 22px; }
.kay-actions { display: grid; gap: 10px; }
