/* Carnitas Montero — Apple-clean, plain words, SVG line icons only, no emojis.
   Theme colors arrive from the business config and land on CSS variables. */
:root {
  --primary: #b3402a;
  --accent: #e8a33d;
  --bg: #fffaf4;
  --card: #ffffff;
  --ink: #221a15;
  --muted: #6f6156;
  --line: #eadfd2;
  --good: #1d7a3a;
  --warn: #9a6a00;
  --bad: #b3261e;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px; line-height: 1.45;
}
.loading { padding: 48px 20px; text-align: center; color: var(--muted); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 120px; }
.admin-wrap { max-width: 980px; }

/* header */
.hero {
  background: linear-gradient(160deg, var(--primary), color-mix(in srgb, var(--primary) 72%, #000));
  color: #fff; padding: 28px 20px 22px; border-radius: 0 0 24px 24px; margin: 0 -16px 16px;
}
.hero h1 { margin: 0 0 4px; font-size: 30px; letter-spacing: -0.02em; }
.hero .tagline { opacity: .92; margin: 0; }
.hero .meta { margin-top: 10px; font-size: 14px; opacity: .92; display: flex; flex-direction: column; gap: 2px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35);
  padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600;
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #7ee2a0; flex: none; }
.status-dot.closed { background: #ffb3ab; }

.banner {
  border-radius: var(--radius); padding: 14px 16px; margin: 0 0 14px; font-size: 15px;
  border: 1px solid var(--line); background: var(--card);
}
.banner.sample { background: #fdf3e0; border-color: #ecd9ac; }
.banner.closed { background: #fdeeea; border-color: #f0c4bd; }
.banner strong { display: block; margin-bottom: 2px; }

h2.section { font-size: 20px; margin: 22px 0 10px; letter-spacing: -0.01em; }
h3.group { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 20px 0 8px; }

/* menu */
.menu-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 620px) { .menu-grid { grid-template-columns: 1fr 1fr; } }
.item-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.item-photo { width: 100%; height: 150px; object-fit: cover; display: block; background: #f3e7d7; }
.item-photo-placeholder {
  height: 110px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #f7ead6, #f1ddc0); color: var(--primary);
}
.item-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.item-name { font-weight: 700; font-size: 17px; }
.item-desc { color: var(--muted); font-size: 14px; flex: 1; }
.item-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.price { font-weight: 700; font-size: 17px; }
.badge {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .03em;
  padding: 2px 8px; border-radius: 999px; vertical-align: middle;
}
.badge.sample { background: #f5df9e; color: #664d03; }
.badge.out { background: #f6d5d1; color: var(--bad); }
.badge.state { background: #e8e2d9; color: var(--ink); }
.badge.state.pending { background: #f5df9e; color: #664d03; }
.badge.state.accepted { background: #cfe4ff; color: #0b4a8a; }
.badge.state.paid { background: #d3ecd9; color: var(--good); }
.badge.state.ready { background: #bfe8cc; color: var(--good); }
.badge.state.done { background: #e8e2d9; color: var(--muted); }
.badge.state.declined, .badge.state.cancelled { background: #f6d5d1; color: var(--bad); }

.qty { display: inline-flex; align-items: center; gap: 10px; }
.qty button {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; font-size: 20px; line-height: 1; cursor: pointer; color: var(--primary); font-weight: 700;
}
.qty .n { min-width: 20px; text-align: center; font-weight: 700; }
.add-btn {
  border: 0; border-radius: 999px; background: var(--primary); color: #fff;
  padding: 10px 18px; font-size: 15px; font-weight: 700; cursor: pointer;
}
.add-btn:disabled { background: #cbb9a9; cursor: default; }

/* cart bar + checkout */
.cart-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom));
  width: min(728px, calc(100% - 24px)); z-index: 40;
  background: var(--primary); color: #fff; border-radius: 999px; padding: 14px 20px;
  display: flex; justify-content: space-between; align-items: center; font-weight: 700;
  box-shadow: 0 10px 30px rgba(60, 20, 5, .35); cursor: pointer; border: 0; font-size: 16px;
}
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; }
.panel h2 { margin: 0 0 10px; font-size: 19px; }
.cart-line { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-of-type { border-bottom: 0; }
.total-row { display: flex; justify-content: space-between; font-weight: 800; font-size: 18px; padding-top: 10px; }

label.field { display: block; margin: 12px 0; font-size: 14px; font-weight: 600; }
label.field span.hint { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }
input[type="text"], input[type="tel"], input[type="email"], input[type="password"], input[type="time"], input[type="number"], select, textarea {
  width: 100%; margin-top: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 16px; background: #fff; color: var(--ink); font-family: inherit;
}
input[type="color"] { width: 64px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-top: 6px; }
textarea { min-height: 70px; }
.radio-row { display: flex; gap: 10px; margin: 8px 0; }
.radio-card { flex: 1; border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; font-size: 15px; }
.radio-card.sel { border-color: var(--primary); background: #fdf0ea; }
.radio-card input { margin-right: 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 13px 22px; font-size: 16px; font-weight: 700; cursor: pointer;
  background: var(--primary); color: #fff; width: 100%;
}
.btn.small { width: auto; padding: 9px 16px; font-size: 14px; }
.btn.ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn.plain { background: #efe7dc; color: var(--ink); }
.btn.danger { background: #fff; color: var(--bad); border: 1px solid var(--bad); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.btn-row .btn { width: auto; flex: 1; min-width: 130px; }
.msg { border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-size: 15px; }
.msg.err { background: #fdeeea; color: var(--bad); border: 1px solid #f0c4bd; }
.msg.ok { background: #e7f5ec; color: var(--good); border: 1px solid #bfe0cc; }
.msg.warn { background: #fdf3e0; color: #664d03; border: 1px solid #ecd9ac; }
.small { font-size: 13px; color: var(--muted); }
.steps { display: flex; gap: 4px; margin: 14px 0; }
.steps .step { flex: 1; text-align: center; font-size: 12px; color: var(--muted); }
.steps .step .bar { height: 6px; border-radius: 3px; background: #e8ded0; margin-bottom: 5px; }
.steps .step.on { color: var(--ink); font-weight: 700; }
.steps .step.on .bar { background: var(--good); }
.zelle-box { background: #f4f8ff; border: 1px solid #c3d7f5; border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.zelle-box .big { font-size: 22px; font-weight: 800; word-break: break-all; }
.checkline { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: 15px; }
.checkline input { width: 22px; height: 22px; flex: none; margin-top: 1px; }

/* admin */
.admin-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 0 8px; gap: 10px; flex-wrap: wrap; }
.admin-top h1 { font-size: 22px; margin: 0; }
.tabs { display: flex; gap: 8px; margin: 10px 0 16px; flex-wrap: wrap; }
.tabs button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 16px;
  font-size: 15px; font-weight: 600; cursor: pointer; color: var(--ink);
}
.tabs button.sel { background: var(--primary); color: #fff; border-color: var(--primary); }
.order-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 12px; }
.order-card.flash { animation: flashbg 1s ease-in-out 6 alternate; }
@keyframes flashbg { from { background: #fff; } to { background: #fdeec9; } }
.order-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.order-num { font-size: 19px; font-weight: 800; }
.order-items { margin: 8px 0; font-size: 15px; }
.order-items div { display: flex; justify-content: space-between; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 2; }
.switch .track { position: absolute; inset: 0; background: #d8cbbd; border-radius: 999px; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked + .track { background: var(--good); }
.switch input:checked + .track::after { left: 25px; }
.hours-grid { display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 8px; align-items: center; font-size: 14px; }
.hours-grid input[type="time"] { padding: 8px; }
.menu-admin-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.menu-admin-row:last-child { border-bottom: 0; }
.menu-admin-row img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; flex: none; }
details.edit { margin-top: 8px; }
details.edit summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: 14px; }
.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
a { color: var(--primary); }

/* ============ SHOWCASE STOREFRONT (customer side, Spanish, brand skin) ============
   Scoped to body.storefront so the owner admin keeps the light template skin.
   Her brand: black page, red + gold from the logo, cream text, dark cards. */
body.storefront { background: #0c0908; color: #f6f0e7; --line: #2e241c; --card: #17120e; --ink: #f6f0e7; --muted: #b3a48f; }
body.storefront a { color: var(--accent); }
body.storefront input[type="text"], body.storefront input[type="tel"], body.storefront input[type="number"], body.storefront textarea {
  background: #0f0c0a; border-color: #3a2d22; color: #f6f0e7;
}
body.storefront .msg.ok { background: #12291a; color: #9fe3b4; border-color: #1f4d2e; }
body.storefront .msg.warn { background: #2a2110; color: #f0d492; border-color: #5a4620; }
body.storefront .msg.err { background: #2c130f; color: #ffb3ab; border-color: #5f2a22; }
body.storefront .zelle-box { background: #101623; border-color: #2b3f5f; }
body.storefront .radio-card.sel { background: #241a12; }
body.storefront .btn.ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
body.storefront .btn.plain { background: #2a211a; color: #f6f0e7; }
body.storefront .qty button { background: #1d1611; border-color: #3a2d22; }
body.storefront .item-photo { height: 185px; background: #241a13; }
body.storefront .item-photo-placeholder { background: linear-gradient(150deg, #241a13, #17120e); }
body.storefront .price { color: var(--accent); }
body.storefront .badge.out { background: #4a2320; color: #ffb3ab; }
body.storefront .badge.state { background: #2b211a; color: #f6f0e7; }
body.storefront .badge.state.pending { background: #f5df9e; color: #664d03; }
body.storefront .badge.state.accepted { background: #cfe4ff; color: #0b4a8a; }
body.storefront .badge.state.paid { background: #d3ecd9; color: #14532d; }
body.storefront .badge.state.ready { background: #bfe8cc; color: #14532d; }
body.storefront .badge.state.declined, body.storefront .badge.state.cancelled { background: #f6d5d1; color: #7a1610; }
body.storefront .banner.closed { background: #2a130f; border-color: #5a2a20; }
body.storefront .banner.sample { background: #2a2110; border-color: #5a4620; }
body.storefront .steps .step .bar { background: #33291f; }
body.storefront .steps .step.on .bar { background: var(--good); }
body.storefront h3.group {
  color: #f0e6d6; font-size: 19px; text-transform: none; letter-spacing: 0;
  display: flex; align-items: center; gap: 12px; margin: 26px 0 12px;
}
body.storefront h3.group::after {
  content: ""; flex: 1; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.site-header {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: rgba(10, 7, 6, .88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #2b211a;
}
.site-header img { width: 40px; height: 40px; border-radius: 50%; display: block; }
.site-header .site-name { font-weight: 800; font-size: 18px; flex: 1; color: #f6f0e7; }
.site-header .site-order { width: auto; padding: 9px 18px; font-size: 15px; text-decoration: none; }

.show-hero { position: relative; overflow: hidden; background: #000; }
.show-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.show-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,3,2,.40), rgba(5,3,2,.55) 45%, rgba(5,3,2,.93)); }
.show-hero-inner { position: relative; max-width: 760px; margin: 0 auto; padding: 30px 20px 26px; text-align: center; color: #fff; }
.show-hero-logo { width: 96px; height: 96px; border-radius: 50%; box-shadow: 0 8px 30px rgba(0,0,0,.55); }
.show-hero h1 { margin: 10px 0 2px; font-size: 36px; letter-spacing: -0.01em; text-shadow: 0 2px 14px rgba(0,0,0,.6); }
.show-tagline { margin: 0; font-size: 19px; font-weight: 700; color: var(--accent); }
.show-sub { margin: 4px 0 0; font-size: 15px; opacity: .92; }
.show-meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; background: rgba(10,7,6,.55);
  border: 1px solid rgba(255,255,255,.28); padding: 6px 12px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: #fff; text-decoration: none;
}
a.chip { color: #fff; }
.chip .icon { width: 16px; height: 16px; }
.show-hero .status-pill { background: rgba(10,7,6,.55); }

.soon-pill {
  font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap;
  border: 1px solid var(--accent); border-radius: 999px; padding: 7px 12px;
}

.catering-strip { position: relative; border-radius: 20px; overflow: hidden; margin: 28px 0 4px; background: #000; }
.catering-strip > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.catering-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,3,2,.90) 25%, rgba(5,3,2,.30)); }
.catering-inner { position: relative; padding: 22px; color: #fff; max-width: 540px; }
.catering-inner h2 { margin: 0 0 6px; font-size: 25px; }
.catering-inner p { margin: 0 0 14px; font-size: 15px; opacity: .95; }
.catering-call { width: auto; background: var(--accent); color: #1d1405; text-decoration: none; }

.site-footer { text-align: center; padding: 28px 16px 42px; color: #b3a48f; font-size: 14px; }
.site-footer img { width: 56px; height: 56px; border-radius: 50%; }
.site-footer .foot-name { color: #f6f0e7; font-weight: 800; font-size: 17px; margin-top: 8px; }
.site-footer .foot-lines { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; align-items: center; }

/* ============ ANIMATED INTRO ============ */
#intro {
  position: fixed; inset: 0; z-index: 200; background: #000;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
#intro.bye { opacity: 0; transition: opacity .45s ease; pointer-events: none; }
#introFlames { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-stage { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 20px; text-align: center; }
.intro-logo { width: min(56vw, 230px); height: min(56vw, 230px); border-radius: 50%; transition: opacity .5s ease, transform .5s ease; }
.intro-logo.roasting { animation: introFlicker .38s ease-in-out infinite alternate; }
.intro-logo.gone { opacity: 0; transform: scale(.9); }
@keyframes introFlicker {
  from { filter: brightness(1) drop-shadow(0 0 18px rgba(255,110,20,.45)); transform: scale(1) rotate(-0.6deg); }
  to { filter: brightness(1.13) drop-shadow(0 0 34px rgba(255,140,25,.75)); transform: scale(1.025) rotate(0.6deg); }
}
.intro-name {
  display: none; color: #fff; font-weight: 900; font-size: clamp(42px, 12vw, 86px);
  line-height: .98; letter-spacing: .01em;
  text-shadow: 0 0 26px rgba(225,35,27,.55), 0 4px 0 rgba(0,0,0,.35);
}
.intro-name.show { display: block; animation: introSlam .38s cubic-bezier(.2, 2.2, .4, 1) both; }
@keyframes introSlam {
  0% { transform: scale(2.7); opacity: 0; }
  55% { opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.intro-enter {
  border: 0; cursor: pointer; background: var(--accent); color: #1d1405;
  font-weight: 800; font-size: 17px; padding: 14px 30px; border-radius: 999px;
  font-family: inherit; animation: introPulse 1.6s ease-in-out infinite;
}
@keyframes introPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.intro-skip { color: rgba(255,255,255,.65); font-size: 14px; display: none; }
.intro-skip.show { display: block; }
body.intro-on { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { #intro { display: none; } }
