/* ==========================================================================
   Nara Sushi — Online Ordering
   Mobile-first. Breakpoints: 600px (large phone), 900px (tablet/iPad),
   1200px (desktop). Every interactive control keeps a >=44px tap target.
   ========================================================================== */

:root {
  --ink: #1c1a17;
  --ink-soft: #4a453d;
  --cream: #f7f2e8;
  --card: #fffdf8;
  --line: #e6ddc9;
  --accent: #9c3b30;
  --accent-dark: #7d2e25;
  --accent-light: #e3c088;
  --green: #4b5a45;
  --radius: 4px;
  --header-h: 56px;
  --topbar-h: 34px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, .display {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  margin: 0;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 600px) { .container { padding: 0 24px; } }
@media (min-width: 900px) { .container { padding: 0 32px; } }

/* ---------------- Top bar ---------------- */
.topbar {
  background: var(--ink);
  color: #efe7d8;
  font-size: 0.76rem;
}
.topbar .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: var(--topbar-h);
  padding-top: 4px;
  padding-bottom: 4px;
}
.topbar .topbar-info { display: flex; gap: 14px; flex-wrap: wrap; }
.topbar .topbar-info span { opacity: 0.9; }
.topbar .topbar-info a.topbar-phone-link {
  color: inherit;
  opacity: 0.9;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.topbar .topbar-info a.topbar-phone-link:hover { opacity: 1; color: var(--accent-light); }
.topbar .pickup-badge {
  border: 1px solid rgba(239, 231, 216, 0.35);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
@media (min-width: 600px) { .topbar { font-size: 0.82rem; } }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 39;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
  gap: 10px;
}
.brand,
.brand:link,
.brand:visited,
.brand:hover,
.brand:focus,
.brand:active { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; cursor: pointer; }
.brand img { height: 26px; width: auto; flex-shrink: 0; }
.brand .brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand .mark { font-size: 1.3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .sub { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); }
@media (min-width: 600px) {
  .brand img { height: 34px; }
  .brand .mark { font-size: 1.6rem; }
  .brand .sub { font-size: 0.7rem; }
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 30px;
  padding: 11px 16px;
  font-size: 0.8rem;
  min-height: 44px;
  white-space: nowrap;
  flex-shrink: 0;
}
.cart-btn .count {
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  padding: 0 4px;
}

/* category tabs + search */
.cat-tabs {
  position: sticky;
  top: var(--header-h);
  z-index: 38;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.cat-tabs .search-row { padding: 4px 16px 10px; }
@media (min-width: 600px) { .cat-tabs .search-row { padding: 4px 24px 10px; } }
@media (min-width: 900px) { .cat-tabs .search-row { padding: 4px 32px 10px; } }

.search-input-wrap { position: relative; max-width: 480px; }
.search-input-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--ink-soft);
  pointer-events: none;
}
.search-input-wrap input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 10px 40px 10px 38px;
  font-size: 0.88rem;
  min-height: 44px;
  background: var(--card);
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
.search-input-wrap input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-input-wrap input[type="search"]:focus { outline: none; border-color: var(--ink); }
.search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1;
  border-radius: 50%;
}
.search-clear:hover { background: var(--line); color: var(--ink); }

.cat-tabs-scroll {
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-tabs-scroll::-webkit-scrollbar { display: none; }
.cat-tabs-scroll .container { display: flex; gap: 6px; padding-top: 10px; padding-bottom: 8px; }
.search-no-results {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
  padding: 50px 20px;
}
.cat-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  padding: 9px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  white-space: nowrap;
  min-height: 40px;
}
.cat-tab.active { background: var(--ink); color: var(--cream); }
.cat-tab:hover:not(.active) { border-color: var(--line); color: var(--ink); }

/* ---------------- Hero ---------------- */
.hero {
  background: linear-gradient(180deg, #23201b 0%, #1c1a17 100%);
  color: #f2ead9;
  padding: 36px 0 34px;
}
.hero .container { display: grid; gap: 26px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.08; margin-bottom: 12px; }
.hero .tagline { font-size: 1rem; color: #cfc4a8; max-width: 52ch; margin-bottom: 18px; line-height: 1.55; }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 30px;
  padding: 13px 24px;
  font-size: 0.86rem;
  min-height: 46px;
  border: 1px solid transparent;
  text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; color: #f2ead9; border-color: rgba(242, 234, 217, 0.4); }
.btn-outline:hover { border-color: #f2ead9; }

.hero-card {
  background: rgba(247, 242, 232, 0.06);
  border: 1px solid rgba(242, 234, 217, 0.18);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.hero-card h3 { font-size: 1.1rem; margin-bottom: 10px; color: #f2ead9; }
.hero-hours-row { display: flex; justify-content: space-between; gap: 10px; font-size: 0.84rem; padding: 6px 0; border-bottom: 1px dashed rgba(242, 234, 217, 0.16); color: #cfc4a8; }
.hero-hours-row:last-child { border-bottom: none; }
.hero-hours-row b { color: #f2ead9; font-weight: 500; text-align: right; }
.hero-card .addr { margin-top: 12px; font-size: 0.84rem; color: #cfc4a8; line-height: 1.5; }
.hero-phone-link {
  display: inline-block;
  margin-top: 6px;
  padding: 6px 0;
  color: #f2ead9;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hero-phone-link:hover { color: var(--accent-light); }

@media (min-width: 900px) {
  .hero { padding: 64px 0 52px; }
  .hero .container { grid-template-columns: 1.3fr 1fr; align-items: center; }
}

/* ---------------- About / gallery strip ---------------- */
.about-strip { padding: 34px 0; border-bottom: 1px solid var(--line); }
.about-strip .grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
.about-strip .grid img { border-radius: var(--radius); object-fit: cover; width: 100%; height: 120px; }
.about-strip p { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.6; max-width: 70ch; }
@media (min-width: 600px) { .about-strip .grid { grid-template-columns: repeat(4, 1fr); } .about-strip .grid img { height: 140px; } }

/* ---------------- Menu ---------------- */
.menu-section { padding: 34px 0 4px; }
.menu-section h2 { font-size: 1.7rem; margin-bottom: 4px; }
.menu-section .cat-count { font-size: 0.74rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 18px; display: block; }
@media (min-width: 600px) { .menu-section h2 { font-size: 2rem; } }

.item-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 8px; }
@media (min-width: 700px) { .item-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .item-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }

.item-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}
.item-card .name-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.item-card .name { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.12rem; font-weight: 600; }
.item-card .raw-star { color: var(--accent); font-size: 0.95rem; }
.item-card .desc { color: var(--ink-soft); font-size: 0.82rem; margin-top: 5px; line-height: 1.45; white-space: pre-line; }
.item-card .price-col { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; flex-shrink: 0; }
.item-card .price { font-size: 0.98rem; font-weight: 600; white-space: nowrap; }
.item-card .price.market { color: var(--ink-soft); font-size: 0.78rem; font-style: italic; }
.add-btn {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 0.78rem;
  margin-top: 8px;
  min-height: 40px;
  white-space: nowrap;
}
.add-btn:hover { background: var(--ink); color: var(--cream); }
.add-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.raw-fish-note { font-size: 0.76rem; color: var(--ink-soft); border-top: 1px solid var(--line); padding: 18px 0 40px; max-width: 70ch; }

/* ---------------- Modal ---------------- */
.overlay { position: fixed; inset: 0; background: rgba(20, 18, 15, 0.55); display: flex; align-items: flex-end; justify-content: center; z-index: 100; }
.overlay.hidden { display: none; }
.modal { background: var(--card); border-radius: 10px 10px 0 0; max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,0.3); }
@media (min-width: 600px) {
  .overlay { align-items: center; padding: 20px; }
  .modal { border-radius: 6px; padding: 26px 26px 22px; }
}
.modal-close { float: right; background: none; border: none; font-size: 1.5rem; color: var(--ink-soft); line-height: 1; min-height: 44px; min-width: 44px; }
.modal h3.name { font-size: 1.4rem; margin-bottom: 6px; padding-right: 30px; }
.modal .desc { color: var(--ink-soft); font-size: 0.86rem; line-height: 1.5; margin-bottom: 14px; white-space: pre-line; }
.modal .unit-price { font-weight: 600; margin-bottom: 16px; }

.mod-group { margin-bottom: 16px; }
.mod-group .label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mod-option { display: flex; align-items: center; gap: 10px; padding: 11px 10px; border: 1px solid var(--line); border-radius: 4px; margin-bottom: 6px; font-size: 0.92rem; min-height: 44px; }
.mod-option input { accent-color: var(--accent); width: 18px; height: 18px; flex-shrink: 0; }
.mod-group-tag {
  display: inline-block; font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 8px; border-radius: 10px; background: var(--line); color: var(--ink-soft);
}
.mod-group-tag.required { background: #f4d9d6; color: var(--accent-dark); }
.mod-group-tag.optional { background: #dcece0; color: var(--green); }
.mod-price-delta { color: var(--ink-soft); font-size: 0.82rem; }
.modal-error {
  background: #fbe8e5; border: 1px solid #e2b3ab; color: var(--accent-dark);
  border-radius: 4px; padding: 10px 12px; font-size: 0.85rem; margin-bottom: 14px;
}

.qty-row { display: flex; align-items: center; justify-content: space-between; margin: 16px 0; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.qty-stepper button { border: none; background: var(--cream); width: 40px; height: 40px; font-size: 1.1rem; }
.qty-stepper span { width: 34px; text-align: center; font-size: 0.95rem; }

.notes-field textarea { width: 100%; border: 1px solid var(--line); border-radius: 4px; padding: 10px; font-size: 0.88rem; resize: vertical; min-height: 54px; }

.modal-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; gap: 12px; }
.modal-footer .total { font-weight: 600; font-size: 1.05rem; flex-shrink: 0; }
.modal-footer .btn { flex: 1; }

/* ---------------- Cart drawer ---------------- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(20,18,15,0.45); z-index: 90; }
.drawer-overlay.hidden { display: none; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 100%; background: var(--cream); z-index: 91; display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(0,0,0,0.25); }
@media (min-width: 480px) { .drawer { width: 400px; max-width: 92vw; } }
.drawer-header { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.drawer-header h3 { font-size: 1.3rem; }
.drawer-clear-row { padding: 8px 18px 0; text-align: right; border-bottom: 1px solid var(--line); }
.clear-cart-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 6px 0 10px;
  min-height: 36px;
}
.clear-cart-link:hover { color: var(--accent-dark); }
.drawer-body { flex: 1; overflow-y: auto; padding: 10px 18px; }
.drawer-empty { color: var(--ink-soft); font-size: 0.9rem; padding: 30px 0; text-align: center; }
.cart-line { display: flex; justify-content: space-between; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line .cl-name { font-weight: 600; font-size: 0.94rem; }
.cart-line .cl-opts { font-size: 0.78rem; color: var(--ink-soft); margin-top: 2px; }
.cart-line .cl-controls { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.cart-line .cl-remove { font-size: 0.78rem; color: var(--accent); background: none; border: none; text-decoration: underline; min-height: 32px; }
.cart-line .cl-price { font-weight: 600; white-space: nowrap; }
.drawer-footer { border-top: 1px solid var(--line); padding: 16px 18px calc(16px + env(safe-area-inset-bottom)); }
.totals-row { display: flex; justify-content: space-between; font-size: 0.9rem; padding: 3px 0; color: var(--ink-soft); }
.totals-row.grand { color: var(--ink); font-weight: 700; font-size: 1.05rem; margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line); }
.drawer-footer-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
@media (min-width: 420px) { .drawer-footer-actions { flex-direction: row; } }
.drawer-footer-actions .btn { width: 100%; margin-top: 0; flex: 1; }
.drawer-footer-actions .btn-outline { color: var(--ink); border-color: var(--line); }
.drawer-footer-actions .btn-outline:hover { border-color: var(--ink); background: var(--cream); }

/* ---------------- Checkout ---------------- */
.checkout-wrap { display: none; padding: 30px 0 70px; }
.checkout-wrap.visible { display: block; }
.checkout-wrap h2 { font-size: 1.7rem; margin-bottom: 20px; }
.checkout-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 900px) { .checkout-grid { grid-template-columns: 1.2fr 0.9fr; align-items: start; } .checkout-wrap h2 { font-size: 2.2rem; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 20px; margin-bottom: 16px; }
@media (min-width: 600px) { .panel { padding: 24px 26px; } }
.panel h3 { font-size: 1.2rem; margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 480px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); margin-bottom: 6px; }
.required-flag { color: #c0392b; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 4px; padding: 12px; font-size: 1rem; background: #fff; min-height: 44px; }
.day-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.day-pill { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 9px 14px; font-size: 0.82rem; min-height: 40px; }
.day-pill.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.day-pill:disabled { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }
.time-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: 220px; overflow-y: auto; padding-right: 4px; }
@media (min-width: 480px) { .time-grid { grid-template-columns: repeat(3, 1fr); } }
.time-pill { border: 1px solid var(--line); background: #fff; border-radius: 4px; padding: 10px 6px; font-size: 0.82rem; min-height: 40px; }
.time-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pickup-payment-note {
  font-size: 0.9rem;
  color: var(--ink);
  background: #f2ecdd;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.dining-option-row { display: flex; gap: 10px; margin-top: 14px; }
.dining-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 10px 14px;
  font-size: 0.86rem;
  min-height: 44px;
  background: #fff;
  cursor: pointer;
}
.dining-option.active { border-color: var(--ink); background: #f2ecdd; }
.dining-option input { accent-color: var(--accent); width: 16px; height: 16px; }
.order-summary-line { display: flex; justify-content: space-between; gap: 10px; font-size: 0.86rem; padding: 8px 0; border-bottom: 1px solid var(--line); }
.order-summary-line .qty { color: var(--ink-soft); margin-right: 6px; }
.error-box { background: #fbe8e5; border: 1px solid #e2b3ab; color: var(--accent-dark); padding: 12px 14px; border-radius: 4px; font-size: 0.85rem; margin-bottom: 16px; }
.error-box.hidden { display: none; }

/* ---------------- Confirmation ---------------- */
.confirm-wrap { display: none; padding: 46px 0 80px; }
.confirm-wrap.visible { display: block; }
.confirm-box { max-width: 560px; margin: 0 auto; text-align: center; }
.confirm-box .mark-circle { width: 60px; height: 60px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; margin: 0 auto 18px; }
.confirm-box h2 { font-size: 1.8rem; margin-bottom: 8px; }
.confirm-box .order-num { font-size: 1.05rem; color: var(--accent); font-weight: 600; margin-bottom: 18px; }
.receipt { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; margin-top: 22px; }
.receipt-line { display: flex; justify-content: space-between; gap: 10px; font-size: 0.9rem; padding: 8px 0; border-bottom: 1px solid var(--line); }
.receipt-line .opts { display: block; font-size: 0.76rem; color: var(--ink-soft); margin-top: 3px; }

/* ---------------- Closed page ---------------- */
.closed-wrap { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; text-align: center; }
.closed-box { max-width: 480px; }
.closed-box .status-pill { display: inline-block; background: var(--accent); color: #fff; padding: 6px 16px; border-radius: 20px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 18px; }
.closed-box h1 { font-size: 2rem; margin-bottom: 14px; }
.closed-box p { color: var(--ink-soft); line-height: 1.6; margin-bottom: 22px; }

/* ---------------- Footer ---------------- */
footer { background: var(--ink); color: #cfc4a8; padding: 32px 0 40px; margin-top: 30px; }
footer .container { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 700px) { footer .container { grid-template-columns: 1.4fr 1fr 1fr; } }
footer h4 { color: #f2ead9; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; font-weight: 600; }
footer p, footer div { font-size: 0.85rem; line-height: 1.7; }
footer .about { max-width: 44ch; }
.footer-map-link {
  display: inline-block;
  color: #f2ead9;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-map-link:hover { color: var(--accent-light); }

.hidden { display: none !important; }
