/* ==========================================================
   INKITIN CRAFTS — Design System
   Shared across all pages
   ========================================================== */

:root {
  --teal:     #0d9488;
  --teal-dk:  #0f766e;
  --teal-lt:  #f0fdfa;
  --teal-md:  #ccfbf1;
  --ink:      #0f172a;
  --ink2:     #1e293b;
  --text:     #1e293b;
  --text2:    #334155;
  --muted:    #64748b;
  --muted2:   #94a3b8;
  --bg:       #ffffff;
  --surface:  #f8fafc;
  --surface2: #f1f5f9;
  --border:   #e2e8f0;
  --border2:  #cbd5e1;
  --red:      #ef4444;
  --green:    #22c55e;
  --shadow:   0 1px 3px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md:0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg:0 16px 56px rgba(0,0,0,0.16);
  --radius:   8px;
  --radius-md:12px;
  --radius-lg:16px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px; color: var(--text2); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

/* ── Icons ── inline SVG, currentColor stroke (see includes/icons.php) */
.ic-ph { width: 40%; height: 40%; color: var(--muted2); opacity: 0.5; }
.mm-dept-icon svg { color: var(--muted); transition: color .14s; }
.mm-dept:hover .mm-dept-icon svg,
.mm-dept.active .mm-dept-icon svg { color: var(--teal); }
.sac-img svg { width: 22px; height: 22px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1;
  border: none; border-radius: var(--radius); padding: 11px 22px;
  cursor: pointer; transition: all .18s; white-space: nowrap;
}
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dk); box-shadow: 0 4px 16px rgba(13,148,136,0.35); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink2); }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border2); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface2); }
.btn-lg { padding: 14px 30px; font-size: 15px; }
.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 6px; }

/* ── NAV ── */
.site-header {
  position: sticky; top: 0; z-index: 300;
  background: #fff; border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; gap: 0;
  max-width: 1600px; margin: 0 auto;
  padding: 0 40px; height: 64px;
}
.nav-logo { flex-shrink: 0; margin-right: 28px; }
.nav-logo img { height: 36px; }

/* Nav links */
.nav-links { display: flex; align-items: stretch; gap: 0; list-style: none; }
.nav-item { position: relative; }
.nav-link-a {
  display: flex; align-items: center; gap: 5px;
  padding: 0 14px; height: 64px; background: none; border: none;
  font-family: inherit; font-size: 13.5px; font-weight: 500; color: var(--muted);
  white-space: nowrap; transition: color .15s; cursor: pointer; text-decoration: none;
}
.nav-link-a:hover, .nav-link-a.open { color: var(--text); }
.nav-link-a.active {
  color: var(--text); font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--teal);
}
.nav-chev {
  display: inline-block; font-size: 9px; opacity: 0.45;
  transition: transform .22s cubic-bezier(.4,0,.2,1);
}
.nav-link-a.open .nav-chev { transform: rotate(180deg); opacity: 0.7; }

/* ── Full-width mega panel ── */
.mega-panel {
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border-top: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(0,0,0,0.11);
  opacity: 0; transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .22s cubic-bezier(.4,0,.2,1), transform .22s cubic-bezier(.4,0,.2,1);
  z-index: 10;
}
.mega-panel.open { opacity: 1; transform: translateY(0); pointer-events: all; }

.mega-panel-inner {
  max-width: 1100px; margin: 0 auto; padding: 14px;
  display: grid; grid-template-columns: 304px 1fr; gap: 14px; align-items: stretch;
  min-height: 380px;
}

/* ── Mega menu — two-pane (left = departments, right = items) ── */

/* LEFT pane: vertical department list */
.mm-depts {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex; flex-direction: column; gap: 1px;
}
.mm-dept {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 8px;
  text-decoration: none; color: var(--text);
  transition: background .14s, transform .12s;
  position: relative;
}
.mm-dept:hover { background: rgba(13,148,136,.06); }
.mm-dept.active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(15,23,42,.06), 0 0 0 1px rgba(15,23,42,.05);
}
.mm-dept-icon {
  font-size: 20px; line-height: 1;
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--border);
  border-radius: 8px;
}
.mm-dept.active .mm-dept-icon {
  background: var(--teal-lt); border-color: var(--teal-md);
}
.mm-dept-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.mm-dept-name {
  font-size: 13.5px; font-weight: 700; color: var(--text);
  letter-spacing: -0.01em; line-height: 1.2;
}
.mm-dept-desc {
  font-size: 11.5px; color: var(--muted);
  line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mm-dept-chev {
  font-size: 18px; color: var(--muted2);
  flex-shrink: 0; line-height: 1;
  opacity: 0; transform: translateX(-4px);
  transition: opacity .15s, transform .15s, color .15s;
}
.mm-dept:hover .mm-dept-chev,
.mm-dept.active .mm-dept-chev { opacity: 1; transform: translateX(0); color: var(--teal); }

.mm-depts-all {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px; padding: 11px 14px;
  border-radius: 8px;
  font-size: 12.5px; font-weight: 700; color: var(--teal);
  text-decoration: none; letter-spacing: 0.01em;
  background: #fff; border: 1px dashed var(--teal-md);
  transition: background .14s, gap .14s;
}
.mm-depts-all:hover { background: var(--teal-lt); }
.mm-depts-all svg { transition: transform .18s; }
.mm-depts-all:hover svg { transform: translateX(2px); }

/* RIGHT pane: detail */
.mm-detail {
  position: relative;
  padding: 22px 26px 22px 26px;
  background: #fff;
  border-radius: var(--radius-md);
}
.mm-detail-pane {
  display: none;
  animation: mmFadeIn .18s ease-out;
}
.mm-detail-pane.active { display: block; }
@keyframes mmFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mm-detail-hd {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding-bottom: 16px; margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.mm-detail-title {
  font-size: 20px; font-weight: 800; color: var(--text);
  letter-spacing: -0.02em; line-height: 1.1;
}
.mm-detail-sub {
  font-size: 13px; color: var(--muted);
  margin-top: 4px; line-height: 1.4;
}
.mm-detail-all {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; color: var(--teal);
  text-decoration: none;
  padding: 6px 11px; border-radius: 20px;
  background: var(--teal-lt);
  white-space: nowrap;
  transition: background .14s, gap .14s;
}
.mm-detail-all:hover { background: var(--teal-md); gap: 8px; }

.mm-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.mm-item {
  display: flex; flex-direction: column; gap: 3px;
  padding: 11px 13px; border-radius: 8px;
  text-decoration: none;
  transition: background .14s, transform .12s;
  border: 1px solid transparent;
}
.mm-item:hover {
  background: var(--surface);
  border-color: var(--border);
}
.mm-item-title {
  font-size: 13.5px; font-weight: 700; color: var(--text);
  letter-spacing: -0.01em;
}
.mm-item-desc {
  font-size: 11.5px; color: var(--muted);
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.mm-empty-cta {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px; font-weight: 700; color: var(--teal);
  text-decoration: none;
}
.mm-empty-cta:hover { text-decoration: underline; }

/* Nav backdrop */
.nav-backdrop {
  position: fixed; inset: 0; top: 64px; z-index: 250;
  background: rgba(15,23,42,0.28);
  opacity: 0; pointer-events: none;
  transition: opacity .22s;
}
.nav-backdrop.open { opacity: 1; pointer-events: all; }

/* Nav right */
.nav-right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-search-toggle {
  background: none; border: none; cursor: pointer;
  width: 38px; height: 38px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--muted); transition: all .15s;
}
.nav-search-toggle:hover { background: var(--surface2); color: var(--text); }
.nav-cart-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff; border: none;
  border-radius: var(--radius); padding: 9px 18px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background .18s;
}
.nav-cart-btn:hover { background: var(--teal); }
.nav-cart-count {
  background: var(--teal); color: #fff; border-radius: 20px;
  padding: 2px 7px; font-size: 11px; font-weight: 700;
  min-width: 20px; text-align: center;
}

/* ── Search autocomplete dropdown ── */
.sac-wrap { position: relative; flex: 1; }
.sac-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  z-index: 600; display: none;
  max-height: 400px; overflow-y: auto;
}
.sac-dropdown.open { display: block; }
.sac-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.sac-item:last-of-type { border-bottom: none; }
.sac-item:hover, .sac-item.focused { background: var(--surface); }
.sac-img {
  width: 44px; height: 44px; border-radius: var(--radius);
  background: var(--surface2); flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.sac-img img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.sac-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
.sac-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sac-all {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; font-size: 13px; font-weight: 600;
  color: var(--teal); text-decoration: none; border-top: 1px solid var(--border);
  transition: background .12s;
}
.sac-all:hover { background: var(--teal-lt); }
.sac-empty { padding: 16px 14px; font-size: 13px; color: var(--muted); text-align: center; }

/* Search bar (slides under nav) */
.nav-search-bar {
  display: none; border-top: 1px solid var(--border);
  padding: 12px 40px; background: var(--surface);
  max-width: 100%;
}
.nav-search-bar.open { display: block; }
.search-bar-inner { display: flex; gap: 10px; max-width: 640px; margin: 0 auto; }
.search-bar-input {
  flex: 1; padding: 10px 16px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-family: inherit; font-size: 14px;
  color: var(--text); background: #fff; outline: none; transition: border-color .15s;
}
.search-bar-input:focus { border-color: var(--teal); }
.search-bar-input::placeholder { color: var(--muted2); }

/* Mobile nav toggle */
.nav-mobile-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 38px; height: 38px; flex-direction: column; align-items: center;
  justify-content: center; gap: 5px; border-radius: var(--radius); margin-left: 6px;
}
.nav-mobile-toggle span {
  display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: all .2s;
}
.nav-mobile-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-mobile-toggle.open span:nth-child(2) { opacity: 0; }
.nav-mobile-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.mobile-open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 12px 0; z-index: 10; box-shadow: var(--shadow-md); }
  .nav-links.mobile-open .nav-link-a { height: 48px; padding: 0 24px; }
  .mega-panel { display: none !important; }
  .nav-backdrop { display: none !important; }
}
@media (max-width: 768px) {
  .mega-panel-inner { grid-template-columns: 1fr; min-height: 0; }
}


/* ── Shop section ── */
.shop-section { background: var(--surface); }
.shop-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px 16px; gap: 12px; flex-wrap: wrap;
  max-width: 1600px; margin: 0 auto;
}
.shop-title { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.shop-meta { display: flex; align-items: center; gap: 12px; }
.shop-count { font-size: 13px; color: var(--muted); }
.sort-select {
  padding: 7px 12px; background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-family: inherit; font-size: 12px; color: var(--text2);
  cursor: pointer; outline: none;
}

/* ── Product grid ── */
.products-wrap { max-width: 1600px; margin: 0 auto; padding: 20px 40px 72px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }


/* ── FOOTER ── */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.7); }
.footer-inner {
  max-width: 1600px; margin: 0 auto;
  padding: 56px 40px 0;
  display: grid; grid-template-columns: 2fr 1fr; gap: 48px;
}
.footer-logo { height: 38px; margin-bottom: 16px; filter: brightness(0) invert(1); opacity: 0.65; }
.footer-tagline { font-size: 13px; line-height: 1.8; color: rgba(255,255,255,0.38); max-width: 260px; }
.footer-col h4 {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.28); margin-bottom: 16px;
}
.footer-col a {
  display: block; color: rgba(255,255,255,0.52); font-size: 13px;
  margin-bottom: 9px; transition: color .15s;
}
.footer-col a:hover { color: rgba(255,255,255,0.9); }
.footer-bottom {
  max-width: 1600px; margin: 0 auto; padding: 20px 40px;
  border-top: 1px solid rgba(255,255,255,0.07); margin-top: 48px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: rgba(255,255,255,0.22); flex-wrap: wrap; gap: 8px;
}
.footer-bottom a { color: rgba(255,255,255,0.32); transition: color .15s; }
.footer-bottom a:hover { color: rgba(255,255,255,0.7); }

/* ── Product Card (base — overridden per-page as needed) ── */
.pc-img-wrap { overflow: hidden; background: var(--surface); }
.pc-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 56px; opacity: 0.12; }

/* ── Forms ── */
.f-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.f-input, .f-select, .f-textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-family: inherit; font-size: 14px;
  color: var(--text); background: #fff; outline: none; transition: border-color .15s;
}
.f-input:focus, .f-select:focus, .f-textarea:focus { border-color: var(--teal); }
.f-input::placeholder, .f-textarea::placeholder { color: var(--muted2); }
.f-textarea { resize: vertical; min-height: 130px; line-height: 1.6; }

/* ── Section ── */
.section { padding: 72px 40px; max-width: 1200px; margin: 0 auto; }
.section-sm { padding: 48px 40px; max-width: 1200px; margin: 0 auto; }
.section-title { font-size: 28px; font-weight: 800; color: var(--text); margin-bottom: 8px; letter-spacing: -0.02em; }

/* ── Coming Soon / placeholder page ── */
.coming-soon-wrap {
  max-width: 920px; margin: 0 auto; padding: 80px 32px 96px;
}
.coming-soon-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal-dk); padding: 6px 14px; border-radius: 999px;
  background: var(--teal-lt); border: 1px solid var(--teal-md);
  margin-bottom: 22px;
}
.coming-soon-eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal); box-shadow: 0 0 0 3px rgba(13,148,136,.18);
}
.coming-soon-title {
  font-size: 44px; font-weight: 800; color: var(--text);
  letter-spacing: -0.025em; line-height: 1.08; margin-bottom: 18px;
}
.coming-soon-title span { color: var(--teal); }
.coming-soon-lede {
  font-size: 17px; color: var(--text2); line-height: 1.6;
  max-width: 640px; margin-bottom: 36px;
}
.coming-soon-features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 40px;
}
.coming-soon-feat {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 18px 20px;
}
.coming-soon-feat-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin-bottom: 12px;
  background: var(--teal-lt); border: 1px solid var(--teal-md);
  border-radius: 11px; color: var(--teal);
}
.coming-soon-feat-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.coming-soon-feat-body  { font-size: 13px; color: var(--muted); line-height: 1.55; }
.coming-soon-ctas {
  display: flex; flex-wrap: wrap; gap: 12px;
  padding-top: 28px; border-top: 1px solid var(--border);
}
@media (max-width: 640px) {
  .coming-soon-wrap { padding: 56px 20px 72px; }
  .coming-soon-title { font-size: 32px; }
  .coming-soon-lede { font-size: 15px; }
}
.section-sub { font-size: 15px; color: var(--muted); margin-bottom: 40px; line-height: 1.6; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 28px; left: 50%; z-index: 9999;
  transform: translateX(-50%) translateY(16px);
  background: var(--ink); color: #fff;
  padding: 13px 24px; border-radius: var(--radius-md); font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-lg); opacity: 0; transition: all .28s; pointer-events: none; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Cart sidebar ── */
.cart-overlay { position: fixed; inset: 0; z-index: 500; background: rgba(15,23,42,0.4); opacity: 0; pointer-events: none; transition: opacity .28s; }
.cart-overlay.open { opacity: 1; pointer-events: all; }
.cart-drawer {
  position: fixed; right: 0; top: 0; bottom: 0; z-index: 501;
  width: 400px; background: #fff; box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .32s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-header {
  padding: 22px 26px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.cart-drawer-header h2 { font-size: 18px; font-weight: 700; color: var(--text); }
.cart-close-btn {
  background: var(--surface); border: none; width: 34px; height: 34px; border-radius: 50%;
  cursor: pointer; font-size: 16px; color: var(--muted); transition: background .15s;
  display: flex; align-items: center; justify-content: center;
}
.cart-close-btn:hover { background: var(--surface2); }
.cart-items-list { flex: 1; overflow-y: auto; padding: 18px 26px; }
.cart-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.cart-item:last-child { border-bottom: none; }
.cart-item-img { width: 68px; height: 84px; border-radius: 8px; background: var(--surface); flex-shrink: 0; overflow: hidden; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-body { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.cart-item-meta { font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.cart-item-price { font-size: 16px; font-weight: 700; color: var(--teal); }
.cart-item-rm { background: none; border: none; color: var(--muted2); cursor: pointer; font-size: 16px; flex-shrink: 0; padding: 2px; transition: color .15s; }
.cart-item-rm:hover { color: var(--red); }
.cart-drawer-footer { padding: 18px 26px 26px; border-top: 1px solid var(--border); background: var(--surface); }
.cart-total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cart-total-label { font-size: 15px; font-weight: 600; }
.cart-total-val { font-size: 24px; font-weight: 800; color: var(--teal); }
.cart-checkout-btn { width: 100%; margin-bottom: 8px; }
.cart-continue-btn { width: 100%; font-size: 13px; color: var(--muted); cursor: pointer; background: none; border: none; padding: 8px; font-family: inherit; transition: color .15s; }
.cart-continue-btn:hover { color: var(--text); }
.cart-empty { text-align: center; padding: 56px 20px; }
.cart-empty-icon { margin-bottom: 14px; }
.cart-empty-icon svg { width: 48px; height: 48px; color: var(--muted2); margin: 0 auto; }
.cart-empty p { font-size: 15px; color: var(--muted); margin-bottom: 20px; }
.cart-item-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--surface); }
.cart-item-ph svg { width: 26px; height: 26px; color: var(--muted2); }


/* ── States ── */
.loading-state { padding: 80px 40px; text-align: center; color: var(--muted); }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--teal); border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 18px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { padding: 72px 40px; text-align: center; }
.empty-state h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.empty-state p { color: var(--muted); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .nav-inner { padding: 0 24px; }
  .footer-inner { grid-template-columns: 2fr 1fr; padding: 48px 24px 0; gap: 28px; }
  .footer-bottom { padding: 18px 24px; }
.section { padding: 56px 24px; }
  .section-sm { padding: 40px 24px; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }
  .nav-search-bar { padding: 10px 20px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { padding: 16px 20px; }
  .cart-drawer { width: 100%; }
  .pd-modal { grid-template-columns: 1fr; }
  .pd-img { max-height: 260px; }
  .section { padding: 44px 20px; }
}

/* ============================================================
   Auth nav slot + auth pages (login / register / account)
   ============================================================ */

/* The slot starts as a fixed-width placeholder so the cart button
   doesn't shift when /api/account/me resolves. */
.nav-auth { position: relative; min-width: 78px; display: flex; align-items: center; justify-content: flex-end; }
.nav-auth[data-state="loading"]::after {
  content: ''; width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--border); border-top-color: var(--muted2);
  animation: nav-auth-spin .7s linear infinite;
}
@keyframes nav-auth-spin { to { transform: rotate(360deg); } }

.nav-signin {
  display: inline-flex; align-items: center; height: 36px;
  padding: 0 14px; font-size: 13px; font-weight: 600; color: var(--text);
  border-radius: var(--radius); transition: background .15s, color .15s;
}
.nav-signin:hover { color: var(--teal); background: var(--teal-lt); }

.nav-account-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px;
  padding: 0 12px 0 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 600; color: var(--text);
  transition: border-color .15s, background .15s;
}
.nav-account-btn:hover { border-color: var(--teal); background: var(--teal-lt); color: var(--teal); }
.nav-account-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.nav-account-btn .nav-chev { font-size: 9px; opacity: .55; transition: transform .2s; }
.nav-account-btn[aria-expanded="true"] .nav-chev { transform: rotate(180deg); }
.nav-account-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-account-menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 200px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); padding: 6px; display: none; z-index: 320;
}
.nav-account-menu.open { display: block; }
.nav-account-menu a,
.nav-account-menu button {
  display: block; width: 100%; text-align: left; padding: 9px 12px;
  font-family: inherit; font-size: 13.5px; color: var(--text);
  background: none; border: none; border-radius: 6px; cursor: pointer;
}
.nav-account-menu a:hover,
.nav-account-menu button:hover { background: var(--surface2); color: var(--teal); }

/* ── Auth pages: centered card layout ── */
.auth-wrap {
  min-height: calc(100vh - 64px); display: grid;
  grid-template-columns: 1fr; place-items: center;
  padding: 56px 24px; background: var(--surface);
}
.auth-card {
  width: 100%; max-width: 440px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 36px 36px 32px; box-shadow: var(--shadow);
}
.auth-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 10px;
}
.auth-card h1 {
  font-size: 26px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--ink); margin-bottom: 6px; text-wrap: balance;
}
.auth-sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
  font-size: 12px; font-weight: 600; color: var(--text2);
  letter-spacing: .01em;
}
.auth-field input {
  font-family: inherit; font-size: 14.5px; color: var(--text);
  padding: 11px 13px; border: 1px solid var(--border2); border-radius: var(--radius);
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
.auth-field input::placeholder { color: var(--muted2); }
.auth-field input:hover { border-color: var(--text2); }
.auth-field input:focus-visible {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,148,136,.18);
}
.auth-field input[aria-invalid="true"] { border-color: var(--red); }
.auth-field input[aria-invalid="true"]:focus-visible {
  box-shadow: 0 0 0 3px rgba(239,68,68,.18);
}
.auth-help { font-size: 12px; color: var(--muted); }

.auth-error {
  background: #fef2f2; color: #991b1b; border: 1px solid #fecaca;
  padding: 10px 12px; border-radius: var(--radius); font-size: 13px;
  display: none;
}
.auth-error.visible { display: block; }

.auth-submit {
  margin-top: 6px; width: 100%; height: 46px; font-size: 14.5px;
  position: relative;
}
.auth-submit[disabled] { opacity: .6; cursor: not-allowed; }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0 18px; font-size: 12px; color: var(--muted);
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.auth-alt { text-align: center; font-size: 13.5px; color: var(--muted); }
.auth-alt a { color: var(--teal); font-weight: 600; }
.auth-alt a:hover { color: var(--teal-dk); }

/* ── /account page ── */
.acct-wrap { max-width: 920px; margin: 0 auto; padding: 48px 24px 80px; }
.acct-hero {
  margin-bottom: 32px;
  padding-bottom: 22px; border-bottom: 1px solid var(--border);
}
.acct-hero h1 {
  font-size: clamp(28px, 4vw, 38px); font-weight: 800;
  letter-spacing: -0.02em; color: var(--ink); margin-bottom: 4px;
}
.acct-hero p { color: var(--muted); font-size: 14.5px; }

.acct-grid { display: grid; gap: 32px; }
@media (min-width: 900px) {
  .acct-grid { grid-template-columns: 360px 1fr; }
}

.acct-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 24px;
}
.acct-card h2 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .13em; color: var(--teal); margin-bottom: 14px;
}
.acct-card h3 {
  font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 6px;
}

.acct-orders { display: flex; flex-direction: column; gap: 10px; }
.acct-order-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 18px;
  align-items: center; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); transition: border-color .15s, background .15s;
}
.acct-order-row:hover { border-color: var(--teal); background: var(--teal-lt); }
.acct-order-id { font-weight: 700; color: var(--ink); font-size: 13.5px; letter-spacing: -.005em; }
.acct-order-meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.acct-order-total { font-weight: 700; color: var(--text); }
.acct-pill {
  display: inline-flex; align-items: center; padding: 3px 9px;
  border-radius: 999px; font-size: 11px; font-weight: 600;
  letter-spacing: .02em;
}
.acct-pill[data-status="paid"]      { background: #dcfce7; color: #166534; }
.acct-pill[data-status="unpaid"]    { background: #fef9c3; color: #854d0e; }
.acct-pill[data-status="confirmed"] { background: var(--teal-md); color: var(--teal-dk); }

.acct-empty {
  padding: 36px 24px; text-align: center;
  background: var(--surface); border: 1px dashed var(--border2);
  border-radius: var(--radius-md); color: var(--muted);
}
.acct-empty a { color: var(--teal); font-weight: 600; }

/* ============================================================
   Checkout page
   ============================================================ */

.co-wrap {
  max-width: 1180px; margin: 0 auto;
  padding: 32px 24px 120px;
}

.co-header {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: 28px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.co-header h1 {
  font-size: clamp(28px, 4vw, 36px); font-weight: 800;
  letter-spacing: -0.02em; color: var(--ink);
}
.co-header-count { color: var(--muted); font-size: 14px; }

.co-grid {
  display: grid; gap: 36px;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) {
  .co-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; }
}

/* ── Guest sign-in banner ── */
.co-signin-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 16px; margin-bottom: 18px;
  background: var(--teal-lt); border: 1px solid var(--teal-md);
  border-radius: var(--radius-md);
  font-size: 13.5px; color: var(--text);
}
.co-signin-banner a { color: var(--teal-dk); font-weight: 700; }
.co-signin-banner a:hover { text-decoration: underline; }

/* ── Form sections ── */
.co-section { margin-bottom: 28px; }
.co-section h2 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .13em; color: var(--teal);
  margin-bottom: 12px;
}

.co-row { display: grid; gap: 12px; }
.co-row.cols-2 { grid-template-columns: 1fr 1fr; }
.co-row.cols-3 { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 540px) {
  .co-row.cols-2, .co-row.cols-3 { grid-template-columns: 1fr; }
}

.co-field { display: flex; flex-direction: column; gap: 6px; }
.co-field label {
  font-size: 12px; font-weight: 600; color: var(--text2); letter-spacing: .01em;
}
.co-field-help { font-size: 11.5px; color: var(--muted); }

.co-input, .co-select, .co-textarea {
  font-family: inherit; font-size: 14.5px; color: var(--text);
  padding: 11px 13px; background: #fff;
  border: 1px solid var(--border2); border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s; width: 100%;
}
.co-input::placeholder, .co-textarea::placeholder { color: var(--muted2); }
.co-input:hover, .co-select:hover, .co-textarea:hover { border-color: var(--text2); }
.co-input:focus-visible, .co-select:focus-visible, .co-textarea:focus-visible {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,148,136,.18);
}
.co-input[aria-invalid="true"], .co-select[aria-invalid="true"] { border-color: var(--red); }
.co-input[aria-invalid="true"]:focus-visible,
.co-select[aria-invalid="true"]:focus-visible {
  box-shadow: 0 0 0 3px rgba(239,68,68,.18);
}
.co-textarea { min-height: 88px; resize: vertical; }

.co-error-inline {
  font-size: 12.5px; color: var(--red); display: none;
}
.co-error-inline.visible { display: block; }

/* ── Payment-method tabs (segmented control) ── */
.co-pay-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-bottom: 16px;
}
.co-pay-tab {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 8px; background: #fff;
  border: 1.5px solid var(--border2); border-radius: var(--radius);
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--text2);
  cursor: pointer; transition: all .18s; text-align: center;
}
.co-pay-tab:hover { border-color: var(--teal); color: var(--teal); }
.co-pay-tab.active {
  background: var(--teal); border-color: var(--teal); color: #fff;
  box-shadow: 0 2px 10px rgba(13,148,136,.22);
}
.co-pay-tab[disabled] { opacity: .5; cursor: not-allowed; }
.co-pay-tab[disabled]:hover { border-color: var(--border2); color: var(--text2); }
.co-pay-tab-icon {
  width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center;
}
@media (max-width: 540px) {
  .co-pay-tabs { grid-template-columns: 1fr; }
}

/* ── Payment-method panels ── */
.co-pay-panel { display: none; }
.co-pay-panel.active { display: block; }

.co-pay-help {
  padding: 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13.5px; color: var(--text2); line-height: 1.55;
}
.co-pay-help strong { color: var(--text); }

/* Square card iframe wrapper */
.co-card-wrap {
  padding: 14px; background: #fff;
  border: 1px solid var(--border2); border-radius: var(--radius);
  min-height: 90px;
}
.co-card-wrap[data-loading="true"] { display: flex; align-items: center; justify-content: center; color: var(--muted); }

/* ── Summary column ── */
.co-summary {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  align-self: start;
}
@media (min-width: 960px) {
  .co-summary { position: sticky; top: calc(64px + 24px); }
}
.co-summary h2 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .13em; color: var(--teal); margin-bottom: 14px;
}

.co-lines { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.co-line {
  display: grid; grid-template-columns: 56px 1fr auto;
  gap: 12px; align-items: center;
}
.co-line-img {
  width: 56px; height: 56px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--border); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.co-line-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.co-line-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
.co-line-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.co-line-total { font-size: 13.5px; font-weight: 700; color: var(--text); }

.co-totals { border-top: 1px solid var(--border); padding-top: 14px; }
.co-total-row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px; font-size: 13.5px;
}
.co-total-row .label { color: var(--muted); }
.co-total-row .val { color: var(--text); font-weight: 600; }
.co-total-row.grand {
  margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--border);
  font-size: 18px;
}
.co-total-row.grand .label { color: var(--ink); font-weight: 700; }
.co-total-row.grand .val { color: var(--ink); font-weight: 800; }
.co-total-row .ship-band { color: var(--teal); font-weight: 700; }

.co-tax-note {
  font-size: 11.5px; color: var(--muted); margin-top: 14px; line-height: 1.5;
}

.co-place {
  width: 100%; margin-top: 16px; height: 50px;
  font-size: 15px; font-weight: 700; gap: 10px;
}
.co-place[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }
.co-place .co-spin {
  display: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5); border-top-color: #fff;
  animation: nav-auth-spin .6s linear infinite;
}
.co-place[data-busy="true"] .co-spin { display: inline-block; }

/* Mobile sticky place-order bar */
@media (max-width: 959px) {
  .co-mobile-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.97);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex; align-items: center; gap: 12px;
  }
  .co-mobile-bar .co-mobile-total { font-weight: 800; color: var(--ink); }
  .co-mobile-bar .co-mobile-total small { color: var(--muted); font-weight: 600; font-size: 11px; display: block; }
  .co-mobile-bar .co-place { flex: 1; margin-top: 0; height: 46px; }
}
@media (min-width: 960px) { .co-mobile-bar { display: none; } }

/* Top-level alert (whole-form errors) */
.co-alert {
  padding: 12px 14px; margin-bottom: 16px;
  background: #fef2f2; color: #991b1b; border: 1px solid #fecaca;
  border-radius: var(--radius); font-size: 13.5px; display: none;
}
.co-alert.visible { display: block; }
.co-alert strong { color: #7f1d1d; }

/* Empty-cart redirect spinner */
.co-loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 50vh; color: var(--muted); font-size: 14px; gap: 12px;
}
.co-loading::before {
  content: ''; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--teal);
  animation: nav-auth-spin .7s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .co-place .co-spin,
  .co-loading::before,
  .nav-auth[data-state="loading"]::after { animation: none !important; }
}

/* ── Success page ── */
.co-success-wrap {
  max-width: 640px; margin: 0 auto; padding: 64px 24px 96px;
}
.co-success-head { text-align: center; margin-bottom: 36px; }

/* Check mark — 320ms scale-in with subtle scribe */
.co-mark {
  width: 80px; height: 80px; margin: 0 auto 22px;
  border-radius: 50%; background: var(--teal);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 32px rgba(13,148,136,.30);
  transform: scale(0.4); opacity: 0;
  animation: co-mark-in .32s cubic-bezier(.16,1.36,.6,1) .05s forwards;
}
.co-mark svg { width: 36px; height: 36px; color: #fff; }
.co-mark svg path {
  stroke-dasharray: 36; stroke-dashoffset: 36;
  animation: co-mark-stroke .35s cubic-bezier(.65,0,.45,1) .28s forwards;
}
@keyframes co-mark-in     { to { transform: scale(1); opacity: 1; } }
@keyframes co-mark-stroke { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .co-mark { animation: none; transform: scale(1); opacity: 1; }
  .co-mark svg path { animation: none; stroke-dashoffset: 0; }
}

.co-success-h1 {
  font-size: clamp(26px, 4vw, 34px); font-weight: 800;
  letter-spacing: -0.02em; color: var(--ink); margin-bottom: 6px;
}
.co-success-id {
  font-family: 'SF Mono', ui-monospace, Menlo, monospace;
  font-size: 13.5px; color: var(--muted); letter-spacing: 0;
}

/* Method callout */
.co-callout {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 22px;
  margin-bottom: 28px;
}
.co-callout h2 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .13em; color: var(--teal); margin-bottom: 12px;
}
.co-callout p { color: var(--text2); font-size: 14px; line-height: 1.6; margin-bottom: 12px; }
.co-callout p:last-child { margin-bottom: 0; }

.co-detail-grid {
  display: grid; grid-template-columns: max-content 1fr;
  gap: 8px 18px; align-items: baseline; margin: 14px 0 16px;
  font-size: 14px;
}
.co-detail-grid dt { color: var(--muted); font-weight: 500; }
.co-detail-grid dd { color: var(--text); font-weight: 600; }
.co-detail-grid dd.mono {
  font-family: 'SF Mono', ui-monospace, Menlo, monospace; letter-spacing: 0;
}

.co-copy-row {
  display: flex; align-items: stretch; gap: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  margin-bottom: 10px;
}
.co-copy-val {
  flex: 1; padding: 10px 14px;
  font-family: 'SF Mono', ui-monospace, Menlo, monospace;
  font-size: 13px; color: var(--text); user-select: all;
  display: flex; align-items: center; min-width: 0;
  word-break: break-all;
}
.co-copy-btn {
  border: none; border-left: 1px solid var(--border);
  background: #fff; padding: 0 14px; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 600; color: var(--teal);
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s, color .15s;
}
.co-copy-btn:hover { background: var(--teal-lt); }
.co-copy-btn[data-copied="true"] { color: var(--green); }
.co-copy-btn svg { width: 14px; height: 14px; }

/* Summary on success */
.co-success-summary {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 22px; margin-bottom: 28px;
}
.co-success-summary h2 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .13em; color: var(--teal); margin-bottom: 14px;
}

.co-success-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.co-success-actions .btn { min-width: 160px; }
