/* ============================================================
   ALYUSR — Fabric of Ease & Beauty
   Design system: warm paper background, Alyusr orange, logo teal
   ============================================================ */

:root {
  --paper: #FDFBF7;
  --card: #FFFFFF;
  --ink: #2B2117;
  --ink-soft: #6F6052;
  --ink-faint: #9C8F80;
  --brand: #E25C18;
  --brand-deep: #C04708;
  --brand-soft: #FCEBDD;
  --teal: #177E7E;
  --teal-soft: #E3F1F0;
  --gold: #E8A33D;
  --berry: #B23A5C;
  --berry-soft: #F8E6EC;
  --green: #2E7D4F;
  --green-soft: #E5F2EA;
  --line: #ECE4D6;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(43, 33, 23, 0.08);
  --shadow-md: 0 8px 28px rgba(43, 33, 23, 0.13);
  --shadow-lg: 0 18px 50px rgba(43, 33, 23, 0.18);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 74px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 1rem; color: var(--ink); }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 22px; }

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

/* ---------- Kanga strip (signature element) ---------- */
.kanga-strip {
  height: 12px;
  background: url("../images/products/pattern-border.svg") repeat-x;
  background-size: auto 100%;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-deep); box-shadow: var(--shadow-md); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #463928; }
.btn-ghost { background: transparent; border: 2px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: #0F6363; }
.btn-danger { background: var(--berry); color: #fff; }
.btn-danger:hover { background: #93294A; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.74rem; font-weight: 700;
  padding: 3px 10px; border-radius: var(--radius-pill);
}
.badge-stock { background: var(--green-soft); color: var(--green); }
.badge-low { background: var(--berry-soft); color: var(--berry); }
.badge-out { background: #EEE9DF; color: var(--ink-faint); }
.badge-cat { background: var(--teal-soft); color: var(--teal); }
.badge-featured { background: var(--brand-soft); color: var(--brand-deep); }

/* ---------- Announcement bar ---------- */
.announce {
  background: var(--ink); color: #F5EFE5;
  text-align: center; font-size: 0.85rem; font-weight: 600;
  padding: 8px 16px;
}
.announce strong { color: var(--gold); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(253, 251, 247, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 18px;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-sm); }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.5rem; letter-spacing: 0.02em;
  color: var(--ink); line-height: 1;
}
.brand-tag { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }

.search-wrap { flex: 1; max-width: 560px; position: relative; }
.search-wrap input {
  width: 100%; padding: 12px 48px 12px 20px;
  border: 2px solid var(--ink); border-radius: var(--radius-pill);
  background: #fff; font-size: 0.95rem;
}
.search-wrap input::placeholder { color: var(--ink-faint); }
.search-btn {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.search-btn:hover { background: var(--brand-deep); }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn {
  position: relative; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: var(--ink);
  transition: background 0.12s ease;
}
.icon-btn:hover { background: var(--brand-soft); }
.icon-btn.active { background: var(--berry-soft); color: var(--berry); }
.icon-btn svg { width: 23px; height: 23px; }
.count-pip {
  position: absolute; top: 2px; right: 0;
  min-width: 19px; height: 19px; padding: 0 5px;
  background: var(--brand); color: #fff;
  font-size: 0.7rem; font-weight: 800;
  border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--paper);
}
.count-pip.hidden, .hidden { display: none !important; }

.lang-switch {
  display: flex; border: 2px solid var(--line); border-radius: var(--radius-pill);
  overflow: hidden; font-size: 0.8rem; font-weight: 800;
}
.lang-switch button { padding: 7px 12px; color: var(--ink-faint); }
.lang-switch button.active { background: var(--ink); color: #fff; }

/* ---------- Category pills ---------- */
.cat-row {
  display: flex; gap: 10px; overflow-x: auto;
  padding: 14px 0; scrollbar-width: none;
}
.cat-row::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0;
  padding: 9px 18px; border-radius: var(--radius-pill);
  border: 2px solid var(--line); background: #fff;
  font-weight: 700; font-size: 0.88rem; color: var(--ink-soft);
  transition: all 0.12s ease;
}
.cat-pill:hover { border-color: var(--ink); color: var(--ink); }
.cat-pill.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(115deg, var(--brand-soft) 0%, #FBF4E6 55%, var(--teal-soft) 100%);
  border-radius: var(--radius-lg);
  margin-top: 8px;
  overflow: hidden;
}
.hero-inner {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 30px; align-items: center;
  padding: 52px 56px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 600; line-height: 1.08;
  letter-spacing: -0.01em;
}
.hero h1 em { font-style: italic; color: var(--brand); }
.hero p { margin-top: 14px; color: var(--ink-soft); font-size: 1.05rem; max-width: 46ch; }
.hero-cta { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-collage { position: relative; height: 300px; }
.hero-collage img {
  position: absolute; width: 56%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  border: 5px solid #fff;
}
.hero-collage img:nth-child(1) { top: 0; left: 0; transform: rotate(-5deg); }
.hero-collage img:nth-child(2) { top: 26%; right: 0; transform: rotate(4deg); z-index: 2; }
.hero-collage img:nth-child(3) { bottom: 0; left: 12%; transform: rotate(-2deg); z-index: 3; width: 48%; }

/* ---------- Sections ---------- */
.section { padding: 44px 0 10px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.7rem; font-weight: 600;
}
.sort-select {
  padding: 9px 14px; border: 2px solid var(--line); border-radius: var(--radius-pill);
  background: #fff; font-weight: 600; font-size: 0.88rem; cursor: pointer;
}

/* ---------- Product grid & cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 22px;
  padding-bottom: 50px;
}
.card {
  background: var(--card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  cursor: pointer; position: relative;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-img-wrap { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--brand-soft); }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.card:hover .card-img-wrap img { transform: scale(1.06); }
.fav-btn {
  position: absolute; top: 10px; right: 10px;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.93); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); transition: transform 0.12s ease, color 0.12s ease;
  z-index: 2;
}
.fav-btn:hover { transform: scale(1.12); color: var(--berry); }
.fav-btn.faved { color: var(--berry); }
.fav-btn svg { width: 20px; height: 20px; }
.card-sold-overlay {
  position: absolute; inset: 0;
  background: rgba(253, 251, 247, 0.55);
  display: flex; align-items: center; justify-content: center;
}
.card-sold-overlay span {
  background: var(--ink); color: #fff; font-weight: 800;
  padding: 8px 18px; border-radius: var(--radius-pill); font-size: 0.85rem;
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-weight: 700; font-size: 0.98rem; line-height: 1.3; }
.card-rating { display: flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--ink-soft); }
.stars { color: var(--gold); letter-spacing: 1px; font-size: 0.85rem; }
.card-price-row { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.card-price { font-weight: 800; font-size: 1.12rem; }
.card-unit { font-size: 0.78rem; color: var(--ink-faint); }
.card-stock { margin-top: auto; padding-top: 8px; }
.card-add {
  margin-top: 10px;
  width: 100%; padding: 10px; border-radius: var(--radius-pill);
  border: 2px solid var(--ink); font-weight: 800; font-size: 0.88rem;
  background: #fff; transition: all 0.12s ease;
}
.card-add:hover:not([disabled]) { background: var(--ink); color: #fff; }
.card-add[disabled] { opacity: 0.4; cursor: not-allowed; }

.empty-state {
  grid-column: 1 / -1; text-align: center;
  padding: 70px 20px; color: var(--ink-soft);
}
.empty-state .big { font-size: 2.6rem; margin-bottom: 10px; }

/* ---------- Modals ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(43, 33, 23, 0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 22px;
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--paper); border-radius: var(--radius-lg);
  max-width: 880px; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(0.98); transition: transform 0.18s ease;
}
.overlay.open .modal { transform: none; }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm);
  font-size: 1.1rem; z-index: 3;
}
.modal-close:hover { background: var(--brand-soft); }

.pd-grid { display: grid; grid-template-columns: 1fr 1fr; position: relative; }
.pd-img { aspect-ratio: 1; }
.pd-img img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.pd-info { padding: 34px 34px 30px; display: flex; flex-direction: column; gap: 12px; }
.pd-info h2 { font-family: var(--font-display); font-size: 1.65rem; font-weight: 600; line-height: 1.15; padding-right: 30px; }
.pd-price { font-size: 1.6rem; font-weight: 800; }
.pd-price small { font-size: 0.85rem; font-weight: 600; color: var(--ink-faint); }
.pd-desc { color: var(--ink-soft); font-size: 0.95rem; }
.qty-row { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.qty-stepper {
  display: flex; align-items: center;
  border: 2px solid var(--line); border-radius: var(--radius-pill);
}
.qty-stepper button { width: 40px; height: 40px; font-size: 1.2rem; font-weight: 800; }
.qty-stepper button:hover { color: var(--brand); }
.qty-stepper input {
  width: 52px; text-align: center; border: none; background: none;
  font-weight: 800; font-size: 1rem;
}
.pd-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

/* ---------- Cart drawer ---------- */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(43, 33, 23, 0.5);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 96;
  width: min(430px, 100vw);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  transform: translateX(102%); transition: transform 0.24s ease;
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; border-bottom: 1px solid var(--line);
}
.drawer-head h3 { font-family: var(--font-display); font-size: 1.35rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 22px; display: flex; flex-direction: column; gap: 14px; }
.cart-item {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 12px;
  background: #fff; border-radius: var(--radius); padding: 10px;
  box-shadow: var(--shadow-sm); align-items: center;
}
.cart-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.cart-item-name { font-weight: 700; font-size: 0.9rem; line-height: 1.25; }
.cart-item-price { font-size: 0.82rem; color: var(--ink-soft); margin-top: 2px; }
.cart-item-controls { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.mini-stepper { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius-pill); }
.mini-stepper button { width: 28px; height: 28px; font-weight: 800; }
.mini-stepper span { min-width: 30px; text-align: center; font-weight: 700; font-size: 0.85rem; }
.cart-item-total { font-weight: 800; font-size: 0.95rem; text-align: right; }
.cart-remove { color: var(--ink-faint); font-size: 0.78rem; text-decoration: underline; margin-top: 4px; }
.cart-remove:hover { color: var(--berry); }
.drawer-foot { border-top: 1px solid var(--line); padding: 18px 22px; background: #fff; }
.cart-subtotal { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.15rem; margin-bottom: 6px; }
.cart-note { font-size: 0.8rem; color: var(--ink-faint); margin-bottom: 14px; }

/* ---------- Checkout ---------- */
.checkout-form { padding: 34px; display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.checkout-form h2 { font-family: var(--font-display); font-size: 1.6rem; }
.form-field label { display: block; font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 14px;
  border: 2px solid var(--line); border-radius: 10px; background: #fff;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  border-color: var(--teal); outline: none;
}
.form-hint { font-size: 0.78rem; color: var(--ink-faint); margin-top: 4px; }
.order-success { text-align: center; padding: 50px 34px; }
.order-success .big { font-size: 3rem; }
.order-success h2 { font-family: var(--font-display); margin: 10px 0 6px; }
.order-success code {
  background: var(--teal-soft); color: var(--teal);
  padding: 4px 12px; border-radius: 8px; font-weight: 800;
}

/* ---------- Chat widget ---------- */
.chat-fab {
  position: fixed; bottom: 22px; right: 22px; z-index: 80;
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--teal); color: #fff;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.14s ease, background 0.14s ease;
}
.chat-fab:hover { transform: scale(1.07); background: #0F6363; }
.chat-fab svg { width: 28px; height: 28px; }
.chat-fab .count-pip { top: -2px; right: -2px; border-color: #fff; }
.chat-panel {
  position: fixed; bottom: 96px; right: 22px; z-index: 81;
  width: min(370px, calc(100vw - 32px));
  height: min(520px, 70vh);
  background: var(--paper); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(14px); opacity: 0; pointer-events: none;
  transition: all 0.18s ease;
}
.chat-panel.open { transform: none; opacity: 1; pointer-events: auto; }
.chat-head {
  background: var(--teal); color: #fff;
  padding: 14px 18px; display: flex; align-items: center; gap: 12px;
}
.chat-head img { width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.6); }
.chat-head-name { font-weight: 800; font-size: 0.95rem; }
.chat-head-status { font-size: 0.75rem; opacity: 0.85; display: flex; align-items: center; gap: 5px; }
.chat-head-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #7BE6A3; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 0.9rem; line-height: 1.4; }
.msg-time { font-size: 0.68rem; opacity: 0.6; margin-top: 3px; }
.msg.from-customer { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg.from-owner { align-self: flex-start; background: #fff; box-shadow: var(--shadow-sm); border-bottom-left-radius: 4px; }
.msg.auto { border: 1.5px dashed var(--teal); background: var(--teal-soft); }
.chat-input-row {
  display: flex; gap: 8px; padding: 12px;
  border-top: 1px solid var(--line); background: #fff;
}
.chat-input-row input {
  flex: 1; padding: 11px 14px;
  border: 2px solid var(--line); border-radius: var(--radius-pill);
}
.chat-input-row input:focus { border-color: var(--teal); outline: none; }
.chat-send {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--teal); color: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.chat-send:hover { background: #0F6363; }
.chat-whatsapp {
  text-align: center; font-size: 0.78rem; padding: 8px;
  background: #fff; color: var(--ink-faint);
}

/* ---------- Toasts ---------- */
.toast-zone {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--ink); color: #fff;
  padding: 12px 22px; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.25s ease, toast-out 0.3s ease 2.6s forwards;
}
.toast.success { background: var(--green); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #D8CDBE; margin-top: 40px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px; padding: 48px 0 36px;
}
.site-footer h4 { color: #fff; font-size: 0.92rem; margin-bottom: 14px; letter-spacing: 0.04em; }
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: 0.88rem; }
.site-footer a { color: #D8CDBE; }
.site-footer a:hover { color: var(--gold); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { width: 46px; height: 46px; border-radius: 50%; }
.footer-brand strong { font-family: var(--font-display); font-size: 1.25rem; color: #fff; }
.footer-about { font-size: 0.88rem; max-width: 34ch; }
.pay-badges { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.pay-badges span {
  background: rgba(255,255,255,0.1); padding: 5px 12px;
  border-radius: 8px; font-size: 0.76rem; font-weight: 700; color: #fff;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 18px 0; font-size: 0.8rem; text-align: center; color: var(--ink-faint);
}

/* ============================================================
   ADMIN
   ============================================================ */
.admin-body { background: #F4EFE6; min-height: 100vh; }
.admin-login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-card {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  padding: 42px 38px; width: 100%; max-width: 420px; text-align: center;
}
.login-card img { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 16px; }
.login-card h1 { font-family: var(--font-display); font-size: 1.55rem; margin-bottom: 4px; }
.login-card p { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 22px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.login-error { color: var(--berry); font-size: 0.85rem; font-weight: 700; }
.login-note {
  margin-top: 18px; font-size: 0.78rem; color: var(--ink-faint);
  background: var(--brand-soft); border-radius: 10px; padding: 10px 14px; text-align: left;
}

.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side {
  background: var(--ink); color: #D8CDBE; padding: 22px 16px;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh;
}
.admin-side .brand { margin-bottom: 22px; padding: 0 8px; }
.admin-side .brand-name { color: #fff; font-size: 1.2rem; }
.admin-side .brand img { width: 40px; height: 40px; }
.admin-nav-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  font-weight: 700; font-size: 0.92rem; color: #D8CDBE;
  text-align: left; position: relative;
}
.admin-nav-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
.admin-nav-btn.active { background: var(--brand); color: #fff; }
.admin-nav-btn .count-pip { position: static; margin-left: auto; border: none; background: var(--berry); }
.admin-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.admin-side-foot a, .admin-side-foot button {
  font-size: 0.85rem; color: var(--ink-faint); padding: 8px 14px; text-align: left;
}
.admin-side-foot a:hover, .admin-side-foot button:hover { color: #fff; text-decoration: none; }

.admin-main { padding: 30px 34px 60px; }
.admin-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-title { font-family: var(--font-display); font-size: 1.8rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 30px; }
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-sm); border-top: 4px solid var(--brand);
}
.stat-card.teal { border-color: var(--teal); }
.stat-card.berry { border-color: var(--berry); }
.stat-card.gold { border-color: var(--gold); }
.stat-num { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: 0.84rem; color: var(--ink-soft); font-weight: 600; }

.admin-table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.admin-table th {
  text-align: left; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-faint); padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 0.9rem; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--paper); }
.admin-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.stock-adjust { display: inline-flex; align-items: center; gap: 8px; }
.stock-adjust button {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--line); font-weight: 800; line-height: 1;
}
.stock-adjust button:hover { border-color: var(--ink); }
.stock-adjust .stock-val { font-weight: 800; min-width: 34px; text-align: center; }
.row-actions { display: flex; gap: 6px; }
.row-actions button {
  padding: 6px 12px; border-radius: 8px; font-size: 0.8rem; font-weight: 700;
  border: 1.5px solid var(--line);
}
.row-actions .edit:hover { border-color: var(--teal); color: var(--teal); }
.row-actions .del:hover { border-color: var(--berry); color: var(--berry); }

/* Admin product form modal */
.admin-form { padding: 30px 32px; display: flex; flex-direction: column; gap: 14px; }
.admin-form h2 { font-family: var(--font-display); font-size: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.img-preview-row { display: flex; gap: 14px; align-items: center; }
.img-preview { width: 86px; height: 86px; border-radius: 12px; object-fit: cover; border: 2px solid var(--line); background: var(--paper); }
.check-row { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.9rem; }
.check-row input { width: 19px; height: 19px; accent-color: var(--brand); }

/* Admin chat inbox */
.inbox-shell {
  display: grid; grid-template-columns: 1fr;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
  height: 64vh; min-height: 420px; overflow: hidden;
}
.inbox-msgs { overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; background: var(--paper); }
.inbox-msgs .msg.from-customer { align-self: flex-start; background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); border-radius: 16px 16px 16px 4px; }
.inbox-msgs .msg.from-owner { align-self: flex-end; background: var(--teal); color: #fff; border-radius: 16px 16px 4px 16px; }
.inbox-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.inbox-input input { flex: 1; padding: 12px 16px; border: 2px solid var(--line); border-radius: var(--radius-pill); }
.inbox-input input:focus { border-color: var(--teal); outline: none; }

/* Orders */
.order-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 18px 20px; margin-bottom: 14px;
  display: grid; grid-template-columns: 1fr auto; gap: 14px;
}
.order-id { font-weight: 800; }
.order-meta { font-size: 0.84rem; color: var(--ink-soft); margin-top: 2px; }
.order-items { font-size: 0.88rem; margin-top: 8px; color: var(--ink-soft); }
.order-right { text-align: right; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.order-total { font-weight: 800; font-size: 1.1rem; }
.status-select { padding: 7px 12px; border-radius: var(--radius-pill); border: 2px solid var(--line); font-weight: 700; font-size: 0.82rem; }

/* Show/hide toggle switch (category visibility) */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; cursor: pointer; vertical-align: middle; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; inset: 0; border-radius: 999px; background: #D9D0C2; transition: background .18s ease; }
.switch-slider::before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s ease;
}
.switch input:checked + .switch-slider { background: var(--green); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }
.switch input:focus-visible + .switch-slider { outline: 2px solid var(--ink); outline-offset: 2px; }
.cat-help { max-width: 760px; color: var(--ink-soft); font-size: .9rem; line-height: 1.5; margin: -2px 0 16px; }

.settings-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 26px; max-width: 620px; display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.settings-card h3 { font-family: var(--font-display); font-size: 1.25rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding: 38px 30px; }
  .hero-collage { height: 240px; max-width: 420px; }
  .pd-grid { grid-template-columns: 1fr; }
  .pd-img img { border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 340px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side {
    position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center;
  }
  .admin-side .brand { margin-bottom: 0; margin-right: auto; }
  .admin-side-foot { margin-top: 0; flex-direction: row; }
}
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 0; row-gap: 10px; }
  .search-wrap { order: 3; max-width: 100%; flex-basis: 100%; }
  .brand-tag { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-body { padding: 10px 12px 12px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .admin-main { padding: 20px 16px 50px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
