/* ============================================================
   Business profile — commerce layer (booking, menu, shop, cart)
   Ported from the GoSalamina mobile-first prototype (m1).
   Reuses base tokens, buttons, cards, sheet & chip systems from site.css.
   ============================================================ */

/* ── Business micro-site header (replaces the GoSalamina site header) ─ */
/* When a business header is present, hide the global site chrome — the
   business reads as its own homepage; GoSalamina stays in the footer. */
body:has(.bizhdr) > .hdr,
body:has(.bizhdr) > .tabbar,
body.has-bizhdr > .hdr,
body.has-bizhdr > .tabbar { display: none !important; }

.bizhdr { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.bizhdr-top { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); padding-top: 8px; padding-bottom: 8px; }
.bizhdr-back {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: grid; place-items: center; text-decoration: none;
}
.bizhdr-back:hover { background: var(--surface-alt); }
[dir="rtl"] .bizhdr-back svg { transform: scaleX(-1); }
.bizhdr-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; padding: 0; background: none; border: 0; font: inherit; color: var(--ink); cursor: pointer; }
.bizhdr-brand .bizlogo { width: 38px; height: 38px; font-size: 15px; object-fit: cover; }
.bizhdr-names { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; text-align: left; }
.bizhdr-name { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.bizhdr-cat { font-size: 11.5px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bizhdr-nav { display: none; }
.bizhdr-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.bizhdr-tabs {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 0 var(--gutter); border-top: 1px solid var(--line);
}
.bizhdr-tabs::-webkit-scrollbar { display: none; }
.bizhdr-tabs .biz-tab { flex: 0 0 auto; }

@media (min-width: 900px) {
  .bizhdr-nav { display: flex; gap: 2px; margin-left: 16px; }
  .bizhdr-nav button {
    background: none; border: 0; font: inherit; cursor: pointer; white-space: nowrap;
    padding: 8px 14px; border-radius: var(--radius); font-size: 14px; font-weight: 600; color: var(--ink-soft);
  }
  .bizhdr-nav button:hover { background: var(--surface-alt); }
  .bizhdr-nav button.active { color: var(--ink); background: var(--surface-alt); }
  .bizhdr-name { max-width: 260px; font-size: 16px; }
  .bizhdr-tabs { display: none; }
}

/* Section visibility (driven by JS) */
[data-biz-section] { display: none; }
[data-biz-section].active { display: block; }

/* Offer card ribbon (mock offers grid reuses .prod-card) */
.pc-badge.ribbon-pass { background: var(--pass); color: var(--pass-ink); }

/* Services (from DB) */
.svc-list { display: flex; flex-direction: column; gap: 12px; }
.svc-card {
  display: flex; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 12px; overflow: hidden;
}
.svc-img { width: 88px; height: 88px; flex: 0 0 88px; object-fit: cover; border-radius: var(--radius); }
.svc-body { flex: 1 1 auto; min-width: 0; }
.svc-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.svc-name { font-weight: 800; font-size: 15.5px; color: var(--ink); }
.svc-price { font-weight: 800; color: var(--ink); margin-left: auto; }
[dir="rtl"] .svc-price { margin-left: 0; margin-right: auto; }
.svc-meta { font-size: 12.5px; color: var(--ink-muted); font-weight: 700; margin-top: 2px; }
.svc-desc { margin: 6px 0 0; color: var(--ink-soft); line-height: 1.5; font-size: 14px; }
.svc-book { flex: 0 0 auto; align-self: center; }
@media (max-width: 560px) {
  .svc-card { flex-wrap: wrap; }
  .svc-img { width: 64px; height: 64px; flex-basis: 64px; }
  .svc-book { width: 100%; }
}

/* Section visibility (driven by JS) */
[data-biz-section] { display: none; }
[data-biz-section].active { display: block; }

/* ── Per-business monogram logo ──────────────────────────────── */
.bizlogo {
  display: inline-grid; place-items: center;
  border-radius: var(--radius); font-weight: 800;
  width: 46px; height: 46px; font-size: 18px; flex: 0 0 auto;
}

/* ── Find-us-online row ──────────────────────────────────────── */
.biz-socials { display: flex; flex-wrap: wrap; gap: 8px; }
.biz-social {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; font-weight: 700; color: var(--ink);
  text-decoration: none; cursor: pointer;
}
.biz-social:hover { background: var(--surface-alt); }
.biz-social svg { width: 15px; height: 15px; }

/* ── Inner page header (Menu / Shop) ─────────────────────────── */
.biz-pagehead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.biz-pagetitle { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }

/* ============================================================
   BOOKING MODAL
   ============================================================ */
.bk-sub { font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.bk-grid { display: grid; gap: 26px; }
@media (min-width: 720px) { .bk-grid { grid-template-columns: 1fr 1fr; } }
.bk-section-label { font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }
.bk-party { display: flex; flex-wrap: wrap; gap: 8px; }
.party-chip {
  min-width: 42px; height: 42px; padding: 0 12px; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--surface);
  font: inherit; font-weight: 700; cursor: pointer; color: var(--ink);
}
.party-chip.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Calendar */
.cal { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.cal-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-weight: 800; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button {
  width: 32px; height: 32px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; display: grid; place-items: center; color: var(--ink);
}
.cal-nav button:disabled { opacity: .4; cursor: default; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px; }
.cal-dow span { text-align: center; font-size: 11px; font-weight: 700; color: var(--ink-muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cell {
  position: relative; aspect-ratio: 1/1; border: 0; background: var(--surface-alt);
  border-radius: var(--radius-sm); font: inherit; font-size: 13px; font-weight: 600;
  color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.cal-cell.is-empty { background: transparent; cursor: default; }
.cal-cell.is-disabled { color: var(--ink-muted); opacity: .4; cursor: default; background: transparent; }
.cal-cell.is-full { opacity: .45; cursor: default; text-decoration: line-through; background: transparent; border: 1px solid var(--line); }
.cal-cell.is-today { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.cal-cell.is-active { background: var(--accent); color: var(--accent-ink); }
.cal-cell .cdot { position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 11.5px; color: var(--ink-muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* Slots */
.slots-empty { padding: 22px; text-align: center; color: var(--ink-muted); background: var(--surface-alt); border-radius: var(--radius); font-size: 14px; }
.slot-group { margin-bottom: 16px; }
.slot-group-label { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.slot-group-label .cnt { color: var(--ink-muted); font-weight: 600; font-size: 12.5px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.slot {
  height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--ink);
}
.slot:disabled { opacity: .35; cursor: default; text-decoration: line-through; }
.slot.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.bk-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px var(--gutter); border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--surface);
}
.bk-recap .r1 { font-weight: 800; }
.bk-recap .r2 { font-size: 13px; color: var(--ink-muted); }

/* Booking success */
.bk-success { padding: 30px var(--gutter) 24px; text-align: center; }
.bk-check { width: 64px; height: 64px; border-radius: 50%; background: rgba(31,122,82,.12); color: var(--success); display: grid; place-items: center; margin: 0 auto 16px; }
.bk-ticket { margin: 22px auto 0; max-width: 380px; border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 16px 18px; text-align: left; }
.bk-ticket-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.bk-ticket-row:last-child { border-bottom: 0; }
.bk-ticket-row .k { color: var(--ink-muted); font-size: 13px; }
.bk-ticket-row .v { font-weight: 700; font-size: 14px; text-align: right; }

/* ============================================================
   MENU
   ============================================================ */
.menu-note { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-soft); background: var(--surface-alt); border-radius: var(--radius); padding: 10px 14px; }
.menu-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 16px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter) 4px; position: sticky; top: var(--header-h); background: var(--bg); z-index: 5; }
.menu-nav::-webkit-scrollbar { display: none; }
.menu-cat-title { font-size: 18px; font-weight: 800; letter-spacing: -.3px; margin: 26px 0 12px; }
.menu-list { display: flex; flex-direction: column; gap: 10px; }
.menu-item {
  display: grid; grid-template-columns: 1fr 84px; gap: 14px; align-items: start;
  width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; cursor: pointer; font: inherit; color: var(--ink);
}
.menu-item:hover { background: var(--surface-alt); }
.mi-top { display: flex; align-items: baseline; gap: 8px; }
.mi-name { font-weight: 700; font-size: 15px; }
.mi-dots { flex: 1; border-bottom: 1px dotted var(--line-strong); transform: translateY(-3px); }
.mi-price { font-weight: 800; font-size: 14px; }
.mi-desc { color: var(--ink-soft); font-size: 13.5px; line-height: 1.45; margin-top: 5px; }
.mi-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.mi-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--surface-alt); color: var(--ink-soft); border: 1px solid var(--line); }
.mi-tag.sig { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.mi-photo { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-sm); }
.mim-hero { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius-lg); }
.mim-price-row { display: flex; align-items: baseline; gap: 12px; margin-top: 14px; }
.mim-price { font-size: 20px; font-weight: 800; }
.mim-stars { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.mim-rev { padding: 12px 0; border-top: 1px solid var(--line); }
.mim-rev-head { display: flex; justify-content: space-between; gap: 10px; }

/* ============================================================
   SHOP — catalog + product detail
   ============================================================ */
.prod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 720px) { .prod-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .prod-grid { grid-template-columns: repeat(4, 1fr); } }
.prod-card { text-align: left; cursor: pointer; padding: 0; overflow: hidden; }
.pc-imgwrap { position: relative; }
.pc-badge { position: absolute; top: 8px; left: 8px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: var(--radius-pill); }
.pc-cat { font-size: 11.5px; color: var(--ink-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.pc-name { font-weight: 700; font-size: 14.5px; margin-top: 3px; line-height: 1.25; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.pc-price { font-weight: 800; font-size: 15px; }
.pc-rate { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 700; color: var(--ink-muted); }

/* Product detail (in-page overlay) */
.pdp { display: grid; gap: 28px; }
@media (min-width: 900px) { .pdp { grid-template-columns: 1.1fr .9fr; align-items: start; } }
.pdp-main { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: var(--radius-lg); }
.pdp-thumbs { display: flex; gap: 8px; margin-top: 8px; }
.pdp-thumbs button { width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid transparent; background: none; cursor: pointer; padding: 0; }
.pdp-thumbs button.is-active { border-color: var(--accent); }
.pdp-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp-buy { position: sticky; top: calc(var(--header-h) + 16px); }
.pdp-price { font-size: 30px; font-weight: 800; letter-spacing: -.6px; }
.pdp-stock { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.pdp-stock .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pdp-stock.ok { color: var(--success); }
.pdp-stock.low { color: var(--danger); }
.pdp-var { display: flex; flex-wrap: wrap; gap: 8px; }
.var-chip { padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--ink); }
.var-chip.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.qty button { width: 38px; height: 38px; border: 0; background: var(--surface); font-size: 18px; cursor: pointer; color: var(--ink); }
.qty button:hover { background: var(--surface-alt); }
.qty .n { min-width: 36px; text-align: center; font-weight: 700; }
.pdp-hl { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.pdp-hl li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); }
.pdp-hl .ic { color: var(--success); flex-shrink: 0; }

/* ============================================================
   CART — FAB + sheet + toast
   ============================================================ */
.cart-fab {
  position: fixed; right: 16px; bottom: 84px; z-index: 40;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: var(--radius-pill); border: 0;
  background: var(--ink); color: var(--surface); font: inherit; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow-lg);
}
[dir="rtl"] .cart-fab { right: auto; left: 16px; }
.cf-count { background: var(--accent); color: var(--accent-ink); border-radius: var(--radius-pill); min-width: 22px; height: 22px; display: grid; place-items: center; font-size: 12px; padding: 0 6px; }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line > img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); }
.cl-name { font-weight: 700; font-size: 14px; }
.cl-var { font-size: 12.5px; color: var(--ink-muted); margin-top: 2px; }
.cl-remove { background: none; border: 0; color: var(--danger); font: inherit; font-size: 12.5px; cursor: pointer; padding: 0; }
.cl-price { font-weight: 800; font-size: 14px; white-space: nowrap; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; }
.cart-total .lbl { font-size: 14px; color: var(--ink-soft); }
.cart-total .amt { font-size: 22px; font-weight: 800; letter-spacing: -.4px; }
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--surface); padding: 12px 18px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); animation: toast-in .25s var(--t);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* In-page product overlay container */
.pdp-overlay { position: fixed; inset: 0; z-index: 70; background: var(--bg); overflow-y: auto; }
.pdp-overlay-bar { position: sticky; top: 0; z-index: 2; background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px var(--gutter); }
