/* style.css - Modern look of the site.
   Colors, radius and shadows are variables so the whole style can change in one place.
   Logical properties (inline-start/end) make the layout flip automatically
   between Arabic (right-to-left) and English (left-to-right). */
:root {
  --ink: #7a2e3b;
  --ink-dark: #4d1c26;
  --gold: #c9973f;
  --gold-soft: #f4e3c3;
  --rose: #f0c4c8;
  --cream: #fdf8f4;
  --text: #2b2024;
  --muted: #6d5c62;
  --card: #ffffff;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(77, 28, 38, .10);
  --shadow-hover: 0 18px 40px rgba(77, 28, 38, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
}

a { color: var(--ink); }
h1, h2, h3 { margin: 0 0 .5rem; color: var(--ink); line-height: 1.3; }

/* ---------- Welcome screen ---------- */
.welcome-screen {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 20%, #a24455, var(--ink-dark)) center / cover no-repeat;
  color: #fff; text-align: center; cursor: pointer;
}
.welcome-screen.visible { display: flex; animation: fade-in .4s ease; }
.welcome-picture { align-items: flex-end; background-color: var(--ink-dark); }
.welcome-tap { margin-bottom: 2.2rem; padding: .45rem 1.1rem; border-radius: 999px; background: rgba(0,0,0,.35); font-size: .95rem; }
.welcome-box { padding: 2.5rem 3rem; background: rgba(0,0,0,.22); backdrop-filter: blur(8px); border-radius: 28px; }
.welcome-box h1 { color: #fff; font-size: 3rem; font-weight: 800; }
.welcome-box small { opacity: .75; }
.welcome-logo { max-width: min(260px, 70vw); max-height: 140px; margin-bottom: 1rem; }

/* ---------- Top strip: small language switch ---------- */
.top-strip { display: flex; justify-content: flex-start; padding: .25rem 1.1rem; background: var(--gold-soft); font-size: .8rem; }
.lang-link { display: inline-flex; align-items: center; gap: .3rem; color: var(--ink-dark); text-decoration: none; font-weight: 600; }
.lang-link .icon { width: 15px; height: 15px; }
.lang-link:hover { text-decoration: underline; }

/* ---------- Header (glass effect) ---------- */
.site-header {
  display: flex; align-items: center; gap: .4rem;
  padding: .5rem 1.1rem;
  background: rgba(253, 248, 244, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(122, 46, 59, .08);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: .5rem; color: var(--ink); text-decoration: none; font-size: 1.5rem; font-weight: 800; }
.brand-logo { height: 46px; width: auto; max-width: 55vw; object-fit: contain; }
.header-actions { display: flex; align-items: center; gap: .2rem; margin-inline-start: auto; }
.icon { width: 22px; height: 22px; flex: none; }
.icon-button {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 0; border-radius: 50%; cursor: pointer;
  background: #fff; color: var(--ink); box-shadow: var(--shadow); text-decoration: none;
  transition: background .2s, color .2s;
}
.icon-button.plain { background: transparent; box-shadow: none; }
.icon-button:hover { background: var(--ink); color: #fff; }
/* The header bar in the brand's wine colour (owner's choice): light icons and name on it. */
.site-header { background: var(--ink-dark); backdrop-filter: none; border-bottom: 0; }
.site-header .brand { color: #fff; }
.site-header .icon-button.plain { color: #fff; }
.site-header .icon-button.plain:hover { background: rgba(255, 255, 255, .14); }
.cart-badge {
  position: absolute; top: 2px; inset-inline-end: 0; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; background: #d93a3a; color: #fff; font-size: .7rem; font-weight: 700;
  line-height: 18px; text-align: center;
}

/* ---------- Search panel (hidden until the search icon is tapped) ---------- */
.search-panel {
  position: fixed; top: 0; inset-inline: 0; z-index: 70;
  padding: .8rem 1rem; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.2);
  border-end-start-radius: var(--radius); border-end-end-radius: var(--radius);
  transform: translateY(-110%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.search-panel.open { transform: none; }
.search-panel form { display: flex; align-items: center; gap: .6rem; max-width: 640px; margin: 0 auto; color: var(--ink); }
.search-panel input { flex: 1; min-width: 0; padding: .6rem .4rem; border: 0; outline: none; font: inherit; font-size: 1.05rem; background: transparent; }
.search-panel .icon-button { box-shadow: none; background: var(--cream); }
.search-backdrop { position: fixed; inset: 0; z-index: 65; background: rgba(40, 10, 18, .45); display: none; }
.search-backdrop.open { display: block; }

/* ---------- Buttons ---------- */
.button {
  display: inline-block; border: 0; border-radius: 999px; padding: .75rem 1.8rem; cursor: pointer;
  background: var(--gold); color: #fff; font: inherit; font-weight: 700; text-decoration: none;
  box-shadow: 0 8px 20px rgba(201, 151, 63, .4);
  transition: transform .2s, box-shadow .2s;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(201, 151, 63, .5); }
.button-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }
.button-ghost:hover { background: rgba(255,255,255,.15); box-shadow: inset 0 0 0 2px #fff; }

/* ---------- Side menu (slides in from the start side) ---------- */
.side-menu {
  position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 60;
  width: 280px; max-width: 82vw; overflow-y: auto; padding: 1.2rem;
  background: #fff; box-shadow: 0 0 40px rgba(0,0,0,.3);
  border-start-end-radius: var(--radius); border-end-end-radius: var(--radius);
  transform: translateX(-110%);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
[dir="rtl"] .side-menu { transform: translateX(110%); }
.side-menu.open { transform: none; }
.side-menu a { display: block; padding: .6rem .8rem; margin: .15rem 0; border-radius: 12px; text-decoration: none; transition: background .2s; }
.side-menu a:hover { background: var(--gold-soft); }
.side-menu a.active { background: var(--ink); color: #fff; font-weight: 700; }
.side-menu h2 { margin: 1.2rem .8rem .3rem; font-size: .9rem; color: var(--gold); letter-spacing: .04em; }
.side-close { border: 0; background: none; font: inherit; cursor: pointer; color: var(--muted); }
.side-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(40, 10, 18, .45); backdrop-filter: blur(2px); display: none; }
.side-backdrop.open { display: block; }

/* ---------- Main ---------- */
.site-main { max-width: 1160px; margin: 0 auto; padding: 1.25rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 4.5rem 1.5rem; border-radius: 32px; color: #fff;
  background: linear-gradient(135deg, #8d3446 0%, var(--ink-dark) 100%);
  box-shadow: var(--shadow);
}
/* With the designer's picture: words above, the picture as it is, the button below. */
.hero-split { text-align: center; }
.hero-split-title { color: var(--ink); font-size: clamp(1.8rem, 4.5vw, 3rem); font-weight: 800; margin: .4rem 0 .3rem; }
.hero-split-text { color: var(--muted); font-size: 1.1rem; margin: 0 auto 1.2rem; max-width: 640px; }
.hero-split-image { display: block; width: auto; max-width: 100%; height: auto; max-height: min(60vh, 460px); margin: 0 auto 1.2rem; border-radius: 24px; }
@media (max-width: 768px) { .hero-split-image { max-height: 300px; border-radius: 16px; } }
.hero-shape { position: absolute; border-radius: 50%; filter: blur(2px); }
.hero-shape-1 { width: 320px; height: 320px; top: -120px; inset-inline-start: -80px; background: radial-gradient(circle, rgba(201,151,63,.55), transparent 70%); }
.hero-shape-2 { width: 380px; height: 380px; bottom: -160px; inset-inline-end: -90px; background: radial-gradient(circle, rgba(240,196,200,.45), transparent 70%); }
.hero-content { position: relative; max-width: 640px; margin: 0 auto; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
.hero p { font-size: 1.15rem; opacity: .92; margin: .5rem 0 1.5rem; }
.hero-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.badge-pill { display: inline-block; padding: .3rem 1rem; margin-bottom: 1rem; border-radius: 999px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); font-size: .9rem; }

/* ---------- Category chips ---------- */
.chips { display: flex; gap: .6rem; overflow-x: auto; padding: 1.2rem .1rem .4rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: .5rem 1.2rem; border-radius: 999px; background: #fff; text-decoration: none; font-weight: 600; box-shadow: var(--shadow); transition: transform .2s, background .2s, color .2s; }
.chip:hover { transform: translateY(-2px); }
.chip.active { background: var(--ink); color: #fff; }

/* ---------- Catalog ---------- */
.section-title { font-size: 1.7rem; font-weight: 800; margin: 1.6rem 0 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.4rem; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.06); }
.card-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.9); font-size: 4.5rem; font-weight: 800; }
.tone-0 { background: linear-gradient(135deg, #c9973f, #7a2e3b); }
.tone-1 { background: linear-gradient(135deg, #d98b9a, #6b2433); }
.tone-2 { background: linear-gradient(135deg, #e0b56a, #a2546a); }
.tone-3 { background: linear-gradient(135deg, #b86a7a, #4d1c26); }
.tone-4 { background: linear-gradient(135deg, #cfa24f, #8d3446); }
.card-badge { position: absolute; top: .8rem; inset-inline-start: .8rem; padding: .2rem .8rem; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--ink); font-size: .8rem; font-weight: 700; }
.card-body { padding: 1.1rem 1.2rem 1.3rem; }
.card-body h3 { font-size: 1.15rem; font-weight: 700; }
.card-text { color: var(--muted); font-size: .95rem; margin: 0 0 1rem; }
.card-foot { display: flex; align-items: center; justify-content: space-between; }
.price-pill { display: inline-block; padding: .3rem 1rem; border-radius: 999px; background: var(--gold-soft); color: var(--ink-dark); }
.price-pill strong { font-size: 1.1rem; }
/* Discount: the old price struck through, and a badge with the percentage on the photo. */
.price-old { margin-inline-end: .35rem; color: var(--muted); font-size: .9rem; }
.card-foot .price-pill { white-space: nowrap; }
.discount-badge { position: absolute; top: .8rem; inset-inline-end: .8rem; padding: .2rem .7rem; border-radius: 999px; background: #c62828; color: #fff; font-size: .8rem; font-weight: 800; }
.catalog-section { scroll-margin-top: 80px; }
.item-offer { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin: .4rem 0 0; }
.item-offer .discount-badge { position: static; }
.item-offer small { color: var(--muted); }
#price-old { margin-inline-end: .4rem; opacity: .75; font-weight: 400; }
.empty { padding: 3rem; text-align: center; background: #fff; border-radius: var(--radius); }
.page { background: #fff; padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- How to book ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; }
.step { background: #fff; border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); text-align: center; }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: .8rem; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--ink)); color: #fff; font-size: 1.4rem; font-weight: 800; }
.step p { color: var(--muted); margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.4rem;
  margin-top: 3rem; padding: 2.5rem 1.5rem 1.5rem; background: var(--ink-dark); color: #fff;
  border-start-start-radius: 32px; border-start-end-radius: 32px;
}
.site-footer h3 { color: var(--gold); font-size: 1rem; }
.site-footer a { color: #fff; text-decoration: none; opacity: .85; }
.site-footer a:hover { opacity: 1; text-decoration: underline; }
.site-footer p { margin: .2rem 0; }
.footer-logo { height: 56px; width: auto; max-width: 100%; object-fit: contain; display: block; margin-bottom: .4rem; }
.footer-brand strong { font-size: 1.4rem; }
.copyright { grid-column: 1 / -1; text-align: center; opacity: .65; font-size: .85rem; border-top: 1px solid rgba(255,255,255,.12); padding-top: 1rem; }

/* ---------- Animations ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

@media (max-width: 768px) {
  .site-main { padding: .9rem; }
  .hero { padding: 3rem 1rem; border-radius: 24px; }
  .welcome-box h1 { font-size: 2.2rem; }
  .brand-logo { height: 38px; }
  .footer-brand strong { font-size: 1.2rem; }
}
@media (max-width: 380px) {
  .brand-logo { height: 30px; max-width: 42vw; }
}

/* ---------- Card as a link (home page -> item page) ---------- */
.card-link { display: block; color: inherit; text-decoration: none; }

/* ---------- Item details page ---------- */
/* Extra space at the bottom so the fixed price bar never hides the last content. */
.item-page { max-width: 760px; margin: 0 auto; padding: 1rem 1.1rem 7rem; }
.back-link { display: inline-block; margin-bottom: .8rem; font-weight: 600; text-decoration: none; }
.back-link:hover { text-decoration: underline; }

.gallery { max-width: 760px; margin: 0 auto; }
.gallery-main { position: relative; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; aspect-ratio: 16 / 10; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.gallery-main .card-placeholder { font-size: 6rem; }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--ink); font-size: 1.8rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
#gallery-prev { inset-inline-start: .7rem; }
#gallery-next { inset-inline-end: .7rem; }
/* Arrows point outward. The browser mirrors these two symbols by itself in
   right-to-left text, so no extra rule is needed for Arabic. */
#gallery-prev::before, #lightbox-prev::before { content: "\2039"; }
#gallery-next::before, #lightbox-next::before { content: "\203A"; }
.gallery-thumbs { display: flex; gap: .6rem; margin-top: .7rem; overflow-x: auto; padding-bottom: .3rem; }
.thumb { flex: 0 0 auto; width: 84px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; background: #fff; opacity: .7; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.active { border-color: var(--gold); opacity: 1; }

.item-info { margin-top: 1.2rem; }
.item-badge { position: static; display: inline-block; margin-bottom: .4rem; }
.item-title { font-size: 1.9rem; font-weight: 800; }
.item-description { color: var(--muted); font-size: 1.05rem; margin: 0; }

.item-section { margin-top: 1.6rem; }
.item-section h2 { font-size: 1.2rem; }
.colors { display: flex; flex-wrap: wrap; gap: .6rem; }
.color-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem 1rem; border: 2px solid transparent; border-radius: 999px; background: #fff; color: var(--text); font: inherit; cursor: pointer; box-shadow: var(--shadow); }
.color-chip.active { border-color: var(--gold); font-weight: 700; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); }

/* Zoom view */
.lightbox { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; background: rgba(20, 8, 12, .92); }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 12px; }
.lightbox-close { position: absolute; top: .8rem; inset-inline-end: 1rem; border: 0; background: none; color: #fff; font-size: 2.6rem; line-height: 1; cursor: pointer; z-index: 3; }
.lightbox-arrow { background: rgba(255,255,255,.2); color: #fff; }
.lightbox #lightbox-prev { inset-inline-start: 1rem; }
.lightbox #lightbox-next { inset-inline-end: 1rem; }

/* Price bar: fixed at the bottom of the screen */
.price-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.3rem; background: var(--ink-dark); color: #fff; box-shadow: 0 -6px 20px rgba(0,0,0,.2); }
.price-bar-label { opacity: .8; }
.price-bar-value strong { font-size: 1.5rem; color: var(--gold-soft); }
/* Keep the footer readable above the bar. */
body:has(.price-bar) .site-footer { padding-bottom: 5.5rem; }

/* Date picker and availability messages */
.calendar { box-sizing: border-box; width: 100%; max-width: 340px; padding: .8rem; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.cal-nav { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--cream, #f6ede8); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.cal-nav:disabled { opacity: .3; cursor: not-allowed; }
.cal-prev::before { content: "\2039"; }
.cal-next::before { content: "\203A"; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.cal-weekday { overflow: hidden; text-overflow: clip; white-space: nowrap; font-size: .8rem; color: var(--muted); padding-bottom: .2rem; }
.cal-day { aspect-ratio: 1; border: 2px solid transparent; border-radius: 50%; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.cal-day:hover:not(:disabled) { background: var(--cream, #f6ede8); }
.cal-day.selected { border-color: var(--gold); background: var(--gold-soft, #f3e3bb); font-weight: 700; }
.cal-day:disabled { cursor: not-allowed; opacity: .35; }
.cal-day.booked { text-decoration: line-through; }
.date-status { margin: .6rem 0 0; min-height: 1.4em; color: var(--muted, #6b5b57); }
.date-status.ok { color: #1d7a46; font-weight: 600; }
.date-status.bad { color: #b3261e; font-weight: 600; }
.color-chip.unavailable { opacity: .45; }

/* Add-ons and note */
.addons-hint { margin: 0 0 .6rem; color: var(--muted); }
.addon-group { margin-bottom: 1rem; }
.addon-group h3 { margin: .2rem 0 .5rem; font-size: 1.05rem; color: var(--ink); }
.addon-group-note { margin: 0 0 .5rem; color: var(--muted); font-size: .9rem; }
.addon { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem .9rem; margin-bottom: .5rem; border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.addon-info { display: flex; flex-direction: column; gap: .1rem; }
.addon-name { font-weight: 600; }
.addon-price { color: var(--gold-dark, #8a6a1f); font-size: .9rem; }
.addon-msg { color: var(--muted); }
.addon.unavailable { opacity: .5; }
.addon.unavailable .addon-msg { color: #b3261e; font-weight: 600; }
.stepper { display: inline-flex; align-items: center; gap: .6rem; }
.stepper button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--cream, #f6ede8); color: var(--ink); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.qty { min-width: 1.5rem; text-align: center; font-weight: 700; }
.note-box { width: 100%; max-width: 560px; padding: .7rem .9rem; border: 2px solid #e3d8d2; border-radius: 14px; background: #fff; color: var(--text); font: inherit; resize: vertical; }
.note-box:focus { outline: none; border-color: var(--gold); }

/* Price breakdown: the price bar itself grows upward to show the lines above the final price */
.price-bar { flex-wrap: wrap; }
.price-bar-main { display: flex; align-items: baseline; gap: .8rem; flex: 1 1 auto; }
.price-bar-actions { display: flex; align-items: center; gap: .6rem; }
.summary-toggle { padding: .5rem 1rem; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; background: transparent; color: #fff; font: inherit; cursor: pointer; }
.summary-toggle::after { content: " \25B2"; font-size: .7em; }
.summary-toggle[aria-expanded="true"]::after { content: " \25BC"; }
.summary-toggle:hover { background: rgba(255,255,255,.12); }
.summary-panel { order: -1; flex: 0 0 100%; margin: 0 0 .6rem; padding-bottom: .6rem; border-bottom: 1px solid rgba(255,255,255,.25); }
.summary-panel[hidden] { display: none; }
.summary-panel h2 { margin: 0 0 .5rem; font-size: 1.2rem; color: var(--gold-soft); }
.summary-lines { list-style: none; margin: 0; padding: 0; max-height: max(6rem, min(38vh, calc(100vh - 17rem))); overflow-y: auto; }
/* Three columns: name | quantity | price. The same grid is used by every row so they line up. */
.summary-line { display: grid; grid-template-columns: 1fr 3.5rem 10.5rem; align-items: baseline; gap: .8rem; padding: .55rem 0; border-bottom: 1px dashed rgba(255,255,255,.25); }
.summary-line:last-child { border-bottom: 0; }
.summary-qty { text-align: center; }
.summary-amount { text-align: end; white-space: nowrap; }
.summary-name small { display: block; margin-top: .1rem; font-size: .8rem; opacity: .7; }
.summary-head { font-size: .85rem; opacity: .75; padding-top: 0; }
.summary-base { font-size: 1.35rem; font-weight: 700; color: var(--gold-soft); }
.summary-addon { font-size: 1rem; }
.summary-base .summary-amount { font-size: 1.1rem; }   /* the item name is big, its amount stays inside its column */
@media (max-width: 480px) {
  .summary-line { grid-template-columns: 1fr 2.6rem 8.6rem; gap: .5rem; }
  .summary-base { font-size: 1.2rem; }
  .summary-base .summary-amount { font-size: .95rem; }
  .summary-addon { font-size: .95rem; }
}
/* On wide screens the price bar content lines up with the page column (760px) instead of the screen edges. */
.price-bar { padding-inline: max(1.3rem, calc((100vw - 760px) / 2)); }
/* Short screens (phone held sideways): keep the open price bar small. */
@media (max-height: 480px) {
  .summary-panel h2, .summary-head { display: none; }
  .summary-name small { display: none; }
}
.add-to-cart { padding: .55rem 1.3rem; border: 0; border-radius: 999px; background: var(--gold); color: var(--ink-dark); font: inherit; font-weight: 700; cursor: pointer; }
.add-to-cart:hover:not(:disabled) { filter: brightness(1.08); }
.add-to-cart:disabled { opacity: .6; cursor: wait; }
.cart-message { order: -1; flex: 0 0 100%; margin: 0 0 .5rem; font-weight: 600; }
.cart-message[hidden] { display: none; }
.cart-message.bad { color: #ffb4ab; }
.cart-message.ok { color: var(--gold-soft); }
@media (max-width: 520px) {
  .price-bar-main, .price-bar-actions { flex: 0 0 100%; }
  .price-bar-actions > * { flex: 1; }
}

/* Cart page */
.cart-page { max-width: 760px; margin: 0 auto; padding: 1.2rem 1.1rem 3rem; }
.cart-line { margin-bottom: 1.2rem; padding: 1rem 1.1rem; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.cart-line-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.cart-line-head h2 { margin: 0; font-size: 1.35rem; color: var(--ink); }
.cart-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; margin: .5rem 0 .8rem; color: var(--muted); }
.cart-meta .swatch { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; margin-inline-end: .3rem; }
.cart-rows { list-style: none; margin: 0; padding: 0; }
.cart-row { display: grid; grid-template-columns: 1fr 3.2rem 9.5rem; align-items: baseline; gap: .6rem; padding: .5rem 0; border-bottom: 1px dashed #e3d8d2; }
.cart-row-head { font-size: .85rem; color: var(--muted); padding-top: 0; }
.cart-row .qty-cell { text-align: center; }
.cart-row .amount-cell { text-align: end; white-space: nowrap; }
.cart-row small { display: block; color: var(--muted); font-size: .8rem; }
.cart-line-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: .7rem; font-weight: 700; }
.cart-line-total strong { font-size: 1.25rem; color: var(--ink); }
.cart-note { margin: .6rem 0 0; padding: .6rem .8rem; border-radius: 12px; background: var(--cream, #f6ede8); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.cart-remove { padding: .35rem .9rem; border: 1px solid #d9c9c4; border-radius: 999px; background: transparent; color: #b3261e; font: inherit; cursor: pointer; }
.cart-remove:hover { background: #fdecea; }
.cart-grand { display: flex; justify-content: space-between; align-items: baseline; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--ink-dark); color: #fff; font-size: 1.1rem; }
.cart-grand strong { font-size: 1.6rem; color: var(--gold-soft); }
.cart-empty { padding: 2rem 1rem; text-align: center; color: var(--muted); }
.summary-toggle, .add-to-cart { white-space: nowrap; }
@media (max-width: 360px) { .summary-toggle, .add-to-cart { padding-inline: .7rem; font-size: .95rem; } }

/* A section that needs the customer's attention flashes with a red frame */
.item-section.flash { animation: flash-frame 1.6s ease-out; border-radius: 6px; }
@keyframes flash-frame {
  0%, 40% { box-shadow: 0 0 0 10px #fdecea, 0 0 0 13px #b3261e; }
  100% { box-shadow: 0 0 0 10px rgba(253,236,234,0), 0 0 0 13px rgba(179,38,30,0); }
}
.item-section:focus { outline: none; }

/* "Added to cart" window with two choices */
.dialog-backdrop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(40, 10, 18, .55); backdrop-filter: blur(2px); }
.dialog-backdrop[hidden] { display: none; }
.dialog { width: min(420px, 100%); padding: 1.6rem 1.4rem; border-radius: var(--radius); background: #fff; box-shadow: 0 20px 50px rgba(0,0,0,.35); text-align: center; }
.dialog h2 { margin: 0 0 1.2rem; font-size: 1.3rem; color: #1d7a46; }
.dialog a { display: block; padding: .8rem 1rem; margin-top: .7rem; border-radius: 999px; text-decoration: none; font-weight: 700; }
.dialog-primary { background: var(--ink-dark); color: #fff; }
.dialog-secondary { border: 2px solid var(--ink-dark); color: var(--ink-dark); }

/* Edit mode and the cart's edit button */
.edit-banner { margin: 0 0 .8rem; padding: .6rem .9rem; border-radius: 12px; background: var(--gold-soft, #f3e3bb); color: var(--ink-dark); }
.edit-banner a { font-weight: 700; margin-inline-start: .4rem; }
.cart-actions { display: flex; align-items: center; gap: .5rem; }
.cart-edit { padding: .35rem .9rem; border: 1px solid var(--ink-dark); border-radius: 999px; color: var(--ink-dark); text-decoration: none; font: inherit; }
.cart-edit:hover { background: var(--cream, #f6ede8); }

/* + and - inside the cart */
.cart-row { grid-template-columns: 1fr 7rem 9.5rem; }
.qty-stepper { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }
.qty-stepper form { margin: 0; }
.qty-stepper button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--cream, #f6ede8); color: var(--ink); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.qty-stepper button:hover { background: var(--gold-soft, #f3e3bb); }
.qty-stepper output { min-width: 1.3rem; text-align: center; font-weight: 700; }
.cart-error { margin: 0 0 1rem; padding: .7rem .9rem; border-radius: 12px; background: #fdecea; color: #b3261e; font-weight: 600; }
.cart-line:target { box-shadow: 0 0 0 3px var(--gold), var(--shadow); }
/* Narrow screens: the name gets its own line; the buttons and the amount share the line below it. */
@media (max-width: 480px) {
  .cart-row-head { display: none; }
  .cart-row { grid-template-columns: auto 1fr; grid-template-areas: "name name" "qty amount"; gap: .3rem .6rem; }
  .cart-row .name-cell { grid-area: name; }
  .cart-row .qty-cell { grid-area: qty; justify-content: flex-start; text-align: start; }
  .cart-row .amount-cell { grid-area: amount; }
}

/* The "added to cart" window cannot be dismissed: the customer must pick one of the two choices */
.dialog-backdrop { background: rgba(40, 10, 18, .7); }

/* ---------- Checkout, confirmation and error pages (Week 5, Stage 3) ---------- */
.checkout-page, .order-done, .error-page { max-width: 640px; margin-inline: auto; padding: 1.5rem 1.1rem 3rem; }
.checkout-intro { color: var(--muted); margin-top: 0; }
.form-field { margin-bottom: 1rem; }
.form-field label { display: block; font-weight: 700; color: var(--ink-dark); }
.form-field label small { margin-inline-start: .4rem; font-weight: 400; color: var(--muted); }
.field-hint { margin: 0 0 .3rem; font-size: .9rem; color: var(--muted); }
.form-field input, .form-field textarea { width: 100%; padding: .7rem .8rem; border: 1.5px solid #d9c9cd; border-radius: 12px; background: #fff; color: var(--text); font: inherit; }
.form-field textarea { resize: vertical; }
.form-field input:focus, .form-field textarea:focus { outline: 3px solid var(--gold-soft); border-color: var(--gold); }
.form-field.has-error input, .form-field.has-error textarea { border-color: #b3261e; }
.field-error { margin: .3rem 0 0; color: #b3261e; font-weight: 600; font-size: .95rem; }
.checkout-summary { margin: 1.4rem 0 1rem; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.checkout-summary h2 { font-size: 1.1rem; }
.checkout-summary ul { list-style: none; margin: 0; padding: 0; }
.checkout-summary li { display: flex; justify-content: space-between; gap: .8rem; padding: .35rem 0; border-bottom: 1px solid #f1e6e8; }
.checkout-summary li small { color: var(--muted); }
.checkout-total { display: flex; justify-content: space-between; gap: .8rem; margin: .8rem 0 0; font-size: 1.1rem; }
.checkout-total strong { color: var(--ink); }
.confirm-button, .whatsapp-button { display: block; width: 100%; padding: .85rem 1.2rem; border: 0; border-radius: 999px; background: var(--gold); color: var(--ink-dark); font: inherit; font-weight: 800; font-size: 1.05rem; text-align: center; text-decoration: none; cursor: pointer; }
.whatsapp-button { background: #1f9d55; color: #fff; margin: 1.2rem 0; }
.confirm-button:hover:not(:disabled), .whatsapp-button:hover { filter: brightness(1.08); }
.confirm-button:disabled { opacity: .6; cursor: wait; }
.checkout-link { margin: 1rem 0; }
.order-code { font-size: 1.15rem; }
.order-code strong { padding: .15rem .6rem; border-radius: 8px; background: var(--gold-soft); color: var(--ink-dark); letter-spacing: .08em; }
.error-page { text-align: center; padding-top: 3rem; }
.error-code { margin: 0; font-size: 4.5rem; font-weight: 800; line-height: 1; color: var(--gold); }
.checkout-summary li > span { min-width: 0; }
.checkout-summary li small { display: block; }               /* the date sits under the name, never splits */
.checkout-summary strong { white-space: nowrap; }            /* an amount is never cut in two */
.checkout-total span { min-width: 0; }
.checkout-summary li, .checkout-total { flex-wrap: wrap; }   /* on a very narrow screen the amount drops under the name */
.checkout-summary li > span, .checkout-total span { flex: 1 1 9rem; }
.checkout-summary li small { white-space: nowrap; }

/* ---------- Admin panel (login and bookings) ---------- */
.admin-body { background: #f6f1ee; }
/* On a computer the top bar stays at the top while the page scrolls (on a phone it scrolls
   away, to leave the small screen to the page). */
.admin-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .8rem 1.1rem; background: var(--ink-dark); color: #fff; }
@media (min-width: 861px) {
  .admin-header { position: sticky; top: 0; z-index: 30; height: 3.4rem; flex-wrap: nowrap; }   /* one line: the side menu starts below it */
}
.admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
.admin-nav a, .admin-link-button { color: var(--gold-soft); font: inherit; font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.admin-nav a:hover, .admin-link-button:hover { text-decoration: underline; }
.admin-main { flex: 1 1 0; min-width: 0; max-width: 980px; margin-inline: auto; padding: 1.5rem 1.1rem 3rem; }
.admin-login { max-width: 420px; margin: 2rem auto 0; padding: 1.5rem; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.admin-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1.2rem; }
.admin-filter a { padding: .35rem 1rem; border-radius: 999px; border: 1.5px solid var(--ink); font-weight: 600; text-decoration: none; }
.admin-filter a.active { background: var(--ink); color: #fff; }
.admin-ok { margin: 0 0 1rem; padding: .7rem .9rem; border-radius: 12px; background: #e6f4ea; color: #1e6b3a; font-weight: 600; }
.admin-order { margin-bottom: 1.2rem; padding: 1.1rem; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); border-inline-start: 6px solid var(--gold); scroll-margin-top: 1rem; }
.admin-order.status-confirmed { border-inline-start-color: #1f9d55; }
.admin-order.status-cancelled { border-inline-start-color: #9a9a9a; opacity: .75; }
.admin-order-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.admin-order-head h2 { margin: 0; font-size: 1.2rem; letter-spacing: .05em; }
.status-badge { padding: .15rem .8rem; border-radius: 999px; background: var(--gold-soft); color: var(--ink-dark); font-weight: 700; font-size: .9rem; }
.status-confirmed .status-badge { background: #d7f0df; color: #1e6b3a; }
.status-cancelled .status-badge { background: #e6e6e6; color: #555; }
.admin-customer { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: .4rem 1.2rem; margin: .8rem 0; }
.admin-customer dt { font-size: .85rem; color: var(--muted); }
.admin-customer dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.admin-lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid #f1e6e8; }
.admin-lines li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; padding: .6rem 0; border-bottom: 1px solid #f1e6e8; }
.admin-line-main { display: flex; flex-direction: column; flex: 1 1 12rem; min-width: 0; }
.admin-line-main small { color: var(--muted); }
.admin-note { font-style: italic; overflow-wrap: anywhere; }
.admin-amount { white-space: nowrap; }
.admin-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.admin-confirm, .admin-cancel { padding: .55rem 1.3rem; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; }
.admin-confirm { border: 0; background: #1f9d55; color: #fff; }
.admin-cancel { border: 1.5px solid #b3261e; background: #fff; color: #b3261e; }
.admin-confirm:hover, .admin-cancel:hover { filter: brightness(1.08); }

/* Admin frame: side menu on the start side (right in Arabic), page beside it. */
.admin-shell { display: flex; align-items: flex-start; min-height: calc(100vh - 3.4rem); }
/* The side menu stays in place while the page beside it scrolls (on a phone it is a menu
   opened from the header instead, see below). */
.admin-side { flex: 0 0 230px; position: sticky; top: 3.4rem; align-self: flex-start; height: calc(100vh - 3.4rem); overflow-y: auto; padding: 1rem .7rem; background: #fff; border-inline-end: 1px solid #eadfe2; }
.side-group { margin: 1rem .6rem .3rem; font-size: .85rem; font-weight: 700; color: var(--muted); }
.side-link { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .8rem; border-radius: 10px; color: var(--text); font-weight: 600; text-decoration: none; }
.side-link.sub { padding-inline-start: 1.4rem; font-weight: 400; }
.side-link:hover { background: #f6eef0; }
.side-link.active { background: var(--ink); color: #fff; font-weight: 700; }
.side-count { min-width: 1.5rem; padding: 0 .4rem; border-radius: 999px; background: #d93025; color: #fff; font-size: .8rem; font-weight: 700; text-align: center; }
.admin-menu-button { display: none; padding: .3rem .8rem; border: 1px solid var(--gold-soft); border-radius: 999px; background: none; color: var(--gold-soft); font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 860px) {
  .admin-menu-button { display: inline-block; }
  .admin-shell { display: block; }
  .admin-side { display: none; position: static; height: auto; overflow: visible; border-inline-end: 0; border-bottom: 1px solid #eadfe2; }
  .admin-menu-open .admin-side { display: block; }
}
/* Dashboard */
.admin-dashboard h1 small { font-size: 1rem; font-weight: 400; color: var(--muted); margin-inline-start: .5rem; }
.dash-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: .8rem; margin: 1rem 0 1.4rem; }
.dash-card { display: flex; flex-direction: column; gap: .1rem; padding: .9rem 1rem; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); color: var(--text); text-decoration: none; border-top: 4px solid var(--gold-soft); }
.dash-card:hover { box-shadow: var(--shadow-hover); }
.dash-card strong { font-size: 2rem; line-height: 1.2; color: var(--ink); }
.dash-card small { color: var(--muted); }
.dash-card.attention { border-top-color: #d93025; }
.dash-card.attention strong { color: #d93025; }
.dash-panel { margin-bottom: 1.2rem; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); scroll-margin-top: 1rem; }
.dash-panel h2 { font-size: 1.1rem; margin: 0; }
.dash-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 1rem; }
.dash-empty { margin: .6rem 0 0; color: var(--muted); }
.dash-list { list-style: none; margin: .6rem 0 0; padding: 0; }
.dash-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; padding: .6rem 0; border-top: 1px solid #f1e6e8; }
.dash-list-main { display: flex; flex-direction: column; flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.dash-list-main small { color: var(--muted); }
.dash-list-side { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; }
.badge-confirmed { background: #d7f0df; color: #1e6b3a; }
.badge-cancelled { background: #e6e6e6; color: #555; }

/* Side menu: pages not built yet, and the bookings calendar of the dashboard. */
.side-link.soon { color: #b5a9ad; cursor: default; }
.side-link.soon:hover { background: none; }
.side-link.soon small { font-size: .7rem; padding: 0 .4rem; border-radius: 999px; background: #f1e9eb; }
.bcal-nav { display: flex; align-items: center; gap: .8rem; }
.bcal-nav a { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; background: #f6eef0; font-size: 1.3rem; text-decoration: none; }
.bcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; margin-top: .8rem; }
.bcal-wd { text-align: center; font-size: .8rem; color: var(--muted); overflow: hidden; white-space: nowrap; }
.bcal-cell { display: flex; flex-direction: column; align-items: center; gap: .15rem; min-height: 3.4rem; padding: .3rem .1rem; border-radius: 10px; background: #faf6f4; color: var(--text); text-decoration: none; }
.bcal-cell.empty { background: none; }
.bcal-cell b { font-weight: 600; }
.bcal-cell.today { outline: 2px solid var(--gold); }
.bcal-cell.has { background: #fff; box-shadow: 0 2px 8px rgba(77, 28, 38, .12); }
.bcal-cell.has:hover { box-shadow: var(--shadow-hover); }
.bcal-marks { display: flex; flex-wrap: wrap; justify-content: center; gap: .15rem; }
.mark-pending, .mark-confirmed { display: inline-block; min-width: 1.2rem; height: 1.2rem; padding: 0 .25rem; border-radius: 999px; font-size: .75rem; font-style: normal; font-weight: 700; line-height: 1.2rem; text-align: center; color: #fff; }
.mark-pending { background: #d98a00; }
.mark-confirmed { background: #1f9d55; }
.bcal-legend { margin: .7rem 0 0; font-size: .85rem; color: var(--muted); }
.bcal-legend i { vertical-align: middle; margin-inline-start: .6rem; }
.admin-day-filter { margin: 0 0 1rem; }
@media (max-width: 420px) { .bcal-wd { font-size: .62rem; } .bcal-cell { min-height: 3rem; } }

/* Round tabs at the top of an admin section (the pages that belong to that section). */
.admin-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.3rem; }
.admin-tabs a, .admin-tabs span { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem 1.1rem; border-radius: 999px; background: #fff; border: 1.5px solid #e4d6da; color: var(--text); font-weight: 700; text-decoration: none; white-space: nowrap; }
.admin-tabs a:hover { border-color: var(--gold); }
.admin-tabs a.active { background: var(--gold); border-color: var(--gold); color: var(--ink-dark); }
.admin-tabs .soon { color: #b5a9ad; font-weight: 400; }
.admin-tabs .soon small { font-size: .7rem; padding: 0 .4rem; border-radius: 999px; background: #f1e9eb; }
.admin-tabs a .side-count { padding: 0 .4rem; border: 0; background: #d93025; color: #fff; font-size: .8rem; }

/* Admin forms (manual booking, blocked dates) */
.admin-form h2 { font-size: 1.1rem; }
.admin-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 0 1rem; }
.admin-form select, .admin-form input[type="date"], .admin-form input[type="number"] { width: 100%; padding: .7rem .8rem; border: 1.5px solid #d9c9cd; border-radius: 12px; background: #fff; color: var(--text); font: inherit; }
.admin-fieldset { margin: .4rem 0 1rem; padding: .8rem 1rem .2rem; border: 1px solid #eadfe2; border-radius: 14px; min-width: 0; }
.admin-fieldset legend { padding: 0 .5rem; font-weight: 700; color: var(--ink); }
.admin-check { display: flex; align-items: flex-start; gap: .5rem; margin: .4rem 0 1rem; font-weight: 600; }
.admin-check input { width: 1.2rem; height: 1.2rem; margin-top: .25rem; flex: none; }
.admin-message { width: 100%; padding: .8rem; border: 1.5px solid #d9c9cd; border-radius: 12px; background: #fbf8f6; color: var(--text); font: inherit; line-height: 1.7; resize: vertical; }
.admin-secondary { display: inline-flex; align-items: center; padding: .55rem 1.3rem; border-radius: 999px; border: 1.5px solid var(--ink); color: var(--ink); font-weight: 700; text-decoration: none; }
.whatsapp-button.admin-inline { display: inline-flex; width: auto; margin: 0; padding: .55rem 1.3rem; font-size: 1rem; }
.admin-badges { display: inline-flex; flex-wrap: wrap; gap: .4rem; }
.badge-manual { background: #e3e9f7; color: #2b4a8b; }
.dash-list li form { align-self: center; }

/* Products pages: color rows and the price switch. */
.admin-add { text-decoration: none; display: inline-flex; align-items: center; }
.admin-form textarea { width: 100%; }
.color-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); gap: 0 .8rem; padding: .7rem 0 0; border-top: 1px solid #f1e6e8; }
.admin-fieldset .color-row { border-top: 0; padding-top: 0; }
.color-swatch-field input[type="color"] { width: 100%; height: 2.9rem; padding: .2rem; border: 1.5px solid #d9c9cd; border-radius: 12px; background: #fff; cursor: pointer; }
.color-price-field { display: none; }                          /* shown only when the switch is on */
.per-color-on .color-price-field { display: block; }
.admin-switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; margin-top: .4rem; }
.admin-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; flex: none; width: 2.8rem; height: 1.5rem; border-radius: 999px; background: #cfc3c6; transition: background .2s; }
.switch-track::after { content: ""; position: absolute; top: .15rem; inset-inline-start: .15rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: #fff; transition: inset-inline-start .2s; }
.admin-switch input:checked + .switch-track { background: #1f9d55; }
.admin-switch input:checked + .switch-track::after { inset-inline-start: 1.45rem; }
.admin-switch input:focus-visible + .switch-track { outline: 3px solid var(--gold); }
.color-deletes { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid #f1e6e8; }
.dash-count { font-size: .85rem; font-weight: 400; color: var(--muted); }
.admin-cancel:disabled { opacity: .45; cursor: not-allowed; }

/* Photos of a color in the admin panel. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.photo-color { padding: 1rem 0; border-top: 1px solid #f1e6e8; scroll-margin-top: 1rem; }
.photo-color h3 { display: flex; align-items: center; gap: .5rem; font-size: 1rem; margin: 0 0 .6rem; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 110px), 1fr)); gap: .6rem; list-style: none; margin: 0 0 .8rem; padding: 0; }
.photo-grid li { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #f1e9eb; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-delete { position: absolute; top: .3rem; inset-inline-end: .3rem; width: 1.8rem; height: 1.8rem; border: 0; border-radius: 50%; background: rgba(179, 38, 30, .92); color: #fff; font-size: .9rem; line-height: 1; cursor: pointer; }
.photo-upload { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.photo-upload input[type="file"] { flex: 1 1 12rem; min-width: 0; max-width: 100%; font: inherit; }

/* Add-ons page: each add-on opens to show its form. */
.addon-edit { border-top: 1px solid #f1e6e8; padding: .2rem 0; scroll-margin-top: 1rem; }
.addon-edit summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1rem; padding: .7rem 0; cursor: pointer; }
.addon-edit summary span { color: var(--muted); }
.addon-edit[open] summary { border-bottom: 1px dashed #eadfe2; margin-bottom: .8rem; }
.addon-delete { margin: .8rem 0 1rem; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 0 1rem; }
.check-grid .admin-check { margin: .2rem 0 .6rem; font-weight: 400; }

/* Accounts section */
.kind-income { color: #1e7a40; }
.kind-expense { color: #b3261e; }
.kind-choice { display: flex; gap: .6rem; margin-bottom: 1rem; }
.kind-choice label { flex: 1; cursor: pointer; }
.kind-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kind-choice span { display: block; padding: .6rem; border-radius: 12px; border: 2px solid #e4d6da; background: #fff; font-weight: 800; text-align: center; }
.kind-choice input:checked + .kind-income { border-color: #1e7a40; background: #e6f4ea; }
.kind-choice input:checked + .kind-expense { border-color: #b3261e; background: #fdecea; }
.kind-choice input:focus-visible + span { outline: 3px solid var(--gold); }
.admin-form input[type="month"] { width: 100%; padding: .7rem .8rem; border: 1.5px solid #d9c9cd; border-radius: 12px; background: #fff; color: var(--text); font: inherit; }
.ledger-filter { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 0 1rem; align-items: end; margin: 1.4rem 0 .4rem; }
.ledger-filter-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.ledger-totals .dash-card strong { font-size: 1.5rem; overflow-wrap: anywhere; }
.ledger-list { list-style: none; margin: 0; padding: 0; }
.ledger-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; padding: .7rem .7rem; border-bottom: 1px solid #f1e6e8; border-inline-start: 4px solid #1e7a40; }
.ledger-list li.ledger-expense { border-inline-start-color: #b3261e; }
.ledger-desc { font-weight: 400; }
.admin-link-delete { background: none; border: 0; padding: 0; color: #b3261e; font: inherit; font-size: .9rem; text-decoration: underline; cursor: pointer; }
.person-form { display: flex; flex: 1 1 14rem; flex-wrap: wrap; gap: .5rem; min-width: 0; }
.person-form input[type="text"] { flex: 1 1 10rem; min-width: 0; padding: .55rem .8rem; border: 1.5px solid #d9c9cd; border-radius: 12px; font: inherit; }
.person-side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .6rem; }
.paid-line { margin-top: .3rem; font-size: 1rem; }
@media print {
  .admin-header, .admin-side, .admin-tabs, .no-print { display: none !important; }
  .admin-body { background: #fff; }
  .dash-panel, .dash-card { box-shadow: none; border: 1px solid #ccc; }
}

/* Accounts, fuller model: four kinds, payments on the booking card, partner report. */
.kind-draw { color: #8a5a00; }
.kind-capital { color: #1f5f8b; }
.pl-sub { font-size: .95rem; margin: 1rem 0 .2rem; color: var(--muted); }
.kind-transfer { color: #2b4a8b; }
.kind-choice { flex-wrap: wrap; }
.kind-choice label { flex: 1 1 7rem; }
.kind-choice input:checked + .kind-draw { border-color: #8a5a00; background: #fbf1dc; }
.kind-choice input:checked + .kind-transfer { border-color: #2b4a8b; background: #e3e9f7; }
.only-transfer, .only-draw { display: none; }
#new-entry[data-kind="transfer"] .only-transfer { display: block; }
#new-entry[data-kind="transfer"] small.only-transfer { display: inline; }
#new-entry[data-kind="draw"] .only-draw { display: block; }
#new-entry[data-kind="transfer"] .not-transfer, #new-entry[data-kind="transfer"] .only-money,
#new-entry[data-kind="draw"] .only-money { display: none; }
.ledger-list li.ledger-draw { border-inline-start-color: #8a5a00; }
.ledger-list li.ledger-transfer { border-inline-start-color: #2b4a8b; }
.pay-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: .6rem; margin: 1rem 0 .7rem; }
.pay-boxes div { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .7rem .5rem; border-radius: 14px; background: #faf6f4; text-align: center; }
.pay-boxes span { font-size: .85rem; color: var(--muted); }
.pay-boxes strong { font-size: 1.05rem; overflow-wrap: anywhere; }
.pay-list { list-style: none; margin: 0 0 .7rem; padding: 0; font-size: .92rem; }
.pay-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem .8rem; padding: .35rem 0; border-bottom: 1px dashed #eadfe2; }
.pay-list li span { flex: 1 1 10rem; min-width: 0; color: var(--muted); }
.pay-form { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .4rem; }
.pay-form input, .pay-form select { flex: 1 1 8rem; min-width: 0; padding: .6rem .8rem; border: 1.5px solid #d9c9cd; border-radius: 12px; background: #fff; color: var(--text); font: inherit; }
.pay-button { flex: 0 0 auto; padding: .6rem 1.2rem; border: 0; border-radius: 12px; background: var(--gold); color: var(--ink-dark); font: inherit; font-weight: 800; cursor: pointer; }
.pay-button:hover { filter: brightness(1.08); }
.paid-full { display: inline-block; margin: 0 0 .4rem; padding: .35rem .9rem; }
.share-label { display: flex; align-items: center; gap: .4rem; font-size: .9rem; color: var(--muted); }
.share-label input { width: 5rem; padding: .5rem .6rem; border: 1.5px solid #d9c9cd; border-radius: 12px; font: inherit; }
.partner { padding: 1rem 0; border-top: 1px solid #f1e6e8; }
.partner h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.partner h3 small { font-weight: 400; color: var(--muted); }
.partner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); gap: .5rem; margin: 0; }
.partner-grid div { padding: .5rem .6rem; border-radius: 12px; background: #faf6f4; }
.partner-grid dt { font-size: .8rem; color: var(--muted); }
.partner-grid dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.settle { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; margin: .6rem 0 0; padding: .6rem .8rem; border-radius: 12px; background: #f1ecea; }
.settle-owes { background: #fdecea; color: #8f1d17; }
.settle-owed { background: #e6f4ea; color: #1e6b3a; }
.dash-money strong { font-size: 1.4rem; overflow-wrap: anywhere; }

/* Bookings page: search box, and the card in the owner's layout (number – name, date, labelled facts). */
.booking-search { display: flex; gap: .5rem; margin-bottom: .9rem; }
.booking-search input { flex: 1 1 auto; min-width: 0; padding: .75rem 1rem; border: 1.5px solid #e4d6da; border-radius: 14px; background: #fff; color: var(--text); font: inherit; }
.booking-search input:focus { outline: 3px solid var(--gold-soft); border-color: var(--gold); }
.order-day { margin: .2rem 0 .6rem; color: var(--muted); }
.order-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .25rem 1.2rem; margin: 0 0 .9rem; }
.order-facts div { display: contents; }
.order-facts dt { color: var(--muted); }
.order-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.order-facts a { color: var(--ink); }
.order-item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; margin-bottom: .5rem; padding: .7rem .9rem; border: 1px solid #eadfe2; border-radius: 14px; }
.order-item .admin-amount { color: var(--muted); }
.admin-order-head h2 { overflow-wrap: anywhere; letter-spacing: 0; }
#new-entry[data-kind="income"] .not-income { display: none; }

/* Accounts in the usual accounting layout: statement table, bars, profit and loss. */
.statement-panel { padding: .4rem .6rem; overflow: hidden; }
.statement { width: 100%; border-collapse: collapse; font-size: .95rem; }
.statement th, .statement td { padding: .55rem .6rem; text-align: start; vertical-align: top; border-bottom: 1px solid #f1e6e8; }
.statement thead th { font-size: .82rem; color: var(--muted); font-weight: 700; border-bottom: 2px solid #e4d6da; white-space: nowrap; }
.statement .num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.statement .balance { font-weight: 700; }
.statement .details strong, .statement .details span, .statement .details small { display: block; }
.statement .details span { overflow-wrap: anywhere; }
.statement .details small { color: var(--muted); }
.statement tbody tr:hover { background: #fbf7f5; }
.statement-opening td, .statement tfoot td { background: #faf6f4; font-weight: 700; }
.statement tfoot td { border-top: 2px solid #e4d6da; border-bottom: 0; }
.statement-period { margin: 0 0 .6rem; }
.statement-period small { color: var(--muted); }
@media (max-width: 760px) {           /* on a phone each line becomes a small card */
  .statement thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .statement, .statement tbody, .statement tfoot, .statement tr, .statement td { display: block; }
  .statement tr { padding: .6rem .2rem; border-bottom: 1px solid #eadfe2; }
  .statement td { display: flex; justify-content: space-between; gap: 1rem; padding: .15rem .3rem; border: 0; text-align: start; }
  .statement td::before { content: attr(data-label); flex: none; color: var(--muted); font-size: .85rem; }
  .statement td:empty, .statement td.num:not(.balance):empty { display: none; }
  .statement td.details { display: block; }
  .statement td.details::before { content: none; }
  .statement .num { text-align: end; }
  .statement-opening td:first-child::before, .statement tfoot td:first-child::before { content: none; }
  .statement tfoot td, .statement-opening td { background: none; }
  .statement tfoot tr, .statement-opening { background: #faf6f4; border-radius: 10px; }
}
.bars { display: flex; align-items: flex-end; gap: .6rem; height: 170px; margin-top: 1rem; padding-bottom: 1.6rem; position: relative; }
.bar-month { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.bar-pair { display: flex; align-items: flex-end; justify-content: center; gap: 3px; width: 100%; height: 100%; border-bottom: 2px solid #e4d6da; }
.bar { width: min(38%, 26px); min-height: 2px; border-radius: 6px 6px 0 0; }
.bar-income { background: #1f9d55; }
.bar-expense { background: #c9453c; }
.bar-month small { position: absolute; bottom: -1.5rem; font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; max-width: 100%; text-overflow: ellipsis; }
.mark-expense { display: inline-block; min-width: 1.2rem; height: 1.2rem; border-radius: 999px; background: #c9453c; vertical-align: middle; margin-inline-start: .6rem; }
.share-bar { display: block; height: 6px; margin-top: .3rem; border-radius: 999px; background: #f1e6e8; overflow: hidden; }
.share-bar i { display: block; height: 100%; background: #c9453c; border-radius: 999px; }
.entry-income { border-top: 4px solid #1f9d55; }
.entry-expense { border-top: 4px solid #c9453c; }
.entry-draw { border-top: 4px solid #8a5a00; }
.period-tabs { align-items: center; }
.period-pick { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.period-pick input { padding: .4rem .6rem; border: 1.5px solid #d9c9cd; border-radius: 12px; font: inherit; background: #fff; max-width: 100%; }
.pl-title { margin: 0 0 1rem; padding-bottom: .7rem; border-bottom: 2px solid #e4d6da; text-align: center; }
.pl-report h2 { font-size: 1.05rem; margin: 1rem 0 .3rem; }
.pl-lines { list-style: none; margin: 0; padding: 0; }
.pl-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem .6rem; border-bottom: 1px dotted #e4d6da; }
.pl-lines li span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-lines .pl-none { color: var(--muted); }
.pl-lines .pl-sum { font-weight: 700; border-bottom: 0; border-top: 2px solid #e4d6da; background: #faf6f4; }
.pl-net { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; margin: 1.2rem 0 0; padding: .9rem 1rem; border-radius: 14px; background: #e6f4ea; color: #1e6b3a; font-size: 1.15rem; }
.pl-net.pl-loss { background: #fdecea; color: #8f1d17; }
.person-figures { flex: 1 1 100%; margin: 0; font-size: .92rem; color: var(--muted); }
.admin-cancel.admin-add { text-decoration: none; display: inline-flex; align-items: center; }

/* Accounts: one form for every kind of line; only the fields of the chosen kind are shown. */
.kind-fieldset { border: 0; margin: 0 0 .4rem; padding: 0; }
.kind-fieldset legend { font-weight: 700; margin-bottom: .4rem; }
.kind-choice input:checked + .kind-salary { border-color: #b3261e; background: #fdecea; }
.kind-choice input:checked + .kind-capital { border-color: #1f5f8b; background: #e3eef7; }
.kind-salary { color: #b3261e; }
#new-entry[data-kind] .for-income, #new-entry[data-kind] .for-expense, #new-entry[data-kind] .for-salary,
#new-entry[data-kind] .for-capital, #new-entry[data-kind] .for-draw, #new-entry[data-kind] .for-fee, #new-entry[data-kind] .for-named { display: none; }
#new-entry[data-kind="income"] .for-income, #new-entry[data-kind="expense"] .for-expense,
#new-entry[data-kind="salary"] .for-salary, #new-entry[data-kind="capital"] .for-capital,
#new-entry[data-kind="draw"] .for-draw, #new-entry[data-kind="fee"] .for-fee, #new-entry[data-kind="fee"] .for-named,
#new-entry[data-kind="capital"] .for-named, #new-entry[data-kind="draw"] .for-named { display: block; }
#new-entry[data-kind="salary"] .for-plain, #new-entry[data-kind="fee"] .for-plain, #new-entry[data-kind="capital"] .for-plain, #new-entry[data-kind="draw"] .for-plain { display: none; }
.entry-more { margin: .8rem 0 0; text-align: center; }
.pl-gross { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; margin: 1rem 0 .6rem; padding: .7rem 1rem; border-radius: 12px; background: #faf3e3; font-size: 1.05rem; }
.pl-gross small, .pl-net small { opacity: .7; font-weight: 400; }
.pl-lines .pl-note { color: var(--muted); }
.pl-lines .pl-note small { display: block; }
.kind-choice input:checked + .kind-fee { border-color: #7b2d3b; background: #f6e9ec; }
.kind-fee { color: #7b2d3b; }
.pl-lines li small { display: block; color: var(--muted); }

/* A policy page written by the owner: keep his line breaks. */
.page-text { white-space: pre-line; line-height: 1.9; }

/* Settings: the logo and welcome picture, and the accounts. */
.site-image { display: grid; place-items: center; min-height: 140px; margin: .6rem 0; border: 2px dashed #e4d6da; border-radius: 14px; background: #faf6f4; color: var(--muted); overflow: hidden; }
.site-image img { max-width: 100%; max-height: 220px; object-fit: contain; }
.site-image-welcome img { width: 100%; max-height: 240px; object-fit: cover; }
.site-image-panel input[type=file] { max-width: 100%; }
.user-row { flex-wrap: wrap; gap: .6rem; }
.user-row .dash-list-main { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: .5rem; }
.user-row .dash-list-main .status-badge { flex: 0 0 auto; }
.user-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .6rem; }
.user-password summary { cursor: pointer; font-weight: 700; padding: .35rem 0; }
.user-password form { margin-top: .5rem; min-width: min(260px, 100%); }
.inline-form { display: inline; }
/* A viewer account (a partner who may only look): every form that changes something is hidden. */
.viewer-note { margin: 0 0 1rem; padding: .7rem 1rem; border-radius: 12px; background: #fbf1dc; color: #6b4a00; font-weight: 700; }
.admin-viewer .admin-main form[method="post"], .admin-viewer .admin-main .admin-add,
.admin-viewer .admin-main .entry-more { display: none !important; }

/* Item form: extra categories and the discount. */
.extra-categories, .discount-box { border: 1px solid #eadfe2; border-radius: 14px; padding: .8rem 1rem; margin: .8rem 0; }
.extra-categories legend, .discount-box legend { font-weight: 700; padding: 0 .3rem; }
.check-list { display: flex; flex-wrap: wrap; gap: .5rem; margin: .3rem 0 .6rem; }
.check-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .8rem; border: 1px solid #e4d6da; border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; }
.check-pill input { accent-color: var(--ink); }

/* Categories: their place on the home page, changed with the arrows. */
.order-number { display: inline-grid; place-items: center; min-width: 1.8rem; height: 1.8rem; margin-inline-end: .3rem; border-radius: 999px; background: var(--gold-soft); color: var(--ink-dark); font-size: .9rem; }
.order-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }

/* Backup page and the reminder on the first page. */
.backup-list { margin: .4rem 0 .8rem; padding-inline-start: 1.2rem; line-height: 1.9; }
.backup-reminder a { margin-inline-start: .4rem; }
