/* Hairlux web shop (Marketplace Phase 2, 2026-10-18): shop, checkout and
   shop orders pages. Base theme and navbar rules copied from
   transactions.css so these pages match the rest of the signed-in app. */
:root {
  --card-bg: #ffffff;
  --surface: #f8f9fa;
  --surface-2: #e9ecef;
  --primary: #9d8248;
  --muted: #6c757d;
  --border: #edf0f2;
  --shadow-soft: 0 6px 22px rgba(0, 0, 0, 0.06);
  --radius-lg: 18px;
  --radius-md: 14px;
}

:root[data-theme="dark"] {
  --card-bg: #1c2027;
  --surface: #14171c;
  --surface-2: #20242c;
  --primary: #f0ede6;
  --muted: #a7adb8;
  --border: #30353f;
  --shadow-soft: 0 6px 22px rgba(0, 0, 0, .35);
}

/* Literal (non-variable) colors from the rules below, patched for dark
   mode. --primary defaults to gold in light mode here (used as an
   accent), but in dark mode it takes the same light-cream value as
   every other page so text using it (top-profile-name, tx-description,
   etc.) stays readable on the new dark surfaces. Status pills and small
   pastel badges keep their colors, which stay legible on a dark page;
   only the plain white cards, modals, tables, and form inputs are
   switched. */
[data-theme="dark"] .top-profile,
[data-theme="dark"] .profile-list { background: var(--card-bg); }

body {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.section {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
}

.dashboard-shell {
  margin-top: 7em;
  padding-bottom: 60px;
}


.mobile-nav-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-dropdown {
  margin-left: 10px;
}

.profile-toggle {
  padding: 0;
  background: transparent;
  border: none;
}

.profile-toggle .w-icon-dropdown-toggle {
  display: none;
}

.profile-list {
  left: auto;
  right: 0;
  min-width: 220px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.profile-list .dropdown-link {
  border-radius: 8px;
  margin-bottom: 2px;
}

.profile-list .dropdown-link:last-child {
  margin-bottom: 0;
}

.top-profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
}

.top-profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #91621c, #c18a37);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.top-profile-name {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  line-height: 1;
}

.top-profile-link {
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  line-height: 1;
}


@media (max-width: 767px) {
  .dashboard-shell { margin-top: 5em; }
  .top-profile {
    width: auto;
    justify-content: center;
    margin: 0 0 0 8px;
    padding: 0;
    border: none;
    background: transparent;
  }

  .top-profile-name,
  .top-profile-link {
    display: none;
  }

  .mobile-nav-tools {
    display: inline-flex;
    align-items: center;
  }

  .mobile-nav-tools .menu-button {
    margin-left: 0;
  }

  .profile-dropdown {
    margin-left: 8px;
  }

  .profile-list {
    min-width: 190px;
  }
}

/* ── Shop ─────────────────────────────────────────────────────────────── */
.shop-shell [hidden], .cart-fab[hidden] { display: none !important; }
:root { --text: #1f2328; --gold: #9d8248; --gold-soft: #f5efe1; --ok: #2f8f5b; --ok-soft: #e7f5ec; --warn: #a66b00; --warn-soft: #fff4dc; --bad: #c0392b; --bad-soft: #fdecea; }
:root[data-theme="dark"] { --text: #f0ede6; --gold: #d4b26a; --gold-soft: #2a2620; --ok-soft: #17301f; --warn-soft: #33290f; --bad-soft: #3a1c1a; }

.shop-shell { max-width: 1180px; margin: 0 auto; padding: 32px 20px 120px; color: var(--text); }
.shop-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.shop-head h1 { margin: 0 0 4px; }
.shop-head p { margin: 0; color: var(--muted); }
.shop-tools { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-bottom: 16px; }
.shop-input, .shop-select { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card-bg); color: var(--text); font: inherit; outline: none; }
.shop-input:focus, .shop-select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(157, 130, 72, .18); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; scrollbar-width: none; }
.chip { flex: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--card-bg); color: var(--text); font: 600 13px/1 inherit; cursor: pointer; }
.chip.active { background: var(--gold); border-color: var(--gold); color: #fff; }
:root[data-theme="dark"] .chip.active { color: #1a1408; }

@media (max-width: 560px) { .shop-tools { grid-template-columns: 1fr; } }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.pcard { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; cursor: pointer; transition: transform .15s; text-align: left; padding: 0; font: inherit; color: var(--text); }
.pcard:hover { transform: translateY(-2px); }
.pcard .ph { aspect-ratio: 1; background: var(--surface-2) center/cover no-repeat; position: relative; }
/* Wishlist heart (cards: corner of the photo; product details: a button with words) */
.wish { display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; user-select: none; }
.wish svg { fill: none; stroke: currentColor; stroke-width: 2; transition: transform .15s; }
.wish.on svg { fill: #e0245e; stroke: #e0245e; }
.wish:active svg { transform: scale(.85); }
.pcard .wish { position: absolute; right: 8px; top: 8px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #1a1a1a; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.wish.big { height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--card-bg); color: var(--text); font-weight: 600; font-size: 14px; }
.wish.big.on { border-color: #e0245e; color: #e0245e; }
.wish:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.chip-saved { display: inline-flex; align-items: center; gap: 6px; }
.chip-saved svg { width: 14px; height: 14px; fill: #e0245e; stroke: #e0245e; stroke-width: 2; }
.chip-saved.active svg { fill: #fff; stroke: #fff; }
.pcard .flag { position: absolute; left: 10px; top: 10px; background: rgba(20, 23, 28, .78); color: #fff; font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.pcard .body { padding: 14px; display: grid; gap: 6px; flex: 1; }
.pcard .cat { font-size: 12px; color: var(--muted); }
.pcard .name { font-weight: 600; line-height: 1.35; }
.pcard .price { font-weight: 700; color: var(--gold); margin-top: auto; }
@media (max-width: 560px) { .pgrid { grid-template-columns: 1fr 1fr; gap: 10px; } .pcard .body { padding: 10px; } .pcard .name { font-size: 14px; } }

.btn-shop { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: 12px; border: 1px solid transparent; font: 600 15px/1 inherit; cursor: pointer; text-decoration: none; background: var(--gold); color: #fff; }
.btn-shop:disabled { opacity: .5; cursor: not-allowed; }
.btn-shop.ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-shop.dark { background: #1f2328; color: #fff; }
.btn-shop.block { width: 100%; }
.btn-shop.sm { min-height: 36px; padding: 6px 14px; font-size: 13.5px; }

/* Sits above the Tawk chat bubble (bottom right, about 60px tall). */
.cart-fab { position: fixed; right: 20px; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: inline-flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: 999px; background: #1f2328; color: #fff; border: 0; font: 600 15px inherit; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); cursor: pointer; }
.cart-fab .n { background: var(--gold); color: #fff; min-width: 24px; height: 24px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 12.5px; padding: 0 6px; }

.overlay { position: fixed; inset: 0; background: rgba(15, 17, 20, .55); z-index: 9998; display: none; }
.overlay.open { display: block; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--card-bg); color: var(--text); z-index: 9999; transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0, 0, 0, .2); }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { margin: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.drawer-foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: grid; gap: 10px; }
.x-btn { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); }

.modal-box { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(860px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow-y: auto; background: var(--card-bg); color: var(--text); border-radius: var(--radius-lg); z-index: 9999; display: none; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal-box.open { display: block; }
.pdetail { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 24px; }
.pdetail .main-img { aspect-ratio: 1; border-radius: 14px; background: var(--surface-2) center/cover no-repeat; }
.pdetail .thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.pdetail .thumbs button { flex: none; width: 56px; height: 56px; border-radius: 10px; border: 2px solid transparent; background: var(--surface-2) center/cover no-repeat; cursor: pointer; }
.pdetail .thumbs button.active { border-color: var(--gold); }
.pdetail h2 { margin: 4px 0 8px; font-size: 24px; line-height: 1.25; }
.pdetail .price { font-size: 22px; font-weight: 700; color: var(--gold); margin-bottom: 12px; }
.pdetail .desc { color: var(--muted); white-space: pre-line; line-height: 1.6; margin-bottom: 16px; }
@media (max-width: 700px) { .pdetail { grid-template-columns: 1fr; padding: 16px; gap: 14px; } .modal-box { top: auto; bottom: 0; transform: translateX(-50%); width: 100%; max-height: 92%; border-radius: 18px 18px 0 0; } }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.qty button { width: 40px; height: 42px; border: 0; background: var(--surface); color: var(--text); font-size: 18px; cursor: pointer; }
.qty span { min-width: 44px; text-align: center; font-weight: 600; }
.qty.sm button { width: 32px; height: 32px; font-size: 16px; }
.qty.sm span { min-width: 32px; font-size: 14px; }

.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .img { width: 64px; height: 64px; border-radius: 10px; background: var(--surface-2) center/cover no-repeat; }
.cart-line .nm { font-weight: 600; line-height: 1.3; }
.cart-line .meta { font-size: 13px; color: var(--muted); margin-top: 4px; }
.cart-line .side { display: grid; justify-items: end; gap: 6px; }
.link-btn { background: none; border: 0; color: var(--bad); font-size: 13px; cursor: pointer; padding: 0; }

.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.sum-row.total { font-weight: 700; font-size: 17px; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.note { border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 14px; }
.note.info { background: var(--gold-soft); }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note.bad { background: var(--bad-soft); color: var(--bad); }
.note.ok { background: var(--ok-soft); color: var(--ok); }
.note strong { display: block; margin-bottom: 2px; }

.co-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .co-grid { grid-template-columns: 1fr; } }
.panel { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); padding: 22px; color: var(--text); }
.panel + .panel { margin-top: 16px; }
.panel h3 { margin: 0 0 14px; font-size: 18px; }
.opt { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 14px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; margin-bottom: 10px; }
.opt:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.opt.disabled { opacity: .55; cursor: not-allowed; }
.opt input { margin-top: 4px; accent-color: var(--gold); width: 18px; height: 18px; }
.opt .t { font-weight: 600; }
.opt .d { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.sticky { position: sticky; top: 100px; }

.olist { display: grid; gap: 12px; }
.ocard { display: grid; gap: 8px; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 18px; color: var(--text); text-decoration: none; box-shadow: var(--shadow-soft); }
.ocard:hover { border-color: var(--gold); }
.ocard .top { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.ocard .code { font-weight: 700; letter-spacing: .02em; }
.pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.gold { background: var(--gold-soft); color: var(--gold); }

.dcode { text-align: center; border: 2px dashed var(--gold); border-radius: 16px; padding: 18px; background: var(--gold-soft); }
.dcode .digits { font-size: 38px; font-weight: 800; letter-spacing: .28em; margin: 6px 0; font-variant-numeric: tabular-nums; }
.ship { border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.ship .hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 600; }
.ship ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.empty-box { text-align: center; padding: 48px 20px; color: var(--muted); }
.back-link { display: inline-block; color: var(--gold); text-decoration: none; font-weight: 600; margin-bottom: 14px; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--gold); animation: shopspin .7s linear infinite; margin: 40px auto; }
@keyframes shopspin { to { transform: rotate(360deg); } }
