/* ==========================================================================
   Midnite Houston Cupcakery — dark luxury theme
   Brand: midnight navy #072247 / steel #334B72 / charcoal #323335
          aqua accent #7FCBD6 (from logo) / gold #C9A14A (lighting accent)
   Type:  Roboto Slab (display) / Roboto (body)
   ========================================================================== */

:root {
  --navy-deep: #050e1c;
  --navy: #072247;
  --navy-soft: #0b2d5c;
  --steel: #334b72;
  --charcoal: #323335;
  --ink: #fff9f9;
  --ink-soft: #ccd6df;
  --ink-mute: #8fa0b3;
  --aqua: #7fcbd6;
  --aqua-deep: #4fa8b6;
  --gold: #c9a14a;
  --card: rgba(13, 34, 66, 0.55);
  --card-solid: #0a1d3a;
  --line: rgba(127, 203, 214, 0.16);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
  --radius: 14px;
  --font-display: "Roboto Slab", serif;
  --font-body: "Roboto", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--navy-deep) 0%, #061426 40%, var(--navy-deep) 100%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0 0 0.5em; }
a { color: var(--aqua); text-decoration: none; }
a:hover { color: var(--ink); }
img { max-width: 100%; display: block; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 300;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: linear-gradient(180deg, rgba(5, 14, 28, 0.92), rgba(5, 14, 28, 0.75) 70%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(127, 203, 214, 0.08);
}
.site-header .logo img { height: 44px; width: auto; }
.site-nav { display: flex; gap: 26px; align-items: center; }
.site-nav a {
  color: var(--ink-soft); font-size: 13.5px; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 500;
}
.site-nav a:hover, .site-nav a.active { color: var(--aqua); }
.site-nav .nav-cta {
  color: var(--navy-deep); background: var(--aqua);
  padding: 9px 18px; border-radius: 999px; font-weight: 700;
}
.site-nav .nav-cta:hover { background: var(--ink); color: var(--navy); }
.cart-button {
  position: relative; cursor: pointer; background: none; border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 16px; color: var(--ink-soft);
  font-family: var(--font-body); font-size: 13.5px; letter-spacing: 0.1em; text-transform: uppercase;
}
.cart-button:hover { border-color: var(--aqua); color: var(--aqua); }
.cart-count {
  position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px;
  border-radius: 999px; background: var(--gold); color: var(--navy-deep);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}
.menu-toggle { display: none; }

/* ---------- generic layout ---------- */
.page-wrap { max-width: 1200px; margin: 0 auto; padding: 140px 28px 80px; }
.section-pad { max-width: 1200px; margin: 0 auto; padding: 90px 28px; }
.eyebrow {
  color: var(--aqua); letter-spacing: 0.32em; text-transform: uppercase;
  font-size: 12px; font-weight: 600; margin-bottom: 14px;
}
.section-title { font-size: clamp(28px, 4vw, 44px); }
.section-sub { color: var(--ink-soft); max-width: 640px; }
.center { text-align: center; }
.center .section-sub { margin-inline: auto; }

.btn {
  display: inline-block; border-radius: 999px; padding: 14px 30px;
  font-family: var(--font-body); font-weight: 700; font-size: 15px; letter-spacing: 0.05em;
  cursor: pointer; border: none; transition: all 0.25s ease;
}
.btn-primary { background: var(--aqua); color: var(--navy-deep); }
.btn-primary:hover { background: var(--ink); color: var(--navy); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid rgba(255, 249, 249, 0.35); }
.btn-ghost:hover { border-color: var(--aqua); color: var(--aqua); }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { filter: brightness(1.12); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ---------- cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.card-body { padding: 22px; }

/* product card */
.product-card { display: flex; flex-direction: column; transition: transform 0.3s ease, border-color 0.3s ease; }
.product-card:hover { transform: translateY(-6px); border-color: rgba(127, 203, 214, 0.4); }
.product-card .product-img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.product-card h3 { font-size: 22px; margin-bottom: 4px; }
.product-card .flavor-note { color: var(--ink-mute); font-size: 14px; min-height: 42px; }
.price-row { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.price { font-family: var(--font-display); font-size: 20px; color: var(--gold); }
.size-select {
  background: var(--navy-deep); color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font-family: var(--font-body); font-size: 14px;
}

/* ---------- cart drawer ---------- */
.drawer-scrim {
  position: fixed; inset: 0; background: rgba(3, 8, 16, 0.6); z-index: 400;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); z-index: 401;
  background: var(--card-solid); border-left: 1px solid var(--line);
  transform: translateX(105%); transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; flex-direction: column;
}
body.drawer-open .drawer-scrim { opacity: 1; pointer-events: auto; }
body.drawer-open .cart-drawer { transform: translateX(0); }
.cart-drawer header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 24px; border-bottom: 1px solid var(--line);
}
.cart-drawer header h3 { margin: 0; font-size: 20px; }
.drawer-close { background: none; border: none; color: var(--ink-soft); font-size: 26px; cursor: pointer; line-height: 1; }
.cart-items { flex: 1; overflow-y: auto; padding: 12px 24px; }
.cart-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(127, 203, 214, 0.08); }
.cart-item img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.cart-item .ci-swatch {
  width: 64px; height: 64px; border-radius: 10px; flex-shrink: 0;
  background: radial-gradient(circle at 50% 30%, var(--steel), var(--navy-deep));
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item .ci-name { font-weight: 700; font-size: 15px; }
.cart-item .ci-meta { color: var(--ink-mute); font-size: 13px; }
.ci-qty { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.ci-qty button {
  width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line);
  background: none; color: var(--ink); cursor: pointer; font-size: 15px;
}
.ci-remove { background: none; border: none; color: var(--ink-mute); cursor: pointer; font-size: 12px; text-decoration: underline; }
.ci-price { font-family: var(--font-display); color: var(--gold); white-space: nowrap; }
.cart-footer { padding: 20px 24px; border-top: 1px solid var(--line); }
.cart-total-row { display: flex; justify-content: space-between; font-family: var(--font-display); font-size: 19px; margin-bottom: 14px; }
.cart-empty { color: var(--ink-mute); text-align: center; padding: 48px 0; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 40px;
  background: linear-gradient(180deg, transparent, rgba(7, 34, 71, 0.5));
}
.footer-grid {
  max-width: 1200px; margin: 0 auto; padding: 60px 28px 30px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
}
.site-footer h4 { color: var(--aqua); font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; }
.site-footer p, .site-footer li { color: var(--ink-mute); font-size: 14.5px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-logo img { height: 40px; margin-bottom: 16px; }
.footer-bottom {
  text-align: center; padding: 18px; color: var(--ink-mute); font-size: 13px;
  border-top: 1px solid rgba(127, 203, 214, 0.07);
}

/* ---------- forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--navy-deep); border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); padding: 13px 14px; font-family: var(--font-body); font-size: 15px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--aqua); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field .hint { color: var(--ink-mute); font-size: 12.5px; margin-top: 5px; }

/* ---------- option pills (builder) ---------- */
.opt-group { margin-bottom: 26px; }
.opt-group h4 { font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--aqua); margin-bottom: 12px; }
.opt-group .opt-price { color: var(--ink-mute); font-weight: 400; text-transform: none; letter-spacing: 0; }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px;
  background: rgba(7, 34, 71, 0.4); color: var(--ink-soft); cursor: pointer;
  font-family: var(--font-body); font-size: 14px; display: flex; align-items: center; gap: 8px;
  transition: all 0.2s ease;
}
.pill:hover { border-color: rgba(127, 203, 214, 0.5); }
.pill.selected { background: var(--aqua); color: var(--navy-deep); border-color: var(--aqua); font-weight: 700; }
.pill .swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.25); }
.pill.selected .swatch { border-color: rgba(0, 0, 0, 0.35); }

/* ---------- banners / notices ---------- */
.notice {
  background: rgba(201, 161, 74, 0.1); border: 1px solid rgba(201, 161, 74, 0.35);
  color: #e8cf96; border-radius: 12px; padding: 14px 18px; font-size: 14.5px;
}
.turnaround-strip {
  display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap;
  padding: 16px 24px; font-size: 14.5px; color: var(--ink-soft);
  border-block: 1px solid var(--line); background: rgba(7, 34, 71, 0.35);
}
.turnaround-strip strong { color: var(--aqua); }

/* ---------- page hero banner ---------- */
.page-hero {
  position: relative; min-height: 380px; display: flex; align-items: flex-end;
  padding: 140px 28px 46px; overflow: hidden; border-bottom: 1px solid var(--line);
}
.page-hero .ph-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center 35%;
}
.page-hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(5,14,28,0.55) 0%, rgba(5,14,28,0.15) 45%, rgba(5,14,28,0.88) 100%);
}
.page-hero .ph-inner { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; width: 100%; }
.page-hero h1 { font-size: clamp(30px, 4.5vw, 50px); margin-bottom: 6px; text-shadow: 0 4px 24px rgba(0,0,0,0.6); }
.page-hero .section-sub { text-shadow: 0 2px 12px rgba(0,0,0,0.7); }
.page-hero .eyebrow { text-shadow: 0 2px 8px rgba(0,0,0,0.8); }
@media (max-width: 640px) { .page-hero { min-height: 300px; padding-top: 110px; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
/* touch ergonomics: comfortable tap targets, no iOS focus-zoom */
@media (hover: none) and (pointer: coarse), (max-width: 640px) {
  .field input, .field select, .field textarea, .size-select { font-size: 16px; }
  .pill { min-height: 42px; padding-block: 10px; }
  .menu-toggle { padding: 10px 12px; }
  .drawer-close { padding: 10px 14px; }
  .ci-qty button { width: 34px; height: 34px; }
  .btn { padding: 15px 30px; }
}

@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .site-nav.open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--navy-deep); padding: 22px 28px;
    border-bottom: 1px solid var(--line); gap: 18px;
  }
  .menu-toggle {
    display: block; background: none; border: none; color: var(--ink);
    font-size: 24px; cursor: pointer;
  }
}
