@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&family=Playfair+Display:wght@700;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #C0392B;
  --primary-dark: #96281B;
  --primary-light: #E74C3C;
  --accent: #2C3E50;
  --accent-light: #34495E;
  --gold: #D4AC0D;
  --bg: #FAFAF8;
  --bg2: #F2EFE9;
  --card: #FFFFFF;
  --card2: #F7F4EE;
  --border: #E8E0D0;
  --text: #1C1C1C;
  --text-muted: #6B6B6B;
  --success: #27AE60;
  --white: #FFFFFF;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 30px rgba(0,0,0,0.08), 0 2px 8px rgba(192,57,43,0.08);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
}

html { font-size: 16px; }
body {
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 40% at 80% 0%, rgba(192,57,43,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(44,62,80,0.04) 0%, transparent 60%);
  color: var(--text);
  min-height: 100vh;
}

/* ── HEADER ── */
.header {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--primary);
  padding: 0 20px;
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  box-shadow: 0 2px 16px rgba(192,57,43,0.10);
}
.header-logo { display: flex; align-items: center; gap: 10px; }
.header-logo img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }
.header-logo span { font-size: 1.15rem; font-weight: 900; color: var(--primary); letter-spacing: 1px; font-family: 'Playfair Display', serif; }
.header-logo .tagline { font-size: 0.65rem; color: var(--text-muted); font-weight: 400; letter-spacing: 0.5px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.cart-btn {
  background: var(--primary); color: #fff; border: none; border-radius: 50px;
  padding: 8px 16px; font-size: 0.85rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 6px; transition: background 0.2s;
  text-decoration: none;
}
.cart-btn:hover { background: var(--primary-dark); }
.cart-badge {
  background: var(--gold); color: #000; border-radius: 50%;
  width: 20px; height: 20px; font-size: 0.7rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* ── PROGRESS BAR ── */
.progress-wrap {
  background: var(--bg2);
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.progress-steps { display: flex; align-items: center; justify-content: center; gap: 0; }
.step {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 1; position: relative;
}
.step:not(:last-child)::after {
  content: ''; position: absolute; top: 14px; left: 60%; width: 80%; height: 2px;
  background: var(--border); z-index: 0;
}
.step.active:not(:last-child)::after, .step.done:not(:last-child)::after { background: var(--primary); }
.step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--border); color: var(--text-muted);
  font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1; transition: all 0.3s;
}
.step.active .step-dot { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(192,57,43,0.2); }
.step.done .step-dot { background: var(--success); color: #fff; }
.step-label { font-size: 0.6rem; font-weight: 600; color: var(--text-muted); text-align: center; }
.step.active .step-label { color: var(--primary); }
.step.done .step-label { color: var(--success); }

/* ── MAIN CONTENT ── */
.main { padding: 20px; max-width: 1200px; margin: 0 auto; }

/* ── PAGE TITLE ── */
.page-title { font-size: 1.5rem; font-weight: 900; margin-bottom: 4px; font-family: 'Playfair Display', serif; color: var(--accent); }
.page-subtitle { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }

/* ── CATEGORY FILTER ── */
.category-row {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 20px;
  scrollbar-width: none;
  margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px;
}
.category-row::-webkit-scrollbar { display: none; }
.cat-btn {
  background: var(--card); color: var(--text-muted); border: 1px solid var(--border);
  border-radius: 50px; padding: 7px 16px; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all 0.2s;
  font-family: 'Noto Sans JP', sans-serif;
}
.cat-btn.active, .cat-btn:hover {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(192,57,43,0.25);
}

/* ── PRODUCTS ROWS ── */
.section-label { font-size: 1rem; font-weight: 700; margin-bottom: 12px; color: var(--accent); display: flex; align-items: center; gap: 8px; font-family: 'Playfair Display', serif; }
.section-label span { font-size: 1.2rem; }
.products-row {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 24px;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
  margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px;
}
.products-row::-webkit-scrollbar { height: 4px; }
.products-row::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; opacity: 0.4; }

/* ── PRODUCT CARD ── */
.product-card {
  background: var(--card); border-radius: var(--radius); border: 1px solid var(--border);
  min-width: 160px; max-width: 160px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; cursor: pointer; flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--primary); }
.product-card img { width: 100%; height: 120px; object-fit: cover; }
.product-card .card-body { padding: 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .card-name { font-size: 0.85rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.product-card .card-desc { font-size: 0.72rem; color: var(--text-muted); line-height: 1.3; }
.product-card .card-price { font-size: 1rem; font-weight: 800; color: var(--primary); }
.add-btn {
  background: var(--primary); color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 7px; font-size: 0.8rem; font-weight: 700; cursor: pointer;
  width: 100%; transition: background 0.2s; margin-top: auto;
  font-family: 'Noto Sans JP', sans-serif;
}
.add-btn:hover { background: var(--primary-dark); }
.add-btn.added { background: var(--success); }

/* ── FLOATING CART ── */
.floating-cart {
  z-index: 1000;
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; border-radius: 50px;
  padding: 14px 28px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 8px 32px rgba(192,57,43,0.45), 0 2px 8px rgba(0,0,0,0.2); cursor: pointer;
  text-decoration: none; font-weight: 700; font-size: 0.95rem;
  transition: background 0.2s, transform 0.2s; white-space: nowrap;
  min-width: 240px; justify-content: space-between;
}
.floating-cart:hover { background: var(--primary-dark); transform: translateX(-50%) translateY(-2px); }
.floating-cart .fc-info { display: flex; flex-direction: column; line-height: 1.1; }
.floating-cart .fc-count { font-size: 0.75rem; opacity: 0.85; }
.floating-cart .fc-label { font-size: 0.95rem; font-weight: 800; }
.floating-cart .fc-price { font-size: 1rem; font-weight: 800; color: var(--gold); }

/* ── CART ITEMS ── */
.cart-item {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.cart-item img { width: 70px; height: 70px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 700; font-size: 0.9rem; }
.cart-item-price { color: var(--primary); font-weight: 800; font-size: 0.95rem; }
.qty-control { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-btn {
  background: var(--card2); border: 1px solid var(--border); color: var(--text);
  width: 28px; height: 28px; border-radius: 6px; font-size: 1rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.qty-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.qty-num { font-weight: 700; font-size: 0.95rem; min-width: 20px; text-align: center; }
.remove-btn { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; padding: 4px; transition: color 0.2s; }
.remove-btn:hover { color: var(--primary); }

/* ── ORDER TOTAL ── */
.order-total {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin: 16px 0; box-shadow: var(--shadow-sm);
}
.total-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.85rem; color: var(--text-muted); }
.total-row.big { font-size: 1.1rem; font-weight: 800; color: var(--text); border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }
.total-row .val { color: var(--primary); }

/* ── FORMS ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-input {
  width: 100%; background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 0.95rem;
  padding: 12px 14px; font-family: inherit; transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(192,57,43,0.12); }
.form-input::placeholder { color: var(--text-muted); }
textarea.form-input { resize: vertical; min-height: 80px; }

/* ── DELIVERY OPTIONS ── */
.delivery-options { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.delivery-card {
  background: var(--card); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 20px; cursor: pointer; transition: all 0.25s; display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-sm);
}
.delivery-card:hover { border-color: var(--primary); background: rgba(192,57,43,0.03); }
.delivery-card.selected { border-color: var(--primary); background: rgba(192,57,43,0.05); box-shadow: 0 0 0 3px rgba(192,57,43,0.12); }
.delivery-icon { font-size: 2.5rem; width: 60px; text-align: center; flex-shrink: 0; }
.delivery-info .d-title { font-weight: 800; font-size: 1rem; margin-bottom: 4px; }
.delivery-info .d-desc { font-size: 0.8rem; color: var(--text-muted); }
.delivery-check { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.delivery-card.selected .delivery-check { background: var(--primary); border-color: var(--primary); color: #fff; font-size: 0.75rem; }

/* ── SUMMARY CARD ── */
.summary-section { margin-bottom: 20px; }
.summary-section-title { font-size: 0.75rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.summary-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.summary-row:last-child { border-bottom: none; }
.summary-row .sr-label { color: var(--text-muted); }
.summary-row .sr-val { font-weight: 600; text-align: right; max-width: 55%; }
.summary-item-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.summary-item-row:last-child { border-bottom: none; }
.summary-item-row img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.summary-item-info { flex: 1; font-size: 0.85rem; }
.summary-item-info .si-name { font-weight: 700; }
.summary-item-info .si-qty { color: var(--text-muted); font-size: 0.78rem; }
.summary-item-price { font-weight: 800; color: var(--primary); font-size: 0.9rem; }

/* ── WHATSAPP PREVIEW ── */
.wa-preview-wrap { background: #0B141A; border-radius: var(--radius); padding: 20px; margin-bottom: 20px; min-height: 260px; }
.wa-chat-header { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid #1F2C34; margin-bottom: 16px; }
.wa-avatar { width: 40px; height: 40px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.wa-name { font-weight: 700; font-size: 0.95rem; color: #E9EDF0; }
.wa-status { font-size: 0.72rem; color: #8696A0; }
.wa-bubble { background: #202C33; border-radius: 8px 18px 18px 18px; padding: 12px 14px; max-width: 85%; position: relative; font-size: 0.82rem; line-height: 1.6; color: #E9EDF0; white-space: pre-line; }
.wa-bubble::before { content: ''; position: absolute; left: -8px; top: 0; border: 8px solid transparent; border-right-color: #202C33; border-top: 0; }
.wa-time { font-size: 0.65rem; color: #8696A0; text-align: right; margin-top: 6px; }
.wa-sent-label { text-align: center; font-size: 0.75rem; color: #8696A0; background: #0B141A; padding: 4px 14px; border-radius: 8px; margin-bottom: 10px; }

/* ── BUTTONS ── */
.btn {
  display: block; width: 100%; padding: 15px; border: none; border-radius: var(--radius);
  font-family: inherit; font-size: 1rem; font-weight: 800; cursor: pointer;
  transition: all 0.2s; text-align: center; text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(192,57,43,0.35); }
.btn-secondary { background: var(--card2); color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-success { background: #25D366; color: #fff; }
.btn-success:hover { background: #1DA851; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,211,102,0.35); }
.btn-back { background: none; border: none; color: var(--text-muted); font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; gap: 6px; margin-bottom: 16px; transition: color 0.2s; font-family: inherit; padding: 0; }
.btn-back:hover { color: var(--primary); }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 50px 20px; }
.empty-state .empty-icon { font-size: 4rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.empty-state p { font-size: 0.85rem; color: var(--text-muted); }

/* ── SUCCESS PAGE ── */
.success-wrap { text-align: center; padding: 40px 20px; }
.success-icon { width: 80px; height: 80px; background: rgba(39,174,96,0.12); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; margin: 0 auto 20px; border: 2px solid var(--success); }
.success-title { font-size: 1.5rem; font-weight: 900; margin-bottom: 8px; font-family: 'Playfair Display', serif; color: var(--accent); }
.success-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 30px; }
.order-num { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 24px; }
.order-num span { font-size: 0.75rem; color: var(--text-muted); display: block; }
.order-num strong { font-size: 1.4rem; color: var(--primary); font-weight: 900; }

/* ── MISC ── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: 0.7rem; font-weight: 700; }
.badge-delivery { background: rgba(192,57,43,0.10); color: var(--primary); }
.badge-pickup { background: rgba(39,174,96,0.12); color: var(--success); }
.pb-120 { padding-bottom: 120px; }
.gap-12 { display: flex; flex-direction: column; gap: 12px; }
.mt-12 { margin-top: 12px; }
.text-center { text-align: center; }

/* ── SPLASH / LOADING SCREEN ── */
#splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: #1C1C1C;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
}
.splash-bg-mosaic {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  opacity: 0.18; filter: blur(2px) brightness(0.35);
  pointer-events: none;
}
.splash-bg-mosaic img { width: 100%; height: 100%; object-fit: cover; }
.splash-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  animation: splashFadeIn 0.7s ease both;
}
/* Japanese decorative line */
.splash-content::before {
  content: '— 鮨 —';
  font-size: 1rem; color: rgba(212,172,13,0.7); letter-spacing: 8px;
  margin-bottom: 4px;
}
.splash-logo-wrap {
  width: 130px; height: 130px; border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 8px rgba(212,172,13,0.1), 0 0 40px rgba(192,57,43,0.4);
  overflow: hidden; background: #2a2a2a;
  animation: splashPulse 2.5s ease-in-out infinite;
}
.splash-logo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.splash-name {
  font-size: 2.4rem; font-weight: 900; color: #FFFFFF;
  text-align: center; letter-spacing: 4px;
  font-family: 'Playfair Display', serif;
  text-shadow: 0 2px 20px rgba(192,57,43,0.5);
}
.splash-name span { color: var(--gold); }
.splash-tagline {
  font-size: 0.75rem; color: rgba(255,255,255,0.6); letter-spacing: 3px;
  text-transform: uppercase; text-align: center;
}
.splash-bar-wrap { width: 200px; height: 3px; background: rgba(255,255,255,0.15); border-radius: 10px; overflow: hidden; margin-top: 8px; }
.splash-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 10px; animation: splashLoad 2.4s ease forwards;
}
.splash-food-row { display: flex; gap: 10px; margin-top: 4px; }
.splash-food-img {
  width: 62px; height: 62px; border-radius: 10px; object-fit: cover;
  border: 2px solid rgba(212,172,13,0.4);
  animation: splashFoodIn 0.5s ease both;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}
.splash-food-img:nth-child(1) { animation-delay: 0.2s; }
.splash-food-img:nth-child(2) { animation-delay: 0.35s; }
.splash-food-img:nth-child(3) { animation-delay: 0.5s; }
.splash-food-img:nth-child(4) { animation-delay: 0.65s; }

@keyframes splashFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes splashPulse {
  0%, 100% { box-shadow: 0 0 0 8px rgba(212,172,13,0.1), 0 0 40px rgba(192,57,43,0.4); }
  50%       { box-shadow: 0 0 0 12px rgba(212,172,13,0.15), 0 0 60px rgba(192,57,43,0.6); }
}
@keyframes splashLoad {
  0%   { width: 0%; }
  100% { width: 100%; }
}
@keyframes splashFoodIn {
  from { opacity: 0; transform: scale(0.6) rotate(-8deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}
#splash-screen.hidden { animation: splashExit 0.5s ease forwards; }
@keyframes splashExit {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.04); pointer-events: none; }
}