/* =====================================================
   AWURA SELLS EVERYTHING
   SHARED STOREFRONT AND ADMIN STYLES
===================================================== */

:root {
  --navy: #17152f;
  --navy-light: #292644;
  --purple: #7862a8;
  --purple-dark: #59447f;
  --lavender: #eee9f7;
  --ivory: #faf8f3;
  --white: #ffffff;
  --gold: #c5a66b;
  --ink: #252336;
  --muted: #6d6a7e;
  --line: #e9e5ee;
  --danger: #a8404c;
  --success: #2c6e4f;
  --shadow: 0 18px 55px rgba(31, 24, 53, .12);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  /* Roles used by both themes (light values here, dark values below). */
  --page: #ffffff;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --tint: #eee9f7;
  --navy-fill: #17152f;
  --navy-ink: #17152f;
  --text-strong: #17152f;
  --accent-text: #59447f;
  --gold-text: #86672a;
  --focus-ring: #17152f;
  --header-bg: rgba(255, 255, 255, .97);
  --admin-bg: #f7f5fa;
  --img-bg: #f0edf3;
  --tint-2: #f6f3fd;
  --tint-line: rgba(90, 50, 160, .25);
  --ok-bg: #e8f3ed;
  --bad-bg: #f8e9eb;
  --bad-line: #ecc8cd;
  --warn-bg: #fff3df;
  --warn-line: #ecd9b0;
  --warn-text: #94671f;
  --accent-card-a: #fffdf8;
  --accent-card-b: #fbf6ea;
  --disabled-bg: #eee;
  --disabled-line: #ddd;
  --disabled-text: #666666;
  --switch-off: #cfc8dc;
  --danger-strong: #8f2f3a;
  --danger-fill: #a8404c;
  color-scheme: light;
}

/* =====================================================
   DARK THEME (set by theme.js on the html element)
   Only the colour roles change; layout never does.
===================================================== */
:root[data-theme="dark"] {
  --page: #0f0e1d;
  --surface: #1a1830;
  --surface-2: #131226;
  --tint: #2a2646;
  --navy-fill: #2d2852;
  --text-strong: #f2effb;
  --ink: #dcd8ec;
  --muted: #a8a3bd;
  --line: #2f2c4d;
  --accent-text: #c4b3ef;
  --gold-text: #c5a66b;
  --focus-ring: #c4b3ef;
  --header-bg: rgba(15, 14, 29, .94);
  --admin-bg: #0d0c1a;
  --img-bg: #24223d;
  --tint-2: #221f3c;
  --tint-line: rgba(160, 135, 230, .35);
  --ok-bg: #15302a;
  --bad-bg: #38192a;
  --bad-line: #6b2d3d;
  --warn-bg: #36290f;
  --warn-line: #6a521c;
  --warn-text: #f2cd8a;
  --accent-card-a: #2a2415;
  --accent-card-b: #221e12;
  --disabled-bg: #25233b;
  --disabled-line: #34314f;
  --disabled-text: #8f8aa6;
  --switch-off: #4a4666;
  --danger-strong: #f090a0;
  --purple: #9a86cf;
  --danger: #e57f8a;
  --success: #62c596;
  --shadow: 0 18px 55px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

/* A short fade when the theme is switched (skipped for reduced motion in theme.js). */
:root.theme-anim body,
:root.theme-anim body * {
  transition: background-color .3s ease, border-color .3s ease, color .3s ease, fill .3s ease, stroke .3s ease !important;
}

/* The sun and moon button: the icon shown is the theme that is active now. */
.theme-toggle .theme-icon { display: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:root:not([data-theme="dark"]) .theme-toggle .theme-icon-sun,
:root[data-theme="dark"] .theme-toggle .theme-icon-moon { display: block; animation: theme-icon-in .35s ease; }
.theme-toggle-floating { position: fixed; top: 14px; right: 14px; z-index: 40; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text-strong); box-shadow: var(--shadow); }
@keyframes theme-icon-in { from { opacity: 0; transform: rotate(-60deg) scale(.6); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .theme-toggle .theme-icon { animation: none !important; } }


* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body,
button,
input,
select,
textarea {
  font-family: var(--sans);
}

button,
input,
select,
textarea {
  font-size: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--tint);
  color: var(--text-strong);
}

/* =====================================================
   SHARED BUTTONS AND TEXT
===================================================== */

.eyebrow {
  display: inline-block;
  color: var(--gold-text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  line-height: 1.5;
}

.primary-button,
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 47px;
  padding: 0 23px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}

.primary-button {
  background: var(--navy-fill);
  color: var(--white);
}

.primary-button:hover {
  background: var(--purple-dark);
  transform: translateY(-2px);
}

.outline-button {
  border-color: var(--navy-fill);
  background: transparent;
  color: var(--text-strong);
}

.outline-button:hover {
  background: var(--navy-fill);
  color: var(--white);
}

.text-button {
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 700;
}

.close-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--tint);
  color: var(--text-strong);
  font-size: 25px;
  line-height: 1;
}

.close-button:hover {
  background: var(--navy-fill);
  color: var(--white);
}

/* =====================================================
   STOREFRONT HEADER
===================================================== */

.announcement {
  padding: 9px 15px;
  background: var(--navy-fill);
  color: var(--white);
  text-align: center;
  font-size: 10px;
  letter-spacing: .1em;
}

.site-header {
  position: sticky;
  z-index: 15;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 0 6%;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(15px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-strong);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: var(--navy-fill);
  color: var(--white);
  font: 27px var(--serif);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .17em;
}

.brand small {
  margin-top: 4px;
  font-size: 8px;
  letter-spacing: .19em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.desktop-nav a {
  position: relative;
  padding: 8px 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--gold);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s;
}

.desktop-nav a:hover::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-strong);
}

.icon-button:hover {
  background: var(--tint);
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 50px;
  background: var(--gold);
  color: var(--navy-ink);
  font-size: 9px;
  font-weight: 700;
}

.menu-toggle,
.mobile-nav {
  display: none;
}

/* =====================================================
   SEARCH PANEL
===================================================== */

.search-panel {
  display: none;
  padding: 18px 6%;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.search-panel.open {
  display: block;
}

.search-panel form {
  display: flex;
  max-width: 850px;
  margin: auto;
  gap: 9px;
}

.search-panel input {
  flex: 1;
  min-width: 0;
  min-height: 47px;
  padding: 0 15px;
  border: 1px solid var(--line);
  outline: none;
  background: var(--surface);
  font-size: 12px;
}

.search-panel input:focus {
  border-color: var(--purple);
}

/* =====================================================
   HERO SLIDESHOW
===================================================== */

.hero {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  background: var(--navy-fill);
}

.hero-slider,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity .8s ease, visibility .8s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroZoom 9s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 13, 31, .84), rgba(15, 13, 31, .48) 53%, rgba(15, 13, 31, .08));
}

.hero-content {
  position: absolute;
  z-index: 2;
  bottom: 76px;
  left: 10%;
  width: min(590px, 80%);
  color: var(--white);
}

.hero-content .eyebrow {
  color: #e2c995;
}

.hero-content h1 {
  margin: 20px 0;
  font: 600 clamp(42px, 6vw, 76px)/1.1 var(--serif);
  letter-spacing: -.025em;
}

.hero-content h1 em,
.editorial-copy h2 em {
  color: #dfc99f;
  font-weight: 600;
}

.hero-content p {
  max-width: 430px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
  line-height: 1.9;
}

.hero-content .primary-button {
  background: var(--gold);
  color: var(--navy-ink);
}

.hero-content .primary-button:hover {
  background: var(--surface);
}

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: var(--white);
  font-size: 28px;
  transform: translateY(-50%);
  transition: background .2s;
}

.hero-arrow:hover {
  background: var(--gold);
  color: var(--navy-ink);
}

.hero-arrow.previous {
  left: 25px;
}

.hero-arrow.next {
  right: 25px;
}

.hero-bottom {
  position: absolute;
  z-index: 3;
  right: 10%;
  bottom: 28px;
  left: 10%;
  display: flex;
  align-items: center;
  gap: 22px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
}

.hero-dot.active {
  background: var(--gold);
}

.hero-progress {
  width: 100px;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, .35);
}

.hero-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold);
}

/* =====================================================
   TRUST STRIP
===================================================== */

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 25px 8%;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.trust-strip > div {
  padding: 4px 20px;
  text-align: center;
}

.trust-strip > div + div {
  border-left: 1px solid var(--line);
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip strong {
  color: var(--text-strong);
  font: 600 16px var(--serif);
}

.trust-strip span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

/* =====================================================
   GENERAL SECTIONS
===================================================== */

.section {
  width: min(1240px, 88%);
  margin: 0 auto;
  padding: 90px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}

.section-heading h2,
.editorial-copy h2,
.newsletter-section h2 {
  margin: 10px 0 0;
  color: var(--text-strong);
  font: 600 clamp(29px, 4vw, 43px)/1.15 var(--serif);
}

.section-heading > p {
  max-width: 310px;
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

/* =====================================================
   CATEGORY GRID
===================================================== */

.categories-section {
  padding-bottom: 55px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
}

.category-card {
  position: relative;
  min-height: 235px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--tint);
  cursor: pointer;
}

.category-card img {
  width: 100%;
  height: 235px;
  object-fit: cover;
  transition: transform .55s;
}

.category-card.no-picture {
  height: 235px;
  background: linear-gradient(145deg, var(--navy, #14122b), var(--purple, #4b2a7b));
}

.category-card:hover img {
  transform: scale(1.07);
}

.category-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 15, 33, .72), transparent 75%);
  content: "";
}

.category-card-content {
  position: absolute;
  z-index: 1;
  right: 18px;
  bottom: 18px;
  left: 18px;
  color: var(--white);
}

.category-card-content span {
  display: block;
  margin-bottom: 5px;
  color: #e3d1ad;
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.category-card-content h3 {
  margin: 0;
  font: 600 22px var(--serif);
}

/* =====================================================
   SHOP TOOLBAR AND FILTERS
===================================================== */

.shop-section {
  padding-top: 65px;
  background: var(--surface-2);
  /* the band runs the full width of the page, not just the content column */
  box-shadow: 0 0 0 100vmax var(--surface-2);
  clip-path: inset(0 -100vmax);
}

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-chip {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  transition: .2s;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: var(--navy-fill);
  background: var(--navy-fill);
  color: var(--white);
}

.sort-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.sort-wrap label {
  color: var(--muted);
  font-size: 10px;
}

.sort-wrap select {
  min-height: 37px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-strong);
  font-size: 10px;
}

.results-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 15px 0;
  color: var(--muted);
  font-size: 10px;
}

/* =====================================================
   PRODUCT GRID
===================================================== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 23px 17px;
}

.product-card {
  min-width: 0;
  background: var(--surface);
  transition: transform .25s, box-shadow .25s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(31, 24, 53, .09);
}

.product-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 4.7;
  background: var(--img-bg);
  cursor: pointer;
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}

.product-card:hover .product-image-wrap img {
  transform: scale(1.05);
}

.product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  background: var(--surface-2);
  color: var(--text-strong);
  font-size: 9px;
  font-weight: 700;
}

.product-tag.sold-out {
  background: var(--bad-bg);
  color: var(--danger);
}

.product-info {
  padding: 14px 12px 16px;
}

.product-category {
  color: var(--purple);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.product-info h3 {
  min-height: 38px;
  margin: 7px 0;
  color: var(--text-strong);
  font: 600 16px/1.3 var(--serif);
}

.product-price {
  display: block;
  margin: 8px 0 12px;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 700;
}

.product-actions {
  display: flex;
  gap: 7px;
}

.product-actions button {
  min-height: 36px;
  border: 1px solid var(--navy-fill);
  font-size: 10px;
  font-weight: 700;
  transition: .2s;
}

.view-product {
  flex: 1;
  background: var(--surface);
  color: var(--text-strong);
}

.add-product {
  flex: 1;
  background: var(--navy-fill);
  color: var(--white);
}

.product-actions button:hover {
  border-color: var(--purple-dark);
  background: var(--purple-dark);
  color: var(--white);
}

.product-actions button:disabled {
  border-color: var(--disabled-line);
  background: var(--disabled-bg);
  color: var(--disabled-text);
  cursor: not-allowed;
}

.empty-products {
  padding: 65px 20px;
  text-align: center;
}

.empty-products h3 {
  color: var(--text-strong);
  font: 600 26px var(--serif);
}

.empty-products p {
  color: var(--muted);
  font-size: 12px;
}

/* =====================================================
   EDITORIAL SECTION
===================================================== */

.editorial-section {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  min-height: 490px;
  background: var(--navy-fill);
}

.editorial-image {
  min-height: 490px;
  overflow: hidden;
}

.editorial-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editorial-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 65px 12%;
  color: var(--white);
}

.editorial-copy h2 {
  margin: 15px 0;
  color: var(--white);
}

.editorial-copy p {
  max-width: 430px;
  margin: 0 0 25px;
  color: rgba(255, 255, 255, .75);
  font-size: 12px;
  line-height: 2;
}

.editorial-copy .outline-button {
  border-color: var(--gold);
  color: var(--white);
}

.editorial-copy .outline-button:hover {
  background: var(--gold);
  color: var(--navy-ink);
}

/* =====================================================
   NEWSLETTER
===================================================== */

.newsletter-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding: 70px 8%;
  background: var(--tint);
}

.newsletter-section h2 {
  max-width: 470px;
  font-size: clamp(28px, 4vw, 38px);
}

.newsletter-section > div > p {
  color: var(--muted);
  font-size: 12px;
}

.newsletter-section form {
  display: grid;
  grid-template-columns: minmax(180px, 280px) auto;
  gap: 8px;
}

.newsletter-section input {
  min-height: 47px;
  padding: 0 14px;
  border: 1px solid var(--line);
  outline: none;
  background: var(--surface);
  font-size: 11px;
}

.newsletter-section input:focus {
  border-color: var(--purple);
}

.newsletter-section form p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--success);
  font-size: 11px;
}

/* =====================================================
   FOOTER
===================================================== */

.site-footer {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 35px;
  padding: 55px 8% 25px;
  background: #111022;
  color: var(--white);
}

.brand-light {
  color: var(--white);
}

.brand-light .brand-mark {
  background: var(--gold);
  color: var(--navy-ink);
}

.footer-brand p,
.site-footer > div > p {
  max-width: 250px;
  color: rgba(255, 255, 255, .58);
  font-size: 11px;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 7px 0 18px;
  color: #e5d2aa;
  font: 600 17px var(--serif);
}

.site-footer > div:not(.footer-brand):not(.footer-bottom) a {
  display: block;
  margin: 10px 0;
  color: rgba(255, 255, 255, .7);
  font-size: 11px;
}

.site-footer a:hover {
  color: var(--gold) !important;
}

.footer-bottom {
  grid-column: 1 / -1;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .13);
  color: rgba(255, 255, 255, .5);
  text-align: center;
  font-size: 10px;
}

/* =====================================================
   CART DRAWER
===================================================== */

.drawer-backdrop,
.modal-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  background: rgba(15, 13, 29, .58);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
}

.drawer-backdrop.open,
.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  z-index: 31;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  height: 100dvh;
  padding: 25px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateX(105%);
  transition: transform .3s ease;
}

.cart-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2 {
  margin: 7px 0 0;
  color: var(--text-strong);
  font: 600 28px var(--serif);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 15px 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item img {
  width: 72px;
  height: 85px;
  object-fit: cover;
  background: var(--surface-2);
}

.cart-item h3 {
  margin: 2px 0 7px;
  color: var(--text-strong);
  font: 600 15px var(--serif);
}

.cart-item p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
}

.cart-item button {
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 10px;
}

.cart-quantity {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
}

.cart-quantity button {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  color: var(--text-strong);
  font-size: 14px;
}
.cart-quantity button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.cart-stock-note {
  color: var(--muted);
  font-size: 10px;
}


.cart-empty {
  margin: auto 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.cart-summary {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.cart-summary > div {
  display: flex;
  justify-content: space-between;
  color: var(--text-strong);
  font-size: 13px;
}

.cart-summary p {
  color: var(--muted);
  font-size: 10px;
}

.cart-summary .primary-button {
  width: 100%;
}

.cart-summary:empty {
  display: none;
}

/* =====================================================
   PRODUCT DETAILS MODAL
===================================================== */

.product-modal {
  position: fixed;
  z-index: 32;
  top: 50%;
  left: 50%;
  width: min(850px, calc(100% - 28px));
  max-height: 90dvh;
  overflow-y: auto;
  padding: 25px;
  background: var(--surface);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -47%);
  transition: opacity .25s, visibility .25s, transform .25s;
}

.product-modal.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
}

.modal-close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
}

.modal-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.modal-image-wrap {
  position: relative;
  min-height: 350px;
  background: var(--surface-2);
}

.modal-image-wrap img {
  width: 100%;
  height: 100%;
  min-height: 350px;
  object-fit: cover;
}

.modal-info {
  align-self: center;
  padding: 20px 0;
}

.modal-info h2 {
  margin: 12px 0;
  color: var(--text-strong);
  font: 600 31px var(--serif);
}

.modal-price {
  display: block;
  margin: 15px 0;
  color: var(--accent-text);
  font-size: 19px;
}

.modal-info > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

.variant-group {
  margin: 18px 0;
}

.variant-group strong {
  display: block;
  margin-bottom: 9px;
  color: var(--text-strong);
  font-size: 11px;
}

.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.variant-options button {
  min-width: 34px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-strong);
  font-size: 10px;
}

.variant-options button.selected {
  border-color: var(--navy-fill);
  background: var(--navy-fill);
  color: var(--white);
}

.stock-message {
  margin: 12px 0;
  color: var(--success);
  font-size: 11px;
}

.stock-message.out {
  color: var(--danger);
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  margin: 10px 0 17px;
  border: 1px solid var(--line);
}

.quantity-control button {
  width: 38px;
  height: 37px;
  border: 0;
  background: var(--surface-2);
  color: var(--text-strong);
  font-size: 17px;
}

.quantity-control span {
  min-width: 38px;
  text-align: center;
  font-size: 12px;
}

.modal-add-button {
  display: flex;
  width: 100%;
}

/* =====================================================
   TOAST NOTIFICATION
===================================================== */

.toast {
  position: fixed;
  z-index: 60;
  right: 20px;
  bottom: 20px;
  max-width: calc(100% - 40px);
  padding: 13px 18px;
  border-radius: 3px;
  background: var(--navy-fill);
  color: var(--white);
  box-shadow: var(--shadow);
  font-size: 11px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: .25s;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

/* =====================================================
   ADMIN DASHBOARD SHARED STYLES
===================================================== */

.admin-body {
  background: var(--admin-bg);
  color: var(--ink);
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 5.5%;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-strong);
}

.admin-brand strong,
.admin-brand small {
  display: block;
}

.admin-brand strong {
  font-size: 14px;
  letter-spacing: .16em;
}

.admin-brand small {
  margin-top: 3px;
  font-size: 8px;
  letter-spacing: .18em;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 12px;
}

.header-links a {
  color: var(--accent-text);
  font-weight: 700;
}

.demo-label {
  padding: 7px 10px;
  border-radius: 30px;
  background: var(--tint);
  color: var(--accent-text);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
}

.admin-shell {
  width: min(1240px, 90%);
  margin: 0 auto;
  padding: 48px 0 35px;
}

.admin-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}

.admin-intro h1,
.panel-heading h2,
.data-tools h2,
.form-heading h2 {
  margin: 8px 0;
  color: var(--text-strong);
  font: 600 clamp(28px, 4vw, 40px) var(--serif);
}

.admin-intro p,
.data-tools p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.notice {
  padding: 15px 17px;
  border: 1px solid var(--warn-line);
  border-left: 3px solid var(--gold);
  background: var(--warn-bg);
  color: var(--warn-text);
  font-size: 12px;
  line-height: 1.6;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin: 22px 0;
}

.stat-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.stat-card span,
.stat-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.stat-card strong {
  display: block;
  margin: 8px 0;
  color: var(--text-strong);
  font-size: 30px;
}

.catalogue-panel,
.data-tools {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.panel-heading h2,
.data-tools h2 {
  font-size: 28px;
}

.catalogue-tools {
  display: flex;
  gap: 9px;
}

.catalogue-tools input,
.catalogue-tools select {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
}

.catalogue-tools input {
  width: 220px;
}

.table-wrap {
  overflow-x: auto;
}

.admin-body table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}

.admin-body th {
  padding: 12px 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.admin-body td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.admin-body td strong {
  color: var(--text-strong);
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 210px;
}

.product-cell img {
  width: 48px;
  height: 52px;
  border-radius: 3px;
  object-fit: cover;
  background: var(--surface-2);
}

.product-cell small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.status {
  display: inline-block;
  padding: 6px 9px;
  border-radius: 20px;
  background: var(--ok-bg);
  color: var(--success);
  font-size: 10px;
  font-weight: 700;
}

.status.low {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.status.out {
  background: var(--bad-bg);
  color: var(--danger);
}

.row-actions {
  display: flex;
  gap: 7px;
}

.row-actions button {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--text-strong);
  font-size: 10px;
}

.row-actions .delete {
  color: var(--danger);
}

.empty-state {
  padding: 30px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.data-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}

.data-tools h2 {
  margin-bottom: 5px;
}

.data-tools p {
  max-width: 600px;
}

.data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}

.admin-footer {
  margin-top: 24px;
  color: var(--accent-text);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

/* =====================================================
   ADMIN PRODUCT FORM
===================================================== */

.modal-shade {
  position: fixed;
  z-index: 40;
  inset: 0;
  background: rgba(15, 13, 29, .58);
  opacity: 0;
  visibility: hidden;
  transition: .2s;
}

.modal-shade.open {
  opacity: 1;
  visibility: visible;
}

.product-form-modal {
  position: fixed;
  z-index: 41;
  top: 50%;
  left: 50%;
  width: min(700px, calc(100% - 28px));
  max-height: 92dvh;
  overflow: auto;
  padding: 25px;
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -47%);
  transition: .2s;
}

.product-form-modal.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
}

.form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.form-heading h2 {
  font-size: 29px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--text-strong);
  font-size: 11px;
  font-weight: 700;
}

.form-grid label small {
  color: var(--muted);
  font-weight: 400;
}

.form-grid input:not([type="checkbox"]),
.form-grid select,
.form-grid textarea {
  width: 100%;
  min-height: 41px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 3px;
  outline: none;
  color: var(--ink);
  font-size: 12px;
}

.form-grid textarea {
  resize: vertical;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  border-color: var(--purple);
}

.wide {
  grid-column: 1 / -1;
}

.check-label {
  display: flex !important;
  align-items: center;
}

.check-label input {
  accent-color: var(--purple);
}

.form-error {
  min-height: 17px;
  color: var(--danger);
  font-size: 11px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.admin-toast {
  position: fixed;
  z-index: 60;
  right: 20px;
  bottom: 20px;
  padding: 13px 17px;
  border-radius: 4px;
  background: var(--navy-fill);
  color: var(--white);
  font-size: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: .2s;
}

.admin-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* =====================================================
   ACCOUNT, CHECKOUT AND ORDER TRACKING
===================================================== */

.account-button.is-signed-in::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--gold);
}

.account-button.is-signed-in.has-unread::after {
  top: 4px;
  right: 4px;
  width: 11px;
  height: 11px;
  background: var(--danger-fill);
}

.app-banner {
  position: fixed;
  z-index: 40;
  top: 14px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(520px, calc(100% - 24px));
  padding: 12px 14px;
  border-left: 4px solid var(--gold);
  background: var(--navy-fill);
  box-shadow: var(--shadow);
  color: var(--white);
  font-size: 13px;
  line-height: 1.5;
  transform: translateX(-50%);
}

.app-banner span {
  flex: 1;
}

.app-banner-view {
  flex: none;
  padding: 6px 12px;
  border: 1px solid var(--gold);
  border-radius: 3px;
  background: transparent;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

.app-banner-close {
  flex: none;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--white);
  font-size: 22px;
  line-height: 1;
}

.app-banner button:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.update-unread {
  border-left: 3px solid var(--gold);
  background: var(--surface-2);
}

.update-time {
  color: var(--muted);
  font-size: 10px;
}

.auth-modal {
  position: fixed;
  z-index: 34;
  top: 50%;
  left: 50%;
  width: min(460px, calc(100% - 28px));
  max-height: 90dvh;
  overflow-y: auto;
  padding: 30px 28px 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -47%);
  transition: opacity .25s, visibility .25s, transform .25s;
}

.auth-modal.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
}

.checkout-modal {
  width: min(640px, calc(100% - 28px));
}

.auth-modal h2 {
  margin: 8px 0 6px;
  color: var(--text-strong);
  font: 600 29px var(--serif);
}

.auth-note {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-field {
  display: grid;
  gap: 7px;
  color: var(--text-strong);
  font-size: 11px;
  font-weight: 700;
}

.auth-field input,
.auth-field select,
.auth-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  outline: none;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  transition: border-color .2s;
}

.auth-field textarea {
  resize: vertical;
}

.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
  border-color: var(--purple);
}

.auth-field small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 3px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
  transition: color .2s;
}

.password-toggle:hover {
  color: var(--text-strong);
}

.password-toggle:focus-visible,
.auth-modal button:focus-visible,
.auth-modal a:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.password-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye-off {
  display: block;
}

.otp-input {
  text-align: center;
  letter-spacing: .45em;
  font-size: 20px !important;
  font-weight: 700 !important;
}

.auth-message {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.6;
}

.auth-message:empty {
  display: none;
}

.auth-message.error,
.auth-message.success,
.auth-message.info {
  padding: 10px 12px;
  border-left: 3px solid var(--danger);
  background: var(--bad-bg);
  color: var(--danger);
}

.auth-message.success {
  border-left-color: var(--success);
  background: var(--ok-bg);
  color: var(--success);
}

.auth-message.info {
  border-left-color: var(--purple);
  background: var(--tint);
  color: var(--accent-text);
}

.auth-form .primary-button,
.auth-form .outline-button {
  width: 100%;
}

.auth-form .primary-button:disabled {
  opacity: .6;
  cursor: wait;
  transform: none;
}

.auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.auth-switch {
  margin: 18px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.account-summary {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.account-summary strong,
.account-summary span {
  display: block;
}

.account-summary strong {
  color: var(--text-strong);
  font-size: 14px;
}

.account-summary span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.account-summary span:empty {
  display: none;
}

.account-orders-title {
  margin: 0 0 10px;
  color: var(--text-strong);
  font: 600 18px var(--serif);
}

.order-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.order-card {
  padding: 13px 14px;
  border: 1px solid var(--line);
}

.order-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.order-card-top strong {
  color: var(--text-strong);
  font-size: 13px;
}

.order-card p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px dashed var(--gold);
  background: var(--surface-2);
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .12em;
}

.code-box button {
  flex: none;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--accent-text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.checkout-grid .span-all {
  grid-column: 1 / -1;
}

.checkout-summary {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 12px;
}

.checkout-summary h3 {
  margin: 0 0 10px;
  color: var(--text-strong);
  font: 600 16px var(--serif);
}

.checkout-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  color: var(--ink);
}

.checkout-line small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.checkout-line.total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--text-strong);
  font-weight: 700;
}

.pay-method {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.pay-method img {
  flex: none;
  width: 64px;
  height: auto;
  border-radius: 4px;
}

.pay-method p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.7;
}

.pay-method strong {
  color: var(--text-strong);
}

.checkout-done-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.track-shell {
  width: min(760px, 90%);
  margin: 0 auto;
  padding: 64px 0 90px;
}

.policy-shell h2 {
  margin: 34px 0 8px;
  color: var(--text-strong);
  font: 600 24px var(--serif);
}

.policy-shell p,
.policy-shell li {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.8;
}

.policy-shell ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.todo {
  padding: 1px 5px;
  background: var(--warn-bg);
  color: var(--warn-text);
}

.track-title {
  margin: 8px 0 8px;
  color: var(--text-strong);
  font: 600 clamp(30px, 5vw, 44px) var(--serif);
}

.track-form {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
  margin: 22px 0 16px;
}

.track-result {
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.track-result h2 {
  margin: 0 0 4px;
  color: var(--text-strong);
  font: 600 24px var(--serif);
}

.track-result p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.track-items {
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.track-items li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
}

.track-items small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.image-preview {
  display: flex;
  align-items: center;
  gap: 12px;
}

.image-preview img {
  flex: none;
  width: 84px;
  height: 84px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: var(--surface-2);
}

.image-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.image-preview p.error {
  color: var(--danger);
}

.order-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 18px;
  color: var(--ink);
  font-size: 12px;
}

.order-tools input {
  width: 74px;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.order-tools .outline-button {
  min-height: 38px;
  padding: 0 14px;
}

.order-detail {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.order-detail strong {
  color: var(--text-strong);
  font-size: 12px;
}

.proof-link {
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--purple);
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
}

.admin-gate {
  width: min(460px, 100%);
  margin: 20px auto 40px;
  padding: 30px 28px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-gate h1 {
  margin: 8px 0 8px;
  color: var(--text-strong);
  font: 600 28px var(--serif);
}

.header-links .text-button {
  font-size: 12px;
}

@media (max-width: 700px) {
  .auth-modal {
    padding: 24px 18px 20px;
  }

  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .checkout-grid .span-all {
    grid-column: auto;
  }

  .track-form {
    grid-template-columns: 1fr;
  }

  .track-form .primary-button {
    width: 100%;
  }
}

/* =====================================================
   RESPONSIVE TABLET
===================================================== */

@media (max-width: 1000px) {
  .site-header {
    padding: 0 4%;
  }

  .desktop-nav {
    gap: 17px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-footer {
    grid-template-columns: repeat(2, 1fr);
  }

  .newsletter-section {
    padding-right: 5%;
    padding-left: 5%;
  }
}

/* =====================================================
   RESPONSIVE MOBILE
===================================================== */

@media (max-width: 700px) {
  html {
    scroll-padding-top: 72px;
  }

  .site-header {
    min-height: 70px;
    padding: 0 4%;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 23px;
  }

  .brand strong {
    font-size: 12px;
  }

  .brand small {
    font-size: 7px;
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: grid;
  }

  .mobile-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    padding: 0 5%;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height .3s, visibility .3s, padding .3s;
  }

  .mobile-nav.open {
    max-height: 350px;
    padding-top: 10px;
    padding-bottom: 15px;
    visibility: visible;
  }

  .mobile-nav a {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    color: var(--text-strong);
    font-size: 12px;
  }

  .hero {
    min-height: 550px;
  }

  .hero-content {
    bottom: 84px;
    left: 8%;
    width: 84%;
  }

  .hero-content h1 {
    font-size: clamp(39px, 10vw, 57px);
  }

  .hero-arrow {
    top: auto;
    bottom: 20px;
    width: 36px;
    height: 36px;
    transform: none;
  }

  .hero-arrow.previous {
    left: auto;
    right: 65px;
  }

  .hero-arrow.next {
    right: 18px;
  }

  .hero-bottom {
    right: auto;
    bottom: 34px;
    left: 8%;
  }

  .trust-strip {
    padding: 20px 3%;
  }

  .trust-strip > div {
    padding: 3px 7px;
  }

  .trust-strip strong {
    font-size: 13px;
  }

  .trust-strip span {
    font-size: 9px;
  }

  .section {
    width: 90%;
    padding: 65px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .category-grid {
    gap: 11px;
  }

  .category-card,
  .category-card img {
    min-height: 185px;
    height: 185px;
  }

  .category-card-content h3 {
    font-size: 18px;
  }

  .shop-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-chips {
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .filter-chip {
    flex: 0 0 auto;
  }

  .sort-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .sort-wrap select {
    flex: 1;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 10px;
  }

  .product-info {
    padding: 11px 9px 13px;
  }

  .product-info h3 {
    font-size: 14px;
  }

  .product-actions button {
    font-size: 9px;
  }

  .editorial-section {
    grid-template-columns: 1fr;
  }

  .editorial-image {
    min-height: 280px;
    max-height: 350px;
  }

  .editorial-copy {
    padding: 45px 8%;
  }

  .newsletter-section {
    align-items: flex-start;
    flex-direction: column;
    padding: 50px 6%;
  }

  .newsletter-section form {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .newsletter-section form p {
    grid-column: auto;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
    gap: 25px 17px;
    padding: 45px 6% 20px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    grid-column: 1 / -1;
  }

  .modal-layout {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .modal-image-wrap,
  .modal-image-wrap img {
    min-height: 230px;
    max-height: 300px;
  }

  .modal-info {
    padding: 5px 0;
  }

  .product-modal {
    padding: 17px;
  }

  .modal-info h2 {
    font-size: 25px;
  }

  /* Admin mobile */
  .admin-shell {
    width: 92%;
    padding-top: 32px;
  }

  .admin-intro {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-intro .button {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
  }

  .stat-card {
    padding: 15px;
  }

  .stat-card strong {
    font-size: 25px;
  }

  .panel-heading,
  .data-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .catalogue-panel,
  .data-tools {
    padding: 15px;
  }

  .catalogue-tools {
    flex-direction: column;
  }

  .catalogue-tools input,
  .catalogue-tools select {
    width: 100%;
    min-height: 43px;
  }

  .data-actions {
    justify-content: flex-start;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: auto;
  }

  .product-form-modal {
    padding: 18px;
  }

  .header-links {
    gap: 10px;
  }

  .demo-label {
    display: none;
  }
}

/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 380px) {
  .brand {
    gap: 7px;
  }

  .brand strong {
    font-size: 10px;
  }

  .brand small {
    font-size: 6px;
  }

  .header-actions {
    gap: 4px;
  }

  .category-card,
  .category-card img {
    min-height: 155px;
    height: 155px;
  }

  .product-actions {
    flex-direction: column;
  }

  .product-actions button {
    width: 100%;
  }

  .cart-drawer {
    padding: 18px;
  }
}

/* =====================================================
   ACCESSIBILITY AND REDUCED MOTION
===================================================== */

:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
/* ---------- owner notification management ---------- */

.notif-panel {
  margin-top: 20px;
}

.notif-intro {
  max-width: 760px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.notif-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 16px;
  margin-bottom: 18px;
}

.notif-balance,
.notif-global,
.notif-event {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
}

.notif-balance {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px;
}

.notif-label {
  color: var(--accent-text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.notif-balance-value {
  color: var(--text-strong);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
}

.notif-balance small,
.notif-global small,
.notif-event small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.notif-balance .outline-button {
  min-height: 38px;
  margin-top: 4px;
  padding: 0 14px;
}

.notif-balance .outline-button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.notif-global {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}

.notif-global-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.notif-global-text strong,
.notif-event-title {
  color: var(--text-strong);
  font-size: 15px;
}

.notif-error {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--bad-line);
  border-radius: 4px;
  background: var(--bad-bg);
  color: var(--danger);
  font-size: 12px;
}

.notif-events {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.notif-events > .empty-state {
  grid-column: 1 / -1;
}

.notif-event {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.notif-event:hover {
  border-color: var(--purple);
}

.notif-event-title {
  margin: 0;
  font-weight: 700;
}

.notif-channel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
}

.notif-channel-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.notif-channel-text strong {
  color: var(--ink);
  font-size: 13px;
}

.notif-channel.paused .notif-channel-text small {
  color: var(--warn-text);
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 30px;
  background: var(--switch-off);
  cursor: pointer;
  transition: background .2s ease, opacity .2s ease;
}

.switch::before {
  content: "";
  position: absolute;
  inset: -7px -4px;
}

.switch[aria-checked="true"] {
  background: var(--purple);
}

.switch:disabled {
  cursor: progress;
  opacity: .65;
}

.switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(23, 21, 47, .3);
  transition: transform .2s ease;
}

.switch[aria-checked="true"] .switch-knob {
  transform: translateX(22px);
}

.notif-status {
  min-height: 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.notif-status.saved {
  color: var(--success);
}

.notif-status.error {
  color: var(--danger);
}

.notif-activity-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.notif-activity-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
}

.notif-activity-head .outline-button {
  min-height: 38px;
  padding: 0 14px;
}

.activity-table td {
  font-size: 12px;
  vertical-align: top;
}

.activity-table .activity-error {
  display: block;
  margin-top: 4px;
  color: var(--danger);
  font-size: 11px;
}

.status.muted {
  background: var(--tint);
  color: var(--accent-text);
}

.status.pending {
  background: var(--warn-bg);
  color: var(--warn-text);
}

@media (max-width: 760px) {
  .notif-top,
  .notif-events {
    grid-template-columns: 1fr;
  }

  .notif-global {
    align-items: flex-start;
  }

  .notif-activity-head {
    align-items: stretch;
    flex-direction: column;
  }

  .notif-activity-head .outline-button {
    width: 100%;
  }
}

/* ---------- owner: SMS balance ---------- */

.notif-balance-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.notif-balance-actions .outline-button {
  margin-top: 0;
}

.notif-levels {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.notif-levels-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.notif-levels label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.notif-levels input {
  width: 110px;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
}

.notif-levels .outline-button {
  min-height: 38px;
  padding: 0 14px;
}

.notif-alert {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--warn-line);
  border-radius: 4px;
  background: var(--warn-bg);
  color: var(--warn-text);
  font-size: 12px;
  line-height: 1.6;
}

.notif-alert.critical {
  border-color: var(--bad-line);
  background: var(--bad-bg);
  color: var(--danger);
}

@media (max-width: 760px) {
  .notif-levels input {
    width: 100%;
  }

  .notif-levels label {
    flex: 1 1 120px;
  }

  .notif-levels .outline-button {
    width: 100%;
  }
}

/* ---------- notification bell ---------- */

.bell-wrap {
  position: relative;
}

.bell-wrap[hidden] {
  display: none;
}

.bell-count {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 50px;
  background: var(--purple);
  color: var(--white);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.bell-count[hidden] {
  display: none;
}

.bell-panel {
  position: absolute;
  z-index: 60;
  top: calc(100% + 10px);
  right: -60px;
  display: flex;
  flex-direction: column;
  width: 360px;
  max-width: calc(100vw - 24px);
  max-height: min(70vh, 520px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: bell-in .16s ease-out;
}

.bell-panel[hidden] {
  display: none;
}

@keyframes bell-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.bell-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  color: var(--text-strong);
}

.bell-markall {
  padding: 6px 4px;
  border: 0;
  background: transparent;
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.bell-markall:hover:not(:disabled) {
  text-decoration: underline;
}

.bell-markall:disabled {
  color: var(--muted);
  cursor: default;
  opacity: .6;
}

.bell-list {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.bell-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 13px 16px 13px 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background .15s ease;
}

.bell-item:last-child {
  border-bottom: 0;
}

.bell-item:hover {
  background: var(--surface-2);
}

.bell-item.unread {
  background: var(--tint);
}

.bell-item.unread::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple);
}

.bell-item-title {
  display: block;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 500;
}

.bell-item.unread .bell-item-title {
  font-weight: 700;
}

.bell-item-text {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.bell-item-time {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.bell-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 34px 26px 38px;
  text-align: center;
}

.bell-empty[hidden] {
  display: none;
}

.bell-empty svg {
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bell-empty strong {
  color: var(--text-strong);
  font-size: 14px;
}

.bell-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.bell-error {
  margin: 0;
  padding: 10px 16px;
  background: var(--bad-bg);
  color: var(--danger);
  font-size: 12px;
}

.bell-error[hidden] {
  display: none;
}

@media (max-width: 760px) {
  .bell-wrap {
    position: static;
  }

  .bell-panel {
    position: fixed;
    top: 70px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    /* The header (and the announcement bar above it) sit above the panel, so leave room for both. */
    max-height: calc(100vh - 130px);
    max-height: calc(100dvh - 130px);
  }
}

/* ---------- installable app ---------- */
.offline-page { min-height: 100vh; display: grid; place-items: center; background: var(--surface-2); padding: 24px 16px; }
.offline-card { max-width: 440px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 36px 28px; }
.offline-card img { border-radius: 50%; margin-bottom: 14px; }
.offline-card h1 { font-family: var(--serif); color: var(--text-strong); margin: 6px 0 12px; font-size: 1.9rem; }
.offline-card p { color: var(--ink); line-height: 1.6; margin: 0 0 12px; }
.offline-card .offline-note { color: var(--muted); font-size: .9rem; }
.offline-card .primary-button { margin-top: 8px; }

.install-box { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 16px 18px; }
.install-box[hidden], .install-help[hidden] { display: none; }
.install-box strong { display: block; color: var(--white); }
.install-box span { color: rgba(255,255,255,.75); font-size: .92rem; }
.install-button { border: 1px solid var(--gold); background: transparent; color: var(--white); border-radius: 999px; padding: 11px 22px; font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; }
.install-button:hover, .install-button:focus-visible { background: var(--gold); color: var(--navy-ink); }
.install-help { flex-basis: 100%; margin: 0; padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.9); font-size: .92rem; line-height: 1.6; }
.install-help ol { margin: 6px 0 0; padding-left: 20px; }

.install-help p { margin: 10px 0 0; }
.install-box { font-size: .9rem; }
.install-box strong { font-size: 1rem; }
.install-help li { margin: 2px 0; }
.install-help strong { font-size: inherit; display: inline; }
@media (hover: none) { .install-button:hover { background: transparent; color: var(--white); } }

/* ---------- push switch inside the bell panel ---------- */
.bell-push { padding: 12px 16px 14px; border-top: 1px solid var(--line); background: var(--tint); border-radius: 0 0 6px 6px; flex-shrink: 0; }
.bell-push[hidden], .bell-push-button[hidden], .bell-push-note[hidden] { display: none; }
.bell-push-text { margin: 0 0 8px; color: var(--ink); font-size: 13px; line-height: 1.5; }
.bell-push-text:last-child { margin-bottom: 0; }
.bell-push-button { min-height: 40px; padding: 8px 16px; border: 1px solid var(--purple-dark); border-radius: 50px; background: var(--surface); color: var(--accent-text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.bell-push-button:hover, .bell-push-button:focus-visible { background: var(--purple-dark); color: var(--white); }
.bell-push-button[disabled] { opacity: .6; cursor: default; }
.bell-push-note { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.bell-push-note.error { color: var(--danger); }
@media (hover: none) { .bell-push-button:hover { background: var(--surface); color: var(--accent-text); } }

/* ---------- owner push panel ---------- */
.push-setup { margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.push-setup summary { cursor: pointer; font-weight: 600; color: var(--text-strong); }
.push-setup ol { margin: 10px 0 0; padding-left: 20px; line-height: 1.7; color: var(--ink); font-size: 14px; }
.push-setup code { padding: 1px 5px; border-radius: 4px; background: var(--tint); font-size: 13px; overflow-wrap: anywhere; }
.push-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0 8px; }
.push-stats > div { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.push-stats strong { font-family: var(--serif); font-size: 20px; color: var(--text-strong); overflow-wrap: anywhere; }
.push-note { display: block; margin: 0 0 14px; color: var(--muted); line-height: 1.5; }
.push-test { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 18px; }

/* ---------- staff management (owner dashboard) ---------- */
.staff-panel .panel-heading {
  align-items: flex-start;
  gap: 16px;
}

.staff-form,
.staff-editor,
.staff-history {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
}

.staff-form {
  display: grid;
  gap: 14px;
}

.staff-form select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.staff-perms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  border: 0;
}

.staff-perms legend {
  margin-bottom: 8px;
  padding: 0;
  color: var(--text-strong);
  font-weight: 700;
}

.staff-perm-group {
  display: grid;
  align-content: start;
  gap: 8px;
}

.staff-perm-group strong {
  color: var(--accent-text);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.staff-perm-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

.staff-perm-row input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--purple);
}

.staff-perm-row input:disabled + span {
  color: var(--muted);
}

.staff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.staff-secret {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  border-color: var(--gold);
  background: var(--surface);
}

.staff-secret-value {
  display: block;
  padding: 14px;
  border: 1px dashed var(--gold);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px;
  letter-spacing: .12em;
  overflow-wrap: anywhere;
  user-select: all;
}

.staff-history-list {
  display: grid;
  gap: 6px;
  margin: 10px 0 14px;
  padding: 0;
  list-style: none;
  color: var(--ink);
  font-size: 14px;
}

.staff-history-list li {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 640px) {
  .staff-secret-value {
    font-size: 18px;
  }

  .staff-actions .primary-button,
  .staff-actions .outline-button {
    flex: 1 1 100%;
  }
}

/* ---------- delete account and Customer Centre contact ---------- */
.privacy-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.delete-account-button {
  color: var(--danger);
  border-color: var(--danger);
}

.delete-account-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  font-size: 14px;
  line-height: 1.6;
}

.delete-account-panel p {
  margin: 0;
  color: var(--text-strong);
}

.delete-account-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
}

.delete-account-list li + li {
  margin-top: 6px;
}

.delete-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.delete-account-confirm {
  background: var(--danger-fill);
  border-color: var(--danger);
}

.support-contact {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--gold);
  border-radius: 5px;
  background: var(--surface-2);
}

.support-contact-list {
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

.support-contact-list a {
  color: var(--accent-text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .delete-account-actions .primary-button,
  .delete-account-actions .outline-button {
    flex: 1 1 100%;
  }
}

/* =====================================================
   LOADING STATES (ui.js)
   Splash screen, button spinner, top progress bar, skeletons.
===================================================== */

.app-splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: var(--surface-2);
  opacity: 1;
  visibility: visible;
  transition: opacity .5s ease, visibility 0s linear .5s;
  /* Safety net that needs no script: the splash always goes away after 10 seconds. */
  animation: appSplashFailsafe 0s linear 10s forwards;
}

.app-splash.is-hiding {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-splash.is-updating {
  animation: none;
  z-index: 10001;
}

@keyframes appSplashFailsafe {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

.app-splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
}

.app-splash-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
}

.app-splash-logo img {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  box-shadow: 0 16px 42px rgba(31, 24, 53, .24);
  animation: splashLogoIn .8s cubic-bezier(.2, .8, .2, 1) both, splashBreathe 2.6s ease-in-out .8s infinite;
}

.app-splash-ring {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(197, 166, 107, .22);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: splashSpin 1.15s linear infinite;
}

.app-splash-ring-2 {
  inset: 11px;
  border-color: rgba(120, 98, 168, .16);
  border-bottom-color: var(--purple);
  animation-duration: 1.8s;
  animation-direction: reverse;
}

.app-splash-name {
  margin: 28px 0 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--text-strong);
  animation: splashRise .7s ease .25s both;
}

.app-splash-status {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  animation: splashRise .7s ease .4s both;
}

.app-splash-bar {
  width: 150px;
  height: 3px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--tint);
}

.app-splash-bar span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--purple), var(--gold));
  animation: splashBar 1.25s ease-in-out infinite;
}

@keyframes splashSpin { to { transform: rotate(360deg); } }
@keyframes splashBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
@keyframes splashLogoIn { from { opacity: 0; transform: scale(.72); } to { opacity: 1; transform: scale(1); } }
@keyframes splashRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes splashBar { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }

/* Thin bar at the top of the screen while a request or page change is under way */
.top-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  height: 3px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.top-progress::before {
  content: "";
  display: block;
  width: 35%;
  height: 100%;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, var(--purple), var(--gold));
  transform: translateX(-110%);
}

.top-progress.is-active {
  opacity: 1;
}

.top-progress.is-active::before {
  animation: topProgress 1.1s ease-in-out infinite;
}

@keyframes topProgress {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(310%); }
}

/* A button that is saving or sending */
.is-loading {
  position: relative;
  pointer-events: none;
  cursor: progress;
  opacity: .92;
}

.is-loading::before {
  content: "";
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  margin-right: .6em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -.17em;
  animation: btnSpin .7s linear infinite;
}

.is-loading.is-loading-icon > * {
  opacity: 0;
}

.is-loading.is-loading-icon::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.1em;
  height: 1.1em;
  margin: -.55em 0 0 -.55em;
}

@keyframes btnSpin { to { transform: rotate(360deg); } }

/* Placeholder shapes while a list loads */
.skeleton-list {
  display: grid;
  gap: 10px;
}

.skeleton {
  display: block;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--lavender) 25%, var(--tint-2) 50%, var(--lavender) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.3s ease-in-out infinite;
}

.skeleton-block { height: 66px; }

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- owner order alerts (dashboard) ---------- */

.alert-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-text);
  cursor: pointer;
}

.alert-bell[hidden] {
  display: none;
}

.alert-bell svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.alert-bell-count,
.alert-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 20px;
  background: var(--danger-fill);
  color: var(--white);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.alert-bell-count {
  position: absolute;
  top: -5px;
  right: -5px;
}

.alert-bell-count[hidden],
.alert-count[hidden] {
  display: none;
}

.alert-count {
  margin-left: 8px;
  vertical-align: middle;
}

.alert-panel {
  margin: 0 0 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.alert-panel[hidden] {
  display: none;
}

.alert-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: 8px;
  background: var(--navy-fill);
  color: var(--white);
  border-left: 5px solid var(--gold);
  animation: alert-pulse 1.4s ease-in-out 3;
}

.alert-banner[hidden] {
  display: none;
}

.alert-banner-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
}

.alert-banner-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.alert-banner-text strong {
  font-size: 16px;
}

.alert-banner-text span {
  color: #ddd7ee;
  font-size: 13px;
}

.alert-banner .outline-button {
  border-color: #6c648f;
  color: var(--white);
  background: transparent;
}

@keyframes alert-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(197, 166, 107, 0); }
  50% { box-shadow: 0 0 0 6px rgba(197, 166, 107, .35); }
}

.alert-device {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--tint);
}

.alert-device p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.alert-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.alert-item,
.alert-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 13px;
}

.alert-empty {
  color: var(--muted);
}

.alert-item.unread {
  border-color: var(--purple);
  background: var(--surface);
  box-shadow: inset 4px 0 0 var(--purple);
}

.alert-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.alert-item-main small {
  color: var(--muted);
}

.alert-item button {
  flex: 0 0 auto;
}

.alert-test-form {
  margin: 0 0 12px;
}

.alert-test-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.alert-test-row input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

@media (max-width: 700px) {
  .alert-banner,
  .alert-device,
  .alert-test-row {
    flex-direction: column;
    align-items: stretch;
  }

  .alert-banner .outline-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .alert-banner {
    animation: none;
  }
}

/* ---------- managed homepage content (slides and moving headline) ---------- */

.hero-arrow[hidden],
.hero-dots[hidden] {
  display: none;
}

.hero-slide-plain {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 55%, var(--purple-dark) 100%);
}

.ticker {
  overflow: hidden;
  background: var(--navy-fill);
  color: var(--ivory);
  border-bottom: 1px solid rgba(197, 166, 107, .35);
  font-size: 13px;
  letter-spacing: .04em;
}

.ticker-track {
  display: flex;
  width: max-content;
  padding: 11px 0;
  animation: ticker-move 40s linear infinite;
}

@media (hover: hover) {
  .ticker:hover .ticker-track {
    animation-play-state: paused;
  }
}

.ticker-group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.ticker-item {
  padding: 0 22px;
  white-space: nowrap;
}

.ticker-mark {
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}

@keyframes ticker-move {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    width: auto;
    justify-content: center;
    animation: none;
  }

  .ticker-group[aria-hidden="true"],
  .ticker-group .ticker-mark,
  .ticker-group .ticker-item:not(:first-child) {
    display: none;
  }

  .ticker-item {
    white-space: normal;
    text-align: center;
  }
}

/* ---------- dashboard: homepage slideshow and moving headline ---------- */

.sf-card,
.sf-slot {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.sf-card {
  padding: 18px;
}

.sf-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
}

.sf-card-head > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sf-slot summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
}

.sf-slot-num {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sf-slot-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sf-chip {
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--tint);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 700;
}

.sf-chip.on {
  background: var(--ok-bg);
  color: var(--success);
}

.sf-chip.none {
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--muted);
}

.sf-body {
  padding: 4px 16px 18px;
}

.sf-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sf-picture {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sf-thumb {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 80px;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.sf-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sf-hint {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.sf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.sf-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.sf-form select {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font: inherit;
}

@media (max-width: 700px) {
  .sf-picture {
    flex-direction: column;
    align-items: stretch;
  }

  .sf-thumb {
    width: 100%;
    height: 120px;
  }

  .sf-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- dashboard layout: sidebar, page header, mobile drawer ---------- */

.view-off {
  display: none !important;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-strong);
  cursor: pointer;
}

.nav-toggle[hidden] {
  display: none !important;
}

.nav-toggle svg,
.nav-item svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.admin-app-on .admin-shell {
  width: 100%;
  max-width: none;
  padding: 0;
}

.admin-layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  align-items: start;
  min-height: calc(100vh - 74px);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 14px 18px;
  background: var(--navy-fill);
  color: #d8d3ea;
}

.nav-section {
  margin: 0 0 20px;
}

.nav-section[hidden] {
  display: none;
}

.nav-group {
  margin: 0 0 8px;
  padding: 0 12px;
  color: #9a93b8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
  padding: 11px 12px;
  border-radius: 8px;
  color: #d8d3ea;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}

.nav-item[hidden] {
  display: none;
}

.nav-item:hover {
  background: rgba(255, 255, 255, .07);
  color: var(--white);
}

.nav-item:focus-visible,
.nav-store:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.nav-item[aria-current="page"] {
  background: rgba(120, 98, 168, .32);
  color: var(--white);
  box-shadow: inset 3px 0 0 var(--gold);
}

.nav-store {
  display: block;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: #bdb6d6;
  font-size: 12.5px;
  font-weight: 600;
}

.nav-store:hover {
  color: var(--white);
}

.admin-main {
  min-width: 0;
  padding: 34px clamp(18px, 3vw, 44px) 40px;
}

.admin-main > .catalogue-panel,
.admin-main > .data-tools,
.admin-main > .alert-panel {
  margin: 0 0 24px;
}

.admin-main > .notice {
  margin: 0 0 20px;
}

.admin-main .admin-intro h1 {
  outline: none;
}

.stat-card {
  position: relative;
}

.stat-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--tint);
  color: var(--accent-text);
}

.stat-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-shade {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(23, 21, 47, .5);
}

.nav-shade[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .admin-header {
    gap: 10px;
    padding: 12px 4%;
  }

  .admin-header .header-links {
    gap: 10px;
    margin-left: auto;
  }

  .admin-header .header-links > a,
  .admin-header .demo-label {
    display: none;
  }

  .admin-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    width: min(300px, 86vw);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .22s ease, visibility 0s linear .22s;
  }

  body.nav-open .admin-sidebar {
    transform: translateX(0);
    visibility: visible;
    transition: transform .22s ease, visibility 0s;
  }

  body.nav-open {
    overflow: hidden;
  }

  .admin-main {
    padding: 24px 4% 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-sidebar {
    transition: none;
  }
}

.stat-card .stat-icon {
  display: flex;
  margin: 0;
  color: var(--accent-text);
  font-size: 0;
}

/* ---------- Customer Centre on the storefront ---------- */

.customer-centre {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 32px;
  margin: 0 auto;
  padding: 56px 5.5%;
  background: var(--tint);
}

.customer-centre[hidden] {
  display: none;
}

.customer-centre h2 {
  margin: 8px 0 10px;
}

.customer-centre p {
  margin: 0;
  color: var(--muted);
}

.customer-centre-list,
.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.customer-centre-list li {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow-wrap: anywhere;
}

.customer-centre-list a {
  color: var(--accent-text);
  font-weight: 700;
}

.footer-contact-list li {
  overflow-wrap: anywhere;
}

.footer-contact-list a {
  display: inline;
}

@media (max-width: 800px) {
  .customer-centre {
    grid-template-columns: 1fr;
    padding: 40px 5.5%;
  }
}

/* ---------- Dashboard: Messages / newsletter list ---------- */
.nl-list { display: grid; gap: 8px; }
.nl-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.nl-row.nl-off .nl-email { opacity: 0.55; text-decoration: line-through; }
.nl-email { overflow-wrap: anywhere; font-weight: 600; }
.nl-date { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
@media (max-width: 640px) {
  .nl-row { grid-template-columns: 1fr auto; }
  .nl-date { grid-column: 1; }
}

/* Customer Centre icons */
.contact-item { display: flex; align-items: center; gap: 12px; }
.contact-text { min-width: 0; overflow-wrap: anywhere; }
.contact-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--lavender, #ece8f8);
  color: var(--accent-text);
}
.contact-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.footer-contact-list .contact-icon { width: 30px; height: 30px; background: rgba(255, 255, 255, 0.12); color: #fff; }
.footer-contact-list .contact-icon svg { width: 16px; height: 16px; }
.footer-contact-list a { color: inherit; }
.footer-contact-list .contact-text { font-size: 0.82rem; color: rgba(255, 255, 255, 0.78); }
.footer-contact-list .contact-text a { font-size: inherit; }

/* Unsubscribe page */
.unsub-body { min-height: 100vh; display: grid; place-items: center; background: var(--lavender, #ece8f8); padding: 24px 16px; }
.unsub-card { width: 100%; max-width: 480px; background: var(--surface); border-radius: 16px; padding: 32px 24px; display: grid; gap: 16px; justify-items: start; box-shadow: 0 10px 30px rgba(30, 20, 70, 0.12); }
.unsub-card h1 { margin: 0; font-size: 1.5rem; }
.unsub-card p { margin: 0; color: var(--ink); line-height: 1.6; }
.unsub-status { min-height: 1.4em; }

/* Dashboard: send a message */
.msg-form { gap: 14px; }
.msg-count { display: block; margin-top: 4px; color: var(--muted); font-size: 0.8rem; }
.msg-channels { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; margin: 0; }
.msg-channels legend { padding: 0 6px; font-weight: 700; }
.msg-channel, .msg-ack { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; cursor: pointer; }
.msg-channel input, .msg-ack input { margin-top: 4px; flex: 0 0 auto; }
.msg-channel input:disabled + span { opacity: 0.5; }
.msg-review { border: 1px solid var(--tint-line); background: var(--tint-2); border-radius: 12px; padding: 14px 16px; display: grid; gap: 12px; }
.msg-review h3 { margin: 0; font-size: 1rem; }
.msg-review-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; line-height: 1.5; }
.msg-warn { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-text); line-height: 1.5; }
.msg-flush { align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.msg-hint { color: var(--muted); font-size: 0.85rem; flex: 1 1 240px; }
.msg-history { display: grid; gap: 10px; }
.msg-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; }
.msg-card header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.msg-card header span { color: var(--muted); font-size: 0.85rem; }
.msg-stats { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.9rem; }

/* Dashboard: test data */
.td-h { margin: 22px 0 6px; font-size: 1.05rem; }
.td-h2 { margin: 16px 0 6px; font-size: 0.95rem; }
.td-help { margin: 0 0 10px; color: var(--ink); line-height: 1.55; font-size: 0.92rem; }
.td-help code { display: inline-block; margin: 2px 0; font-size: 0.78rem; overflow-wrap: anywhere; }
.td-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.td-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.td-table caption { text-align: left; font-weight: 700; padding: 0 0 6px; }
.td-table th, .td-table td { padding: 8px 12px; text-align: left; border-top: 1px solid rgba(40, 20, 80, 0.08); font-size: 0.9rem; white-space: normal; overflow-wrap: anywhere; }
.td-table td { text-align: right; font-weight: 700; width: 5em; }
.td-tag { margin-top: 14px; display: grid; gap: 10px; }
.td-orders { display: grid; gap: 10px; }
.td-group h5 { margin: 0 0 6px; font-size: 0.85rem; color: var(--muted); }
.td-order { display: inline-block; margin: 0 6px 6px 0; padding: 5px 10px; border-radius: 999px; font-size: 0.82rem; background: var(--tint-2); }
.td-order.is-test { background: var(--warn-bg); }
.td-bc { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.td-danger { background: #8c1d2f; border-color: #8c1d2f; }
.td-danger:disabled { opacity: 0.45; }
.td-backups { display: grid; gap: 10px; }
.td-backup { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; }
.td-backup header { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.td-backup p { margin: 0; }
.td-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.td-actions label { display: grid; gap: 4px; font-size: 0.85rem; flex: 1 1 240px; }
@media (max-width: 700px) { .td-cols { grid-template-columns: minmax(0, 1fr); } }

/* Policies page contact list */
.policy-contact { list-style: none; padding: 0; margin: 12px 0 18px; display: grid; gap: 12px; }
.policy-contact .contact-text a { color: var(--accent-text); font-weight: 600; }

/* The built-in top line, now moving like the dashboard headline */
.announcement.ticker { padding: 0; font-size: 10px; letter-spacing: .1em; color: var(--white); border-bottom: 0; }
.announcement.ticker .ticker-track { padding: 9px 0; }
.announcement[hidden] { display: none; }

/* =====================================================
   MOTION: scroll reveals, product card entrance, press feedback
   Everything here is switched off for visitors who ask for reduced motion.
===================================================== */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.is-in { opacity: 1; transform: none; }

  .product-card { animation: cardIn .5s ease backwards; }
  .product-card:nth-child(2) { animation-delay: .04s; }
  .product-card:nth-child(3) { animation-delay: .08s; }
  .product-card:nth-child(4) { animation-delay: .12s; }
  .product-card:nth-child(n+5) { animation-delay: .16s; }

  .primary-button, .outline-button, .icon-button, .button { transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease; }
  .primary-button:active, .outline-button:active, .icon-button:active, .button:active { transform: scale(.97); }
}

@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* =====================================================
   DASHBOARD: business overview
===================================================== */
.biz-overview { margin: 22px 0; }
.biz-overview [hidden], .biz-overview[hidden] { display: none !important; }
.biz-welcome { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px 20px; margin-bottom: 16px; }
.biz-welcome h2 { margin: 4px 0 0; }
.biz-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; color: var(--muted); font-size: 12px; text-align: right; }
.biz-basis { color: var(--muted); }

.biz-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.biz-kpis .stat-card { margin: 0; }
.biz-kpis .view-off { display: none; }
.biz-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; border-radius: 10px; }
.biz-card > span:not(.stat-icon) { padding-right: 46px; }
.biz-card strong { font-family: var(--serif); font-size: 32px; font-weight: 700; overflow-wrap: anywhere; }
.biz-accent { background: linear-gradient(180deg, var(--accent-card-a), var(--accent-card-b)); border-color: rgba(197, 166, 107, .6); }
.biz-accent .stat-icon { background: rgba(197, 166, 107, .22); color: var(--warn-text); }

.biz-hero { position: relative; grid-column: span 2; overflow: hidden; padding: 24px 26px; border-radius: 10px; color: var(--ivory); background: var(--navy-fill); border: 1px solid var(--navy-light); box-shadow: 0 14px 34px rgba(23, 21, 47, .22); }
.biz-hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gold); }
.biz-hero-label { display: block; color: rgba(250, 248, 243, .72); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.biz-hero strong { display: block; margin: 10px 0 8px; font-family: var(--serif); font-size: clamp(30px, 4vw, 42px); line-height: 1.1; overflow-wrap: anywhere; }
.biz-hero small { display: block; max-width: 34ch; color: rgba(250, 248, 243, .7); font-size: 12px; line-height: 1.55; }
.biz-spark { position: absolute; right: 18px; bottom: 16px; width: 44%; height: 52px; opacity: .95; }
.spark-line { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

@media (hover: hover) {
  .biz-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(31, 24, 53, .09); border-color: rgba(197, 166, 107, .55); }
}

.biz-grid2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.biz-grid3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.biz-panel { padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-width: 0; }
.biz-panel h3 { margin: 0 0 14px; color: var(--text-strong); font-size: 15px; }
.biz-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.biz-panel-head h3 { margin: 0; }
.biz-sub { color: var(--muted); font-size: 12px; }

.biz-chart svg { display: block; width: 100%; height: 190px; }
.chart-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-bar { fill: var(--purple); }
.chart-bar-empty { fill: var(--lavender); }
.chart-bar:hover { fill: var(--gold); }
.chart-axis { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 11px; }

.biz-bar { display: flex; height: 14px; overflow: hidden; border-radius: 999px; background: var(--tint); }
.biz-seg { display: block; height: 100%; min-width: 4px; }
.biz-seg + .biz-seg { box-shadow: -2px 0 0 var(--surface); }
.seg-unpaid { background: var(--gold); }
.seg-review { background: #b9a8e8; }
.seg-progress { background: var(--purple); }
.seg-done { background: var(--navy-fill); }
.seg-off { background: #b7b3c4; }
.biz-legend { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.biz-legend li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink); }
.biz-legend strong { margin-left: auto; color: var(--text-strong); }
.biz-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }

.biz-recent { list-style: none; margin: 0; padding: 0; }
.biz-recent li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13px; }
.biz-recent li:first-child { border-top: 0; padding-top: 0; }
.biz-recent li > div { min-width: 0; }
.biz-recent li > div:last-child { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.biz-recent strong { display: block; color: var(--text-strong); overflow-wrap: anywhere; }
.biz-recent small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.biz-empty { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.biz-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.biz-actions a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }

@media (prefers-reduced-motion: no-preference) {
  .biz-seg { animation: bizGrow .7s ease backwards; transform-origin: left center; }
  .chart-bar { animation: barRise .7s ease backwards; transform-box: fill-box; transform-origin: bottom; }
  .spark-line { stroke-dasharray: 600; stroke-dashoffset: 0; animation: sparkDraw 1.1s ease backwards; }
}
@keyframes bizGrow { from { transform: scaleX(0); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes barRise { from { transform: scaleY(0); } to { transform: none; } }
@keyframes sparkDraw { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }

@media (max-width: 1100px) {
  .biz-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .biz-grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .biz-welcome { align-items: flex-start; }
  .biz-meta { align-items: flex-start; text-align: left; }
  .biz-grid3 { grid-template-columns: minmax(0, 1fr); }
  .biz-hero { padding: 20px; }
  .biz-spark { position: static; display: block; width: 100%; margin-top: 12px; }
}
@media (max-width: 420px) {
  .biz-card strong { font-size: 26px; }
  .biz-actions a { flex: 1 1 100%; justify-content: center; }
}

/* =====================================================
   DASHBOARD TABLES
   Laptop: text may wrap so the action buttons are never cut off.
   Phone: each row becomes a readable card (cell labels come from table-labels.js).
===================================================== */
.admin-body .order-detail { white-space: normal; min-width: 150px; }
.admin-body .row-actions { flex-wrap: wrap; }
.admin-body .row-actions button { white-space: nowrap; }

@media (max-width: 760px) {
  .admin-body .table-wrap { overflow-x: visible; }
  .admin-body .table-wrap table,
  .admin-body .table-wrap tbody,
  .admin-body .table-wrap tr,
  .admin-body .table-wrap td { display: block; width: 100%; }
  .admin-body .table-wrap thead { display: none; }
  .admin-body .table-wrap tr { margin-bottom: 12px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
  .admin-body .table-wrap td { display: block; padding: 9px 0; border: 0; border-top: 1px solid var(--line); white-space: normal; text-align: left; overflow-wrap: anywhere; }
  .admin-body .table-wrap td:first-child { border-top: 0; }
  .admin-body .table-wrap td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
  .admin-body .table-wrap td[data-label=""]::before { content: none; }
  .admin-body .table-wrap td[colspan] { display: block; text-align: center; }
  .admin-body .table-wrap td[colspan]::before { content: none; }
  .admin-body .table-wrap td[data-empty] { display: none; }
  .admin-body .order-detail { min-width: 0; }
  .admin-body .row-actions button { min-height: 40px; padding: 8px 12px; font-size: 11px; }
}


/* ---------- dashboard: categories ---------- */
.cat-list { display: flex; flex-direction: column; gap: 10px; }
.cat-row { display: flex; align-items: center; gap: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.cat-thumb { width: 120px; height: 70px; }
.cat-info { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; gap: 3px; }
.cat-info strong { overflow-wrap: anywhere; }
.cat-info span, .cat-info small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.cat-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.cat-actions .outline-button { padding: 7px 12px; font-size: 12px; }
.cat-actions .outline-button:disabled { opacity: .4; cursor: default; }
#catForm[hidden], #catAddButton[hidden], #catClearPic[hidden] { display: none !important; }
#catClearPic { margin-left: 8px; }
@media (max-width: 700px) {
  .cat-row { flex-wrap: wrap; align-items: flex-start; }
  .cat-thumb { width: 100%; height: 120px; }
  .cat-info { flex-basis: calc(100% - 90px); }
  .cat-actions { width: 100%; justify-content: flex-start; }
}
.outline-button.danger { color: var(--danger-strong); border-color: var(--bad-line); }


/* ---------- payment: modern method cards ---------- */
.pay-amount { display: flex; flex-direction: column; gap: 2px; margin: 10px 0 16px; padding: 18px 20px; border-radius: 14px; background: linear-gradient(135deg, var(--navy), #3b2f63); color: var(--white); box-shadow: 0 10px 26px rgba(23, 21, 47, .22); }
.pay-amount span { color: #e3d1ad; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.pay-amount strong { font: 600 30px var(--serif); letter-spacing: .01em; }
.pay-amount small { color: rgba(255, 255, 255, .72); font-size: 11px; }
.pay-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 0 0 16px; padding: 0; border: 0; }
.pay-choices legend { margin-bottom: 8px; padding: 0; color: var(--text-strong); font-size: 12px; font-weight: 700; }
.pay-choice { position: relative; display: block; cursor: pointer; }
.pay-choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pay-choice-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); text-align: center; transition: border-color .2s, box-shadow .2s, transform .2s; }
.pay-choice:hover .pay-choice-card { border-color: var(--purple); transform: translateY(-2px); }
.pay-choice input:checked + .pay-choice-card { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(120, 98, 168, .2), 0 8px 20px rgba(23, 21, 47, .1); background: var(--tint-2); }
.pay-choice input:focus-visible + .pay-choice-card { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.pay-logo { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; overflow: hidden; border-radius: 12px; background: #ffffff; border: 1px solid var(--line); }
.pay-logo img { width: 100%; height: 100%; object-fit: contain; }
.pay-initials { background: var(--tint); color: var(--text-strong); font: 600 22px var(--serif); }
.pay-choice-name { color: var(--text-strong); font-size: 12px; font-weight: 700; line-height: 1.3; }
.pay-tick { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; fill: none; stroke: var(--white); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s; }
.pay-tick circle { fill: var(--purple); stroke: none; }
.pay-choice input:checked + .pay-choice-card .pay-tick { opacity: 1; transform: scale(1); }
.pay-details { margin: 0 0 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.pay-details h4 { margin: 0 0 10px; color: var(--text-strong); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.pay-details dl { display: grid; gap: 8px; margin: 0; }
.pay-details dl > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface); }
.pay-details dt { color: var(--muted); font-size: 11px; }
.pay-details dd { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--text-strong); font-size: 14px; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.pay-copy { padding: 5px 12px; border: 1px solid var(--purple); border-radius: 999px; background: transparent; color: var(--purple); font: 700 11px var(--sans, inherit); cursor: pointer; transition: background .2s, color .2s; }
.pay-copy:hover { background: var(--purple); color: var(--white); }
.pay-details p { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
@media (max-width: 480px) { .pay-choices { grid-template-columns: 1fr; } .pay-choice-card { flex-direction: row; justify-content: flex-start; padding: 12px 14px; text-align: left; } .pay-logo { width: 44px; height: 44px; } .pay-tick { top: 50%; right: 12px; margin-top: -10px; } .pay-amount strong { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { .pay-choice-card, .pay-tick { transition: none; } .pay-choice:hover .pay-choice-card { transform: none; } }

/* Gold labels sit on dark panels in some places; use the brighter gold there. */
.editorial .eyebrow,
.editorial-copy .eyebrow,
.site-footer .eyebrow,
.biz-hero .eyebrow { color: var(--gold); }
.newsletter-section .eyebrow { color: #7a5c20; }
:root[data-theme="dark"] .newsletter-section .eyebrow { color: var(--gold); }
.newsletter-section > div > p { color: var(--ink); }


/* ---------- product cards (premium) ---------- */
.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(31, 24, 53, .04);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s, border-color .3s;
}
.product-card:hover {
  border-color: var(--purple);
  box-shadow: 0 16px 38px rgba(31, 24, 53, .14);
}
:root[data-theme="dark"] .product-card:hover { box-shadow: 0 16px 38px rgba(0, 0, 0, .5); }
.product-image-wrap { aspect-ratio: 1 / 1.1; }
.product-tag { top: 12px; left: 12px; border-radius: 999px; padding: 6px 11px; letter-spacing: .04em; box-shadow: 0 2px 8px rgba(31, 24, 53, .15); }
.product-info { display: flex; flex: 1; flex-direction: column; padding: 16px 16px 18px; }
.product-info h3 { min-height: 0; margin: 6px 0 10px; font-size: 17px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; }
.product-price { margin: 0; font-size: 16px; }
.stock-line { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.stock-line::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.stock-line.low { color: var(--warn-text); }
.stock-line.low::before { background: var(--gold); }
.stock-line.out { color: var(--danger); }
.stock-line.out::before { background: var(--danger); }
.product-actions { margin-top: auto; gap: 8px; }
.product-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; border-radius: 10px; font-size: 11px; transition: background .2s, border-color .2s, color .2s, transform .15s; }
.product-actions button:active:not(:disabled) { transform: scale(.97); }
.product-actions button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 520px) {
  .product-info { padding: 12px 12px 14px; }
  .product-meta { flex-direction: column; align-items: flex-start; gap: 4px; }
  .product-actions { flex-direction: column; }
  .product-info h3 { font-size: 15px; }
}


/* ---------- admin: sign-out button ---------- */
.signout-button { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text-strong); font-size: 12px; font-weight: 700; cursor: pointer; transition: background .2s, border-color .2s, color .2s, transform .15s; }
.signout-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.signout-button:hover, .signout-button:focus-visible { border-color: var(--danger); background: var(--bad-bg); color: var(--danger); }
.signout-button:hover svg { transform: translateX(2px); }
.signout-button:active { transform: scale(.97); }
.signout-button[hidden] { display: none !important; }
@media (max-width: 520px) { .signout-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .signout-button { width: 38px; padding: 0; justify-content: center; } }


/* ---------- shared polish: fields, tables, toast, switches ---------- */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]),
select,
textarea {
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]):focus,
select:focus,
textarea:focus {
  border-color: var(--purple);
  outline: none;
  box-shadow: 0 0 0 3px rgba(120, 98, 168, .25);
}
::placeholder { color: var(--muted); opacity: .8; }
.admin-body tbody tr { transition: background-color .15s ease; }
.admin-body tbody tr:hover td { background: var(--surface-2); }
.toast { border-radius: 10px; transition: opacity .3s ease, transform .3s cubic-bezier(.2, .7, .2, 1), visibility .3s; }
.switch .switch-knob { background: #ffffff; }

/* ---------- phone header: room for the theme button ---------- */
@media (max-width: 430px) {
  .site-header .brand small { display: none; }
  .site-header .header-actions { gap: 2px; }
  .site-header .icon-button { width: 36px; height: 36px; }
}
@media (max-width: 360px) {
  .site-header .icon-button { width: 33px; height: 33px; }
  .site-header .brand-mark { width: 34px; height: 34px; }
}
@media (max-width: 340px) {
  .site-header { padding: 0 10px; }
  .site-header .brand { gap: 6px; }
  .site-header .brand strong { letter-spacing: .1em; }
  .site-header .header-actions { gap: 0; }
  .site-header .icon-button { width: 32px; height: 32px; }
}

/* ---------- dashboard finishing touches ---------- */
.panel-heading p,
.data-tools p,
.form-heading p { max-width: 720px; margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.panel-heading .primary-button,
.panel-heading .outline-button { white-space: nowrap; }
.admin-body .primary-button,
.admin-body .outline-button,
.admin-body .button { border-radius: 8px; }
.admin-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
.admin-body select,
.admin-body textarea { border-radius: 8px; }
.admin-body .empty-state,
.admin-body td.empty,
.admin-body td[colspan] { color: var(--muted); }
.admin-body .empty-state { margin: 4px 0; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface-2); }


/* ---------- product window: extra photos ---------- */
.modal-thumbs { position: absolute; right: 12px; bottom: 12px; left: 12px; display: flex; gap: 8px; padding: 8px; border-radius: 12px; background: rgba(15, 14, 29, .55); backdrop-filter: blur(6px); }
.modal-thumbs[hidden] { display: none; }
.modal-thumb { flex: 0 0 auto; width: 52px; height: 52px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 8px; background: var(--surface); cursor: pointer; transition: border-color .2s, transform .15s; }
.modal-thumb img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.modal-thumb:hover { transform: translateY(-2px); }
.modal-thumb.active { border-color: var(--gold); }
.modal-thumb:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
@media (max-width: 700px) { .modal-thumb { width: 44px; height: 44px; } }


/* ---------- dashboard: extra product photos ---------- */
.gallery-editor { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.gallery-title { display: block; color: var(--text-strong); font-size: 13px; font-weight: 700; }
.gallery-help { margin: 4px 0 12px; color: var(--muted); font-size: 12px; }
.gallery-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; margin-bottom: 12px; }
.gallery-list:empty { display: none; }
.gallery-item { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-remove { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: rgba(15, 14, 29, .75); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.gallery-remove:hover { background: var(--danger-fill); }
.gallery-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.gallery-actions .outline-button.disabled { opacity: .45; pointer-events: none; }
.gallery-status { color: var(--muted); font-size: 12px; }
.gallery-status.error { color: var(--danger); }

/* ---------- Orders: spreadsheet export and packing slips ---------- */
.order-export {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12px;
}

.order-export-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.order-export input[type="date"] {
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--text-strong);
  font: inherit;
}

.order-export .outline-button {
  min-height: 38px;
  padding: 0 14px;
}

@media (max-width: 640px) {
  .order-export,
  .order-export-group { align-items: stretch; flex-direction: column; }
  .order-export input[type="date"],
  .order-export .outline-button { width: 100%; }
}

.print-slips { display: none; }

@media print {
  body.printing-slips > *:not(.print-slips) { display: none !important; }
  body.printing-slips { background: #fff !important; }
  body.printing-slips .print-slips { display: block !important; }

  .print-slip {
    box-sizing: border-box;
    padding: 6mm 4mm;
    color: #000;
    background: #fff;
    font: 12pt/1.45 Arial, Helvetica, sans-serif;
    break-after: page;
    page-break-after: always;
  }
  .print-slip:last-child { break-after: auto; page-break-after: auto; }
  .slip-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 10px; }
  .slip-brand { font-size: 16pt; }
  .slip-title { letter-spacing: 0.12em; font-weight: 700; }
  .slip-meta { margin-bottom: 12px; }
  .slip-to { margin-bottom: 14px; padding: 8px 10px; border: 1px solid #000; }
  .slip-to h3 { margin: 0 0 4px; font-size: 10pt; letter-spacing: 0.1em; text-transform: uppercase; }
  .slip-name { font-weight: 700; font-size: 14pt; }
  .slip-items { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
  .slip-items th, .slip-items td { border: 1px solid #000; padding: 6px 8px; text-align: left; vertical-align: top; }
  .slip-items .slip-qty { text-align: center; font-weight: 700; }
  .slip-items .slip-box { width: 16mm; }
  .slip-total { text-align: right; font-weight: 700; margin-bottom: 18px; }
  .slip-foot { margin-top: 24px; }
}

/* ---------- Saved items and back-in-stock alerts ---------- */
.product-card { position: relative; }

.wish-heart {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-strong);
  cursor: pointer;
  transition: transform .15s ease, background-color .2s ease, color .2s ease;
}
.wish-heart svg, .wish-modal-button svg, .wish-trigger svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wish-heart svg { width: 18px; height: 18px; }
.wish-heart:hover { background: var(--tint); }
.wish-heart.on, .wish-modal-button.on { color: var(--danger); }
.wish-heart.on svg, .wish-modal-button.on svg { fill: currentColor; }

.notify-link {
  display: block;
  width: 100%;
  min-height: 40px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px dashed var(--accent-text);
  border-radius: 4px;
  background: transparent;
  color: var(--accent-text);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}
.notify-link:hover { background: var(--tint); }
.notify-link.on { border-style: solid; background: var(--tint); }

.modal-extra-actions { display: grid; gap: 10px; margin-top: 10px; }
.modal-extra-actions [hidden] { display: none !important; }
.modal-extra-actions .outline-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; }
.wish-modal-button svg { width: 18px; height: 18px; }
.modal-extra-actions .outline-button.on { background: var(--tint); }

.wish-drawer [hidden] { display: none !important; }
.wish-row { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.wish-row img { width: 72px; height: 85px; object-fit: cover; background: var(--surface-2); }
.wish-row h4 { margin: 2px 0 6px; color: var(--text-strong); font: 600 15px var(--serif); }
.wish-price { display: block; margin-bottom: 4px; color: var(--text-strong); font-size: 13px; }
.wish-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.wish-row-actions .outline-button, .wish-row-actions .primary-button { min-height: 38px; padding: 0 12px; font-size: 11px; }
.wish-row-actions .wish-remove { min-height: 38px; padding: 0 6px; border: 0; background: transparent; color: var(--danger); font-size: 11px; text-decoration: underline; cursor: pointer; }
.wish-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; }

/* ---------- Account security: devices and Face ID / fingerprint ---------- */
.security-box { display: grid; gap: 10px; margin: 0 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.security-box h4 { margin: 0; color: var(--text-strong); font: 600 15px var(--serif); }
.security-box .auth-note { margin: 0; }
.security-box [hidden] { display: none !important; }
.device-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.device-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.device-row strong { display: inline-block; margin-right: 8px; color: var(--text-strong); font-size: 13px; }
.device-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.device-row > div { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.device-row .outline-button { flex: none; width: auto; min-width: 0; min-height: 38px; padding: 0 12px; font-size: 11px; }
.device-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--tint); color: var(--accent-text); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.passkey-signin { display: grid; gap: 10px; margin-top: 4px; }
.passkey-signin[hidden] { display: none !important; }
.passkey-signin .auth-or { color: var(--muted); font-size: 11px; letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.passkey-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px; }
.passkey-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 430px) { .device-row { align-items: stretch; flex-direction: column; } .device-row .outline-button { width: 100%; } }

/* ---------- mobile bottom navigation (phones only) ---------- */
.bottom-nav { display: none; }

@media (max-width: 767px) {
  :root { --bn-h: 62px; --bn-total: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px)); }

  .bottom-nav {
    position: fixed;
    z-index: 35;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: var(--bn-total);
    padding: 0 max(4px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left, 0px));
    border-top: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 -6px 18px rgba(25, 19, 60, .08);
    transition: transform .25s ease, opacity .2s ease;
  }
  .bottom-nav[hidden] { display: none !important; }

  .bn-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 48px;
    color: var(--muted);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color .2s ease;
  }
  .bn-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 28px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--gold-text, #9a7b2e);
    transform: translateX(-50%) scaleX(0);
    transition: transform .25s ease;
  }
  .bn-item.is-active { color: var(--accent-text); }
  .bn-item.is-active::before { transform: translateX(-50%) scaleX(1); }

  .bn-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 28px;
    border-radius: 14px;
    transition: background .2s ease, transform .15s ease;
  }
  .bn-item.is-active .bn-icon { background: var(--tint); }
  .bn-item:active .bn-icon { transform: scale(.9); }
  .bn-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .bn-label {
    max-width: 100%;
    overflow: hidden;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .bn-item:focus-visible { outline: 2px solid var(--purple); outline-offset: -3px; border-radius: 10px; }

  .bn-badge {
    position: absolute;
    top: -4px;
    right: 3px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--navy-fill, var(--purple));
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--surface);
  }
  .bn-badge[hidden] { display: none; }

  /* never cover content */
  body.has-bottom-nav { padding-bottom: var(--bn-total); }
  body.has-bottom-nav .toast { bottom: calc(var(--bn-total) + 12px); }
  body.has-bottom-nav .cart-drawer { height: calc(100dvh - var(--bn-total)); }
  body.has-bottom-nav .auth-modal:not(.checkout-modal) {
    top: calc((100dvh - var(--bn-total)) / 2);
    max-height: calc(100dvh - var(--bn-total) - 16px);
  }
  body.has-bottom-nav .bell-panel { max-height: calc(100dvh - var(--bn-total) - 80px); }

  /* focused tasks and typing: bar steps aside */
  body.bn-covered .bottom-nav,
  body.bn-typing .bottom-nav { transform: translateY(105%); opacity: 0; pointer-events: none; }
  body.bn-covered, body.bn-typing { padding-bottom: 0; }
  body.bn-covered .toast, body.bn-typing .toast { bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-nav, .bn-item, .bn-item::before, .bn-icon { transition: none; }
  .bn-item:active .bn-icon { transform: none; }
}

/* ---------- account centre ---------- */
.auth-modal.ac-open { width: min(940px, calc(100% - 28px)); padding: 24px 28px 28px; }
.auth-modal.ac-open #authTitle,
.auth-modal.ac-open #authEyebrow,
.auth-modal.ac-open #authNote,
.auth-modal.ac-open #authMessage:empty { display: none; }
.auth-modal.ac-open .modal-close { position: absolute; top: 14px; right: 14px; z-index: 2; }

.account-centre { gap: 18px; }
.account-centre [hidden] { display: none !important; }

.ac-head { display: flex; align-items: center; gap: 14px; padding: 16px; padding-right: 64px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.ac-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--navy-fill, var(--purple)); color: #fff; font: 600 20px var(--serif); letter-spacing: .02em; }
.ac-id { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; }
.ac-id strong { overflow: hidden; color: var(--text-strong); font: 600 19px var(--serif); text-overflow: ellipsis; white-space: nowrap; }
.ac-id span { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.ac-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ac-chip { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--tint); color: var(--accent-text) !important; font-size: 11px !important; font-weight: 700; letter-spacing: .03em; }
.ac-chip-ok::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; }
.ac-edit { width: auto; min-height: 38px; padding: 0 16px; white-space: nowrap; }

.ac-layout { display: block; }
.ac-menu { display: grid; gap: 18px; align-content: start; }
.ac-group h3 { margin: 0 0 8px 4px; color: var(--muted); font: 700 11px var(--sans, inherit); letter-spacing: .14em; text-transform: uppercase; }
.ac-group { display: grid; border: 0; padding: 0; }
.ac-group > h3 { grid-column: 1; }
.ac-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) 20px; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--text-strong); text-align: left; cursor: pointer; transition: background .18s ease, transform .12s ease; -webkit-tap-highlight-color: transparent; }
.ac-group .ac-item:first-of-type { border-top: 1px solid var(--line); border-radius: 12px 12px 0 0; }
.ac-group .ac-item:last-of-type { border-radius: 0 0 12px 12px; }
.ac-group .ac-item:only-of-type { border-radius: 12px; }
.ac-item { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.ac-item:hover { background: var(--surface-2); }
.ac-item:active { transform: scale(.992); background: var(--tint); }
.ac-item:focus-visible { outline: 2px solid var(--purple); outline-offset: -2px; }
.ac-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--tint); color: var(--accent-text); }
.ac-ico svg { width: 20px; height: 20px; }
.ac-text { display: grid; gap: 2px; min-width: 0; }
.ac-text strong { color: var(--text-strong); font-size: 14.5px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.ac-text small { color: var(--muted); font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.ac-chev { display: grid; place-items: center; color: var(--muted); transition: transform .18s ease; }
.ac-chev svg { width: 18px; height: 18px; }
.ac-item:hover .ac-chev { transform: translateX(2px); }
.ac-item svg, .ac-back svg, .ac-links svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.ac-danger-group { margin-top: 6px; }
.ac-danger-group h3 { color: var(--danger); }
.ac-item-danger .ac-ico { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.ac-item-danger .ac-text strong { color: var(--danger); }
.ac-logout { width: 100%; }
.ac-dashboard { text-align: center; }

.ac-panels { min-width: 0; }
.ac-panel { display: grid; gap: 14px; align-content: start; animation: ac-in .22s ease both; }
.ac-panel-head { display: flex; align-items: center; gap: 10px; }
.ac-panel-head h3 { margin: 0; color: var(--text-strong); font: 600 24px var(--serif); outline: none; }
.ac-back { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text-strong); cursor: pointer; }
.ac-back svg { width: 20px; height: 20px; }
.ac-sub { margin: 4px 0 0; color: var(--text-strong); font: 600 16px var(--serif); }
.ac-seg { display: inline-grid; grid-template-columns: 1fr 1fr; width: min(280px, 100%); padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.ac-seg button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; transition: background .18s ease, color .18s ease; }
.ac-seg button[aria-pressed="true"] { background: var(--navy-fill, var(--purple)); color: #fff; }
.ac-facts { display: grid; gap: 10px; margin: 0; }
.ac-facts div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.ac-facts dt { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.ac-facts dd { margin: 4px 0 0; color: var(--text-strong); font-weight: 600; overflow-wrap: anywhere; }
.ac-links { display: grid; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ac-links li + li { border-top: 1px solid var(--line); }
.ac-links a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 0 14px; background: var(--surface); color: var(--text-strong); font-weight: 600; text-decoration: none; transition: background .18s ease; }
.ac-links a:hover { background: var(--surface-2); }
.ac-links svg { width: 18px; height: 18px; color: var(--muted); }
.ac-links [data-ico] { display: grid; }
.ac-email:empty { display: none; }
.account-centre input[readonly] { background: var(--surface-2); color: var(--muted); }

@keyframes ac-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* phones: the menu and each section are separate screens inside a full sheet */
@media (max-width: 767px) {
  .auth-modal.ac-open,
  body.has-bottom-nav .auth-modal.ac-open {
    top: 0; left: 0; width: 100%; height: calc(100dvh - var(--bn-total, 0px)); max-height: none;
    padding: 18px 16px 24px; border-radius: 0; transform: none; -webkit-overflow-scrolling: touch;
  }
  .auth-modal.ac-open.open { transform: none; }
  .ac-head { padding-right: 56px; flex-wrap: wrap; }
  .ac-edit { flex: 1 0 100%; }
  .ac-in-panel .ac-head { display: none; }
  .ac-in-panel .ac-menu { display: none; }
  .account-centre:not(.ac-in-panel) .ac-panels { display: none; }
  .auth-modal.ac-open .modal-close { top: 12px; right: 12px; }
}

/* tablets and desktops: sidebar + section */
@media (min-width: 768px) {
  .ac-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
  .ac-menu { position: sticky; top: 0; max-height: calc(90dvh - 190px); overflow-y: auto; padding-right: 6px; }
  .ac-back { display: none; }
  .ac-item.is-current { background: var(--tint); }
  .ac-item.is-current .ac-ico { background: var(--surface); }
  .ac-head { padding-right: 70px; }
  .ac-panels { min-height: 320px; padding: 4px 4px 4px 0; }
  .ac-panel .primary-button, .ac-panel .outline-button { width: auto; justify-self: start; min-width: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  .ac-panel { animation: none; }
  .ac-item, .ac-chev, .ac-seg button, .ac-links a { transition: none; }
  .ac-item:active { transform: none; }
}
.ac-id .ac-chips, .ac-id .ac-chip { overflow: visible; text-overflow: clip; }
@media (min-width: 768px) { .ac-edit { flex: 0 0 auto; width: auto; min-width: 0; } .ac-head .ac-edit { margin-right: 0; } }
@media (max-width: 767px) { .ac-edit { width: 100%; } }
@media (min-width: 768px) { .account-centre .ac-head .ac-edit { width: auto; flex: 0 0 auto; } }
@media (max-width: 767px) { .account-centre .ac-head .ac-edit { width: 100%; } }
.account-centre .ac-panel a.outline-button, .account-centre .ac-panel a.primary-button { text-align: center; }

/* ---------- tracking page: your orders ---------- */
.my-orders-box { display: grid; gap: 10px; margin: 0 0 22px; }
.my-orders-box[hidden] { display: none; }
.my-orders-list { display: grid; gap: 8px; }
.my-order { display: grid; gap: 4px; width: 100%; min-height: 56px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text-strong); text-align: left; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .12s ease; }
.my-order:hover { background: var(--surface-2); }
.my-order:active { transform: scale(.99); }
.my-order:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.my-order.is-selected { border-color: var(--purple); background: var(--tint); }
.my-order-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.my-order-status { padding: 2px 9px; border-radius: 999px; background: var(--tint); color: var(--accent-text); font-size: 11px; font-weight: 700; }
.my-order small { color: var(--muted); font-size: 12px; }
.my-orders-or { margin: 6px 0 0; }
@media (prefers-reduced-motion: reduce) { .my-order { transition: none; } .my-order:active { transform: none; } }

/* ---------- phones: one navigation, not two ---------- */
@media (max-width: 767px) {
  .bottom-nav.bn-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .bn-item[hidden] { display: none; }
  .bn-label { font-size: 10px; }
  /* Cart, account and bell live in the bottom bar; the top bar keeps brand, search, theme, saved items and the page menu. */
  body.has-bottom-nav #cartToggle,
  body.has-bottom-nav #accountToggle,
  body.has-bottom-nav #bellToggle { display: none; }
  /* Phones use the bottom bar for navigation: no top-bar page links and no three-line menu button. */
  body.has-bottom-nav .menu-toggle,
  body.has-bottom-nav .desktop-nav,
  body.has-bottom-nav .mobile-nav { display: none !important; }
  /* A blurred header would trap the fixed notification list inside itself; a solid header lets it sit above the bar. */
  body.has-bottom-nav .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface); }
  /* The notification list opens just above the bar. */
  body.has-bottom-nav .bell-panel {
    top: auto;
    bottom: calc(var(--bn-total) + 8px);
    max-height: calc(100dvh - var(--bn-total) - 90px);
  }
}

/* animations off (Account settings) */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after {
  animation-duration: .00001s !important; animation-iteration-count: 1 !important; transition-duration: .00001s !important; scroll-behavior: auto !important;
}

/* ---------- account centre: addresses, order filters, checkout picker ---------- */
.ac-addr-list { display: grid; gap: 10px; }
.ac-addr { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ac-addr.is-default { border-color: var(--purple); background: var(--tint); }
.ac-addr-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ac-addr-top strong { color: var(--text-strong); font-size: 15px; overflow-wrap: anywhere; }
.ac-addr-badge { padding: 2px 9px; border-radius: 999px; background: var(--navy-fill, var(--purple)); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ac-addr p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.ac-addr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.account-centre .ac-addr-actions button { width: auto; min-height: 36px; padding: 0 14px; font-size: 12px; }
.ac-addr-confirm { color: var(--danger-strong, var(--danger)); font-size: 13px; font-weight: 600; }
.ac-form-actions { display: grid; gap: 10px; }
.ac-check { display: flex; align-items: center; gap: 10px; color: var(--text-strong); font-size: 14px; cursor: pointer; }
.ac-check input { width: 20px; height: 20px; accent-color: var(--purple); }
.ac-filters { display: grid; gap: 10px; }
.ac-filters input[type="search"] { width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text-strong); font: inherit; }
.ac-chipset { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-chipset button { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; transition: background .18s ease, color .18s ease; }
.ac-chipset button[aria-pressed="true"] { border-color: var(--navy-fill, var(--purple)); background: var(--navy-fill, var(--purple)); color: #fff; }
.ac-saved-wrap[hidden] { display: none; }
.ac-addr-form[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .ac-chipset button { transition: none; } }
.order-card[hidden] { display: none; }

/* ---------- support screens ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sp-thread { width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.sp-thread:hover { background: var(--surface-2); }
.sp-meta { color: var(--muted); font-size: 12px; }
.sp-chat { display: grid; gap: 12px; }
.sp-chat[hidden], #spProblemList[hidden], #spProblemForm[hidden], #spComplaintForm[hidden], #spReturnForm[hidden] { display: none; }
.sp-chat-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.account-centre .sp-chat-head .outline-button { width: auto; min-height: 36px; padding: 0 14px; font-size: 12px; }
.sp-chat-head strong { flex: 1 1 140px; min-width: 0; color: var(--text-strong); overflow-wrap: anywhere; }
.sp-messages { display: grid; align-content: start; gap: 10px; min-height: 180px; max-height: min(50dvh, 420px); overflow-y: auto; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.sp-msg { display: grid; gap: 3px; max-width: 86%; padding: 9px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.sp-msg.mine { justify-self: end; background: var(--tint); border-color: transparent; }
.sp-msg p { margin: 0; color: var(--text-strong); font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-who { color: var(--accent-text); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.sp-time { color: var(--muted); font-size: 11px; }
.sp-compose { display: grid; gap: 8px; }
.sp-compose textarea, .account-centre textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text-strong); font: inherit; resize: vertical; }
.sp-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.sp-thumb { display: grid; gap: 6px; width: 92px; }
.sp-thumb img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); }
.sp-thumb-remove { min-height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--danger-strong, var(--danger)); font-size: 12px; font-weight: 700; cursor: pointer; }
@media (min-width: 768px) { .sp-compose { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } .account-centre .sp-compose .primary-button { width: auto; min-width: 100px; } }

/* ---------- support inbox (dashboard) ---------- */
.sp-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0; }
.sp-tab { min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-strong); font: inherit; font-weight: 600; cursor: pointer; }
.sp-tab[aria-selected="true"] { background: var(--navy-fill, var(--purple)); color: #fff; border-color: transparent; }
.sp-tab b, .nav-count { display: inline-block; min-width: 20px; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--purple); color: #fff; font-size: 11px; text-align: center; }
.sp-tab b[hidden], .nav-count[hidden] { display: none; }
.sp-filter { margin-left: auto; }
.sp-filter select { min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text-strong); font: inherit; }
.sp-admin-grid { display: grid; gap: 16px; }
.sp-admin-list { display: grid; gap: 8px; align-content: start; }
.sp-admin-list .sp-thread[aria-current="true"] { border-color: var(--purple); }
.sp-admin-detail { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sp-admin-detail[hidden] { display: none; }
.sp-preview { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-text { margin: 0; color: var(--text-strong); white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-admin-detail textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text-strong); font: inherit; }
@media (min-width: 900px) { .sp-admin-grid { grid-template-columns: minmax(260px, 1fr) minmax(0, 1.4fr); align-items: start; } .sp-admin-grid .empty-state { grid-column: 1; } }

/* ---------- edit profile ---------- */
.ep-form { gap: 18px; }
.ep-section { display: grid; gap: 12px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.ep-section legend { padding: 0 8px; color: var(--text-strong); font-weight: 700; }
.ep-photo { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.ep-avatar { width: 84px; height: 84px; font-size: 28px; overflow: hidden; flex: none; }
.ep-avatar img, .ac-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.ep-photo-actions, .ep-crop-actions, .ep-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.account-centre .ep-photo-actions .outline-button, .account-centre .ep-crop-actions .outline-button, .account-centre .ep-crop-actions .primary-button,
.account-centre .ep-buttons .outline-button { width: auto; min-height: 44px; padding: 0 18px; }
.account-centre .ep-buttons .primary-button { width: auto; min-height: 44px; padding: 0 22px; }
.ep-crop { display: grid; gap: 12px; justify-items: start; }
.ep-crop canvas { width: min(240px, 100%); height: auto; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 12px; touch-action: none; cursor: grab; background: var(--surface-2); }
.ep-zoom { display: grid; gap: 4px; width: min(240px, 100%); color: var(--muted); font-size: 13px; }
.ep-zoom input { width: 100%; }
.ep-status { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.ep-status.ok { color: var(--accent-text); font-weight: 600; }
.ep-check { display: flex; align-items: flex-start; gap: 10px; color: var(--text-strong); min-height: 32px; }
.ep-check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.ep-otp { display: grid; gap: 10px; padding: 12px; border-radius: 10px; background: var(--surface-2); }
.ep-otp[hidden], .ep-crop[hidden], #epCredNote[hidden] { display: none; }
.ep-form select, .ep-form textarea, .ep-form input[type="date"] { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text-strong); font: inherit; }
.ep-facts dd { overflow-wrap: anywhere; }

/* =====================================================================
   Sign-in and create-account upgrade: phone field, six-box code entry,
   password strength, success mark, and motion.
   ===================================================================== */
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-row .auth-field { min-width: 0; }
.auth-links-center { justify-content: center; }
.phone-field { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.auth-field .phone-cc { width: auto; max-width: 150px; padding-right: 8px; font-size: 13px; }
.field-hint { min-height: 16px; color: var(--muted); font-size: 11px; line-height: 1.5; font-weight: 400; transition: color .2s; }
.field-hint.is-ok { color: var(--success); }
.field-hint.is-error { color: var(--danger); }
.auth-field input[aria-invalid="true"] { border-color: var(--danger); }

/* inputs: animated border, soft glow, label colour */
.auth-field input, .auth-field select, .auth-field textarea { transition: border-color .2s, box-shadow .2s, background-color .2s; }
.auth-field input:focus, .auth-field select:focus, .auth-field textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--purple) 22%, transparent); }
.auth-field label { transition: color .2s, transform .2s; }
.auth-field:focus-within > label { color: var(--accent-text); transform: translateX(2px); }

/* password */
.password-toggle svg { transition: opacity .2s, transform .25s; }
.password-toggle[aria-pressed="true"] .icon-eye-off, .password-toggle[aria-pressed="false"] .icon-eye { animation: eye-swap .25s ease both; }
@keyframes eye-swap { from { opacity: 0; transform: scale(.7) rotate(-18deg); } to { opacity: 1; transform: none; } }
.strength { display: grid; gap: 6px; margin-top: -4px; }
.strength-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.strength-bar span { height: 5px; border-radius: 3px; background: var(--line); transition: background-color .35s ease, transform .35s ease; transform-origin: left; }
.strength[data-level="1"] .strength-bar span:nth-child(-n+1) { background: var(--danger); }
.strength[data-level="2"] .strength-bar span:nth-child(-n+2) { background: var(--gold); }
.strength[data-level="3"] .strength-bar span:nth-child(-n+3) { background: var(--purple); }
.strength[data-level="4"] .strength-bar span:nth-child(-n+4) { background: var(--success); }
.strength[data-level="0"] .strength-bar span { transform: scaleX(.6); }
.strength-text { color: var(--muted); font-size: 11px; line-height: 1.5; }
.terms-check { display: flex; align-items: flex-start; gap: 10px; color: var(--text-strong); font-size: 12px; line-height: 1.6; }
.terms-check input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--purple); }
.terms-check a { color: var(--accent-text); text-decoration: underline; }

/* six-box code entry */
.otp-sent { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.otp-sent strong { color: var(--text-strong); letter-spacing: .04em; }
.otp-group { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; padding-bottom: 2px; }
.otp-box {
  width: 100%; min-width: 0; height: 52px; padding: 0; text-align: center;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text-strong);
  font: 700 22px var(--serif, inherit); outline: none; caret-color: var(--purple);
  transition: border-color .2s, box-shadow .2s, transform .18s, background-color .2s;
}
.otp-box:focus { border-color: var(--purple); transform: scale(1.06); box-shadow: 0 0 0 3px color-mix(in srgb, var(--purple) 24%, transparent); }
.otp-box.filled { border-color: var(--purple); background: var(--tint); }
.otp-group.is-error .otp-box { border-color: var(--danger); animation: otp-shake .4s ease; }
.otp-group.is-ok .otp-box { border-color: var(--success); background: var(--ok-bg); animation: otp-pop .4s ease both; }
.otp-group.is-ok .otp-box:nth-child(2) { animation-delay: .04s; } .otp-group.is-ok .otp-box:nth-child(3) { animation-delay: .08s; }
.otp-group.is-ok .otp-box:nth-child(4) { animation-delay: .12s; } .otp-group.is-ok .otp-box:nth-child(5) { animation-delay: .16s; } .otp-group.is-ok .otp-box:nth-child(6) { animation-delay: .2s; }
.otp-group.is-verifying .otp-box { opacity: .75; }
.otp-real { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; opacity: 0; pointer-events: none; }
.otp-progress { height: 3px; overflow: hidden; border-radius: 3px; background: var(--line); }
.otp-progress[hidden] { display: none; }
.otp-progress span { display: block; width: 40%; height: 100%; border-radius: 3px; background: var(--purple); animation: otp-run 1s ease-in-out infinite; }
@keyframes otp-run { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@keyframes otp-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes otp-pop { 0% { transform: scale(1); } 50% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* success */
.auth-success { display: grid; justify-items: center; gap: 8px; padding: 18px 0 8px; text-align: center; }
.auth-success[hidden] { display: none; }
.auth-success h3 { margin: 6px 0 0; color: var(--text-strong); font: 600 24px var(--serif, inherit); }
.auth-success p { margin: 0; color: var(--muted); font-size: 13px; }
.success-mark { width: 84px; height: 84px; fill: none; stroke: var(--success); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.sm-circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: sm-draw .6s ease forwards; transform-origin: center; }
.sm-check { stroke-dasharray: 40; stroke-dashoffset: 40; animation: sm-draw .4s .45s ease forwards; }
@keyframes sm-draw { to { stroke-dashoffset: 0; } }
.auth-success h3, .auth-success p { animation: auth-rise .5s .6s ease both; }

/* entrance and view change */
.auth-form:not([hidden]) > *, .auth-success:not([hidden]) > .success-mark { animation: auth-rise .45s ease both; }
.auth-form:not([hidden]) > *:nth-child(2) { animation-delay: .04s; } .auth-form:not([hidden]) > *:nth-child(3) { animation-delay: .08s; }
.auth-form:not([hidden]) > *:nth-child(4) { animation-delay: .12s; } .auth-form:not([hidden]) > *:nth-child(5) { animation-delay: .16s; }
.auth-form:not([hidden]) > *:nth-child(n+6) { animation-delay: .2s; }
@keyframes auth-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.auth-modal.open #authTitle, .auth-modal.open #authEyebrow { animation: auth-rise .5s ease both; }
.auth-modal.open { transition-timing-function: cubic-bezier(.2, .8, .2, 1); }
.auth-form.shake { animation: otp-shake .4s ease; }
.auth-form.shake > * { animation: none; }

/* buttons */
.auth-form .primary-button, .auth-form .outline-button { transition: transform .18s, box-shadow .2s, background-color .2s, opacity .2s; }
.auth-form .primary-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(33, 24, 74, .22); }
.auth-form .primary-button:active:not(:disabled), .auth-form .outline-button:active { transform: scale(.98); }
.auth-form .primary-button:disabled { position: relative; }

@media (max-width: 420px) {
  .auth-row { grid-template-columns: 1fr; }
  .otp-group { gap: 6px; }
  .otp-box { height: 48px; font-size: 20px; }
  .auth-field .phone-cc { max-width: 142px; }
}
@media (max-width: 767px) {
  .auth-modal:not(.ac-open) { padding-bottom: max(26px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .sm-circle, .sm-check { stroke-dashoffset: 0; animation: none; }
  .otp-progress span { animation: none; width: 100%; }
}
html[data-motion="off"] .auth-form *, html[data-motion="off"] .auth-success *, html[data-motion="off"] .otp-box { animation: none !important; }
html[data-motion="off"] .sm-circle, html[data-motion="off"] .sm-check { stroke-dashoffset: 0; }

.auth-modal:has(#welcomeView:not([hidden])) #authEyebrow,
.auth-modal:has(#welcomeView:not([hidden])) #authTitle,
.auth-modal:has(#welcomeView:not([hidden])) #authNote { display: none; }
.auth-modal:has(#welcomeView:not([hidden])) { padding-top: 40px; padding-bottom: 36px; }

/* loyal customer check mark */
:root { --verified: #1d6fe0; }
.ac-id .ac-namerow { display: flex; align-items: center; gap: 6px; overflow: visible; min-width: 0; }
.loyal-mark { flex: none; width: 20px; height: 20px; fill: var(--verified); stroke: none; }
.loyal-mark path { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.loyal-mark[hidden], .ac-loyal-note[hidden], .ac-chip-loyal[hidden] { display: none; }
.ac-chip-loyal { background: color-mix(in srgb, var(--verified) 14%, transparent); color: var(--verified) !important; }
.ac-id .ac-loyal-note { overflow: visible; white-space: normal; color: var(--verified); font-size: 12px; font-weight: 600; line-height: 1.5; }
.loyal-mark { animation: loyal-pop .5s ease both; }
@keyframes loyal-pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: none; opacity: 1; } }
