/* =========================================================
   1160 Falafel — shared design system
   Rose & red. Soft glass. Floating heart-falafel.
   ========================================================= */

:root {
  --bg-1: #fde6e2;
  --bg-2: #f3c3c0;
  --bg-3: #efb2b5;

  --red: #c11431;        /* primary accent red */
  --red-deep: #8f0e24;   /* pressed / strong */
  --red-soft: #e06a7e;   /* soft strokes */
  --ink: #5c0d1a;        /* body text — deep red, readable */
  --ink-dim: #914a54;    /* secondary text */

  --paper: rgba(255, 255, 255, 0.55);
  --paper-strong: rgba(255, 255, 255, 0.78);
  --line: rgba(146, 16, 40, 0.16);

  --shadow-soft: 0 20px 60px -24px rgba(143, 14, 36, 0.45);
  --shadow-lift: 0 30px 80px -30px rgba(143, 14, 36, 0.55);

  --radius: 22px;
  --radius-lg: 34px;

  --ff-display: "Fraunces", "Georgia", serif;
  --ff-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw: 1120px;
}

* { box-sizing: border-box; }

/* the hidden attribute must always win over class-level display rules
   (e.g. .overlay{display:grid}, .sum-line{display:flex}) */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ff-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 78% -8%, #ffe9e6 0%, rgba(255,233,230,0) 60%),
    radial-gradient(900px 620px at 8% 100%, #f6cbc9 0%, rgba(246,203,201,0) 55%),
    linear-gradient(158deg, var(--bg-1) 0%, var(--bg-2) 58%, var(--bg-3) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* faint film grain via layered radial dots for a printed-poster feel */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: radial-gradient(rgba(143,14,36,0.05) 1px, transparent 1.4px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
}

/* ---------- Ambient floating falafels ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ambient .fal {
  position: absolute;
  width: var(--s, 120px);
  opacity: var(--o, 0.28);
  filter: drop-shadow(0 18px 26px rgba(143,14,36,0.25));
  animation: drift var(--dur, 26s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform;
}
@keyframes drift {
  0%   { transform: translate3d(0,0,0) rotate(var(--r0, -8deg)); }
  50%  { transform: translate3d(var(--dx, 26px), var(--dy, -34px), 0) rotate(var(--r1, 10deg)); }
  100% { transform: translate3d(0,0,0) rotate(var(--r0, -8deg)); }
}

/* ---------- Layout ---------- */
.wrap { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.site-header {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  max-width: var(--maxw); margin: 0 auto; padding: 26px 24px 8px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--red); }
.brand img { width: 40px; height: auto; filter: drop-shadow(0 6px 10px rgba(143,14,36,0.3)); }
.brand .mark {
  font-family: var(--ff-display);
  font-weight: 600; font-size: 1.28rem; letter-spacing: -0.02em; line-height: 1;
}
.brand .mark small { display: block; font-family: var(--ff-body); font-weight: 500; font-size: 0.6rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-dim); margin-top: 3px; }
.nav-note { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-size: 0.74rem; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--red); font-weight: 600;
}
.display {
  font-family: var(--ff-display);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.92;
  color: var(--red);
  margin: 0;
}
.italic { font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  appearance: none; border: none; cursor: pointer;
  font-family: var(--ff-body); font-weight: 600; font-size: 1rem;
  padding: 16px 30px; border-radius: 100px;
  background: var(--red); color: #fff;
  box-shadow: 0 16px 34px -14px rgba(143,14,36,0.75);
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s, background .18s;
  display: inline-flex; align-items: center; gap: 10px;
}
.btn:hover { transform: translateY(-2px); background: var(--red-deep); box-shadow: 0 22px 44px -14px rgba(143,14,36,0.8); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost {
  background: transparent; color: var(--red);
  box-shadow: inset 0 0 0 1.5px var(--red-soft);
}
.btn.ghost:hover { background: rgba(193,20,49,0.06); }
.btn.block { width: 100%; justify-content: center; }
.btn.big { font-size: 1.12rem; padding: 19px 40px; }

/* ---------- Cards / glass ---------- */
.card {
  background: var(--paper);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}

a { color: var(--red); }

.reduced-hint { display: none; }

@media (prefers-reduced-motion: reduce) {
  .ambient .fal { animation: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 640px) {
  .site-header { padding: 20px 20px 4px; }
  .nav-note { display: none; }
}

/* =========================================================
   STORE PAGE
   ========================================================= */

/* ---------- Hero ---------- */
.hero { padding: 40px 0 20px; max-width: 860px; }
.hero-title {
  font-size: clamp(3.4rem, 12vw, 8.2rem);
  margin: 14px 0 0;
}
.hero-lede {
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  line-height: 1.5; max-width: 34ch; margin: 26px 0 30px; color: var(--ink);
}
.hero-cta { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.hero-price {
  font-family: var(--ff-display); font-size: 1.4rem; color: var(--red);
}
.hero-price em { font-style: normal; font-size: 0.8rem; color: var(--ink-dim); letter-spacing: 0.04em; }

/* ---------- Product ---------- */
.product {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 10px;
  align-items: center; margin: 70px 0; padding: 30px; overflow: hidden;
}
.product-media { display: grid; place-items: center; padding: 20px; }
.product-hero-img {
  width: min(360px, 80%); height: auto;
  filter: drop-shadow(0 40px 50px rgba(143,14,36,0.4));
  animation: bob 6s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-16px) rotate(3deg); } }
.product-copy { padding: 20px 34px 20px 10px; }
.product-title { font-size: clamp(2.6rem, 7vw, 4.4rem); margin: 8px 0 16px; }
.product-copy p { line-height: 1.6; max-width: 42ch; }
.feature-list { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 12px; }
.feature-list li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.feature-list li span { color: var(--red-soft); font-size: 1.1rem; }
.product-foot { display: flex; align-items: center; gap: 22px; }
.product-price { font-family: var(--ff-display); font-size: 2rem; color: var(--red); }

/* ---------- Checkout ---------- */
.checkout { margin: 40px 0 60px; scroll-margin-top: 20px; }
.checkout-head { margin-bottom: 26px; }
.checkout-title { font-size: clamp(2.4rem, 6vw, 3.8rem); margin-top: 6px; }
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.checkout-form { padding: 30px; display: grid; gap: 26px; }

.field label { display: block; font-weight: 600; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.field input[type="text"] {
  width: 100%; font-family: var(--ff-body); font-size: 1.05rem; color: var(--ink);
  padding: 15px 18px; border-radius: 16px;
  border: 1.5px solid var(--line); background: rgba(255,255,255,0.65);
  transition: border-color .18s, box-shadow .18s;
}
.field input::placeholder { color: #bd8a8f; }
.field input:focus { outline: none; border-color: var(--red-soft); box-shadow: 0 0 0 4px rgba(224,106,126,0.18); }
.field-error { color: var(--red); font-size: 0.92rem; margin: 10px 0 0; font-weight: 500; }
.field-ok { color: #1f8a4c; font-size: 0.92rem; margin: 10px 0 0; font-weight: 600; }
.field-hint { color: var(--ink-dim); font-size: 0.88rem; margin: 12px 0 0; }

/* calendar */
.calendar { background: rgba(255,255,255,0.5); border: 1.5px solid var(--line); border-radius: 18px; padding: 16px; }
.cal-head { text-align: center; font-family: var(--ff-display); font-size: 1.15rem; color: var(--red); margin-bottom: 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); padding-bottom: 4px; }
.cal-day {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px;
  font-size: 0.95rem; font-weight: 500; position: relative;
  background: transparent; border: none; font-family: var(--ff-body);
}
.cal-day.empty { visibility: hidden; }
.cal-day.taken { color: #c79aa0; text-decoration: line-through; cursor: not-allowed; }
.cal-day.avail {
  cursor: pointer; color: var(--red); font-weight: 700;
  background: rgba(193,20,49,0.08); box-shadow: inset 0 0 0 1.5px var(--red-soft);
  animation: pulseday 2.4s ease-in-out infinite;
}
@keyframes pulseday { 0%,100% { box-shadow: inset 0 0 0 1.5px var(--red-soft); } 50% { box-shadow: inset 0 0 0 2px var(--red), 0 0 0 4px rgba(224,106,126,0.22); } }
.cal-day.avail:hover { background: rgba(193,20,49,0.16); }
.cal-day.selected { background: var(--red); color: #fff; animation: none; box-shadow: 0 8px 18px -6px rgba(143,14,36,0.7); }
.cal-day.selected::after { content: "❤"; position: absolute; bottom: 1px; font-size: 0.5rem; }

/* payment method */
.pay-method { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-radius: 16px; border: 1.5px solid var(--line); background: rgba(255,255,255,0.4); }
.pay-method-left { display: flex; align-items: center; gap: 14px; }
.cc-dot { width: 34px; height: 24px; border-radius: 6px; background: linear-gradient(135deg, var(--red-soft), var(--red)); box-shadow: inset 0 -8px 10px -8px rgba(0,0,0,0.4); flex: none; }
.pay-sub { display: block; font-size: 0.78rem; color: var(--ink-dim); }
.badge-off { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; color: var(--red); background: rgba(193,20,49,0.1); border: 1px solid rgba(193,20,49,0.25); padding: 5px 10px; border-radius: 100px; white-space: nowrap; }

/* coupon */
.coupon-row { display: flex; gap: 10px; }
.coupon-row input { flex: 1; }
.coupon-row .btn { flex: none; padding: 15px 22px; }
.field.applied .coupon-row input { border-color: #43b072; background: rgba(67,176,114,0.08); }

/* summary */
.checkout-summary { padding: 28px; position: sticky; top: 20px; }
.summary-title { font-family: var(--ff-display); font-size: 1.5rem; color: var(--red); margin: 0 0 20px; }
.sum-line { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 0.98rem; }
.sum-line.discount { color: #1f8a4c; font-weight: 600; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0 22px; }
.sum-total span:first-child { font-weight: 600; }
.sum-total-val { font-family: var(--ff-display); font-size: 2rem; color: var(--red); transition: transform .3s; }
.sum-total-val.flash { animation: flashprice .6s ease; }
@keyframes flashprice { 0% { transform: scale(1); } 40% { transform: scale(1.28); color: #1f8a4c; } 100% { transform: scale(1); } }
.pay-note { margin: 14px 0 0; font-size: 0.9rem; color: var(--red); font-weight: 500; text-align: center; }
.secure-note { margin: 16px 0 0; text-align: center; font-size: 0.82rem; color: var(--ink-dim); }

/* footer */
.site-footer { display: flex; align-items: center; gap: 16px; justify-content: center; text-align: center; padding: 40px 0 70px; color: var(--ink-dim); }
.site-footer img { width: 34px; opacity: 0.8; }
.site-footer p { font-size: 0.9rem; line-height: 1.6; }

/* =========================================================
   OVERLAY  (processing / success / used)
   ========================================================= */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(900px 600px at 50% 30%, rgba(255,236,233,0.96), rgba(247,205,201,0.98)),
    var(--bg-2);
  backdrop-filter: blur(6px);
  animation: fade .4s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.overlay-inner { text-align: center; max-width: 560px; position: relative; }
.stage .display { font-size: clamp(2.4rem, 8vw, 4.2rem); margin: 22px 0 10px; }
.overlay-sub { font-size: 1.1rem; color: var(--ink); line-height: 1.5; }

.spinner-fal { width: 130px; animation: spinbob 1.6s ease-in-out infinite; filter: drop-shadow(0 20px 26px rgba(143,14,36,0.4)); }
@keyframes spinbob { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.12); } 100% { transform: rotate(360deg) scale(1); } }
.used-fal { width: 110px; opacity: 0.85; filter: grayscale(0.15) drop-shadow(0 16px 22px rgba(143,14,36,0.35)); margin-bottom: 6px; }

.success-badge { font-size: 3.4rem; animation: pop .6s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.receipt { padding: 22px 26px; margin: 26px 0 20px; text-align: left; background: var(--paper-strong); }
.receipt-line { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 0.98rem; }
.receipt-line:last-child { border-bottom: none; }
.receipt-line span { color: var(--ink-dim); }
.birthday { font-family: var(--ff-display); font-style: italic; font-size: 1.5rem; color: var(--red); margin: 18px 0 8px; }

/* confetti falafels */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: -1; }
.confetti .c {
  position: absolute; top: -12%; width: var(--cs, 40px);
  animation: fall var(--cd, 3.4s) linear var(--cdelay, 0s) forwards;
}
@keyframes fall {
  0% { transform: translateY(-20vh) rotate(0); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(120vh) rotate(var(--cr, 540deg)); opacity: 1; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .product { grid-template-columns: 1fr; margin: 50px 0; }
  .product-copy { padding: 0 10px 16px; }
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
}
@media (max-width: 640px) {
  .hero { padding: 24px 0 10px; }
  .checkout-form { padding: 22px; }
  .coupon-row { flex-direction: column; }
  .coupon-row .btn { width: 100%; justify-content: center; }
}

