:root {
  --ink: #1d2624;
  --ink-soft: #5b6664;
  --bg: #f5f3ee;
  --paper: #ffffff;
  --line: #dcd6c9;
  --accent: #2c5f6b;
  --accent-soft: #e4edee;
  --amber: #a8672a;
  --danger: #b3261e;
  --radius: 8px;
  --maxw: 1180px;
  --shadow: 0 1px 2px rgba(29, 38, 36, .04), 0 4px 14px rgba(29, 38, 36, .05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---- Header ---- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1.25rem;
  flex-wrap: wrap;
}
.logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
  white-space: nowrap;
  letter-spacing: -.01em;
}
.search-form {
  flex: 1 1 240px;
  display: flex;
  min-width: 180px;
}
.search-form input[type="search"] {
  flex: 1;
  padding: .6rem .9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: .95rem;
  font-family: inherit;
  background: var(--bg);
}
.search-form input[type="search"]:focus-visible { position: relative; z-index: 1; }
.search-form button {
  padding: .6rem 1.1rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: background-color .15s ease;
}
.search-form button:hover { background: #234b55; }
.header-links {
  display: flex;
  gap: 1.3rem;
  align-items: center;
  white-space: nowrap;
  font-size: .92rem;
  font-weight: 600;
}
.header-links a { color: var(--ink); }
.header-links a:hover { color: var(--accent); text-decoration: none; }
.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 .35rem;
  border-radius: 999px;
  background: var(--amber);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  margin-left: .3rem;
}
.cart-count[hidden] { display: none; }

@media (max-width: 640px) {
  .site-header .bar { padding: .7rem 1rem; gap: .6rem; }
  .search-form { order: 3; flex-basis: 100%; }
  .header-links { margin-left: auto; gap: 1rem; }
}

/* ---- Hero ---- */
.hero {
  padding: 3.4rem 0;
  background:
    radial-gradient(ellipse 700px 260px at 85% -20%, var(--accent-soft), transparent),
    var(--paper);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}
.hero-copy { display: flex; flex-direction: column; gap: 1.15rem; max-width: 34rem; }
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: .07em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent);
}
.hero h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
}
.hero p {
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.6;
  margin: 0;
}
.hero-actions { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.hero-link { font-weight: 600; font-size: .95rem; }
.hero-stats {
  display: flex;
  gap: 1.8rem;
  margin-top: .4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.hero-stat { display: flex; flex-direction: column; }
.hero-stat-value { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.hero-stat-label { font-size: .8rem; color: var(--ink-soft); }

/* Abstract geometric hero visual — stands in for product photography we
   don't have, using the same accent/amber palette as the rest of the site. */
.hero-visual { position: relative; height: 22rem; }
.hero-shape { position: absolute; border-radius: 1.4rem; }
.hero-shape-square { top: 0; right: 2.5rem; width: 15.5rem; height: 15.5rem; background: var(--accent); }
.hero-shape-icon-square { position: absolute; top: 2.4rem; right: 6.5rem; width: 12rem; height: 12rem; color: #fff; display: flex; align-items: center; justify-content: center; }
.hero-shape-circle { bottom: 1.2rem; left: 0; width: 11.5rem; height: 11.5rem; border-radius: 999px; background: var(--amber); }
.hero-shape-icon-circle { position: absolute; bottom: 3.3rem; left: 2rem; width: 7.5rem; height: 7.5rem; color: #fff; display: flex; align-items: center; justify-content: center; }
.hero-shape-tile { top: 12rem; left: 9rem; width: 9rem; height: 9rem; background: var(--accent-soft); border: 1px solid var(--line); }
.hero-shape-icon-tile { position: absolute; top: 14.2rem; left: 11.2rem; width: 4.6rem; height: 4.6rem; color: var(--accent); display: flex; align-items: center; justify-content: center; }

/* ---- Trust strip ---- */
.trust-strip { background: var(--paper); border-bottom: 1px solid var(--line); padding: 1.2rem 0; }
.trust-strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.trust-item { display: flex; align-items: center; gap: .7rem; font-size: .88rem; font-weight: 600; }
.trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

/* ---- Section headings ---- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.section-head h2 { margin: 1.6rem 0 .8rem; }

/* ---- Home category cards ---- */
.category-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.1rem;
}
.category-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.2rem;
  height: 9.5rem;
  border-radius: var(--radius);
  padding: 1.4rem;
  color: #fff;
  transition: transform .15s ease;
}
.category-card:hover { transform: translateY(-2px); text-decoration: none; }
.category-card-name { font-weight: 800; font-size: 1.15rem; }
.category-card-teal { background: var(--accent); }
.category-card-amber { background: var(--amber); }
.category-card-ink { background: var(--ink); }

/* ---- CTA band ---- */
.cta-band {
  margin: 2.5rem 0 0;
  background: var(--accent);
  border-radius: 1.2rem;
  padding: 2rem 2.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: #fff;
}
.cta-band-title { font-size: 1.3rem; font-weight: 800; margin-bottom: .5rem; }
.cta-band-points { display: flex; gap: 1.6rem; flex-wrap: wrap; font-size: .88rem; opacity: .92; }
.cta-band-btn { background: #fff; color: var(--accent); }
.cta-band-btn:hover { background: #f0eee8; }

/* ---- Breadcrumbs ---- */
.breadcrumbs {
  font-size: .85rem;
  color: var(--ink-soft);
  margin: 1.1rem 0 .5rem;
}
.breadcrumbs a { color: var(--ink-soft); }

main.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem 3.5rem;
}

h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; margin: .3rem 0 1rem; text-wrap: balance; }
h2 { font-size: 1.1rem; font-weight: 700; margin: 1.6rem 0 .8rem; }

.page-heading { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.page-heading h1 { margin-bottom: .3rem; }
.page-heading-count { color: var(--ink-soft); font-size: .92rem; font-variant-numeric: tabular-nums; margin: 0 0 1rem; }

/* ---- Grids ---- */
/* ---- Category filters ---- */
.subcategory-section { margin-bottom: 2.2rem; padding-bottom: 2.2rem; border-bottom: 1px solid var(--line); }

.category-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 780px) {
  .category-layout { grid-template-columns: 1fr; }
}
.filters {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.1rem 1.3rem;
  box-shadow: var(--shadow);
}
.filters-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; margin-bottom: .3rem; }
.filters-head h2 { margin: 0; font-size: 1rem; }
.filters-clear { font-size: .8rem; color: var(--amber); white-space: nowrap; }
.filter-group { border-top: 1px solid var(--line); padding-top: .8rem; margin-top: .8rem; }
.filter-group:first-of-type { border-top: none; margin-top: .4rem; padding-top: 0; }
.filter-group h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); font-weight: 700; margin: 0 0 .5rem; }
.filter-options { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .15rem; }
.filter-option {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .3rem;
  border-radius: 4px;
  color: var(--ink);
  font-size: .88rem;
}
.filter-option:hover { background: var(--bg); text-decoration: none; }
.filter-option.is-selected { font-weight: 700; color: var(--accent); }
.filter-checkbox {
  width: 1rem; height: 1rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  flex-shrink: 0;
  color: var(--paper);
}
.filter-option.is-selected .filter-checkbox { background: var(--accent); border-color: var(--accent); }
.filter-value { flex: 1; }
.filter-count { color: var(--ink-soft); font-size: .78rem; font-variant-numeric: tabular-nums; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.page-link { font-weight: 600; font-size: .9rem; }
.page-link.is-disabled { color: var(--line); pointer-events: none; }
.page-numbers { display: flex; gap: .3rem; }
.page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  border-radius: 6px;
  color: var(--ink);
  font-size: .88rem;
  font-variant-numeric: tabular-nums;
}
.page-number:hover { background: var(--accent-soft); text-decoration: none; }
.page-number.is-current { background: var(--accent); color: #fff; font-weight: 700; }

.product-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.1rem;
}
.product-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem .9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(29, 38, 36, .06), 0 10px 24px rgba(29, 38, 36, .08);
}
.thumb-wrap { position: relative; }
.thumb-link {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  background: var(--bg);
}

/* ---- Wishlist ---- */
.wishlist-btn {
  position: absolute;
  top: .5rem;
  right: .5rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, .92);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: color .15s ease, transform .1s ease;
}
.wishlist-btn:hover { transform: scale(1.06); color: var(--danger); }
.wishlist-btn.is-active { color: var(--danger); }
.wishlist-btn.is-active svg { fill: currentColor; }
.wishlist-btn-inline { display: inline-flex; align-items: center; gap: .5rem; }
.wishlist-btn-inline.is-active { color: var(--danger); border-color: var(--danger); }
.wishlist-btn-inline.is-active svg { fill: currentColor; }
.product-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: 1.1rem 0; }
.thumb-link img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-soft), var(--paper));
  color: var(--ink-soft);
  font-size: .72rem;
  text-align: center;
  padding: .5rem;
}
.product-card .name { font-weight: 600; color: var(--ink); }
.product-card .price { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.badge {
  display: inline-block;
  font-size: .72rem;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .15rem .55rem;
  width: fit-content;
}
/* Subcategory listing on a category page — the same card as the homepage's
   top-level categories, just shorter since it's a secondary section here
   rather than the page's main draw. */
.category-cards-compact .category-card { height: 6.5rem; flex-direction: row; align-items: center; gap: .9rem; }
.category-cards-compact .category-card svg { width: 24px; height: 24px; flex-shrink: 0; }

/* ---- Product page ---- */
.product-detail {
  display: grid;
  grid-template-columns: minmax(260px, 440px) 1fr;
  gap: 2.5rem;
}
@media (max-width: 720px) {
  .product-detail { grid-template-columns: 1fr; gap: 1.5rem; }
}
.product-gallery { display: flex; flex-direction: column; gap: .7rem; }
.product-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
}
.gallery-placeholder {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  background: linear-gradient(135deg, var(--accent-soft), var(--paper));
}

/* ---- Product page trust row ---- */
.product-trust-row { display: flex; flex-direction: column; gap: .5rem; margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.product-trust-row .trust-item { font-size: .85rem; font-weight: 500; }
.product-trust-row .trust-icon { width: 1.7rem; height: 1.7rem; }
.product-trust-row .trust-icon svg { width: 16px; height: 16px; }

/* ---- Ratings & reviews ---- */
.stars { display: inline-flex; gap: 1px; color: var(--amber); vertical-align: middle; }
.rating-summary-link { display: inline-flex; align-items: center; gap: .5rem; margin: -.4rem 0 .8rem; color: var(--ink); }
.rating-summary-link:hover { text-decoration: none; }
.rating-summary-link:hover .rating-summary-text { text-decoration: underline; }
.rating-summary-text { font-size: .88rem; color: var(--ink-soft); }

.reviews-section { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.review-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.review-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}
.review-card-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .5rem; flex-wrap: wrap; }
.review-author { font-weight: 600; font-size: .9rem; }
.review-date { color: var(--ink-soft); font-size: .82rem; }
.review-body { margin: 0; color: var(--ink); line-height: 1.55; }

.star-picker { display: flex; gap: .25rem; color: var(--line); }
.star-picker-btn { background: none; border: none; padding: 0; cursor: pointer; color: inherit; transition: color .1s ease; }
.star-picker-btn.is-filled { color: var(--amber); }
.review-form { max-width: 520px; }
.review-form h3 { margin: 0 0 1rem; font-size: 1.05rem; }
.gallery-thumbs { display: flex; gap: .5rem; flex-wrap: wrap; }
.gallery-thumb {
  width: 56px; height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: none;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--accent); }

.product-info .price { font-size: 1.5rem; font-weight: 800; color: var(--accent); margin: .4rem 0 1.1rem; font-variant-numeric: tabular-nums; }
table.attributes { border-collapse: collapse; margin: 1rem 0; width: 100%; max-width: 480px; }
table.attributes th, table.attributes td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
table.attributes th { color: var(--ink-soft); font-weight: 500; width: 40%; }

.variation-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1.1rem; }
.variation-list a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .5rem .8rem;
  font-size: .9rem;
  color: var(--ink);
  font-weight: 500;
  transition: border-color .15s ease;
}
.variation-list a:hover { border-color: var(--accent); text-decoration: none; }

.qty-row { display: flex; align-items: center; gap: .7rem; margin: 1.1rem 0; }

.stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  width: fit-content;
}
.stepper-btn {
  width: 2.2rem;
  border: none;
  background: var(--bg);
  color: var(--ink);
  font-size: 1.1rem;
  font-family: inherit;
  cursor: pointer;
  transition: background-color .15s ease;
}
.stepper-btn:hover { background: var(--accent-soft); }
.stepper input[type="number"] {
  width: 3.2rem;
  border: none;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  padding: .5rem 0;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.stepper input[type="number"]::-webkit-outer-spin-button,
.stepper input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

button.btn, a.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: .7rem 1.4rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: background-color .15s ease, opacity .15s ease;
}
button.btn:hover, a.btn:hover { background: #234b55; text-decoration: none; }
button.btn.secondary, a.btn.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.btn.secondary:hover, a.btn.secondary:hover { background: var(--accent-soft); }
button.btn:disabled { opacity: .5; cursor: not-allowed; }
button.btn.is-added { background: #2f6b45; }

/* ---- Cart / forms ---- */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 860px) {
  .cart-layout { grid-template-columns: 1fr; }
}
.cart-table { width: 100%; border-collapse: collapse; margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cart-table th, .cart-table td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-table tbody tr:last-child td { border-bottom: none; }
.cart-table th { font-size: .78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.cart-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.cart-thumb-empty { background: var(--bg); }
.cart-line-total { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.remove-link { color: var(--amber); font-size: .85rem; }
.link-btn { background: none; border: none; padding: 0; color: var(--amber); font-size: .85rem; cursor: pointer; text-decoration: underline; font-family: inherit; }

.order-summary { display: flex; flex-direction: column; gap: 1.2rem; position: sticky; top: 5rem; }
.order-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow);
  font-weight: 700;
}
.order-summary-total span:last-child { font-size: 1.3rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.checkout-form { max-width: none; }
.checkout-form h2 { margin: 0 0 1rem; }
.form-card label.payment-option { display: flex; align-items: center; gap: .5rem; font-weight: 400; color: var(--ink); font-size: .95rem; margin-top: .4rem; }
.btn-block { display: block; width: 100%; }

.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  max-width: 420px;
  box-shadow: var(--shadow);
}
.form-card .field { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: .35rem; }
.form-card label { font-size: .85rem; color: var(--ink-soft); font-weight: 500; }
.form-card input {
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}
.form-error { color: var(--danger); font-size: .88rem; min-height: 1.2em; }
.form-note { font-size: .85rem; color: var(--ink-soft); margin-top: 1rem; text-align: center; }

/* ---- Auth pages (login / register) ---- */
.auth-page {
  display: flex;
  justify-content: center;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}
.auth-card { width: 100%; padding: 2rem; }
.auth-card h1 { margin: 0 0 .3rem; }
.auth-subtitle { color: var(--ink-soft); font-size: .92rem; margin: 0 0 1.5rem; }

.address-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: .8rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.address-card .actions { display: flex; gap: .8rem; font-size: .85rem; }

.profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  font-weight: 600;
}
.profile-card a { font-weight: 600; font-size: .92rem; }

.order-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: .6rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.order-row {
  width: 100%;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  padding: .9rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem;
  cursor: pointer;
  text-align: left;
  transition: background-color .1s ease;
}
.order-row:hover { background: var(--bg); }
.order-date { color: var(--ink-soft); font-weight: 400; font-size: .85rem; }
.order-toggle-icon {
  color: var(--ink-soft);
  font-size: 1.2rem;
  transition: transform .15s ease;
  margin-left: auto;
}
.order-row[aria-expanded="true"] .order-toggle-icon { transform: rotate(90deg); }
.order-details {
  border-top: 1px solid var(--line);
  padding: 1.1rem;
  background: var(--bg);
}
.order-items-table { box-shadow: none; margin-bottom: 1rem; }
.order-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.order-meta h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); font-weight: 700; margin: 0 0 .35rem; }
.order-meta p { margin: 0; font-size: .9rem; }
.status-pill {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.status-pill.status-new, .status-pill.status-confirmed { background: var(--accent-soft); color: var(--accent); }
.status-pill.status-processing { background: #fdeccf; color: var(--amber); }
.status-pill.status-shipped { background: #e0ecf5; color: #2b5a86; }
.status-pill.status-delivered { background: #e2f0e6; color: #2f6b45; }
.status-pill.status-cancelled { background: #fbe4e2; color: var(--danger); }

.empty-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  text-align: center;
  color: var(--ink-soft);
  padding: 3rem 1.5rem;
  margin: 0;
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.empty-note::before {
  content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" fill="none" stroke="%235b6664" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><path d="M3 8l9-5 9 5v8l-9 5-9-5V8z"></path><path d="M3 8l9 5 9-5"></path><path d="M12 13v8"></path></svg>');
  opacity: .55;
  line-height: 0;
}
.loading-note { color: var(--ink-soft); font-size: .9rem; padding: .5rem 0; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding: 1.5rem 0 2.5rem;
  color: var(--ink-soft);
  font-size: .85rem;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}

/* ---- Chat widget ---- */
.chat-widget { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 50; display: flex; flex-direction: column; align-items: flex-end; gap: .8rem; }
.chat-widget[hidden], .chat-widget-panel[hidden] { display: none !important; }
.chat-widget-toggle {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(29, 38, 36, .2);
  transition: transform .15s ease;
}
.chat-widget-toggle:hover { transform: scale(1.05); }
.chat-widget-panel {
  width: 320px;
  max-width: calc(100vw - 2rem);
  height: 420px;
  max-height: calc(100vh - 8rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(29, 38, 36, .16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: .92rem;
}
.chat-widget-close { background: none; border: none; color: #fff; cursor: pointer; display: flex; padding: 0; }
.chat-widget-messages { flex: 1; overflow-y: auto; padding: .9rem; display: flex; flex-direction: column; gap: .55rem; }
.chat-message { max-width: 82%; padding: .5rem .75rem; border-radius: 10px; font-size: .88rem; line-height: 1.4; }
.chat-message-visitor { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 3px; }
.chat-message-admin { align-self: flex-start; background: var(--bg); color: var(--ink); border-bottom-left-radius: 3px; }
.chat-message-notice { align-self: center; background: none; color: var(--muted, #888); font-size: .8rem; text-align: center; max-width: 100%; }
.chat-widget-form { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid var(--line); }
.chat-widget-form input {
  flex: 1;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: .9rem;
  font-family: inherit;
}
.chat-widget-form button {
  width: 2.4rem;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
