/* ==========================================================================
   El-POS Store — Modern UI v2
   Design language: bright, airy, soft cards, expressive coral accent.
   Brand stays Navy (#1E3A5F) for primary text/headings.
   ========================================================================== */

:root {
  /* Brand */
  --navy:          #1E3A5F;
  --navy-light:    #2D5A87;
  --navy-dark:     #12253E;

  /* Accents */
  --accent:        #FF6B4A;   /* coral CTA */
  --accent-dark:   #E85A36;
  --accent-soft:   #FFEFE9;
  --gold:          #F5A623;
  --gold-soft:     #FFF6E1;

  /* Neutral palette */
  --bg:            #F4F5F8;
  --bg-elev:       #ECEEF3;
  --surface:       #FFFFFF;
  --surface-2:     #F9FAFB;
  --border:        #EAECF0;
  --border-strong: #D6DAE0;

  /* Text */
  --text:          #0F172A;
  --text-2:        #334155;
  --text-muted:    #64748B;

  /* Status */
  --success:       #16A34A;
  --success-soft:  #DCFCE7;
  --danger:        #DC2626;
  --danger-soft:   #FEE2E2;
  --info:          #2563EB;

  /* Shape */
  --radius-sm:     10px;
  --radius:        16px;
  --radius-lg:     22px;
  --radius-xl:     28px;
  --pill:          999px;

  /* Elevation */
  --shadow-xs:     0 1px 2px rgba(15, 23, 42, .04);
  --shadow-sm:     0 2px 8px rgba(15, 23, 42, .05);
  --shadow:        0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg:     0 18px 48px rgba(15, 23, 42, .12);
  --ring:          0 0 0 4px rgba(255, 107, 74, .18);

  /* Motion */
  --ease:          cubic-bezier(.4, 0, .2, 1);
  --ease-bounce:   cubic-bezier(.34, 1.56, .64, 1);
  --t-fast:        .15s var(--ease);
  --t:             .25s var(--ease);

  /* Layout */
  --rail-w:        76px;
  --topbar-h:      72px;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent); }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
:focus:not(:focus-visible) { outline: none; }

/* Skip link */
.skip-link {
  position: absolute; top: -100%; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--navy); color: #fff;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm); font-weight: 600;
  transition: top var(--t);
}
.skip-link:focus { top: 0; color: #fff; }

/* ── Typography ────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5 { color: var(--text); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
h3 { font-size: 1.15rem; }
.text-muted { color: var(--text-muted) !important; }
.eyebrow { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }

/* ── App shell (rail + topbar + content) ───────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
  min-height: 100vh;
}
.app-shell.has-order-rail {
  /* Fluid right rail: shrinks gracefully between 280px–360px */
  grid-template-columns: var(--rail-w) minmax(0, 1fr) clamp(280px, 24vw, 360px);
}
@media (max-width: 1100px) {
  /* Hide the persistent rail on tablets; the floating cart button takes over */
  .app-shell.has-order-rail { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .order-rail { display: none !important; }
}
@media (max-width: 720px) {
  .app-shell, .app-shell.has-order-rail { grid-template-columns: 1fr; }
}

/* Rail */
.app-rail {
  position: sticky; top: 0; align-self: start;
  height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  gap: .35rem;
  padding: 1rem .5rem;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 50;
}
@media (max-width: 720px) {
  .app-rail {
    position: sticky; top: 0; height: auto;
    flex-direction: row; width: 100%; justify-content: flex-start; overflow-x: auto;
    padding: .5rem .75rem;
  }
}
.rail-brand {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff; border-radius: 14px;
  font-weight: 800; font-size: 1.15rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: .75rem;
}
.rail-link {
  position: relative;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 1.15rem;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.rail-link:hover { background: var(--bg-elev); color: var(--navy); }
.rail-link.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.rail-link.active::before {
  content: ""; position: absolute; left: -8px; top: 10px; bottom: 10px;
  width: 4px; border-radius: 4px; background: var(--accent);
}
.rail-spacer { flex: 1; }
@media (max-width: 720px) {
  .rail-spacer { display: none; }
  .rail-brand { margin-bottom: 0; margin-right: .5rem; }
}

/* Tooltip on rail */
.rail-link[data-tip]::after {
  content: attr(data-tip);
  position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  background: var(--navy); color: #fff; font-size: .78rem; font-weight: 600;
  padding: .35rem .6rem; border-radius: 8px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity var(--t-fast);
  z-index: 100;
}
.rail-link[data-tip]:hover::after { opacity: 1; }
@media (max-width: 720px) { .rail-link[data-tip]::after { display: none; } }

/* Main column */
.app-main {
  display: flex; flex-direction: column;
  min-width: 0;
}

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(244, 245, 248, .85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast);
}
.topbar.scrolled { border-color: var(--border); }
.topbar-inner {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.5rem;
  min-height: var(--topbar-h);
}
@media (max-width: 540px) {
  .topbar-inner { padding: .75rem 1rem; gap: .5rem; }
}

.topbar-store {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  padding-right: .15rem;
}
.topbar-store:hover { color: var(--text); }
.topbar-store-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}
.topbar-store-copy strong {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .95rem;
  font-weight: 850;
}
.topbar-store-copy small {
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 650;
}

@media (max-width: 860px) {
  .topbar-store-copy small { display: none; }
  .topbar-store-copy strong { max-width: 150px; font-size: .86rem; }
}

@media (max-width: 620px) {
  .topbar-store { display: none; }
}

.search-pill {
  flex: 1; max-width: 480px;
  display: flex; align-items: center; gap: .6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  padding: .6rem 1rem;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-fast), border-color var(--t-fast);
}
.search-pill:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.search-pill input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-size: .95rem; color: var(--text);
}
.search-pill input::placeholder { color: var(--text-muted); }
.search-pill button {
  border: none; background: transparent; cursor: pointer;
  color: var(--text-muted); font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.search-pill button:hover { color: var(--accent); }

.topbar-actions { display: flex; align-items: center; gap: .6rem; margin-left: auto; }

.user-pill {
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .35rem .85rem .35rem .35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  text-align: right;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.user-pill:hover { border-color: var(--accent); transform: translateY(-1px); color: var(--text); }
.user-pill .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: #fff; font-weight: 700; font-size: .85rem;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-pill .meta { display: flex; flex-direction: column; line-height: 1.1; }
.user-pill .meta .name { font-weight: 700; font-size: .85rem; color: var(--text); }
.user-pill .meta .sub  { font-size: .72rem; color: var(--text-muted); }
@media (max-width: 540px) { .user-pill .meta { display: none; } .user-pill { padding: .25rem; } }

.icon-btn {
  position: relative;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--navy); font-size: 1.05rem;
  transition: border-color var(--t-fast), transform var(--t-fast), background var(--t-fast);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.icon-btn.cart-btn { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; border-color: transparent; }
.icon-btn.cart-btn:hover { color: #fff; box-shadow: var(--shadow); }
.cart-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px;
  padding: 0 5px; border-radius: var(--pill);
  background: var(--navy); color: #fff;
  font-size: .68rem; font-weight: 800; line-height: 20px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
  transition: transform var(--t-fast);
}
.cart-count.bounce { animation: cartBounce .45s var(--ease-bounce); }
/* Hide badge cleanly when the cart is empty (set data-count="0") */
.cart-count[data-count="0"] { display: none; }
@keyframes cartBounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.45); }
  70%  { transform: scale(.85); }
  100% { transform: scale(1); }
}

/* Badge for the rail's cart link (left/top rail) */
.rail-link { position: relative; }
.rail-cart-count {
  position: absolute; top: 2px; right: 2px;
  min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: var(--pill);
  background: var(--accent); color: #fff;
  font-size: .65rem; font-weight: 800; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
  pointer-events: none;
}

/* ── Mobile topbar: declutter so cart is always visible ────────────────── */
@media (max-width: 640px) {
  /* Auth links are still reachable from the rail (login icon at the bottom) */
  .topbar-actions .btn-ghost,
  .topbar-actions .btn-navy { display: none; }
  /* The rail cart now carries the badge; hide the duplicate topbar cart button */
  .topbar-actions .icon-btn.cart-btn { display: none; }
  /* Free up some width for the search */
  .topbar-inner { padding: .65rem .85rem; gap: .5rem; }
  .search-pill { padding: .55rem .85rem; }
}

/* Content area */
.app-content {
  padding: 1.25rem 1.5rem 3rem;
  max-width: 1440px;
  width: 100%;
}
@media (max-width: 540px) { .app-content { padding: .75rem 1rem 2.5rem; } }

.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 1.5rem; }
@media (max-width: 540px) { .container { padding: 0 1rem; } }
.section { padding: 1.5rem 0 2.5rem; }

/* ── Happy Hour banner ─────────────────────────────────────────────────── */
.hh-banner {
  display: flex; align-items: center; justify-content: center; gap: .75rem;
  width: 100%;
  border: 0;
  background: linear-gradient(90deg, var(--gold-soft), #FFE5B0);
  color: #7A5400;
  font-weight: 700; font-size: .9rem;
  padding: .55rem 1rem;
  border-bottom: 1px solid #F0D790;
  cursor: pointer;
}
.hh-banner:hover { filter: saturate(1.05); }
.hh-banner:focus-visible { outline: 3px solid rgba(122, 84, 0, .35); outline-offset: -3px; }
.hh-banner .hh-icon { display: inline-block; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.18); }
}
.hh-banner-hidden { display: none; }

.hh-modal {
  inset: 0;
  margin: auto;
  width: min(760px, calc(100vw - 2rem));
  max-height: min(760px, calc(100vh - 2rem));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: var(--shadow-lg);
  color: var(--text);
}
.hh-modal::backdrop { background: rgba(15, 23, 42, .48); }
.hh-modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.hh-modal-head h2 { margin: .15rem 0 0; font-size: 1.25rem; }
.hh-modal-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}
.hh-modal-close:hover { border-color: var(--accent); color: var(--accent-dark); }
.hh-modal-content { padding: 1rem; overflow: auto; }
.hh-modal-loading, .hh-modal-empty { color: var(--text-muted); font-weight: 650; padding: 1rem; text-align: center; }
.hh-price-group + .hh-price-group { margin-top: 1rem; }
.hh-price-group-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .7rem;
}
.hh-price-group-title { font-weight: 850; font-size: 1rem; }
.hh-price-group-meta { color: var(--text-muted); font-size: .82rem; font-weight: 650; margin-top: .2rem; }
.hh-store-only-pill {
  display: inline-flex;
  align-items: center;
  padding: .25rem .55rem;
  border-radius: var(--pill);
  background: var(--gold-soft);
  color: #7A5400;
  font-size: .75rem;
  font-weight: 850;
  white-space: nowrap;
}
.hh-price-list {
  display: grid;
  gap: .55rem;
}
.hh-price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  padding: .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.hh-price-name { font-weight: 800; line-height: 1.2; }
.hh-price-dept { color: var(--text-muted); font-size: .78rem; font-weight: 650; margin-top: .18rem; }
.hh-price-values { display: flex; align-items: baseline; gap: .45rem; white-space: nowrap; }
.hh-price-original { color: var(--text-muted); text-decoration: line-through; font-size: .82rem; }
.hh-price-current { color: var(--accent-dark); font-size: 1.02rem; font-weight: 900; }
.hh-price-savings { color: var(--success); font-size: .78rem; font-weight: 850; }
@media (max-width: 540px) {
  .hh-price-row { grid-template-columns: 1fr; }
  .hh-price-values { justify-content: space-between; }
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 600; font-size: .92rem; line-height: 1;
  cursor: pointer; text-decoration: none;
  transition: transform var(--t-fast), background var(--t-fast),
              box-shadow var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff; box-shadow: 0 6px 18px rgba(255, 107, 74, .35);
}
.btn-primary:hover { color: #fff; box-shadow: 0 10px 28px rgba(255, 107, 74, .45); }
.btn-primary:focus-visible { outline-color: var(--accent-dark); }

.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); color: #fff; }

.btn-ghost {
  background: var(--surface); color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-outline {
  background: transparent; color: #fff;
  border-color: rgba(255, 255, 255, .55);
}
.btn-outline:hover { background: rgba(255, 255, 255, .15); color: #fff; }

.btn-outline-navy {
  background: transparent; color: var(--navy);
  border-color: var(--navy);
}
.btn-outline-navy:hover { background: var(--navy); color: #fff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #B91C1C; color: #fff; }

.btn-sm { padding: .5rem .9rem; font-size: .85rem; border-radius: 12px; }
.btn-lg { padding: .9rem 1.5rem; font-size: 1rem; border-radius: 16px; }
.btn-full { width: 100%; }

/* ── Hero (home) ───────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 5vw, 3.5rem);
  background:
    radial-gradient(1200px 400px at 110% -20%, rgba(255, 107, 74, .35), transparent 60%),
    radial-gradient(800px 400px at -10% 120%, rgba(74, 144, 164, .35), transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  margin: 1rem 0 2.5rem;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'><circle cx='1' cy='1' r='1' fill='%23ffffff10'/></svg>");
  opacity: .6; pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero .eyebrow { color: rgba(255, 255, 255, .8); }
.hero h1 { color: #fff; margin: .5rem 0 1rem; font-size: clamp(2rem, 4.5vw, 3rem); }
.hero p  { color: rgba(255, 255, 255, .85); font-size: 1.1rem; max-width: 560px; margin-bottom: 1.5rem; }
.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ── Section header ─────────────────────────────────────────────────── */
.section-header {
  display: flex; align-items: end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin: .25rem 0 1.25rem;
}
.section-header h2 { margin: 0; }
.section-header .sub { color: var(--text-muted); font-size: .9rem; margin-top: .25rem; }

/* ── Category pills (horizontal scroller, hidden scrollbar) ───────────── */
.cat-bar {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: 1.5rem;
}
.cat-pills-wrap {
  position: relative;
  flex: 1; min-width: 0;
  overflow: hidden;
}
.cat-pills {
  display: flex; gap: .75rem;
  overflow-x: auto;
  /* Breathing room so hover lift, focus ring, and shadow aren't clipped
     by the scroll container on the top/bottom edges. */
  padding: 6px 2px 10px;
  /* Hide scrollbar across engines — keep wheel/touch/drag scroll */
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* old Edge / IE */
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.cat-pills::-webkit-scrollbar { display: none; height: 0; width: 0; } /* Chrome/Safari */
.cat-pills > * { scroll-snap-align: start; }

/* Prev/Next arrow buttons (flex siblings of cat-pills-wrap) */
.cat-nav {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(15, 23, 42, .2);
  transition: background var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), opacity var(--t-fast);
}
.cat-nav:hover {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.cat-nav:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.cat-nav[hidden] { display: none; }

/* Soft fades hint there's more content beyond either edge. */
.cat-pills-wrap::before,
.cat-pills-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 36px;
  pointer-events: none; z-index: 3;
  opacity: 0; transition: opacity var(--t-fast);
}
.cat-pills-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--bg, #f4f5f8), transparent);
}
.cat-pills-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--bg, #f4f5f8), transparent);
}
.cat-bar:has(.cat-nav-prev:not([hidden])) .cat-pills-wrap::before { opacity: 1; }
.cat-bar:has(.cat-nav-next:not([hidden])) .cat-pills-wrap::after  { opacity: 1; }

@media (max-width: 540px) {
  .cat-nav { width: 34px; height: 34px; }
}

.cat-pill {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .35rem;
  min-width: 110px;
  padding: .9rem 1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-align: center;
  transition: transform var(--t-fast), border-color var(--t-fast),
              box-shadow var(--t-fast), background var(--t-fast);
}
.cat-pill:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--text); box-shadow: var(--shadow-sm); }
.cat-pill .cat-icon {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--bg-elev);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  transition: background var(--t-fast), color var(--t-fast);
}
.cat-pill .cat-name { font-weight: 700; font-size: .88rem; line-height: 1.1; }
.cat-pill .cat-count { font-size: .72rem; color: var(--text-muted); font-weight: 500; }
.cat-pill.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
  box-shadow: 0 6px 18px rgba(255, 107, 74, .18);
}
.cat-pill.active .cat-icon { background: var(--accent); color: #fff; }
.cat-pill.active .cat-count { color: var(--accent-dark); }

/* Friendly compact category chip (preferred). One-line, emoji + name. */
.cat-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem .95rem .55rem .65rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  color: var(--text-2);
  font-weight: 600; font-size: .92rem; line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: transform var(--t-fast), border-color var(--t-fast),
              color var(--t-fast), background var(--t-fast),
              box-shadow var(--t-fast);
}
.cat-chip:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -10px rgba(255, 107, 74, .55);
}
.cat-chip-icon {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-elev);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: background var(--t-fast), color var(--t-fast);
}
.cat-chip-name { display: inline-block; }
.cat-chip.active,
.cat-chip.is-selected,
.cat-chip[aria-current="page"] {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px -10px rgba(255, 107, 74, .65);
}
.cat-chip.active:hover,
.cat-chip.is-selected:hover,
.cat-chip[aria-current="page"]:hover {
  color: #fff;
}
.cat-chip.active .cat-chip-icon,
.cat-chip.is-selected .cat-chip-icon,
.cat-chip[aria-current="page"] .cat-chip-icon { background: rgba(255, 255, 255, .22); }

@media (max-width: 540px) {
  .cat-chip { padding: .5rem .85rem .5rem .55rem; font-size: .88rem; }
  .cat-chip-icon { width: 24px; height: 24px; font-size: .9rem; }
}

/* ── Product grid ──────────────────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.shop-breadcrumb {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  margin: -.35rem 0 1rem;
  color: var(--text-muted);
  font-size: .84rem;
  font-weight: 700;
}
.shop-breadcrumb a {
  color: var(--navy);
  text-decoration: none;
}
.shop-breadcrumb a:hover { color: var(--accent); }
.shop-breadcrumb span[aria-current="page"] { color: var(--text); }

.shop-back-row {
  display: flex;
  align-items: center;
  margin: -.25rem 0 .65rem;
}
.shop-back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 36px;
  padding: .45rem .75rem;
  border-radius: var(--pill);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--navy);
  font-size: .86rem;
  font-weight: 800;
  text-decoration: none;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.shop-back-link:hover {
  color: var(--navy);
  background: #fff;
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.shop-back-link:focus-visible {
  outline: 3px solid rgba(74, 144, 217, .55);
  outline-offset: 2px;
}

.catalog-nav-card {
  min-height: 220px;
  background: linear-gradient(135deg, var(--navy), #275A86);
  color: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 16px 34px rgba(30, 58, 95, .22);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: 1rem;
  text-align: center;
  text-decoration: none;
  transition: transform var(--t), box-shadow var(--t), filter var(--t);
}
.catalog-nav-card:hover {
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(30, 58, 95, .3);
  filter: saturate(1.04);
}
.catalog-nav-card:focus-visible {
  outline: 3px solid rgba(255, 255, 255, .82);
  outline-offset: 3px;
}
.catalog-nav-card-sub {
  background: linear-gradient(135deg, #22577A, #38A3A5);
}
.catalog-nav-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
}
.catalog-nav-name {
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 1.02rem;
  font-weight: 850;
  line-height: 1.16;
}
.catalog-nav-count {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  min-height: 26px;
  padding: .25rem .58rem;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, .15);
  color: rgba(255, 255, 255, .95);
  font-size: .78rem;
  font-weight: 850;
}

.product-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border);
  box-shadow: var(--shadow-lg);
}

.product-card-media {
  position: relative;
  aspect-ratio: 1.2;
  background: linear-gradient(135deg, #F1F3F8, #E6E9F0);
  overflow: hidden;
}
.product-card-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.product-card:hover .product-card-img { transform: scale(1.06); }
.product-card-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--text-muted);
}

.ribbon {
  position: absolute; top: 12px; left: 12px;
  background: var(--accent); color: #fff;
  font-size: .72rem; font-weight: 800; letter-spacing: .02em;
  padding: .3rem .6rem; border-radius: 8px;
  box-shadow: 0 4px 12px rgba(255, 107, 74, .35);
}
.ribbon.muted { background: var(--navy); }
.ribbon.ribbon-customize {
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  box-shadow: 0 4px 12px rgba(99, 102, 241, .35);
  letter-spacing: .02em;
}
.product-card.is-customizable .product-card-actions .btn-primary {
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  box-shadow: 0 6px 18px rgba(99, 102, 241, .35);
}
.product-card.is-customizable .product-card-actions .btn-primary:hover {
  box-shadow: 0 10px 28px rgba(99, 102, 241, .45);
}

.product-card-body {
  padding: .6rem .75rem .5rem;
  display: flex; flex-direction: column; gap: .2rem;
  flex: 1;
}
.product-card-dept { font-size: .65rem; color: var(--text-muted); font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.product-card-name {
  font-size: .875rem; font-weight: 700; line-height: 1.2;
  margin: .1rem 0 .25rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-name a { color: inherit; }
.product-card-name a:hover { color: var(--accent); }
.product-card-meta { font-size: .7rem; color: var(--text-muted); }
.product-price-row { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; margin-top: auto; }
.price-current  { font-size: 1rem; font-weight: 800; color: var(--text); letter-spacing: -.01em; }
.price-current .unit { font-size: .65rem; font-weight: 600; color: var(--text-muted); margin-left: .15rem; }
.price-original { font-size: .85rem; color: var(--text-muted); text-decoration: line-through; }

.badge-hh {
  display: inline-flex; align-items: center; gap: .15rem;
  background: var(--gold-soft); color: #7A5400;
  font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: var(--pill);
  border: 1px solid #F0D790;
}
.badge-out-of-stock {
  background: var(--danger-soft); color: var(--danger);
  font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: var(--pill);
}

.product-card-actions {
  padding: 0 1rem 1rem;
}

/* ── Shop layout ───────────────────────────────────────────────────────── */
.shop-layout { display: block; }   /* sidebar collapsed into pills now */

/* In-stock toggle (segmented switch) */
.shop-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.toggle-switch {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .85rem; color: var(--text-2); font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.toggle-switch input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-switch .track {
  width: 38px; height: 22px; border-radius: var(--pill);
  background: var(--bg-elev); position: relative;
  transition: background var(--t-fast);
}
.toggle-switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-fast);
}
.toggle-switch input:checked + .track { background: var(--accent); }
.toggle-switch input:checked + .track::after { transform: translateX(16px); }

/* ── Cart page ─────────────────────────────────────────────────────────── */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 1.5rem; align-items: start; }
@media (max-width: 960px) { .cart-layout { grid-template-columns: 1fr; } }

.cart-item {
  display: grid; grid-template-columns: 84px 1fr auto;
  gap: 1rem; align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  margin-bottom: .75rem;
  transition: box-shadow var(--t-fast), border-color var(--t-fast);
}
.cart-item:hover { box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.cart-item-img {
  width: 84px; height: 84px; object-fit: cover; border-radius: 14px;
  background: var(--bg-elev);
}
.cart-item-placeholder {
  width: 84px; height: 84px; border-radius: 14px;
  background: var(--bg-elev);
  display: flex; align-items: center; justify-content: center; color: var(--text-muted);
  font-size: 1.6rem;
}
.cart-item-actions { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; }

.qty-stepper {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  padding: 4px;
}
.qty-stepper button {
  width: 28px; height: 28px; border-radius: 50%;
  border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700; line-height: 1;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.qty-stepper button[data-qty-change="-1"],
.qty-stepper #qty-minus {
  background: var(--danger-soft); color: var(--danger);
}
.qty-stepper button[data-qty-change="-1"]:hover,
.qty-stepper #qty-minus:hover { background: var(--danger); color: #fff; transform: scale(1.05); }
.qty-stepper button[data-qty-change="1"],
.qty-stepper #qty-plus {
  background: var(--success-soft); color: var(--success);
}
.qty-stepper button[data-qty-change="1"]:hover,
.qty-stepper #qty-plus:hover { background: var(--success); color: #fff; transform: scale(1.05); }
.qty-value { min-width: 28px; text-align: center; font-weight: 700; color: var(--text); }

/* Order summary */
.order-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky; top: calc(var(--topbar-h) + 16px);
  box-shadow: var(--shadow-sm);
}
.order-summary h3 { margin-bottom: 1rem; font-size: 1.1rem; }
.summary-row { display: flex; justify-content: space-between; align-items: center; margin: .5rem 0; font-size: .92rem; color: var(--text-2); }
.summary-row.total {
  font-weight: 800; font-size: 1.2rem; color: var(--text);
  border-top: 1.5px dashed var(--border);
  padding-top: .85rem; margin-top: .75rem;
}
.hh-savings-row { color: var(--success); font-weight: 600; }

/* ── Order panel (cart page redesign) ──────────────────────────────────── */
.cart-page { max-width: 560px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
@media (min-width: 720px) { .cart-page { max-width: 620px; padding: 2rem 1.5rem 3rem; } }

.order-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 20px 50px -28px rgba(15, 23, 42, .35), 0 2px 6px rgba(15, 23, 42, .04);
  padding: 1.5rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.order-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
}
.order-title {
  font-size: 1.55rem; font-weight: 800; letter-spacing: -.01em;
  color: var(--text); margin: 0 0 .35rem;
}
.order-count-pill {
  display: inline-block;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.order-back-link {
  display: inline-flex; align-items: center; gap: .35rem;
  color: var(--text-2); text-decoration: none; font-weight: 600; font-size: .85rem;
  padding: 6px 10px; border-radius: 10px;
  transition: background var(--t-fast), color var(--t-fast);
}
.order-back-link:hover { background: var(--surface-2); color: var(--accent-dark); }

.order-pickup {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .85rem;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .8rem 1rem;
}
.order-pickup-icon {
  width: 38px; height: 38px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-dark);
}
.order-pickup-body { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.order-pickup-label {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted);
}
.order-pickup-name { font-size: .98rem; color: var(--text); margin-top: 2px; }
.order-pickup-meta {
  display: flex; gap: .75rem; font-size: .78rem; color: var(--text-2);
  white-space: nowrap;
}
.order-pickup-meta span { display: inline-flex; align-items: center; gap: .25rem; }

.order-lines {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
  border-top: 1px solid var(--border);
}
.order-line {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: .9rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.order-line:last-child { border-bottom: none; }
.order-line-thumb {
  width: 64px; height: 64px; border-radius: 14px; overflow: hidden;
  background: var(--bg-elev);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 1.4rem;
}
.order-line-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.order-line-body { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.order-line-top {
  display: flex; justify-content: space-between; align-items: baseline; gap: .5rem;
}
.order-line-name {
  font-weight: 700; color: var(--text); font-size: .98rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.order-line-price { font-weight: 800; color: var(--text); font-size: 1rem; white-space: nowrap; }
.order-line-mods {
  font-size: .8rem; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.order-line-hh { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; }
.order-line-controls {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  margin-top: .25rem;
}
.qty-stepper-sm { padding: 2px; }
.qty-stepper-sm button { width: 24px; height: 24px; font-size: .9rem; }
.qty-stepper-sm .qty-value { min-width: 22px; font-size: .9rem; }
.order-line-remove {
  appearance: none; border: 1px solid var(--border); background: var(--surface);
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted); cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.order-line-remove:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }

.order-promo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  border: 1.5px solid var(--accent);
  background: linear-gradient(135deg, #fff, var(--accent-soft));
  border-radius: 14px;
  padding: .35rem;
}
.order-promo-btn {
  appearance: none; border: none; background: transparent; cursor: pointer;
  font-weight: 700; font-size: .82rem; color: var(--text-2);
  padding: .55rem .75rem; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  transition: background var(--t-fast), color var(--t-fast);
}
.order-promo-btn:hover:not(:disabled) { background: rgba(255,255,255,.6); color: var(--accent-dark); }
.order-promo-btn.primary { background: var(--accent); color: #fff; }
.order-promo-btn.primary:hover:not(:disabled) { background: var(--accent-dark); color: #fff; }
.order-promo-btn:disabled { opacity: .55; cursor: not-allowed; }

.order-totals { margin: 0; display: flex; flex-direction: column; gap: .35rem; }
.order-totals-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: .92rem; color: var(--text-2);
}
.order-totals-row dt, .order-totals-row dd { margin: 0; }
.order-totals-row.muted { color: var(--text-muted); font-size: .82rem; }
.order-totals-row .hh-row { color: var(--success); font-weight: 700; }
.order-totals-row.total {
  margin-top: .5rem; padding-top: .85rem;
  border-top: 1.5px dashed var(--border);
  font-weight: 800; color: var(--text); font-size: 1.45rem;
}

.order-checkout {
  width: 100%;
  font-size: 1.05rem; font-weight: 800;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  letter-spacing: .01em;
  margin-top: .25rem;
  box-shadow: 0 14px 30px -14px rgba(255, 107, 74, .55);
}
.order-checkout:hover { transform: translateY(-1px); }

.order-empty {
  text-align: center; padding: 2.5rem 1rem;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.order-empty-icon {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: .5rem;
}
.order-empty h2 { margin: 0; font-size: 1.3rem; }
.order-empty p { color: var(--text-muted); margin: 0; }

/* ── Persistent right-side cart rail (catalog pages) ───────────────────── */
.order-rail {
  position: sticky; top: 0;
  align-self: start;
  height: 100vh;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 1.25rem 1.1rem 1.1rem;
  gap: .9rem;
  overflow-y: auto;
  z-index: 5;
}
.order-rail-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem;
}
.order-rail-eyebrow {
  display: block;
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted);
}
.order-rail-title {
  margin: 2px 0 0; font-size: 1.05rem; font-weight: 800; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.order-rail-expand {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.order-rail-expand:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateX(2px); }

.order-rail-pickup {
  display: grid; grid-template-columns: auto 1fr; gap: .65rem; align-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: .55rem .7rem;
}
.order-rail-pickup-icon {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-dark);
  display: inline-flex; align-items: center; justify-content: center;
}
.order-rail-pickup-label {
  display: block; font-size: .62rem; text-transform: uppercase; letter-spacing: .08em;
  font-weight: 700; color: var(--text-muted);
}
.order-rail-pickup-name { font-size: .85rem; color: var(--text); }
.order-rail-pickup-meta { font-size: .72rem; color: var(--text-2); white-space: nowrap; }

.order-rail-empty {
  text-align: center; padding: 2rem .5rem; color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
}
.order-rail-empty-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: .25rem;
}
.order-rail-empty p { margin: 0; font-weight: 600; color: var(--text-2); }
.order-rail-empty-hint { font-size: .78rem; }

.order-rail-lines {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
  border-top: 1px solid var(--border);
  flex: 1 1 auto; min-height: 0;
}
.order-rail-line {
  display: grid; grid-template-columns: 48px 1fr auto; gap: .6rem;
  padding: .65rem 0; border-bottom: 1px solid var(--border);
}
.order-rail-line:last-child { border-bottom: none; }
.order-rail-line-thumb {
  width: 48px; height: 48px; border-radius: 10px; overflow: hidden;
  background: var(--bg-elev);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 1.1rem;
}
.order-rail-line-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.order-rail-line-body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.order-rail-line-name {
  font-size: .85rem; font-weight: 700; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.order-rail-line-mods {
  font-size: .72rem; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
}
.order-rail-line-bottom {
  display: flex; align-items: center; justify-content: flex-start; gap: .4rem;
  margin-top: .15rem;
}
.order-rail-line-remove {
  appearance: none; border: none; background: transparent;
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted); cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.order-rail-line-remove:hover { background: var(--danger-soft); color: var(--danger); }
.order-rail-line-price { font-weight: 800; color: var(--text); font-size: .9rem; align-self: flex-start; }

.order-rail-totals {
  margin: 0; display: flex; flex-direction: column; gap: .25rem;
  border-top: 1.5px dashed var(--border);
  padding-top: .75rem;
}
.order-rail-totals-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: .85rem; color: var(--text-2);
}
.order-rail-totals-row dt, .order-rail-totals-row dd { margin: 0; }
.order-rail-totals-row.muted { font-size: .76rem; color: var(--text-muted); }
.order-rail-totals-row.hh { color: var(--success); font-weight: 700; }

.order-rail-cta {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .6rem;
  background: linear-gradient(135deg, var(--accent-soft), #fff);
  border: 1.5px solid var(--accent);
  border-radius: 14px;
  padding: .55rem .75rem .55rem .9rem;
  margin-top: .25rem;
}
.order-rail-cta-total { display: flex; flex-direction: column; line-height: 1.1; }
.order-rail-cta-label {
  font-size: .65rem; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 700; color: var(--text-muted);
}
.order-rail-cta-total strong { font-size: 1.15rem; color: var(--text); }
.order-rail-cta-btn {
  padding: .55rem 1rem; font-size: .9rem; font-weight: 800;
  display: inline-flex; align-items: center; gap: .35rem;
  border-radius: 10px;
}

/* Empty state */
.empty-state {
  background: var(--surface);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 3rem 1.5rem; text-align: center;
}
.empty-state .icon { font-size: 3rem; margin-bottom: .5rem; }
.empty-state h2 { margin-bottom: .5rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1.25rem; }

/* ── Checkout ──────────────────────────────────────────────────────────── */
.checkout-steps {
  display: flex; gap: .5rem; margin-bottom: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  padding: 4px;
  overflow: hidden;
}
.checkout-step {
  flex: 1; padding: .65rem 1rem; text-align: center;
  font-size: .85rem; font-weight: 600;
  border-radius: var(--pill);
  color: var(--text-muted);
  transition: background var(--t-fast), color var(--t-fast);
}
.checkout-step.active { background: var(--navy); color: #fff; }
.checkout-step.done   { color: var(--success); }

/* Forms */
.form-group { margin-bottom: 1.1rem; }
.form-group label,
.form-group .form-label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .88rem; color: var(--text-2); }
.form-control,
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .7rem .95rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: .95rem; font-family: inherit; color: var(--text);
  background: var(--surface);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-control:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: var(--ring);
}
.form-group .field-validation-error { color: var(--danger); font-size: .82rem; margin-top: .25rem; display: block; }
.input-error { border-color: var(--danger) !important; }

.profile-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.profile-actions form {
  margin: 0;
}

/* Fulfillment & payment cards */
.fulfillment-options, .payment-options {
  display: grid; gap: .75rem;
}
.fulfillment-options { grid-template-columns: 1fr 1fr; }
@media (max-width: 540px) { .fulfillment-options { grid-template-columns: 1fr; } }
.fulfillment-card, .payment-option {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.fulfillment-card:hover, .payment-option:hover { border-color: var(--accent); }
.fulfillment-card.selected, .payment-option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 6px 18px rgba(255, 107, 74, .15);
}
.fulfillment-card .icon, .payment-option .payment-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--bg-elev);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.fulfillment-card.selected .icon, .payment-option.selected .payment-icon {
  background: var(--accent); color: #fff;
}
.fulfillment-card h4, .payment-option h4 { font-size: .98rem; margin-bottom: .15rem; }
.fulfillment-card p, .payment-option p   { font-size: .82rem; color: var(--text-muted); margin: 0; }

/* Stripe wrapper */
.stripe-element-wrapper {
  border: 1.5px solid var(--border); border-radius: 12px;
  padding: .75rem .95rem; background: var(--surface);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.stripe-element-wrapper.StripeElement--focus { border-color: var(--accent); box-shadow: var(--ring); }

/* ── Confirmation ──────────────────────────────────────────────────────── */
.confirmation-hero {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.receipt-store-head {
  text-align: center;
  margin: 0 0 1rem;
}
.receipt-store-name {
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.15;
}
.receipt-store-meta,
.receipt-date {
  color: var(--text-muted);
  font-size: .86rem;
  font-weight: 650;
}
.receipt-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  flex-wrap: wrap;
}
.receipt-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}
.confirmation-icon, .check-icon {
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--success); color: #fff;
  font-size: 2.4rem; line-height: 84px;
  margin: 0 auto 1rem;
  display: inline-flex; align-items: center; justify-content: center;
  animation: checkPop .5s var(--ease-bounce) both;
  box-shadow: 0 12px 32px rgba(22, 163, 74, .35);
}
@keyframes checkPop { from { transform: scale(0); } to { transform: scale(1); } }
.order-number, .order-number-badge {
  display: inline-block;
  background: var(--navy); color: #fff;
  padding: .4rem 1rem; border-radius: var(--pill);
  font-weight: 700; font-size: .9rem; letter-spacing: .03em;
  margin-top: .5rem;
}

/* Status tracker */
.status-tracker {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.tracker-step, .status-step { display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; }
.step-dot, .status-dot {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-elev); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  border: 2px solid var(--bg-elev);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.tracker-step.done .step-dot, .status-step.done .status-dot { background: var(--success); color: #fff; border-color: var(--success); }
.tracker-step.active .step-dot, .status-step.current .status-dot {
  background: var(--accent); color: #fff; border-color: var(--accent);
  box-shadow: 0 0 0 6px rgba(255, 107, 74, .15);
}
.step-label, .status-label { margin-top: .5rem; font-size: .78rem; color: var(--text-muted); }
.tracker-step.done .step-label,
.tracker-step.active .step-label,
.status-step.done .status-label,
.status-step.current .status-label { color: var(--text); font-weight: 600; }
.status-line { flex: 1 1 auto; height: 2px; background: var(--bg-elev); margin: 0 .25rem 1.5rem; }
.status-line.done { background: var(--success); }

/* ── Auth ──────────────────────────────────────────────────────────────── */
.auth-card {
  max-width: 460px; margin: 3rem auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2.5rem;
  box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.6rem; margin-bottom: .35rem; }
.auth-card .lead { color: var(--text-muted); margin-bottom: 1.5rem; }
@media (max-width: 540px) { .auth-card { margin: 1rem auto; padding: 1.5rem; } }

.print-only {
  display: none !important;
}

.order-receipt-print {
  display: none;
}

.order-receipt-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem 1rem;
  margin: 1rem 0;
}

.order-receipt-summary div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: .25rem;
}

.order-receipt-summary strong {
  color: var(--text-muted);
  font-size: .8rem;
}

.order-receipt-notes {
  margin-top: .75rem;
  border-top: 1px solid #ddd;
  padding-top: .5rem;
}

.order-receipt-notes p {
  margin: .25rem 0 0;
}

@media print {
  @page { margin: 12mm; }
  body {
    background: #fff !important;
    color: #111 !important;
  }
  .skip-link,
  .hh-banner,
  .app-rail,
  .topbar,
  .store-footer,
  .no-print {
    display: none !important;
  }
  .app-shell,
  .app-main,
  .app-content,
  .section,
  .container {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .receipt-print-area {
    display: block !important;
  }
  .print-only {
    display: block !important;
  }
  .orders-print-head {
    margin-bottom: 1rem !important;
    padding-bottom: .75rem !important;
    border-bottom: 1px solid #ddd !important;
  }
  .print-page-title {
    margin: 0 0 .75rem !important;
    font-size: 22px !important;
  }
  .table-responsive {
    overflow: visible !important;
  }
  body.print-single-receipt .section > .container > :not(.order-receipt-print) {
    display: none !important;
  }
  body.print-single-receipt .order-receipt-print {
    display: none !important;
  }
  body.print-single-receipt .order-receipt-print.is-printing {
    display: block !important;
  }
  .order-receipt-summary {
    grid-template-columns: 1fr 1fr !important;
  }
  .receipt-store-head,
  .confirmation-hero,
  .info-card {
    box-shadow: none !important;
    border-color: #ddd !important;
    break-inside: avoid;
  }
  .confirmation-hero {
    padding: 1rem 0 !important;
    border: none !important;
    margin-bottom: .75rem !important;
  }
  .confirmation-icon {
    display: none !important;
  }
  .info-card {
    margin-top: .75rem !important;
    padding: .85rem !important;
  }
  .table {
    font-size: 12px;
  }
  .table th,
  .table td {
    padding: .35rem .25rem !important;
  }
}

/* ── Alerts ────────────────────────────────────────────────────────────── */
.alert {
  border-radius: 12px;
  padding: .85rem 1rem;
  margin-bottom: 1rem; font-size: .92rem;
  border: 1px solid transparent;
  display: flex; align-items: center; gap: .6rem;
}
.alert-danger  { background: var(--danger-soft);  color: #7F1D1D; border-color: #FCA5A5; }
.alert-success { background: var(--success-soft); color: #14532D; border-color: #86EFAC; }
.alert-info    { background: #EFF6FF; color: #1E3A8A; border-color: #BFDBFE; }
.alert-warning { background: var(--gold-soft); color: #7A5400; border-color: #F0D790; }
/* Hide validation summary when there are no errors */
.validation-summary-valid { display: none !important; }

/* ── Modifier chips (product detail) ──────────────────────────────────── */
.modifier-chip { display: inline-flex; align-items: center; cursor: pointer; user-select: none; }
.modifier-chip input { position: absolute; opacity: 0; pointer-events: none; }
.modifier-chip-label {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem .95rem;
  border: 1.5px solid var(--border);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--text-2); font-size: .88rem; font-weight: 600;
  transition: all var(--t-fast);
}
.modifier-chip:hover .modifier-chip-label { border-color: var(--accent); color: var(--accent-dark); }
.modifier-chip input:checked + .modifier-chip-label {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 6px 16px rgba(255, 107, 74, .3);
}
.modifier-chip input:focus-visible + .modifier-chip-label { outline: 3px solid var(--accent); outline-offset: 2px; }
.modifier-chip-price { font-size: .76rem; opacity: .9; }
.modifier-hint {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 999px;
}
.cart-item-mods { font-size: .78rem; color: var(--text-muted); margin-top: .15rem; }

/* ── Department quick links (home) ────────────────────────────────────── */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.dept-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .5rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  color: var(--text); font-weight: 700; font-size: .92rem; text-align: center;
  transition: transform var(--t-fast), border-color var(--t-fast),
              box-shadow var(--t-fast), color var(--t-fast);
}
.dept-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent); color: var(--accent-dark);
  box-shadow: var(--shadow);
}
.dept-icon {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--bg-elev); display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.dept-card:hover .dept-icon { background: var(--accent); color: #fff; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.store-footer {
  margin-top: 3rem;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted); font-size: .85rem;
  border-top: 1px solid var(--border);
}
.store-footer a { color: var(--text-2); }
.store-footer a:hover { color: var(--accent); }

/* ── Toast ─────────────────────────────────────────────────────────────── */
.toast-pop {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--navy); color: #fff;
  padding: .75rem 1.1rem; border-radius: 14px;
  box-shadow: var(--shadow-lg);
  font-weight: 600; font-size: .9rem;
  opacity: 0; transform: translateY(12px);
  transition: opacity .25s, transform .25s;
}
.toast-pop.show { opacity: 1; transform: translateY(0); }

/* ── Spinner ───────────────────────────────────────────────────────────── */
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid rgba(15, 23, 42, .15);
  border-top-color: var(--accent);
  animation: spin .65s linear infinite;
  display: inline-block; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Lazy fade ─────────────────────────────────────────────────────────── */
/* Fade-in for images that opt into the .lazy class. The fade only kicks in
   when JS has tagged the image with .loaded (or src is set up-front, which is
   the case for our server-rendered cards). Without the [src] guard the cards
   stayed at opacity:0 forever because nothing toggled .loaded. */
img.lazy { transition: opacity .4s; }
img.lazy:not(.loaded):not([src]):not([data-src]) { opacity: 0; }

/* ── Utility helpers (Bootstrap-compatible aliases used in views) ─────── */
.fw-600 { font-weight: 600; }
.gap-2  { gap: .5rem; }
.mt-1   { margin-top: .25rem; }
.mt-2   { margin-top: .5rem; }
.mt-3   { margin-top: .75rem; }
.mt-4   { margin-top: 1.5rem; }
.mb-0   { margin-bottom: 0 !important; }
.mb-2   { margin-bottom: .5rem; }
.mb-3   { margin-bottom: .75rem; }
.mb-4   { margin-bottom: 1.5rem; }
.text-end { text-align: right; }
.text-center { text-align: center; }
.d-flex { display: flex; }
.d-inline { display: inline; }
.d-block { display: block; }
.flex-wrap { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-5 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.ms-2 { margin-left: .5rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Reduced motion ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* ── Mobile tweaks ─────────────────────────────────────────────────────── */
@media (max-width: 540px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .85rem; }
  .product-card-name { font-size: .92rem; }
  .price-current { font-size: 1rem; }
  .cart-item { grid-template-columns: 64px 1fr; padding: .75rem; }
  .cart-item-img, .cart-item-placeholder { width: 64px; height: 64px; }
  .cart-item-actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }
  .hero { padding: 1.75rem 1.25rem; border-radius: var(--radius-lg); }
}
