:root {
  --brand-900: #2a211b;
  --brand-800: #3e3128;
  --brand-700: #574538;
  --accent-600: #855d3a;
  --accent-500: #9e7149;
  --accent-400: #b4875d;
  --cream-50: #fbf8f3;
  --cream-100: #f6f1ea;
  --cream-200: #ece3d6;
  --ink: #1d2523;
  --muted: #7a6d62;
  --line: #e7ded2;
  --white: #ffffff;
  --danger: #b3261e;
  --ok: #2e7d4f;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(42, 33, 27, 0.06), 0 2px 8px rgba(42, 33, 27, 0.05);
  --shadow: 0 10px 30px rgba(42, 33, 27, 0.12);
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream-50);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-serif); line-height: 1.15; margin: 0; font-weight: 600; }
.container { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Buttons & fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
  background: var(--brand-800); color: var(--cream-50);
  font-weight: 600; font-size: 0.95rem; cursor: pointer; text-decoration: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:hover { background: var(--brand-700); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-accent { background: var(--accent-500); }
.btn-accent:hover { background: var(--accent-600); }
.btn-ghost { background: transparent; color: var(--brand-800); border-color: var(--line); }
.btn-ghost:hover { background: var(--cream-100); }
.btn-danger { background: transparent; color: var(--danger); border-color: #efc9c5; }
.btn-danger:hover { background: #fdf0ee; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--white); cursor: pointer;
}
.icon-btn:hover { background: var(--cream-100); }

.field { display: grid; gap: 6px; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--brand-800); }
.field .hint { font-size: 0.78rem; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--white); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent-400); box-shadow: 0 0 0 3px rgba(180, 135, 93, 0.15); }
.textarea { resize: vertical; min-height: 80px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(251, 248, 243, 0.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 80px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo { height: 58px; width: auto; display: block; }
.logo-ink { fill: var(--logo-ink, #3e3128); font-family: var(--font-serif); font-weight: 700; font-size: 300px; }
.logo-tan { fill: #b4875d; }
.logo-home { font-family: 'Jost', var(--font-sans); font-weight: 300; font-size: 178px; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; color: var(--muted); font-size: 0.95rem; }
.nav a:hover { color: var(--brand-800); }
.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--accent-500); color: var(--white);
  font-size: 0.72rem; font-weight: 700; display: grid; place-items: center;
}
@media (max-width: 720px) { .nav { display: none; } .cart-btn { margin-left: auto; } }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-500); font-weight: 700; margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); color: var(--brand-900); letter-spacing: -0.02em; }
.hero h1 em { color: var(--accent-500); font-weight: 400; }
.hero p { font-size: 1.1rem; color: var(--muted); max-width: 46ch; margin: 18px 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-media { position: relative; }
.hero-media > img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; border-radius: 28px; box-shadow: var(--shadow); }
.hero-badge {
  position: absolute; left: -18px; bottom: 26px; background: var(--white); border-radius: var(--radius);
  padding: 14px 18px; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center;
}
.hero-badge strong { display: block; font-family: var(--font-serif); font-size: 1.3rem; color: var(--brand-800); }
.hero-badge span { font-size: 0.8rem; color: var(--muted); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-badge { left: 12px; }
}

/* ---------- Category tiles ---------- */
.section { padding: 48px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); color: var(--brand-900); }
.section-head p { margin: 6px 0 0; color: var(--muted); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.chip {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--white);
  cursor: pointer; font-size: 0.9rem; font-weight: 500; color: var(--brand-800); transition: all 0.15s;
}
.chip:hover { border-color: var(--brand-700); }
.chip.active { background: var(--brand-800); border-color: var(--brand-800); color: var(--cream-50); }
.chip .n { opacity: 0.6; margin-left: 4px; font-size: 0.8em; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; }
.toolbar .input { width: 240px; }
.toolbar .select { width: auto; }
@media (max-width: 560px) { .toolbar, .toolbar .input { width: 100%; } }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-media { position: relative; aspect-ratio: 1; background: var(--cream-100); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.card:hover .card-media img { transform: scale(1.04); }
.placeholder { width: 100%; height: 100%; display: grid; place-items: center; }
.placeholder img { width: 64px; height: 64px; opacity: 0.35; }
.badge {
  position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; background: var(--white); color: var(--brand-800);
}
.badge-out { background: var(--ink); color: var(--white); }
.badge-low { background: var(--accent-500); color: var(--white); }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-500); font-weight: 700; }
.card h3 { font-size: 1.12rem; color: var(--brand-900); }
.card-desc { margin: 0; color: var(--muted); font-size: 0.88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; gap: 8px; }
.price { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 600; color: var(--brand-800); }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); grid-column: 1 / -1; }
.skeleton { background: linear-gradient(90deg, var(--cream-100), var(--cream-200), var(--cream-100)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); aspect-ratio: 0.78; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Features & footer ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { background: var(--cream-100); border-radius: var(--radius); padding: 22px; }
.feature .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--white); display: grid; place-items: center; color: var(--accent-500); margin-bottom: 12px; }
.feature h3 { font-size: 1.05rem; color: var(--brand-900); margin-bottom: 4px; }
.feature p { margin: 0; font-size: 0.88rem; color: var(--muted); }
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .features { grid-template-columns: 1fr; } }

.site-footer { background: var(--brand-900); color: #dacfc3; padding: 48px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: var(--cream-50); margin: 0 0 12px; font-size: 0.95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 0.92rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.site-footer .logo, .admin-header .logo { --logo-ink: var(--cream-50); }
.site-footer .logo { height: 52px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 32px; padding-top: 18px; font-size: 0.82rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Cart drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(42, 33, 27, 0.4); z-index: 40; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); z-index: 50;
  background: var(--cream-50); box-shadow: var(--shadow); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.25s ease;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.4rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.drawer-foot { padding: 20px; border-top: 1px solid var(--line); display: grid; gap: 14px; background: var(--white); }
.total-row { display: flex; justify-content: space-between; align-items: baseline; }
.total-row strong { font-family: var(--font-serif); font-size: 1.5rem; color: var(--brand-800); }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line img, .line .ph { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--cream-100); }
.line h4 { margin: 0 0 4px; font-size: 0.95rem; }
.line .unit { font-size: 0.82rem; color: var(--muted); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--white); margin-top: 6px; }
.qty button { width: 30px; height: 30px; border: 0; background: none; cursor: pointer; font-size: 1rem; }
.qty span { min-width: 24px; text-align: center; font-weight: 600; font-size: 0.9rem; }
.line-right { text-align: right; display: grid; gap: 6px; justify-items: end; }
.link-btn { background: none; border: 0; color: var(--muted); font-size: 0.8rem; cursor: pointer; text-decoration: underline; padding: 0; }
.link-btn:hover { color: var(--danger); }

/* ---------- Modal ---------- */
.modal { border: 0; padding: 0; border-radius: 20px; width: min(560px, 100% - 32px); box-shadow: var(--shadow); background: var(--cream-50); }
.modal::backdrop { background: rgba(42, 33, 27, 0.45); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 1.4rem; }
.modal-body { padding: 22px 24px 24px; }
.summary { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 18px; font-size: 0.9rem; }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.summary .sum-total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 8px; font-weight: 700; }
.success { text-align: center; padding: 16px 0 6px; }
.success .check { width: 64px; height: 64px; border-radius: 50%; background: #e3f1e8; color: var(--ok); display: grid; place-items: center; margin: 0 auto 14px; }
.success h3 { font-size: 1.6rem; color: var(--brand-900); }
.success p { color: var(--muted); }
.form-error { color: var(--danger); font-size: 0.88rem; margin: 0; }

/* ---------- Toasts ---------- */
.toast { background: var(--brand-900); color: var(--cream-50); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); font-size: 0.92rem; animation: pop 0.2s ease; transition: opacity 0.3s, transform 0.3s; }
.toast-error { background: var(--danger); }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

/* =========================================================
   Admin
   ========================================================= */
.admin-body { background: var(--cream-100); min-height: 100vh; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(400px, 100%); background: var(--white); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.login-card .brand { justify-content: center; margin-bottom: 4px; }
.login-card .logo { height: 70px; }
.login-card p { margin: 0; text-align: center; color: var(--muted); font-size: 0.92rem; }

.admin-header { background: var(--brand-900); color: var(--cream-50); }
.admin-header .header-inner { height: 64px; }
.admin-header .logo { height: 46px; }
.admin-header .tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; background: rgba(255, 255, 255, 0.12); padding: 3px 8px; border-radius: 6px; }
.admin-user { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 0.85rem; color: #dacfc3; }
.admin-user .btn-ghost { color: var(--cream-50); border-color: rgba(255, 255, 255, 0.25); }
.admin-user .btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
@media (max-width: 560px) { .admin-user .email { display: none; } }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 24px 0; overflow-x: auto; }
.tab { padding: 12px 18px; border: 0; background: none; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab.active { color: var(--brand-800); border-bottom-color: var(--accent-500); }
.tab .n { background: var(--accent-500); color: var(--white); border-radius: 999px; padding: 1px 7px; font-size: 0.72rem; margin-left: 6px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 24px; }
.stat { background: var(--white); border-radius: var(--radius); padding: 18px; border: 1px solid var(--line); }
.stat span { font-size: 0.8rem; color: var(--muted); }
.stat strong { display: block; font-family: var(--font-serif); font-size: 1.7rem; color: var(--brand-900); margin-top: 4px; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }

.panel { background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); padding: 20px; margin-bottom: 20px; }
.panel h2 { font-size: 1.25rem; margin-bottom: 16px; color: var(--brand-900); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.panel-head h2 { margin: 0; }
.admin-cols { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }
@media (max-width: 960px) { .admin-cols { grid-template-columns: 1fr; } }

.order { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.order-head { display: grid; grid-template-columns: auto 1fr auto auto; gap: 16px; align-items: center; padding: 14px 16px; background: var(--cream-50); }
.order-id { font-family: var(--font-serif); font-weight: 600; font-size: 1.1rem; color: var(--brand-800); }
.order-who strong { display: block; }
.order-who span { font-size: 0.82rem; color: var(--muted); }
.order-total { font-family: var(--font-serif); font-weight: 600; font-size: 1.15rem; }
.order-body { padding: 14px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; font-size: 0.9rem; }
.order-body dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.order-body dt { color: var(--muted); }
.order-body dd { margin: 0; word-break: break-word; }
.order-items { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.order-items li { display: flex; justify-content: space-between; gap: 12px; }
.order-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 0 16px 14px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .order-head { grid-template-columns: 1fr auto; }
  .order-body { grid-template-columns: 1fr; }
}

.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; text-transform: capitalize; }

.plist { display: grid; gap: 10px; }
.prow { display: grid; grid-template-columns: 56px 1fr auto auto; gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prow.inactive { opacity: 0.55; }
.prow img, .prow .ph { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--cream-100); }
.prow h4 { margin: 0; font-size: 0.95rem; }
.prow .meta { font-size: 0.8rem; color: var(--muted); }
.prow .actions { display: flex; gap: 6px; }
@media (max-width: 560px) {
  .prow { grid-template-columns: 56px 1fr; }
  .prow .price, .prow .actions { grid-column: 2; }
}
.check-row { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.cat-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }

/* ---------- Social links (footer) ---------- */
.socials { display: flex; gap: 10px; margin-top: 18px; }
.social {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.08); color: var(--cream-50);
  transition: background 0.15s, transform 0.15s;
}
.social:hover { transform: translateY(-2px); color: var(--white); }
.social-whatsapp:hover { background: #25d366; }
.social-instagram:hover { background: #e4405f; }
.social-tiktok:hover { background: #000000; }
.social-facebook:hover { background: #1877f2; }

/* ---------- Admin: product photo manager ---------- */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.img-grid:empty { display: none; }
.img-tile { position: relative; margin: 0; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--cream-100); border: 1px solid var(--line); }
.img-tile img { width: 100%; height: 100%; object-fit: cover; }
.img-tile .cover-tag { position: absolute; top: 6px; left: 6px; background: var(--brand-800); color: var(--cream-50); font-size: 0.68rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.img-tile figcaption { position: absolute; inset: auto 0 0 0; display: flex; justify-content: center; gap: 4px; padding: 6px; background: linear-gradient(transparent, rgba(42, 33, 27, 0.65)); }
.img-tile button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92); cursor: pointer; font-size: 0.8rem; line-height: 1; display: grid; place-items: center; }
.img-tile button:hover { background: var(--white); }
.img-tile button[data-img-remove]:hover { color: var(--danger); }

/* ---------- Store: product view with gallery ---------- */
.card-media, .card-title { cursor: pointer; }
.card-title { all: unset; cursor: pointer; }
.card-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-title:focus-visible { outline: 2px solid var(--accent-400); outline-offset: 2px; }
.badge-photos { left: auto; right: 12px; background: rgba(42, 33, 27, 0.75); color: var(--cream-50); }

.modal-wide { width: min(940px, 100% - 32px); }
.pview { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; }
.gallery-main { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--cream-100); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92); box-shadow: var(--shadow-sm); cursor: pointer; font-size: 1.3rem; display: grid; place-items: center; }
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; }
.thumb { flex: 0 0 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--cream-100); opacity: 0.7; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--accent-500); opacity: 1; }
.pview-info { display: flex; flex-direction: column; gap: 10px; }
.pview-info h2 { font-size: 1.8rem; color: var(--brand-900); }
.pview-info .price { font-size: 1.7rem; }
.pview-info .desc { color: var(--muted); margin: 0; white-space: pre-line; }
.pview-info .stock-note { font-size: 0.88rem; color: var(--muted); }
.pview-info .btn { margin-top: auto; }
@media (max-width: 720px) { .pview { grid-template-columns: 1fr; gap: 18px; } }

/* ---------- Centered messages & confirm ---------- */
#toasts {
  position: fixed; inset: 0; margin: auto; transform: none;
  width: max-content; max-width: calc(100% - 32px); height: max-content;
  padding: 0; border: 0; background: transparent; overflow: visible;
  display: grid; gap: 8px; justify-items: center; pointer-events: none;
}
#toasts:popover-open { display: grid; }
.toast { font-size: 1rem; padding: 14px 22px; border-radius: 14px; text-align: center; box-shadow: 0 20px 50px rgba(42, 33, 27, 0.3); }
.confirm-modal { width: min(420px, 100% - 32px); text-align: center; }
.confirm-modal h2 { font-size: 1.35rem; color: var(--brand-900); margin-bottom: 8px; }
.confirm-modal p { color: var(--muted); margin: 0 0 22px; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.confirm-actions .btn { min-width: 120px; }
.btn-danger-solid { background: var(--danger); }
.btn-danger-solid:hover { background: #8f1e18; }

/* ---------- Order statuses ---------- */
.status-pending { background: #fff3d6; color: #8a5a00; }
.status-in_review { background: #fdebd9; color: #9a4a12; }
.status-confirmed { background: #e2ecfb; color: #1d4f91; }
.status-prepared { background: #e6f0f3; color: #1f6474; }
.status-with_driver { background: #ece4fb; color: #5b3a99; }
.status-delivered { background: #e3f1e8; color: var(--ok); }
.status-cancelled { background: #f5e3e1; color: var(--danger); }
.status-returned { background: #eeeae6; color: #5e5249; }

/* ---------- Order items with photo & color ---------- */
.order-items .oi { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; }
.oi img, .oi .ph { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--cream-100); display: block; }
.oi-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.oi-name small { flex-basis: 100%; color: var(--muted); font-size: 0.8rem; }
.color-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--cream-100); border: 1px solid var(--line); color: var(--brand-800); }

/* ---------- Color picker (product view) ---------- */
.color-pick { display: grid; gap: 8px; }
.color-label { font-size: 0.9rem; color: var(--muted); }
.color-label strong { color: var(--brand-800); }
.color-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.color-opt {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white); cursor: pointer; font-size: 0.88rem; font-weight: 500;
}
.color-opt:hover { border-color: var(--brand-700); }
.color-opt.active { border-color: var(--brand-800); box-shadow: 0 0 0 1px var(--brand-800); }
.swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.15); }

/* ---------- Order placed ---------- */
.order-no-box {
  display: grid; gap: 4px; justify-items: center; margin: 18px auto 12px; padding: 16px 20px; max-width: 320px;
  border: 2px dashed var(--accent-400); border-radius: var(--radius); background: var(--white);
}
.order-no-box span { font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.order-no-box strong { font-family: var(--font-serif); font-size: 2.4rem; color: var(--brand-900); line-height: 1.1; }
.order-no-box .btn { margin-top: 6px; }
.save-note { font-size: 0.92rem; max-width: 40ch; margin: 0 auto 18px !important; }
.save-note strong { color: var(--brand-800); }
.success-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Track order page ---------- */
.track-wrap { max-width: 720px; padding: 40px 0 64px; display: grid; gap: 20px; }
.track-title { font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--brand-900); margin-bottom: 6px; }
.track-intro { color: var(--muted); margin: 0 0 20px; }
.track-meta { font-size: 0.85rem; color: var(--muted); }
.track-note { margin: 4px 0 18px; }
.track-alert { padding: 14px 16px; border-radius: var(--radius-sm); background: #f5e3e1; color: var(--danger); font-weight: 600; margin-bottom: 12px; }
.track-items { border-top: 1px solid var(--line); padding-top: 14px !important; gap: 12px !important; }
.track-total { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }

.timeline { list-style: none; padding: 0; margin: 8px 0 18px; display: grid; grid-template-columns: repeat(6, 1fr); position: relative; }
.timeline li { display: grid; justify-items: center; gap: 8px; text-align: center; position: relative; font-size: 0.8rem; color: var(--muted); }
.timeline li::before { content: ''; position: absolute; top: 9px; right: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.timeline li:first-child::before { display: none; }
.timeline .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--white); border: 3px solid var(--line); position: relative; z-index: 1; }
.timeline li.done::before, .timeline li.current::before { background: var(--accent-500); }
.timeline li.done .dot { background: var(--accent-500); border-color: var(--accent-500); }
.timeline li.current .dot { border-color: var(--accent-500); box-shadow: 0 0 0 4px rgba(180, 135, 93, 0.25); }
.timeline li.current { color: var(--brand-900); font-weight: 700; }
@media (max-width: 560px) {
  .timeline { grid-template-columns: 1fr; gap: 14px; }
  .timeline li { grid-template-columns: 20px 1fr; justify-items: start; text-align: left; }
  .timeline li::before { top: auto; bottom: 50%; right: auto; left: 8.5px; width: 3px; height: calc(100% + 14px); }
}

/* ---------- Image lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; cursor: zoom-out; }
.lightbox::backdrop { background: rgba(20, 15, 12, 0.88); }
.lightbox figure { margin: 0; height: 100%; display: grid; place-items: center; align-content: center; gap: 12px; padding: 24px; }
.lightbox img { max-width: min(1000px, 100%); max-height: calc(100vh - 110px); object-fit: contain; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); background: var(--white); }
.lightbox figcaption { color: var(--cream-50); font-weight: 600; text-align: center; }
.lightbox figcaption:empty { display: none; }
.lightbox-close { position: fixed; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92); font-size: 1.1rem; cursor: pointer; }
.zoomable { cursor: zoom-in; transition: transform 0.15s; }
.zoomable:hover { transform: scale(1.05); }
