/* Shopahaven consumer — Furniline-style shop theme, pink accent variant. */
:root {
  --pink: #e8287a;
  --pink-dark: #c2185b;
  --pink-deep: #9a0b45;
  --pink-soft: #fdeef4;
  --pink-mist: #fdf3f7;
  --pink-grad: linear-gradient(135deg, #ff8ab5 0%, #e8287a 100%);
  --dark: #2a2a2a;
  --heading: #33302f;
  --text: #6b6560;
  --muted: #9a938d;
  --line: #eceae6;
  --panel: #f7f5f4;
  --white: #fff;
  --green: #2e9e5b;
  --green-soft: #e8f6ee;
  --amber: #f2a900;
  --red: #e03e2f;
  --red-soft: #fdece9;
  --navy: #26314b;
  --shadow: 0 12px 32px rgba(0, 0, 0, .08);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, .07);
  --radius: 8px;
  --radius-sm: 5px;
  --container: 1200px;
  --font-head: 'Poppins', sans-serif;
  --font-body: 'Roboto', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { vertical-align: middle; border: 0; }
a { color: var(--pink-dark); text-decoration: none; transition: color .18s; }
a:hover { color: var(--pink); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); color: var(--heading); margin: 0 0 .4em; font-weight: 600; }
p { margin: 0 0 .8em; }
button { font-family: var(--font-body); cursor: pointer; }
input, select, textarea {
  font-family: var(--font-body);
  color: var(--heading);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
  background: var(--white);
  width: 100%;
  transition: border-color .18s, box-shadow .18s;
}
input:focus, select:focus, textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(232,40,122,.12); }
textarea { resize: vertical; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 15px; }
.main-color { color: var(--pink); }
.bg-soft { background: var(--pink-soft); }

.icon { width: 20px; height: 20px; display: inline-block; vertical-align: middle; stroke: none; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 30px; height: 30px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 10px 20px; font-size: 14px; font-weight: 500;
  background: var(--pink-grad); color: #fff; transition: opacity .18s, transform .12s, box-shadow .18s;
  box-shadow: 0 4px 12px rgba(232,40,122,.28);
}
.btn:hover { opacity: .92; color: #fff; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(232,40,122,.34); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }
.btn-outline {
  background: #fff; color: var(--pink-dark); border-color: var(--pink);
  box-shadow: none;
}
.btn-outline:hover { background: var(--pink-soft); color: var(--pink-dark); box-shadow: none; }
.btn-ghost { background: transparent; color: var(--pink-dark); box-shadow: none; }
.btn-ghost:hover { background: var(--pink-soft); }
.btn-green { background: linear-gradient(135deg, #4db47a, #2e9e5b); box-shadow: 0 4px 12px rgba(46,158,91,.28); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-square { padding: 8px; }

/* ---------- topbar ---------- */
#topbar { background: var(--navy); color: #cfd8ea; font-size: 12.5px; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; min-height: 38px; }
.topbar-welcome { display: flex; align-items: center; gap: 8px; }
.topbar-right { display: flex; align-items: center; gap: 4px; position: relative; }
.top-link { color: #cfd8ea; padding: 9px 12px; display: inline-flex; align-items: center; gap: 6px; }
.top-link:hover { color: #fff; }
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 6px 0; z-index: 40; display: none;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 9px 16px; font-size: 13.5px; color: var(--heading); }
.dropdown-menu a:hover { background: var(--pink-soft); color: var(--pink-dark); }
.dropdown-menu .dd-sep { border-top: 1px solid var(--line); margin: 5px 0; }

/* ---------- header ---------- */
#masthead { background: #fff; border-bottom: 1px solid var(--line); }
.header-main { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0 14px; flex-wrap: wrap; }
.header-logo { display: flex; align-items: center; gap: 10px; }
.header-logo svg.logo-mark, .header-logo img.logo-mark { width: 46px; height: 46px; flex-shrink: 0; }
.logo-text { font-family: var(--font-head); font-size: 26px; font-weight: 700; color: var(--pink-dark); line-height: 1; }
.logo-text small { display: block; font-size: 10.5px; font-weight: 500; letter-spacing: .6px; color: var(--muted); text-transform: none; margin-top: 3px; }
.header-phrase { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text); }
.header-phrase .icon { color: var(--pink); }
.head-links { display: flex; gap: 2px; flex-wrap: wrap; }
.head-link { padding: 8px 13px; font-family: var(--font-head); font-size: 14px; font-weight: 500; color: var(--heading); border-radius: var(--radius-sm); }
.head-link:hover, .head-link.active { color: var(--pink-dark); background: var(--pink-soft); }

/* ---------- pink nav-inner ---------- */
.nav-container { background: var(--pink-grad); box-shadow: 0 4px 16px rgba(232,40,122,.22); }
.nav-inner { display: flex; align-items: center; gap: 18px; min-height: 56px; padding-top: 0; padding-bottom: 0; flex-wrap: wrap; row-gap: 8px; }
.box-category-heading {
  display: inline-flex; align-items: center; gap: 8px; color: #fff; font-family: var(--font-head);
  font-size: 14.5px; font-weight: 600; padding: 10px 16px; white-space: nowrap;
  background: rgba(0,0,0,.13); border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  margin-left: -15px;
}
.nav-menu { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; gap: 2px; flex: 1 1 auto; flex-wrap: wrap; min-width: 0; }
.nav-menu li { position: relative; }
.nav-menu a {
  display: inline-flex; align-items: center; gap: 6px; padding: 17px 13px;
  color: #fff; font-family: var(--font-head); font-size: 13.5px; font-weight: 500; opacity: .96;
}
.nav-menu a:hover { background: rgba(0,0,0,.14); opacity: 1; }
.nav-menu .has-children > a::after {
  content: ''; width: 0; height: 0; border-left: 4px solid transparent;
  border-right: 4px solid transparent; border-top: 5px solid rgba(255,255,255,.85);
}
.nav-menu .submenu {
  position: absolute; left: 0; top: 100%; min-width: 200px; background: #fff;
  border: 1px solid var(--line); border-top: 3px solid var(--pink); border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow); padding: 8px 0; display: none; z-index: 50;
}
.nav-menu li:hover .submenu { display: block; }
.nav-menu .submenu a { color: var(--heading); font-weight: 400; padding: 9px 16px; display: block; font-size: 13.5px; background: #fff; }
.nav-menu .submenu a:hover { background: var(--pink-soft); color: var(--pink-dark); }
.nav-search { display: flex; align-items: center; gap: 6px; background: #fff; border-radius: var(--radius-sm); padding: 4px 4px 4px 8px; min-width: 200px; flex: 0 1 280px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.nav-search .icon { color: var(--pink-dark); flex-shrink: 0; }
.nav-search input { border: 0; padding: 8px 4px; font-size: 13.5px; box-shadow: none; width: auto; flex: 1 1 auto; min-width: 0; }
.nav-search input:focus { box-shadow: none; }
.nav-search .btn { padding: 8px 14px; font-size: 13px; flex-shrink: 0; white-space: nowrap; }
.nav-cart a {
  display: inline-flex; align-items: center; gap: 8px; color: #fff; font-family: var(--font-head);
  font-weight: 600; font-size: 14px; padding: 10px 14px; background: rgba(0,0,0,.13); border-radius: var(--radius-sm);
  position: relative;
}
.nav-cart a:hover { background: rgba(0,0,0,.22); color: #fff; }
.cart-badge {
  position: absolute; top: -7px; right: -7px; min-width: 20px; height: 19px; padding: 0 5px;
  background: var(--navy); color: #fff; font-size: 11px; font-weight: 700; border-radius: 20px;
  display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
  white-space: nowrap; line-height: 1;
}
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 22px; padding: 8px; }
.nav-drawer-menu { display: none; background: #fff; border-top: 2px solid var(--pink); box-shadow: var(--shadow); padding: 10px 0; }
.nav-drawer-menu.open { display: block; }
.nav-drawer-menu a { display: block; padding: 11px 20px; color: var(--heading); font-weight: 500; }
.nav-drawer-menu a:hover { background: var(--pink-soft); color: var(--pink-dark); }

/* ---------- generic page ---------- */
.page { padding-bottom: 40px; }
.page-head { padding: 22px 0 14px; }
.page-title { font-size: 26px; font-weight: 700; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--pink-dark); }
.section { padding: 30px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.sec-title { font-size: 22px; font-weight: 700; position: relative; padding-left: 14px; }
.sec-title::before { content: ''; position: absolute; left: 0; top: 5px; bottom: 5px; width: 4px; border-radius: 4px; background: var(--pink-grad); }
.sec-sub { color: var(--muted); font-size: 13px; }
.link-more { font-size: 13.5px; font-weight: 600; color: var(--pink-dark); }

/* ---------- hero slider ---------- */
.hero { position: relative; overflow: hidden; }
.hero-track { display: flex; transition: transform .6s ease; }
/* New hero art: eyebrow kicker, live stat chips, inline search, floating
   deal cards + soft radial glow. Keeps the pink identity, adds depth. */
.hero-eyebrow {
  display: inline-block; font-family: var(--font-head); font-size: 12px; font-weight: 600;
  letter-spacing: 1.6px; text-transform: uppercase; color: #ffd3e4;
  background: rgba(0,0,0,.16); border: 1px solid rgba(255,255,255,.25);
  padding: 5px 12px; border-radius: 30px; margin-bottom: 12px;
}
.hero-eyebrow.light { color: #fff; }
.hero-split { display: flex; align-items: center; gap: 34px; width: 100%; }
.hero-copy { flex: 1.2; min-width: 0; }
.hero-search {
  display: flex; align-items: center; gap: 6px; background: #fff;
  border-radius: var(--radius-sm); padding: 5px 5px 5px 12px; margin-top: 18px;
  max-width: 520px; box-shadow: 0 10px 28px rgba(0,0,0,.22);
}
.hero-search .icon { color: var(--pink-dark); flex-shrink: 0; }
.hero-search input { border: 0; box-shadow: none; flex: 1; min-width: 0; font-size: 14.5px; }
.hero-search input:focus { box-shadow: none; }
.hero-search .btn { flex-shrink: 0; white-space: nowrap; }
.hero-stats { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; }
.hero-stat { font-size: 13px; color: rgba(255,255,255,.88); }
.hero-stat strong { font-family: var(--font-head); font-size: 19px; font-weight: 700; color: #fff; margin-right: 5px; }
.hero-visual { flex: 1; min-width: 0; position: relative; min-height: 230px; display: block; }
.hero-visual::before {
  content: ''; position: absolute; inset: -30px -40px;
  background: radial-gradient(closest-side, rgba(255,255,255,.28), transparent 70%);
}
.hero-float {
  position: absolute; width: 132px; background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 16px 34px rgba(0,0,0,.28); animation: floaty 5s ease-in-out infinite;
}
.hero-float-name {
  display: block; font-size: 12px; font-weight: 600; color: var(--heading);
  padding: 10px 10px 0; line-height: 1.35;
}
.hero-float-price {
  display: block; font-family: var(--font-head); font-weight: 700; font-size: 15px;
  color: var(--pink-dark); padding: 4px 10px 10px;
}
.hero-float.f1 { top: 0; left: 8%; transform: rotate(-5deg); }
.hero-float.f2 { top: 52px; right: 6%; animation-delay: -1.7s; }
.hero-float.f3 { bottom: 0; left: 30%; animation-delay: -3.4s; }
.hero-float.f1 { animation-name: floaty-a; }
@keyframes floaty { 0%, 100% { margin-top: 0; } 50% { margin-top: -12px; } }
@keyframes floaty-a { 0%, 100% { margin-top: 0; } 50% { margin-top: -9px; } }
/* Value props: why stay (retention strip under the hero). */
.value-props { padding: 22px 0 6px; }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.value-card {
  display: flex; gap: 13px; align-items: flex-start; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.value-ico {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: var(--pink-grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.value-title { font-family: var(--font-head); font-weight: 600; color: var(--heading); font-size: 14.5px; }
.value-text { font-size: 13px; color: var(--text); margin-top: 2px; }
.hero-slide {
  min-width: 100%; min-height: 340px; display: flex; align-items: center; padding: 46px 54px;
  color: #fff; background: var(--pink-grad);
}
.hero-slide.alt { background: linear-gradient(120deg, #ff8ab5 0%, #e8287a 55%, #c2185b 100%); }
.hero-slide.dark { background: linear-gradient(120deg, #c2185b 0%, #9a0b45 100%); }
.hero-slide h2 { color: #fff; font-size: 38px; font-weight: 700; max-width: 540px; }
.hero-slide p { color: rgba(255,255,255,.92); font-size: 17px; max-width: 520px; }
.hero-cta { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.hero-cta .btn { background: #fff; color: var(--pink-dark); box-shadow: 0 6px 18px rgba(0,0,0,.16); }
.hero-cta .btn.btn-solid { background: var(--navy); color: #fff; }
.hero-cta .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); box-shadow: none; }
.hero-nav { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); display: flex; justify-content: space-between; padding: 0 14px; }
.hero-nav button { background: rgba(255,255,255,.25); border: 0; color: #fff; width: 42px; height: 42px; border-radius: 50%; font-size: 20px; }
.hero-nav button:hover { background: rgba(255,255,255,.45); }
.hero-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.hero-dots span { width: 9px; height: 9px; border-radius: 9px; background: rgba(255,255,255,.5); cursor: pointer; transition: width .25s; }
.hero-dots span.on { width: 24px; background: #fff; }
/* Compact hero loading state: icon + message + small spinner (replaces oversized loading-block). */
.hero-loading .hero-slide-loading { min-height: auto; padding: 28px 30px; }
.hero-pending { display: flex; align-items: center; gap: 16px; width: 100%; }
.hero-pending-ico {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.35);
  color: #fff; display: flex; align-items: center; justify-content: center;
}
.hero-pending-copy { flex: 1; min-width: 0; }
.hero-loading .hero-slide-loading h2 { font-size: 20px; margin: 0 0 2px; max-width: none; }
.hero-loading .hero-slide-loading p { font-size: 14px; margin: 0; max-width: none; }
.preloader-spin-sm { width: 22px; height: 22px; border-width: 3px; flex-shrink: 0; border-color: rgba(255,255,255,.4); border-top-color: #fff; }

/* ---------- shelves / product grid ---------- */
.shelf { display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x mandatory; }
.shelf::-webkit-scrollbar { height: 8px; }
.shelf::-webkit-scrollbar-thumb { background: #e6d3dc; border-radius: 8px; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
/* Grid blowout guard: flex/grid children default to min-width:auto, so one
   long unbreakable string (retailer URL, long product name) can force its
   column wider than 1fr and paint over neighbouring sections (e.g. footer). */
.product-grid > *, .cat-tiles > *, .footer-cols > *, .shelf > * { min-width: 0; }
.li-name, .off-sub, .product-name, .off-ret { overflow-wrap: anywhere; }
.product-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .2s, transform .2s; position: relative; display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.shelf .product-card { min-width: 200px; width: 200px; scroll-snap-align: start; }
.sale-ribbon {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, #4db47a, #2e9e5b); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .6px; padding: 3px 9px; border-radius: 4px; text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(46,158,91,.35); white-space: nowrap;
}
.sale-ribbon .icon { width: 12px; height: 12px; }
/* Clearance for the absolute pill: long names wrap instead of sliding under it. */
.product-card.on-sale .product-name { padding-right: 78px; }
.product-body { padding: 12px 13px 14px; display: flex; flex-direction: column; flex: 1; }
.product-name { font-family: var(--font-head); font-size: 13.5px; font-weight: 500; color: var(--heading); line-height: 1.35; margin-bottom: 4px; }
.product-name a:hover { color: var(--pink); }
.product-cat { font-size: 11.5px; color: var(--muted); text-transform: capitalize; margin-bottom: 6px; }
.product-rating { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.stars { display: inline-flex; gap: 1px; color: var(--amber); }
.stars .icon { width: 13px; height: 13px; }
.stars .empty { color: #e4ddd6; }
.price-line { margin-top: auto; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-now { font-family: var(--font-head); font-size: 19px; font-weight: 700; color: var(--pink-dark); }
.price-was { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.price-none { font-size: 12.5px; color: var(--muted); }
.sale-story { font-size: 11px; font-weight: 600; color: var(--red); }
.product-actions { display: flex; gap: 8px; margin-top: 11px; }
.product-actions .btn { flex: 1; padding: 7px 8px; font-size: 12.5px; }
.icon-btn { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text); padding: 7px 10px; }
.icon-btn:hover { border-color: var(--pink); color: var(--pink-dark); background: var(--pink-soft); }
.icon-btn.saved { color: var(--red); border-color: var(--red); }
.no-data { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 14px; }

/* ---------- stats band ---------- */
.stats-band { background: var(--navy); border-radius: var(--radius); color: #fff; padding: 22px; margin: 24px 0; }
.stats-in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 14px; }
.stat-card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 16px; }
.stat-card .stat-ico { color: #ffb1d0; margin-bottom: 10px; }
.stat-card .stat-val { font-family: var(--font-head); font-size: 26px; font-weight: 700; color: #fff; line-height: 1.1; }
.stat-card .stat-val.good { color: #7ee2a1; }
.stat-card .stat-lab { font-size: 12.5px; color: #b7c3da; margin-top: 4px; }
.stat-card a:hover .stat-lab { color: #fff; }
.upcoming-box { margin-top: 16px; }
.upcoming-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.upcoming-card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 13px 15px; color: #eef1f8; }
.upcoming-card .u-name { font-family: var(--font-head); font-weight: 600; color: #fff; }
.upcoming-card .u-meta { font-size: 12.5px; color: #b7c3da; margin-top: 4px; }
.upcoming-card .u-days { color: #ffb1d0; font-weight: 600; }

/* ---------- category tiles ---------- */
.cat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat-tile {
  display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; transition: box-shadow .18s, transform .18s;
}
.cat-tile:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); border-color: var(--pink); }
.cat-tile .cat-ico { width: 44px; height: 44px; border-radius: 10px; background: var(--pink-soft); color: var(--pink-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cat-tile .cat-name { font-family: var(--font-head); font-weight: 600; color: var(--heading); font-size: 14px; text-transform: capitalize; }
.cat-tile .cat-count { font-size: 12px; color: var(--muted); }

/* ---------- photo category tiles (home) ---------- */
.cat-tiles.photo { grid-template-columns: repeat(3, 1fr); }
.cat-tile.photo {
  position: relative; display: block; padding: 0; overflow: hidden;
  min-height: 150px; border: 1px solid var(--line); border-radius: var(--radius);
}
.cat-tile.photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.cat-tile.photo:hover img { transform: scale(1.05); }
.cat-tile.photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20, 8, 14, .78) 0%, rgba(20, 8, 14, .25) 55%, transparent 80%);
}
.cat-photo-label { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 10px 14px 12px; display: block; }
.cat-tile.photo .cat-name { color: #fff; font-size: 16px; display: block; }
.cat-tile.photo .cat-count { color: rgba(255, 255, 255, .85); display: block; }
@media (max-width: 760px) {
  .cat-tiles.photo { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-tile.photo { min-height: 120px; }
}

/* ---------- banners ---------- */
.banner-strip { border-radius: var(--radius); padding: 26px 28px; color: #fff; background: linear-gradient(120deg, var(--navy), #3a4a6e); display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 26px 0; flex-wrap: wrap; }
.banner-strip.pink { background: var(--pink-grad); }
.banner-strip h3 { color: #fff; font-size: 20px; margin-bottom: 6px; }
.banner-strip p { color: rgba(255,255,255,.9); font-size: 13.5px; margin: 0; }
.banner-strip .btn { background: #fff; color: var(--pink-dark); }
.banner-strip.pink .btn { color: var(--pink-dark); }

/* ---------- chips ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 20px; }
.chip {
  background: #fff; border: 1px solid var(--line); border-radius: 30px; padding: 7px 15px;
  font-size: 13px; color: var(--heading); transition: all .15s; display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--pink); color: var(--pink-dark); }
.chip.on { background: var(--pink-grad); color: #fff; border-color: transparent; }

/* ---------- grid meta / pagination ---------- */
.grid-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.per-wrap { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.per-select { width: auto; min-height: 40px; padding: 6px 10px; font-size: 13px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 22px 0 6px; }
.page-btn {
  min-width: 40px; min-height: 40px; padding: 6px 12px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); color: var(--heading);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.page-btn:hover:not(:disabled) { border-color: var(--pink); color: var(--pink-dark); }
.page-btn.on { background: var(--pink-grad); color: #fff; border-color: transparent; }
.page-btn:disabled { opacity: .45; cursor: default; }
.page-gap { color: var(--muted); padding: 0 2px; }

/* ---------- offer data table (DataTables, themed) ---------- */
.offer-table-wrap { overflow-x: auto; }
table.offer-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--white); }
.offer-table thead th {
  font-family: var(--font-head); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--heading); background: var(--pink-soft); border-bottom: 2px solid #f3c9da;
  padding: 10px 12px; text-align: left; white-space: nowrap; cursor: pointer; user-select: none;
}
.offer-table thead th:last-child { cursor: default; }
.offer-table thead th.sorting::after { content: ' ⇅'; color: var(--muted); font-size: 11px; }
.offer-table thead th.sorting_asc::after { content: ' ▲'; color: var(--pink-dark); font-size: 11px; }
.offer-table thead th.sorting_desc::after { content: ' ▼'; color: var(--pink-dark); font-size: 11px; }
.offer-table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.offer-table tbody tr:nth-child(even) td { background: var(--pink-mist); }
.offer-table tbody tr:hover td { background: #fdf0f5; }
.offer-table .cell-main { font-weight: 600; color: var(--heading); }
.offer-table .cell-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.offer-table .cell-sub.sale { color: var(--red); font-weight: 600; }
.offer-table .cell-price { font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--pink-dark); }
.offer-table .cell-was { color: var(--muted); text-decoration: line-through; }
.offer-table .cell-dash { color: var(--muted); }
.offer-table a.off-link { font-size: 13px; font-weight: 600; color: var(--pink-dark); text-decoration: underline; white-space: nowrap; }
.offer-table a.off-link:hover { color: var(--pink); }
.dataTables_wrapper { margin: 6px 0 10px; }
.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter { margin-bottom: 12px; }
.dataTables_wrapper .dataTables_length { float: left; }
.dataTables_wrapper .dataTables_filter { float: right; text-align: right; }
.dataTables_wrapper .dataTables_length label, .dataTables_wrapper .dataTables_filter label {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 400;
}
.dataTables_wrapper .dataTables_length select { width: auto; min-height: 40px; padding: 6px 10px; }
.dataTables_wrapper .dataTables_filter input { width: 220px; min-height: 40px; margin-left: 0; }
.dataTables_wrapper .dataTables_info { font-size: 13px; color: var(--muted); padding-top: 12px; clear: both; }
.dataTables_wrapper .dataTables_paginate { text-align: center; padding-top: 10px; }
.dataTables_wrapper .dataTables_paginate .paginate_button {
  display: inline-block; min-width: 40px; min-height: 40px; line-height: 28px; padding: 6px 12px; margin: 0 3px;
  border-radius: 12px; background: var(--white); border: 1px solid var(--line);
  color: var(--heading) !important; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) { border-color: var(--pink); color: var(--pink-dark) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current { background: var(--pink-grad); color: #fff !important; border-color: transparent; }
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled { opacity: .45; cursor: default; }
.dataTables_wrapper .dataTables_paginate .ellipsis { color: var(--muted); padding: 0 2px; }
/* responsive child rows */
.offer-table.dtr-inline.collapsed > tbody > tr > td.dtr-control { cursor: pointer; }
.offer-table.dtr-inline.collapsed > tbody > tr > td.dtr-control::before {
  content: '+'; display: inline-block; width: 22px; height: 22px; line-height: 20px; text-align: center;
  border-radius: 50%; background: var(--pink-grad); color: #fff; font-weight: 700; margin-right: 8px;
}
.offer-table.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control::before { content: '–'; }
.offer-table > tbody > tr.child td.child { background: var(--pink-soft); }
.offer-table > tbody > tr.child ul.dtr-details { list-style: none; margin: 0; padding: 0; width: 100%; }
.offer-table > tbody > tr.child ul.dtr-details > li { display: flex; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.offer-table > tbody > tr.child ul.dtr-details > li:last-child { border-bottom: 0; }
.offer-table > tbody > tr.child span.dtr-title { min-width: 90px; font-weight: 700; color: var(--heading); }
@media (max-width: 760px) {
  .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter { float: none; text-align: left; }
  .dataTables_wrapper .dataTables_filter input { width: 100%; }
}

/* ---------- panel / cards ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 16px; }
.card-title { font-size: 17px; font-weight: 600; margin-bottom: 12px; }
.card-soft { background: var(--pink-soft); border-color: #f7d6e3; }
.card-green { background: var(--green-soft); border-color: #cdeedb; }
.card-row { display: flex; align-items: center; gap: 14px; }
.row-list { display: flex; flex-direction: column; }

/* ---------- product detail ---------- */
.pd-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin-top: 8px; }
.pd-gallery { position: relative; }
.pd-gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.img-credit { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.img-credit a { color: var(--muted); text-decoration: underline; }
.pd-info .pd-name { font-size: 24px; font-weight: 700; }
.pd-info .pd-cat { font-size: 13px; color: var(--muted); text-transform: capitalize; margin-bottom: 8px; }
.pd-rating { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; font-size: 13px; color: var(--muted); }
.pd-best { background: var(--pink-soft); border: 1px solid #f7d6e3; border-radius: var(--radius); padding: 16px 18px; margin: 12px 0; }
.pd-best .pd-price { font-family: var(--font-head); font-size: 34px; font-weight: 700; color: var(--pink-dark); }
.pd-best .pd-was { font-size: 16px; color: var(--muted); text-decoration: line-through; }
.pd-best .pd-story { font-size: 12.5px; font-weight: 600; color: var(--red); margin-top: 2px; }
.pd-best .pd-unit { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pd-actions { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; }
.pd-desc { margin: 16px 0; }
.pd-desc h3, .pd-sec h3 { font-size: 16px; margin-bottom: 8px; }
.offer-tile { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; }
.offer-tile img.ret-logo { width: 34px; height: 34px; object-fit: contain; }
.offer-tile .off-main { flex: 1; }
.offer-tile .off-ret { font-family: var(--font-head); font-weight: 600; font-size: 13.5px; color: var(--heading); }
.offer-tile .off-sub { font-size: 12px; color: var(--muted); }
.offer-tile .off-price { font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--pink-dark); white-space: nowrap; }
.offer-tile .off-was { font-size: 12px; color: var(--muted); text-decoration: line-through; margin-right: 6px; }
.offer-tile a.off-link { font-size: 12px; color: var(--pink-dark); text-decoration: underline; }
.sale-window { font-size: 11.5px; font-weight: 600; color: var(--red); }
.sale-window .valid { color: var(--green); }
.review-tile { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; }
.review-tile .rv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.review-tile .rv-author { font-weight: 600; color: var(--heading); }
.review-tile .rv-date { color: var(--muted); font-size: 12px; }
.review-tile .rv-title { font-weight: 600; color: var(--heading); margin: 6px 0 3px; font-size: 14px; }
.review-tile .rv-body { font-size: 13.5px; }
.review-tile .rv-src { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

/* ---------- list cards ---------- */
.list-card { display: flex; align-items: center; gap: 16px; }
.list-card .lc-ico { width: 48px; height: 48px; border-radius: 12px; background: var(--pink-soft); color: var(--pink-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.list-card .lc-main { flex: 1; }
.list-card .lc-name { font-family: var(--font-head); font-weight: 600; color: var(--heading); }
.list-card .lc-sub { font-size: 12.5px; color: var(--muted); }
.list-card .lc-badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px; background: var(--pink-soft); color: var(--pink-dark); text-transform: capitalize; }

/* ---------- basket / purchase rows ---------- */
.qty-ctl { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.qty-ctl button { border: 0; background: #fff; width: 30px; height: 30px; color: var(--heading); }
.qty-ctl button:hover { background: var(--pink-soft); color: var(--pink-dark); }
.qty-ctl span { min-width: 34px; text-align: center; font-weight: 600; font-size: 14px; color: var(--heading); }
.line-item { display: flex; align-items: center; gap: 14px; }
.line-item .li-prod { flex: 1; }
.line-item .li-name { font-family: var(--font-head); font-weight: 500; color: var(--heading); font-size: 14px; }
.line-item .li-sub { font-size: 12.5px; color: var(--muted); }
.line-item .li-price { font-weight: 700; color: var(--pink-dark); font-family: var(--font-head); }
.swipe-row { display: flex; align-items: center; gap: 6px; }
.swipe-row .s-main { flex: 1; }
.swipe-row .s-del { border: 0; background: transparent; color: var(--red); padding: 8px; }
.text-strike { text-decoration: line-through; color: var(--muted); }
.toggle { position: relative; width: 44px; height: 24px; border-radius: 20px; background: #ccc; border: 0; transition: background .18s; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .18s; }
.toggle.on { background: var(--pink); }
.toggle.on::after { left: 23px; }

/* ---------- charts ---------- */
.chart-box { position: relative; }
.chart-box canvas { width: 100%; height: 100%; display: block; }
.chart-wrap { height: 250px; margin-top: 8px; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text); margin-top: 8px; }
.chart-legend .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.charts-grid .chart-wrap { height: 230px; }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.metric { text-align: center; padding: 16px 10px; }
.metric .m-val { font-family: var(--font-head); font-size: 26px; font-weight: 700; color: var(--pink-dark); }
.metric .m-val.good { color: var(--green); }
.metric .m-val.bad { color: var(--red); }
.metric .m-lab { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- forms & status ---------- */
.auth-wrap { max-width: 420px; margin: 34px auto; }
.auth-card { padding: 26px 28px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--heading); margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-status { display: none; font-size: 13px; border-radius: var(--radius-sm); padding: 10px 12px; margin: 12px 0; }
.form-status.show { display: block; }
.form-status.ok { background: var(--green-soft); color: var(--green); border: 1px solid #cdeedb; }
.form-status.err { background: var(--red-soft); color: var(--red); border: 1px solid #f7cdc8; }
.form-status.info { background: var(--pink-soft); color: var(--pink-dark); border: 1px solid #f7d6e3; }
.form-foot { text-align: center; font-size: 13.5px; margin-top: 14px; }

/* ---------- staged shopping lists (draft -> reconciliation) ---------- */.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .field { width: 100%; }
.stage-cards .stat-card.on { outline: 2px solid var(--pink-dark); }
.stage-cards .stat-card { background: #fff; border: 1px solid var(--line); }
.stage-cards .stat-card .stat-val { color: var(--pink-dark); }
.stage-cards .stat-card .stat-lab { color: var(--heading); font-weight: 600; }
.stage-cards .stat-card .li-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.sugg-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.sugg-row { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13.5px; cursor: pointer; }
.sugg-row:hover { background: var(--pink-soft); }
.sugg-row.sugg-free { border-style: dashed; color: var(--pink-dark); font-weight: 600; }
.draft-lines { margin-top: 6px; }
.qty-inline { width: 64px; margin: 0; }
.price-inline { width: 96px; margin: 0; }
table.price-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--white); }
.price-table thead th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 12px; border-bottom: 2px solid var(--line); }
.price-table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.price-table tbody tr:nth-child(even) td { background: var(--pink-mist); }
.suggested-locked { font-weight: 700; color: var(--heading); white-space: nowrap; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.checkline { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.checkline input { width: auto; }

/* ---------- modal ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(30,20,26,.5); z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 50px 16px 30px; overflow: auto; }
.modal { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); width: 480px; max-width: 100%; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; margin: 0; }
.modal-head .x { border: 0; background: none; color: var(--muted); font-size: 18px; }
.modal-body { padding: 18px 20px; }
.modal-body .picker-input { margin-bottom: 12px; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.pick-item { display: flex; align-items: center; gap: 12px; padding: 9px; border-radius: var(--radius-sm); cursor: pointer; }
.pick-item:hover { background: var(--pink-soft); }
.pick-item img { width: 52px; height: 52px; object-fit: cover; border-radius: var(--radius-sm); background: var(--panel); }
.pick-item .pi-main { flex: 1; }
.pick-item .pi-name { font-family: var(--font-head); font-weight: 500; color: var(--heading); font-size: 13.5px; }
.pick-item .pi-sub { font-size: 12px; color: var(--muted); }
.pick-item .pi-price { font-weight: 700; color: var(--pink-dark); }

/* ---------- toasts ---------- */
#toasts { position: fixed; top: 18px; right: 18px; z-index: 120; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow); font-size: 13.5px; max-width: 330px; animation: slideIn .25s ease; display: flex; gap: 10px; align-items: center; }
.toast.ok { background: var(--green); }
.toast.err { background: var(--red); }
.toast .icon { color: #fff; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- footer ---------- */
footer { margin-top: 40px; clear: both; }
.content_footer_top { background: var(--pink-grad); padding: 30px 0; }
.news-box { display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
.news-title { color: #fff; font-size: 22px; font-weight: 700; }
.news-sub { color: rgba(255,255,255,.92); font-size: 13px; }
.news-form { display: flex; gap: 10px; flex: 1; min-width: 320px; max-width: 560px; }
.news-form input { border: 0; border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14px; }
.news-form .btn { background: var(--navy); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.18); white-space: nowrap; }
#footer { background: #20243a; color: #a9b2c9; padding: 44px 0 10px; }
.footer-cols { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1.15fr; gap: 26px; }
.footer-cols h5 { color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 16px; text-transform: uppercase; letter-spacing: .6px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: 9px; }
.footer-cols a { color: #a9b2c9; font-size: 13.5px; }
.footer-cols a:hover { color: #ffb1d0; }
.footer-about p { font-size: 13px; color: #a9b2c9; }
.footer-about .logo-text { color: #fff; }
.footer-about .logo-text small { color: #8b93ab; }
.footer-links .icon { width: 15px; height: 15px; margin-right: 8px; color: #ffb1d0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 34px; padding: 18px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: #8b93ab; }
.social { display: flex; gap: 10px; }
.social a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.08); color: #cfd8ea; display: inline-flex; align-items: center; justify-content: center; }
.social a:hover { background: var(--pink); color: #fff; }

/* ---------- sync status ---------- */
.sync-strip { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); padding: 8px 0; }
.sync-strip .dot { width: 8px; height: 8px; border-radius: 50%; background: #ccc; display: inline-block; }
.sync-strip.ready .dot { background: var(--green); }
.sync-strip.error .dot { background: var(--red); }
.sync-strip.error { color: var(--red); }
.sync-strip.spinning .dot { background: var(--amber); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- loading ---------- */
.preloader { position: fixed; inset: 0; background: #fff; z-index: 200; display: flex; align-items: center; justify-content: center; transition: opacity .3s; }
.preloader.hide, .preloader.done { opacity: 0; pointer-events: none; }
.preloader-spin { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--pink-soft); border-top-color: var(--pink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); padding: 50px 0; }

/* ---------- misc page blocks ---------- */
#app { min-height: 46vh; }
.choice { margin: 4px 0 14px; }
.muted-line { font-size: 13px; color: var(--muted); margin: 8px 0; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.banner-strip.soft { background: var(--pink-soft); color: var(--heading); border: 1px solid #f7d6e3; }
.banner-strip.soft h3 { color: var(--pink-dark); }
.banner-strip.soft p { color: var(--text); }
.banner-strip.soft .btn { background: var(--pink-grad); color: #fff; }

/* ---------- list index cards ---------- */
.list-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; transition: box-shadow .18s; }
.list-card:hover { box-shadow: var(--shadow-sm); border-color: var(--pink); }
.l-name { font-family: var(--font-head); font-weight: 600; color: var(--heading); font-size: 15px; }
.l-name:hover { color: var(--pink); }
.l-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.l-chips { display: flex; gap: 6px; margin-top: 6px; }
.l-actions { display: flex; gap: 8px; align-items: center; }

/* ---------- list/basket/purchase line rows ---------- */
.li-row { display: flex; align-items: center; gap: 13px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 8px; transition: box-shadow .18s; }
.li-row:hover { box-shadow: var(--shadow-sm); }
.li-row.done { opacity: .62; }
.li-img { width: 54px; height: 54px; object-fit: cover; border-radius: var(--radius-sm); background: var(--panel); flex-shrink: 0; }
.li-img.ph { display: flex; align-items: center; justify-content: center; color: var(--muted); background: var(--panel); }
.li-main { flex: 1; min-width: 0; }
.li-name { font-family: var(--font-head); font-weight: 500; color: var(--heading); font-size: 14px; }
.li-name:hover { color: var(--pink); }
.li-sub { font-size: 12.5px; color: var(--muted); }
.li-total { font-family: var(--font-head); font-weight: 700; color: var(--pink-dark); white-space: nowrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.qty .qty-btn { border: 0; background: #fff; width: 30px; height: 30px; color: var(--heading); font-size: 15px; }
.qty .qty-btn:hover { background: var(--pink-soft); color: var(--pink-dark); }
.qty .qty-n { min-width: 36px; text-align: center; font-weight: 600; font-size: 14px; color: var(--heading); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.icon-btn.danger { color: var(--red); }
.icon-btn.danger:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.icon-btn.muted { color: var(--muted); }
.basket-lines { margin-top: 8px; }
.purchase-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 14px; margin-bottom: 8px; }
.purchase-row .p-right { white-space: nowrap; }
.diff-good { font-size: 12px; font-weight: 600; color: var(--green); }
.diff-bad { font-size: 12px; font-weight: 600; color: var(--red); }
.diff-eq { font-size: 12px; color: var(--muted); }
.purchase-row.clickable { cursor: pointer; }
.purchase-row.clickable:hover { border-color: var(--pink); }

/* ---------- receipt OCR / expense tables ---------- */
.receipts-explorer { margin: 22px 0 8px; }
.receipt-filters { display: grid; grid-template-columns: 150px 150px 1fr 1fr 220px auto auto; gap: 8px; margin: 12px 0; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.receipt-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.receipt-table th, .receipt-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.receipt-table thead th { background: var(--panel); font-family: var(--font-head); font-size: 12.5px; color: var(--heading); }
.receipt-table tr.clickable { cursor: pointer; }
.receipt-table tr.clickable:hover td { background: var(--pink-mist); }
.receipt-img { max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 8px 0; }
.receipt-review-grid { display: grid; grid-template-columns: 240px 1fr; gap: 14px; }
.receipt-item-row { display: grid; grid-template-columns: 1fr 1fr 64px 96px 36px; gap: 6px; margin-bottom: 6px; }
.receipt-datetime-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ocr-text { white-space: pre-wrap; font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; max-height: 220px; overflow: auto; }
.ocr-details { margin-top: 12px; }
.ocr-details summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
mark.pii { background: #ffe08a; color: #5c4000; border-radius: 3px; padding: 0 2px; }
mark.pii.off { background: transparent; color: inherit; }
.pii-banner { display: flex; gap: 8px; align-items: center; font-size: 12.5px; background: var(--pink-soft); border: 1px solid #f7d6e3; border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 12px; }
.pii-banner .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pink); flex: none; }
.pii-toggle { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.receipt-agg { margin: 12px 0; }
.agg-head { font-size: 14px; margin-bottom: 8px; }
.agg-row { display: flex; align-items: center; gap: 10px; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 7px 12px; margin-bottom: 6px; cursor: pointer; text-align: left; }
.agg-row:hover { border-color: var(--pink); }
.agg-label { flex: 0 0 180px; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.agg-bar { flex: 1; background: var(--panel); border-radius: 4px; height: 10px; overflow: hidden; }
.agg-bar span { display: block; height: 100%; background: var(--pink); }
@media (max-width: 900px) {
  .receipt-filters { grid-template-columns: 1fr 1fr; }
  .receipt-review-grid { grid-template-columns: 1fr; }
  .receipt-item-row { grid-template-columns: 1fr 1fr; }
}

/* ---------- alert tiles ---------- */
.alert-tile { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; }
.alert-tile.off { opacity: .6; }
.alert-tile .al-side { display: flex; gap: 6px; align-items: center; }

/* ---------- store optimization plan ---------- */
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.one-stop { align-items: center; border-color: var(--pink); background: var(--pink-mist); }
.plan { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 10px 0; }
.store-plan { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.store-plan .sp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--navy); color: #fff; font-family: var(--font-head); font-weight: 600; font-size: 13.5px; padding: 10px 13px; }
.store-plan .sp-head span { color: #b7c3da; font-size: 12px; font-family: var(--font-body); font-weight: 400; }
.store-plan .sp-items { padding: 10px 13px; }
.sp-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.sp-item:last-child { border-bottom: 0; }
.sp-qty { color: var(--muted); font-weight: 600; min-width: 26px; }
.sp-name { flex: 1; color: var(--heading); }
.sp-price { font-weight: 700; color: var(--pink-dark); }

/* ---------- savings charts / facts ---------- */
.cards-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 10px 0; }
.cards-2col .card { margin: 0; }
.facts-card .card-title { margin-bottom: 6px; }
.dash-facts .fact { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; color: var(--text); }
.dash-facts .fact:last-child { border-bottom: 0; }
.dash-facts .fact strong { color: var(--heading); font-family: var(--font-head); }
.field-label { display: block; font-size: 12.5px; font-weight: 500; color: var(--heading); margin: 0 0 4px; }
.field + .field, .field-label + .field, .field-label + input { margin-top: 2px; }

/* ---------- mobile app chrome (bottom tab bar) ---------- */
#tabbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  /* Mid-width: category heading + full menu + search + cart can't fit one
     56px row — tighten spacing instead of squeezing characters together. */
  .nav-inner { gap: 10px; }
  .nav-menu a { padding: 14px 9px; font-size: 13px; }
  .box-category-heading { font-size: 13px; padding: 10px 12px; }
  .nav-search { flex-basis: 220px; min-width: 180px; }
  .head-link { padding: 8px 9px; font-size: 13px; }
}
@media (max-width: 1000px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-tiles { grid-template-columns: repeat(3, 1fr); }
  .stats-in { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
  .pd-wrap { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .cards-2col { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { overflow-x: hidden; }
  #tabbar { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; }
  .tab-bar {
    display: flex; background: #fff; border-top: 1px solid var(--line);
    box-shadow: 0 -6px 18px rgba(0, 0, 0, .09);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .tab-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 5px 2px 3px; color: var(--muted); border-radius: 10px;
    font-size: 10.5px; font-family: var(--font-body); -webkit-tap-highlight-color: transparent;
  }
  .tab-item .tab-ico .icon { width: 22px; height: 22px; }
  .tab-item.active { color: var(--pink-dark); font-weight: 600; background: var(--pink-soft); }
  .tab-item:active { background: var(--pink-soft); }

  body { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }

  /* inputs keep 16px so iOS doesn't zoom on focus */
  input, select, textarea { font-size: 16px; }

  /* compact header — drop desktop links, keep logo + postal hint */
  .header-main { justify-content: space-between; padding: 12px 0 6px; }
  .header-logo svg.logo-mark, .header-logo img.logo-mark { width: 38px; height: 38px; }
  .logo-text { font-size: 20px; }
  .logo-text small { font-size: 8.5px; letter-spacing: 1.6px; }
  .head-links { display: none; }
  .header-phrase { font-size: 12px; }

  /* topbar — save space, keep account */
  #topbar { font-size: 12px; }
  .topbar-in { min-height: 34px; gap: 8px; }
  .topbar-welcome span { display: none; }
  .top-link { padding: 10px 10px; gap: 4px; }

  /* nav row: toggle + categories + search + cart */
  .nav-inner { flex-wrap: wrap; min-height: auto; padding: 8px 12px; gap: 8px; }
  .box-category-heading { display: none; }
  .nav-menu { display: none; }
  .nav-toggle { display: block; font-size: 24px; padding: 10px 12px; order: -1; }
  .nav-search { min-width: 100%; order: 3; padding: 3px 3px 3px 8px; }
  .nav-search input { font-size: 16px; }
  .nav-cart { order: 1; }
  .nav-cart a { padding: 10px 11px; gap: 6px; font-size: 13px; }
  .cart-badge { min-width: 18px; height: 18px; font-size: 10px; }

  /* drawer becomes a slide-in sheet */
  .nav-drawer-menu {
    display: block; position: fixed; top: 0; left: 0; bottom: 0;
    width: min(300px, 84vw); z-index: 110; overflow-y: auto;
    transform: translateX(-105%); transition: transform .24s ease;
    border: 0; border-right: 1px solid var(--line);
    padding: 18px 0 calc(18px + env(safe-area-inset-bottom, 0px));
  }
  .nav-drawer-menu.open { transform: translateX(0); }
  .nav-drawer-menu::before {
    content: 'Shopahaven'; display: block; font-family: var(--font-head);
    font-weight: 700; font-size: 18px; color: var(--pink-dark); padding: 0 20px 12px;
    border-bottom: 1px solid var(--line); margin-bottom: 8px;
  }
  .nav-drawer-menu a { padding: 13px 20px; font-size: 15px; }

  /* mobile shelves — roomier cards, lots of products visible */
  .shelf { gap: 12px; scroll-padding-left: 15px; }
  .shelf .product-card { min-width: 170px; width: 170px; }

  /* plenty of products, 2-up */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-tile { padding: 11px 12px; gap: 10px; }
  .cat-tile .cat-ico { width: 38px; height: 38px; }
  .cat-tile .cat-name { font-size: 13px; }
  .product-body { padding: 10px 11px 12px; }
  .product-name { font-size: 12.5px; }
  .price-now { font-size: 17px; }
  .stats-band { padding: 16px 14px; }
  .stats-in { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 13px; }
  .stat-card .stat-val { font-size: 23px; }
  .metric-row { grid-template-columns: 1fr; }

  /* full-width hero, thumb-friendly CTAs */
  .hero-slide { padding: 28px 18px; min-height: 260px; }
  .hero-split { flex-direction: column; align-items: stretch; gap: 20px; }
  .hero-search { max-width: none; }
  .hero-visual { min-height: 190px; }
  .hero-float { width: 108px; }
  .value-grid { grid-template-columns: 1fr; gap: 10px; }
  .hero-slide h2 { font-size: 24px; }
  .hero-slide p { font-size: 14.5px; }
  .hero-cta .btn { flex: 1; }
  .hero-nav button { width: 36px; height: 36px; }
  .page { padding-bottom: 24px; }
  .page-head { padding: 16px 0 10px; }
  .page-title { font-size: 21px; }
  .section { padding: 20px 0; }

  /* touch targets */
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; }
  .icon-btn { min-width: 42px; min-height: 40px; padding: 8px 11px; }
  .chip { padding: 10px 16px; min-height: 40px; }
  .qty .qty-btn, .qty-ctl button { width: 38px; height: 38px; }
  .toggle { width: 50px; height: 28px; }
  .toggle::after { width: 22px; height: 22px; }
  .toggle.on::after { left: 25px; }
  .product-actions { gap: 6px; }
  .product-actions .btn { min-height: 40px; padding: 8px; }

  /* rows flex-wrap so nothing clips on narrow screens */
  .offer-tile { align-items: flex-start; flex-wrap: wrap; }
  .offer-tile .off-right { margin-left: auto; }
  .sale-window { width: 100%; }
  .line-item, .li-row, .purchase-row, .alert-tile, .list-card { flex-wrap: wrap; }
  .purchase-row .p-right { white-space: normal; text-align: right; }
  .li-name { overflow-wrap: anywhere; }
  .pd-actions { gap: 8px; }
  .pd-actions .btn { flex: 1; min-width: 0; }
  .pd-best { padding: 13px 14px; }
  .pd-best .pd-price { font-size: 28px; }

  /* charts/metrics fit the phone width */
  .charts-grid { gap: 12px; }
  .auth-wrap { margin: 22px auto; }
  .auth-card { padding: 20px 16px; }
  .footer-cols { gap: 20px; }
}

@media (max-width: 480px) {
  .cat-tiles { grid-template-columns: repeat(2, 1fr); }
  .product-grid { gap: 9px; }
  .metrics-inline, .metric-row { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr; gap: 22px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  #toasts { top: auto; left: 10px; right: 10px; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); align-items: stretch; }
  .toast { max-width: none; }

  /* modal becomes a bottom sheet */
  .modal-mask { align-items: flex-end; padding: 0; }
  .modal {
    width: 100%; max-height: 92vh; overflow-y: auto;
    border-radius: 16px 16px 0 0;
  }
  .modal-foot {
    position: sticky; bottom: 0; background: #fff; border-radius: 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .pd-wrap { gap: 20px; }
  .upcoming-list { grid-template-columns: 1fr; }
  .offer-grid, .plan { grid-template-columns: 1fr; }
}

/* ---------- in-aisle mobile pass (390px): stacked price cards, 44px targets ---------- */
@media (max-width: 480px) {
  /* Approved + reconciliation tables become stacked cards. */
  table.price-table.stackable thead { display: none; }
  table.price-table.stackable, table.price-table.stackable tbody,
  table.price-table.stackable tr, table.price-table.stackable td {
    display: block; width: 100%;
  }
  table.price-table.stackable tr {
    border: 1px solid var(--line); border-radius: var(--radius);
    margin-bottom: 10px; background: #fff; padding: 4px 0;
  }
  table.price-table.stackable tbody tr:nth-child(even) td { background: none; }
  table.price-table.stackable td { border-bottom: 1px dashed var(--line); }
  table.price-table.stackable td:last-child { border-bottom: 0; }
  table.price-table.stackable td::before {
    content: attr(data-label); display: block; font-size: 11px;
    text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
    margin-bottom: 2px;
  }
  table.price-table.stackable .price-inline { width: 100%; }
  table.price-table.stackable input[type='checkbox'] { width: 26px; height: 26px; }
  /* Never clip action rows. */
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 140px; }
  /* Receipt flows go single column. */
  .receipt-filters { grid-template-columns: 1fr; }
  .receipt-filters .btn { min-height: 44px; }
  .receipt-item-row { grid-template-columns: 1fr; }
  .receipt-datetime-grid { grid-template-columns: 1fr; }
  .modal.wide { width: 100%; }
  /* 44px touch targets. */
  .icon-btn { min-width: 44px; min-height: 44px; }
  .qty .qty-btn, .qty-ctl button { width: 44px; height: 44px; }
  .chip { min-height: 44px; }
  .page-btn { min-width: 44px; min-height: 44px; }
  .offer-table.dtr-inline.collapsed > tbody > tr > td.dtr-control::before {
    width: 32px; height: 32px; line-height: 30px;
  }
  .hero-dots span { width: 14px; height: 14px; }
  .hero-nav button { width: 44px; height: 44px; }
  .top-link { padding: 12px 10px; }
  .dropdown-menu a { padding: 12px 16px; }
  .modal-head .x { padding: 10px 14px; font-size: 20px; }
  .sugg-row { min-height: 44px; display: flex; align-items: center; }
  /* Declutter. */
  .hero-float.f3 { display: none; }
  .agg-label { flex-basis: 120px; }
  .news-form { min-width: 0; flex-wrap: wrap; }
  .news-form input { flex: 1 1 200px; min-width: 0; }
  .product-name { font-size: 13px; }
}

/* ---------- list-first start page + ad slots ---------- */
.start-hero {
  background: var(--pink-grad);
  border-radius: var(--radius);
  color: #fff;
  padding: 34px 28px;
  margin: 18px 0 6px;
}
.start-hero .hero-eyebrow { color: rgba(255,255,255,.85); }
.start-title { color: #fff; font-size: 34px; margin: 6px 0 8px; max-width: 560px; }
.start-sub { color: rgba(255,255,255,.92); font-size: 15.5px; max-width: 560px; }
.start-cta { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.start-cta .btn { background: #fff; color: var(--pink-dark); box-shadow: 0 6px 18px rgba(0,0,0,.16); }
.start-cta .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); box-shadow: none; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px; background: #fff; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 8px;
}
.step-card .btn { margin-top: auto; align-self: flex-start; }
.ad-slot {
  margin: 26px 0; min-height: 120px;
  background: var(--panel); border: 1px dashed var(--line);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ad-slot .adsbygoogle { width: 100%; }
/* Per-format placeholder floors (zero CLS while the creative loads). */
.ad-slot[data-format='rectangle'] { min-height: 280px; }
.ad-slot[data-format='horizontal'] { min-height: 110px; }
.ad-fallback {
  display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
  padding: 16px 18px; font-size: 14px; color: var(--heading);
}
.ad-fallback strong { color: var(--pink-dark); }
@media (max-width: 900px) {
  .steps-grid { grid-template-columns: 1fr; }
  .start-hero { padding: 26px 18px; }
  .start-title { font-size: 25px; }
  .start-cta .btn { flex: 1 1 100%; min-height: 48px; }
  .step-card .btn { align-self: stretch; min-height: 44px; }
  .ad-slot { min-height: 100px; }
  .ad-slot[data-format='rectangle'] { min-height: 250px; }
  .ad-slot[data-format='horizontal'] { min-height: 100px; }
}

/* ---------- install / home-screen shortcut ---------- */
.install-topbtn {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 12.5px;
  white-space: nowrap;
}
.install-topbtn:hover { color: #fff; }
.install-topbtn .icon { flex: none; }
.install-hero-btn { min-height: 48px; }
.install-steps { margin: 0 0 12px 20px; padding: 0; display: grid; gap: 8px; }
.install-steps li { font-size: 14px; color: var(--heading); }
.install-linkrow {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 12px;
}
.install-url { font-size: 13px; color: var(--pink-dark); word-break: break-all; }
body.is-standalone [data-install-btn] { display: none !important; }
@media (max-width: 760px) {
  .install-topbtn .install-label { display: none; }
  .install-topbtn { padding: 10px 8px; }
}