/* ALSAS Store — shared storefront + admin styles */

:root {
  --ink: #191817;
  --gold: #a88136;
  --goldlight: #e4c98f;
  --cream: #f8f6f0;
  --paper: #fffefa;
  --muted: #6c6962;
  --line: #e7e1d6;
  --max: 1500px;
  --shell: 1080px;
  --danger: #9b2c2c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: min(calc(100% - 64px), var(--max));
  margin: auto;
}
.store-shell {
  width: min(100%, var(--shell));
  margin-left: auto;
  margin-right: auto;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

h1, h2, h3, h4 {
  font-family: Manrope, sans-serif;
  letter-spacing: -0.035em;
}
p { line-height: 1.7; }

.eyebrow {
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 800;
}
.kicker {
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  margin: 0 0 6px;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 254, 250, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.nav {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand img {
  width: clamp(145px, 15vw, 205px);
  height: auto;
  max-height: 76px;
  object-fit: contain;
}
.brand-caption {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 3px;
  font-size: 0.59rem;
  color: var(--gold);
  letter-spacing: 0.17em;
  text-transform: uppercase;
  font-weight: 800;
}
.nav-links {
  display: flex;
  gap: clamp(12px, 2vw, 32px);
  align-items: center;
  font-size: 0.87rem;
  font-weight: 700;
}
.nav-links a:hover,
.nav-links [aria-current] { color: var(--gold); }
.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 1.3rem;
}
.cart-pill { display: inline-flex; align-items: center; gap: 6px; }
.cart-pill b {
  background: var(--gold);
  color: #181715;
  border-radius: 999px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  padding: 0 5px;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ink);
  color: #fff !important;
  padding: 13px 20px;
  border-radius: 7px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  font: inherit;
}
.btn-outline {
  background: transparent;
  color: var(--ink) !important;
  border: 1px solid var(--line);
}
.btn-gold { background: var(--gold); }
.btn-danger { background: var(--danger); }
.btn-sm { padding: 9px 14px; font-size: 0.8rem; }
.linkish {
  background: none;
  border: 0;
  color: #876527;
  font-weight: 700;
  cursor: pointer;
  font: inherit;
  padding: 0;
  margin-top: 8px;
}
.text-link {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
  color: #876527;
  font-size: 0.88rem;
}

/* —— Hero —— */
.hero {
  background: radial-gradient(ellipse at 88% 18%, #5b4527 0%, transparent 34%), #1d1b19;
  color: #fff;
  padding: 80px 0 70px;
}
.hero-compact { padding: 56px 0 48px; }
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
  margin: 14px 0 12px;
  max-width: 900px;
}
.hero h1 em { color: var(--goldlight); font-style: normal; }
.hero p {
  color: #cbc5ba;
  max-width: 640px;
  font-size: 1rem;
  margin: 0;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.hero-actions a {
  border: 1px solid #95805b;
  padding: 12px 16px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.86rem;
}
.hero-actions a:first-child {
  background: var(--goldlight);
  color: #181715;
  border-color: transparent;
}

main { padding-bottom: 80px; }

/* —— Search —— */
.store-search {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 22px 0 8px;
}
.store-search input[type="search"] {
  flex: 1;
  min-width: 200px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
.search-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 8px 0 0;
}

/* —— Empty state —— */
.empty {
  margin: 50px auto;
  max-width: 640px;
  text-align: center;
  padding: 48px 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fcfaf6;
}
.empty h2 {
  margin: 10px 0 12px;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}
.empty p { color: var(--muted); margin: 0 0 22px; }

/* —— Category pills —— */
.cat-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 0 8px;
  scrollbar-width: none;
}
.cat-pills::-webkit-scrollbar { display: none; }
.sticky-pills {
  position: sticky;
  top: 84px;
  z-index: 40;
  background: rgba(255, 254, 250, 0.94);
  backdrop-filter: blur(10px);
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
  border-bottom: 1px solid transparent;
}
.cat-pills a {
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  flex: 0 0 auto;
}
.cat-pills a:hover,
.cat-pills a.is-active {
  border-color: #d8c5a1;
  color: #876527;
  background: #fcfaf6;
}

/* —— Catalogue sections + cards —— */
.store-section { padding: 34px 0 6px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  margin: 0;
}
.section-count { color: var(--muted); font-size: 0.78rem; }

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.shop-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.shop-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px #20170b0c;
  border-color: #d8c5a1;
}
.shop-card-media {
  display: block;
  background: #f3efe7;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.shop-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.shop-card-media.img-unavailable {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e9e1d0, #fff);
}
.shop-card-body {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.shop-card-body h3 {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}
.shop-card-body h3 a:hover { color: var(--gold); }
.shop-card-body .price {
  font-weight: 800;
  color: #876527;
  font-size: 0.95rem;
  margin-top: auto;
}
.shop-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.shop-card-actions form { margin: 0; }

/* —— Product detail page —— */
.pdp { padding-top: 24px; padding-bottom: 40px; }
.back-link { margin: 0 0 16px; }
.back-link a { font-weight: 700; color: #876527; }
.pdp-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: start;
}
.pdp-gallery {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f3efe7;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pdp-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.pdp-gallery.img-unavailable {
  background: linear-gradient(135deg, #e9e1d0, #fff);
  min-height: 240px;
  aspect-ratio: auto;
}
.pdp-buy h1 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  margin: 10px 0 12px;
  line-height: 1.2;
}
.pdp-buy .price {
  font-size: 1.35rem;
  font-weight: 800;
  color: #876527;
  margin-bottom: 12px;
}
.pdp-buy .price span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.pdp-blurb {
  color: var(--muted);
  margin: 0 0 8px;
  font-size: 0.95rem;
}
.pdp-specs {
  margin: 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.pdp-specs summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 800;
  list-style: none;
}
.pdp-specs summary::-webkit-details-marker { display: none; }
.pdp-specs[open] summary { border-bottom: 1px solid var(--line); }
.pdp-specs .product-detail { padding: 8px 18px 18px; }

.product-detail { color: var(--muted); font-size: 0.9rem; }
.product-detail h3 {
  color: var(--ink);
  font-size: 1.02rem;
  margin: 18px 0 10px;
}
.product-detail p { margin: 0 0 10px; }
.product-detail > div {
  overflow-x: auto;
  margin: 8px 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.product-detail table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  background: #fff;
}
.product-detail th,
.product-detail td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.product-detail th {
  background: #25221d;
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.product-detail tr:last-child td { border-bottom: 0; }

.buy-box {
  margin: 16px 0 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfaf6;
}
.buy-box label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0 0 8px;
}
.buy-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.buy-row input {
  width: 110px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
}
.buy-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}
.buy-total strong {
  color: #876527;
  font-size: 1.2rem;
  font-family: Manrope, sans-serif;
  font-weight: 800;
}

/* —— Flash —— */
.flash {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
}
.flash-ok {
  background: #eef7ee;
  border: 1px solid #b7d7b7;
  color: #245424;
}
.flash-err {
  background: #fbf0f0;
  border: 1px solid #e0b4b4;
  color: #6e2424;
}

/* —— Cart / checkout —— */
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
}
.cart-line {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 12px;
}
.cart-thumb {
  width: 92px;
  height: 92px;
  border-radius: 8px;
  overflow: hidden;
  background: #f6f3ee;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-info h3 { margin: 0 0 6px; font-size: 1rem; }
.cart-qty-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.cart-qty-form input {
  width: 88px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
}
.cart-side { text-align: right; }
.cart-summary {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  background: #fff;
  position: sticky;
  top: 100px;
}
.cart-summary h2 {
  margin: 10px 0 4px;
  font-size: 1.8rem;
}
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 22px;
  align-items: start;
  padding-bottom: 40px;
}
.checkout-items {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.checkout-items li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.86rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

/* —— Admin —— */
.admin-wrap { padding: 36px 0 70px; }
.admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.admin-table th,
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.88rem;
  vertical-align: middle;
}
.admin-table th {
  background: #25221d;
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.admin-table tr:last-child td { border-bottom: 0; }
.form-card {
  max-width: 720px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
}
.form-card label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0 0 6px;
}
.form-card input,
.form-card textarea,
.form-card select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  margin-bottom: 16px;
  background: #fffefa;
}
.form-card textarea { min-height: 120px; resize: vertical; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}
.badge-on { background: #eef7ee; color: #245424; }
.badge-off { background: #f3f0ea; color: #6c6962; }
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 16px;
}
.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
  font-family: Manrope, sans-serif;
}
.admin-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  background: #f6f3ee;
  border: 1px solid var(--line);
}
.admin-image-preview {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfaf6;
}
.admin-image-preview img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
}

/* —— Public customer account pages —— */
body.account-app {
  background: #f8f6f0;
  min-height: 100vh;
}
.account-main {
  padding: 48px 0 70px;
}
.account-shell {
  width: min(100%, 520px);
  margin: 0 auto;
}
.account-shell-wide {
  width: min(100%, 920px);
}
.account-card,
.account-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
}
.account-card h1,
.account-profile-head h1 {
  margin: 10px 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.account-lead {
  color: var(--muted);
  margin: 0 0 20px;
}
.account-card label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0 0 6px;
}
.account-card input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  margin-bottom: 16px;
  background: #fffefa;
}
.account-foot {
  border-top: 1px solid var(--line);
  padding: 18px 0 28px;
}
.account-foot .container {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
}
.account-profile-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.account-profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.account-panel {
  margin-bottom: 18px;
}
.account-panel h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
}
.account-details {
  display: grid;
  gap: 12px;
  margin: 0;
}
.account-details div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
  font-size: 0.92rem;
}
.account-details dt {
  color: var(--muted);
  font-weight: 700;
}
.account-details dd {
  margin: 0;
}

/* —— Admin app shell (no public header) —— */
body.admin-app {
  background: #f3f0ea;
  min-height: 100vh;
}
.admin-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.2s ease;
}
.admin-shell.is-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}
.admin-sidebar {
  background: #141312;
  color: #fff;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  transition: opacity 0.2s ease, padding 0.2s ease;
}
.admin-shell.is-collapsed .admin-sidebar {
  opacity: 0;
  padding-left: 0;
  padding-right: 0;
  pointer-events: none;
}
.admin-sidebar-backdrop {
  display: none;
}
.admin-sidebar-brand a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.admin-sidebar-brand img {
  width: 132px;
  height: auto;
  filter: brightness(1.05);
}
.admin-sidebar-brand span {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--goldlight);
}
.admin-side-nav {
  display: grid;
  gap: 6px;
}
.admin-side-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #cfc9c0;
}
.admin-side-nav a:hover,
.admin-side-nav a.is-active {
  background: #25221d;
  color: #fff;
}
.admin-sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid #2e2a26;
}
.admin-sidebar-foot a {
  color: #a9a49b;
  font-size: 0.8rem;
  font-weight: 600;
}
.admin-sidebar-foot a:hover { color: var(--goldlight); }
.admin-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.admin-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: rgba(255, 254, 250, 0.96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.admin-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
}
.admin-menu-btn:hover {
  border-color: #d6d0c5;
  background: #fffefa;
}
.admin-top-search {
  flex: 1;
  display: flex;
  gap: 8px;
  min-width: 0;
}
.admin-top-search input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
.admin-top-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.admin-user {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}
.admin-stock-strip {
  margin: 16px 22px 0;
}
.admin-content {
  padding: 18px 22px 40px;
}
.admin-page-head {
  margin-bottom: 18px;
}
.admin-page-head h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
}
.admin-page-head p {
  margin: 6px 0 0;
  color: var(--muted);
}
.admin-back {
  margin: 0 0 14px;
}
.admin-back a {
  font-weight: 700;
  color: #876527;
}
.admin-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}

@media (max-width: 980px) {
  .admin-shell,
  .admin-shell.is-collapsed { grid-template-columns: 1fr; }
  .admin-shell.is-collapsed .admin-sidebar {
    opacity: 1;
    padding: 22px 16px;
    pointer-events: auto;
  }
  .admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    z-index: 80;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    opacity: 1;
    pointer-events: auto;
  }
  .admin-sidebar.is-open { transform: none; }
  .admin-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20, 19, 18, 0.45);
    z-index: 70;
  }
  .admin-sidebar-backdrop.is-open { display: block; }
  .admin-stock-strip,
  .admin-content { margin-left: 0; padding-left: 16px; padding-right: 16px; }
  .admin-topbar { padding-left: 16px; padding-right: 16px; }
  .admin-user { display: none; }
}

/* —— Admin upgrade —— */
.admin-title {
  margin: 8px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}
.admin-lead {
  color: var(--muted);
  margin: 8px 0 0;
  max-width: 540px;
}
.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.stock-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin: 22px 0 8px;
  padding: 12px 16px;
  background: #141312;
  color: #fff;
  border-radius: 999px;
}
.stock-strip-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.stock-box-icon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: #e74c3c;
  box-shadow: inset 0 -5px 0 #0003;
  flex-shrink: 0;
}
.stock-strip-label strong {
  font-size: 0.92rem;
  font-weight: 700;
}
.stock-updated {
  color: #9a9590;
  font-size: 0.72rem;
}
.stock-strip-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  font-size: 0.9rem;
}
.stock-strip-values b {
  color: #e74c3c;
  font-weight: 800;
}
.stock-sep { color: #5c5854; }
.admin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 28px 0 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.admin-tabs a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
}
.admin-tabs a.is-active,
.admin-tabs a:hover {
  background: #f3efe7;
  color: var(--ink);
}
.admin-panel {
  margin-bottom: 36px;
}
.admin-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.admin-panel-head h2 {
  margin: 0;
  font-size: 1.25rem;
}
.admin-panel-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.admin-search {
  min-width: 200px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  background: #fff;
}
.admin-hint,
.admin-empty {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 14px;
}
.admin-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
}
.admin-row-actions {
  white-space: nowrap;
  display: flex;
  gap: 8px;
  align-items: center;
}
.admin-row-actions form { margin: 0; }
.admin-tools-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.stock-kind {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: #f3f0ea;
  color: #6c6962;
}
.stock-kind-tyvek { background: #fdecea; color: #9b2c2c; }
.stock-kind-fabric { background: #eef4fb; color: #1f4e79; }
.stock-kind-soap { background: #eef7ee; color: #245424; }

@media (max-width: 780px) {
  .stock-strip {
    border-radius: 14px;
    align-items: flex-start;
    flex-direction: column;
  }
}

/* —— Footer (match homepage index.php) —— */
.footer {
  background: #191817;
  color: #fff;
  padding: 74px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.7fr 1fr 1fr;
  gap: 42px;
}
.footer .brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
  margin-bottom: 16px;
}
.footer .brand img,
.footer .brand-logo {
  width: 200px;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}
.footer .brand-caption {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 3px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--goldlight);
  text-transform: uppercase;
}
.footer .brand-name { color: #fff; }
.footer p {
  color: #b8b4ac;
  font-size: 0.88rem;
  max-width: 310px;
  line-height: 1.7;
}
.footer h4 {
  font-size: 0.95rem;
  letter-spacing: 0;
  margin: 4px 0 20px;
}
.footer-links { display: grid; gap: 13px; }
.footer-links a,
.footer-address {
  color: #b8b4ac;
  font-size: 0.87rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.footer-links a:hover { color: var(--goldlight); }
.footer-note {
  font-size: 0.82rem;
  color: #b8b4ac;
}
.footer-bottom {
  margin-top: 65px;
  padding-top: 23px;
  border-top: 1px solid #393632;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: #a9a49b;
  font-size: 0.76rem;
}
.footer-bottom a { color: var(--goldlight); }

/* —— Responsive —— */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cart-layout,
  .checkout-grid,
  .pdp-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 860px) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .nav { min-height: 72px; }
  .brand img { width: 150px; max-height: 60px; }
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--paper);
    padding: 23px;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .sticky-pills { top: 72px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .admin-table { display: block; overflow-x: auto; }
  .cart-line { grid-template-columns: 72px 1fr; }
  .cart-side {
    grid-column: 1 / -1;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .hero-compact { padding: 42px 0 34px; }
  .buy-row { width: 100%; }
  .buy-row .btn { flex: 1; }
  .buy-row input { width: 96px; }
  .store-search { flex-wrap: nowrap; }
  .store-search input[type="search"] { min-width: 0; }
}

@media (max-width: 480px) {
  .shop-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .shop-card-body { padding: 10px; }
  .shop-card-body h3 {
    font-size: 0.84rem;
    min-height: 2.3em;
  }
  .shop-card-actions .btn {
    padding: 8px 10px;
    font-size: 0.72rem;
  }
}
