/* ============================================================
   style.css — Cock N Bull DHA Phase 1
   Theme: Obsidian Black + Volcanic Orange
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Nunito:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --primary:       #ff6600;
  --primary-dark:  #cc4f00;
  --primary-glow:  rgba(255,102,0,.35);
  --bg:            #111111;
  --bg2:           #1a1a1a;
  --bg3:           #222222;
  --card:          #1e1e1e;
  --border:        #2e2e2e;
  --text:          #f0f0f0;
  --text-muted:    #888;
  --white:         #ffffff;
  --danger:        #e53e3e;
  --success:       #38a169;
  --radius:        14px;
  --radius-sm:     8px;
  --shadow:        0 4px 24px rgba(0,0,0,.5);
  --shadow-orange: 0 4px 24px rgba(255,102,0,.25);
  --transition:    .22s cubic-bezier(.4,0,.2,1);
  --font-display:  'Bebas Neue', sans-serif;
  --font-body:     'Nunito', sans-serif;
  --nav-h:         60px;
  --cat-h:         52px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font-body); border: none; outline: none; }
input,select,textarea { font-family: var(--font-body); }
ul { list-style: none; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

/* ── Loader ────────────────────────────────────────────────── */
#loader {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity .5s, visibility .5s;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-logo {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: var(--primary);
  letter-spacing: 4px;
  animation: pulse 1.4s ease-in-out infinite;
}
.loader-bar {
  margin-top: 24px;
  width: 180px; height: 3px;
  background: var(--bg3);
  border-radius: 2px;
  overflow: hidden;
}
.loader-bar::after {
  content: '';
  display: block; height: 100%;
  width: 40%;
  background: var(--primary);
  border-radius: 2px;
  animation: loaderSlide 1.2s ease-in-out infinite;
}
@keyframes loaderSlide {
  0%   { transform: translateX(-200%); }
  100% { transform: translateX(350%); }
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .5; }
}

/* ── Closed Banner ─────────────────────────────────────────── */
#closed-banner {
  display: none;
  background: var(--danger);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .5px;
  position: sticky; top: 0; z-index: 800;
}
#closed-banner.show { display: block; }

/* ── Topbar / Nav ──────────────────────────────────────────── */
#topbar {
  position: sticky; top: 0; z-index: 700;
  background: rgba(17,17,17,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 16px;
  gap: 12px;
}
.topbar-logo {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--primary);
  letter-spacing: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}
.topbar-logo span { color: var(--text); }
.search-wrap {
  flex: 1;
  position: relative;
  max-width: 440px;
}
.search-wrap input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 9px 16px 9px 40px;
  color: var(--text);
  font-size: .9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  outline: none;
}
.search-wrap input::placeholder { color: var(--text-muted); }
.search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 1rem; pointer-events: none;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
#install-btn {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 50px;
  padding: 7px 14px;
  font-size: .78rem;
  font-weight: 700;
  display: none;
  align-items: center; gap: 6px;
  transition: background var(--transition), color var(--transition);
}
#install-btn.show { display: flex; }
#install-btn:hover { background: var(--primary); color: #fff; }
#cart-btn {
  position: relative;
  background: var(--primary);
  color: #fff;
  border-radius: 50px;
  padding: 9px 18px;
  font-weight: 700;
  font-size: .88rem;
  display: flex; align-items: center; gap: 8px;
  transition: background var(--transition), transform var(--transition);
}
#cart-btn:hover { background: var(--primary-dark); transform: scale(1.04); }
#cart-count {
  background: #fff;
  color: var(--primary);
  border-radius: 50%;
  width: 20px; height: 20px;
  font-size: .72rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  min-width: 20px;
}

/* ── Category Navbar ───────────────────────────────────────── */
#cat-nav {
  position: sticky; top: var(--nav-h); z-index: 600;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  height: var(--cat-h);
  display: flex; align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 4px;
  padding: 0 12px;
}
#cat-nav::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 16px;
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .4px;
  transition: all var(--transition);
  white-space: nowrap;
}
.cat-pill:hover { border-color: var(--primary); color: var(--primary); }
.cat-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px var(--primary-glow);
}

/* ── Hero ──────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 280px;
  display: flex; align-items: center;
  padding: 48px 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #111 0%, #1a0a00 50%, #111 100%);
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 70% 50%, rgba(255,102,0,.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(255,102,0,.06) 0%, transparent 60%);
  pointer-events: none;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,102,0,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,102,0,.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 600px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,102,0,.15);
  border: 1px solid rgba(255,102,0,.3);
  border-radius: 50px;
  padding: 4px 14px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: blink 1.4s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.2} }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  line-height: 1.0;
  color: var(--white);
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.hero-title .highlight { color: var(--primary); }
.hero-sub {
  font-size: clamp(.95rem, 2.5vw, 1.15rem);
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}
.hero-sub strong { color: var(--text); }
.hero-stats {
  display: flex; gap: 24px; flex-wrap: wrap;
}
.hero-stat { text-align: left; }
.hero-stat .num {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--primary);
  line-height: 1;
}
.hero-stat .label { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* ── Menu Sections ─────────────────────────────────────────── */
#menu-container { padding: 0 12px 80px; max-width: 1200px; margin: 0 auto; }
.menu-section { margin-top: 36px; scroll-margin-top: calc(var(--nav-h) + var(--cat-h) + 12px); }
.section-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.section-icon { font-size: 1.6rem; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--white);
  letter-spacing: 2px;
}
.section-count {
  margin-left: auto;
  background: var(--bg3);
  border-radius: 50px;
  padding: 3px 12px;
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 700;
}

/* ── Cards Grid ────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.menu-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column;
  position: relative;
}
.menu-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-orange);
}
.menu-card.unavailable { opacity: .5; pointer-events: none; }
.card-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 56%;
  background: var(--bg3);
  overflow: hidden;
  flex-shrink: 0;
}
.card-img-wrap img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.menu-card:hover .card-img-wrap img { transform: scale(1.06); }
.card-img-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px;
  color: var(--text-muted);
}
.card-img-placeholder .emoji { font-size: 2.2rem; }
.card-img-placeholder .ph-text { font-size: .72rem; letter-spacing: .5px; }
.card-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.card-body {
  padding: 12px;
  display: flex; flex-direction: column;
  flex: 1;
}
.card-name {
  font-size: .92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 8px;
  flex: 1;
}
.card-price {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--primary);
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.card-price .currency { font-size: .9rem; color: var(--text-muted); }

/* Pizza size selector */
.size-selector {
  display: flex; gap: 4px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.size-btn {
  flex: 1; min-width: 0;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 4px;
  color: var(--text-muted);
  font-size: .73rem;
  font-weight: 700;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
}
.size-btn:hover { border-color: var(--primary); color: var(--primary); }
.size-btn.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.size-btn .size-label { display: block; }
.size-btn .size-price { display: block; font-size: .66rem; font-weight: 600; opacity: .85; }

/* Add to cart button */
.btn-add {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 10px;
  font-weight: 800;
  font-size: .85rem;
  letter-spacing: .5px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background var(--transition), transform var(--transition);
}
.btn-add:hover { background: var(--primary-dark); transform: scale(1.02); }
.btn-add:active { transform: scale(.98); }

/* ── No results ────────────────────────────────────────────── */
#no-results {
  display: none;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
#no-results .nr-icon { font-size: 3.5rem; margin-bottom: 16px; }
#no-results .nr-title { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
#no-results.show { display: block; }

/* ── Cart Overlay ──────────────────────────────────────────── */
#cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 900;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
#cart-overlay.open { opacity: 1; pointer-events: all; }

#cart-sidebar {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: var(--bg2);
  border-left: 1px solid var(--border);
  z-index: 901;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 40px rgba(0,0,0,.5);
}
#cart-sidebar.open { transform: translateX(0); }

.cart-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.cart-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--white);
  letter-spacing: 2px;
  display: flex; align-items: center; gap: 10px;
}
.cart-title .cart-icon { color: var(--primary); }
#close-cart {
  background: var(--bg3);
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: background var(--transition), color var(--transition);
}
#close-cart:hover { background: var(--danger); color: #fff; }

#cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}
.cart-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%; gap: 12px;
  color: var(--text-muted);
}
.cart-empty .ce-icon { font-size: 3rem; }
.cart-empty .ce-text { font-size: .95rem; font-weight: 600; }

.cart-item {
  display: grid; grid-template-columns: 56px 1fr auto;
  gap: 10px; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  animation: slideIn .2s ease;
}
@keyframes slideIn { from{opacity:0;transform:translateX(20px)} to{opacity:1;transform:none} }
.ci-img {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  overflow: hidden;
  flex-shrink: 0;
}
.ci-img img { width:100%;height:100%;object-fit:cover; }
.ci-img .ci-placeholder {
  width:100%;height:100%;
  display:flex;align-items:center;justify-content:center;
  font-size:1.4rem;
}
.ci-info .ci-name { font-size: .85rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.ci-info .ci-size { font-size: .72rem; color: var(--primary); font-weight: 600; }
.ci-info .ci-price { font-size: .82rem; color: var(--text-muted); margin-top: 2px; }
.ci-controls { display: flex; align-items: center; gap: 6px; }
.qty-btn {
  background: var(--bg3); border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text); font-size: 1rem; font-weight: 700;
  transition: background var(--transition), color var(--transition);
}
.qty-btn:hover { background: var(--primary); color: #fff; }
.qty-num { font-weight: 800; font-size: .9rem; min-width: 18px; text-align: center; }

.cart-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.cart-subtotal {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.cart-subtotal .label { font-size: .85rem; color: var(--text-muted); }
.cart-subtotal .amount { font-family: var(--font-display); font-size: 1.5rem; color: var(--primary); }
.cart-customer { margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.cart-customer input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: .88rem;
  transition: border-color var(--transition);
}
.cart-customer input:focus { border-color: var(--primary); outline: none; }
.cart-customer input::placeholder { color: var(--text-muted); }
#whatsapp-btn {
  width: 100%;
  background: #25d366;
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-weight: 800;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background var(--transition), transform var(--transition);
  letter-spacing: .5px;
}
#whatsapp-btn:hover { background: #1da851; transform: scale(1.02); }
#whatsapp-btn svg { width: 22px; height: 22px; fill: currentColor; }

/* ── Toast ─────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 9998;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: .88rem; font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow);
  animation: toastIn .3s ease, toastOut .3s ease 2.5s forwards;
  white-space: nowrap;
}
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
@keyframes toastIn  { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:none} }
@keyframes toastOut { from{opacity:1} to{opacity:0} }

/* ── PWA Install Banner ─────────────────────────────────────── */
#pwa-banner {
  position: fixed; bottom: 20px; right: 16px;
  background: var(--card);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px 18px;
  max-width: 300px;
  box-shadow: var(--shadow-orange);
  z-index: 800;
  display: none;
  animation: slideUp .4s ease;
}
#pwa-banner.show { display: block; }
@keyframes slideUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }
.pwa-title { font-weight: 800; font-size: .95rem; margin-bottom: 4px; color: var(--white); }
.pwa-desc  { font-size: .8rem; color: var(--text-muted); margin-bottom: 12px; }
.pwa-btns  { display: flex; gap: 8px; }
#pwa-install-btn {
  flex: 1;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-weight: 700; font-size: .82rem;
  transition: background var(--transition);
}
#pwa-install-btn:hover { background: var(--primary-dark); }
#pwa-dismiss-btn {
  background: var(--bg3);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-weight: 700; font-size: .82rem;
  transition: background var(--transition);
}
#pwa-dismiss-btn:hover { background: var(--border); }

/* ── Footer ────────────────────────────────────────────────── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: .8rem;
}
footer .foot-logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--primary);
  letter-spacing: 3px;
  margin-bottom: 8px;
}
footer p { line-height: 1.8; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
  .topbar-logo { font-size: 1.3rem; }
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .card-name { font-size: .85rem; }
  #hero { min-height: 220px; padding: 36px 16px; }
  .hero-stats { gap: 16px; }
  #menu-container { padding: 0 8px 80px; }
  .section-title { font-size: 1.4rem; }
}
@media (min-width: 900px) {
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  #topbar { padding: 0 32px; }
  #cat-nav { padding: 0 28px; gap: 8px; }
  #menu-container { padding: 0 32px 80px; }
}
