/* ==========================================================================
   Public site styles - extracted/adapted from the approved client template.
   Built on variables.css + base.css. Local fonts + local icons only.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Normalize override
   vendors/feather-icon.css is Normalize.css, which sets
   `font-family: sans-serif` on form controls so native widgets do not inherit
   the page font. Every button/input/select/textarea therefore rendered in a
   generic sans-serif while the rest of the page used Cairo. Put them back on
   the shared token. Sized by the control rules further down this file.
   -------------------------------------------------------------------------- */
button,
input,
select,
textarea,
optgroup {
  font-family: var(--font-family-base);
}

/* ------------------------------------------------------------------ buttons */
.btn,
.pill {
  font-family: var(--font-family-heading);
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: transform .25s var(--ease), background-color .25s ease, color .25s ease, border-color .25s ease;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}

.btn {
  border: 0;
  padding: .7rem 1.875rem;
  font-size: 1.05rem;
  line-height: 1.6;
}

.btn:hover { transform: translateY(-3px); }

.btn.gold,
.btn-gold {
  background-color: var(--color-accent);
  color: var(--color-primary-dark);
}

.btn.gold:hover,
.btn-gold:hover { background-color: #e6bb5c; }

/* Outlined button. The default is the light-surface variant: white text with a
   translucent white border only reads on the dark hero, and on the cream body
   colour it measured a 1.00 contrast ratio, i.e. invisible. Dark surfaces opt
   back in with .btn.line.on-dark. */
.btn.line,
.btn-line {
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  background-color: transparent;
  padding: .65rem 1.75rem;
}

.btn.line:hover,
.btn-line:hover {
  background-color: var(--color-primary);
  color: var(--text-on-primary);
}

.btn.line.on-dark,
.btn-line.on-dark {
  border-color: rgba(255, 255, 255, .6);
  color: #ffffff;
}

.btn.line.on-dark:hover,
.btn-line.on-dark:hover {
  background-color: #ffffff;
  color: var(--color-primary-dark);
  border-color: #ffffff;
}

.btn.dark,
.btn-dark {
  background-color: var(--color-primary);
  color: var(--text-on-primary);
}

.btn.dark:hover,
.btn-dark:hover { background-color: var(--color-primary-light); }

.btn.wide,
.btn-wide { width: 100%; }

.btn.sm { padding: .45rem 1.1rem; font-size: .95rem; }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.btn i,
.pill i { margin-inline-end: .1rem; }

.pill {
  border: 1.5px solid currentColor;
  padding: .35rem 1.125rem;
  font-size: .95rem;
  background: none;
  color: inherit;
}

.pill.solid {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-primary-dark);
}

.pill.solid b {
  background-color: var(--color-primary-dark);
  color: var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 0 .5rem;
  margin-inline-start: .25rem;
  font-size: .8rem;
}

.pill.solid.bump { animation: bump .5s ease; }

@keyframes bump { 40% { transform: scale(1.14); } }

/* ------------------------------------------------------------------- header */
.hdr {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  transition: background-color .3s ease, box-shadow .3s ease, transform .4s var(--ease);
  color: #ffffff;
}

.hdr-in {
  display: flex;
  align-items: center;
  gap: 1.125rem;
  height: var(--header-height);
}

.brand img { height: 56px; width: auto; }
.l-off { display: none; }

.hdr.solid {
  background-color: rgba(250, 245, 230, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--color-primary);
  box-shadow: 0 1px 0 var(--border-color);
}

.hdr.solid .l-on { display: none; }
.hdr.solid .l-off { display: block; }
.hdr.hide { transform: translateY(-100%); }

.hdr.menu { background-color: var(--bg-body); color: var(--color-primary); }
.hdr.menu .l-on { display: none; }
.hdr.menu .l-off { display: block; }

.nav {
  display: flex;
  gap: .125rem;
  margin-inline-start: auto;
  /* Must stay on one line. Wrapping pushed the conditional "الطلب الطبي" entry
     onto a second row underneath "تواصل معنا", which read as a broken layout.
     The row is guaranteed to fit because the burger breakpoint below is set
     from the measured worst case (a signed-in medical org, 8 items + 3 pills). */
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.nav a {
  padding: .375rem .4rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: .95rem;
  position: relative;
  white-space: nowrap;
}

.nav a::after {
  content: '';
  position: absolute;
  inset: auto 14px 2px 14px;
  height: 2px;
  background-color: var(--color-accent);
  transform: scaleX(0);
  transition: transform .3s var(--ease);
}

.nav a:hover::after,
.nav a.on::after { transform: scaleX(1); }

.act { display: flex; gap: .5rem; align-items: center; }

.burger {
  display: none;
  width: 42px;
  height: 42px;
  background: none;
  border: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: .625rem;
  color: inherit;
}

.burger span {
  height: 3px;
  background-color: currentColor;
  border-radius: 2px;
  transition: .3s ease;
}

.burger.x span:first-child { transform: translateY(5px) rotate(45deg); }
.burger.x span:last-child { transform: translateY(-5px) rotate(-45deg); }

.nav-toggle { color: inherit; }

/* Below this width the horizontal nav cannot hold 8 items plus the action
   pills inside the 1180px container, so it collapses into the burger panel.
   1080 was measured before the medical nav entry and the third pill existed. */
@media (max-width: 1200px) {
  .nav {
    position: fixed;
    top: var(--header-height);
    inset-inline: 0;
    background-color: var(--bg-body);
    color: var(--color-primary);
    flex-direction: column;
    align-items: flex-start;
    padding: .75rem clamp(16px, 2.2vw, 22px) 1.25rem;
    display: none;
    box-shadow: 0 20px 30px -20px rgba(0, 0, 0, .4);
    gap: .5rem;
    z-index: 39;
  }

  .nav.open { display: flex; }
  .burger { display: flex; }
  .act { margin-inline-start: auto; }
}

@media (max-width: 860px) {
  :root { --header-height: 68px; }
  .brand img { height: 46px; }
  .pill:not(.solid) { display: none; }
}

/* --------------------------------------------------------------------- hero */
.hero {
  position: relative;
  overflow: hidden;
  text-align: right;
  color: #ffffff;
  background-color: var(--color-primary-dark);
  background-image:
    radial-gradient(58% 68% at 78% 38%, rgba(217, 171, 71, .22), transparent 70%),
    linear-gradient(200deg, #0f4a2a 0%, #0a331f 55%, #072517 100%);
  min-height: min(100vh, 760px);
  display: grid;
  align-items: center;
  padding: calc(var(--header-height) + 3rem) 0 4rem;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 100%);
  pointer-events: none;
}

.hero-t {
  position: relative;
  z-index: 2;
  width: 100%;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

.hero-t > * { max-width: 620px; }

.kick {
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: .6rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.kick::before {
  content: '';
  width: 34px;
  height: 2px;
  background-color: var(--color-accent);
}

.hero h1 {
  font-size: clamp(2.2rem, 5.2vw, 4rem);
  line-height: 1.35;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.05rem;
  color: #dfeade;
  margin-bottom: 1.6rem;
}

.btns { display: flex; gap: .75rem; flex-wrap: wrap; }

.hero-badge {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2.2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.hero-badge div {
  display: flex;
  flex-direction: column;
  padding-inline-start: 1.25rem;
  border-inline-start: 1px solid rgba(255, 255, 255, .16);
}

.hero-badge b { font-size: 1.7rem; color: var(--color-accent); line-height: 1.2; }
.hero-badge span { font-size: .85rem; color: #c8d8c4; }

.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  inset-inline-start: 50%;
  transform: translateX(50%);
  z-index: 2;
  color: rgba(255, 255, 255, .65);
  font-size: 1.4rem;
  animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translate(50%, 0); }
  50% { transform: translate(50%, 8px); }
}

/* ------------------------------------------------------------------ marquee */
.marquee {
  background-color: var(--color-accent);
  color: var(--color-primary-dark);
  overflow: hidden;
  white-space: nowrap;
  padding: .75rem 0;
  font-weight: 600;
  font-size: 1.05rem;
}

.marquee-track {
  display: inline-block;
  animation: marquee-scroll 38s linear infinite;
}

.marquee-track span { margin-inline: 1.4rem; }
.marquee-track i {
  display: inline-block;
  width: 9px;
  height: 9px;
  background-color: var(--color-primary);
  transform: rotate(45deg);
  margin-inline-start: .8rem;
}

@keyframes marquee-scroll { to { transform: translateX(50%); } }

.marquee:hover .marquee-track { animation-play-state: paused; }

/* ----------------------------------------------------------------- sections */
.sec { padding: clamp(3rem, 7vw, 5rem) 0; }
.sec-alt { background-color: var(--bg-surface-alt); }

.h {
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 1.1rem;
}

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1.4rem;
}

.sec-head .h { margin: 0; }

.sec-more {
  color: var(--color-primary-light);
  font-weight: 600;
  border-bottom: 2px solid var(--color-accent);
  white-space: nowrap;
}

.sec-more i { font-size: .8em; margin-inline-end: .25rem; }

.page-head {
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 1rem;
}

/* Inner pages have a solid fixed header and no hero: reserve room so the first
   block is never hidden under the bar (matches the template's .page offset). */
main.main-page { padding-top: var(--header-height); }
main.main-page > .sec:first-of-type { padding-top: 2.5rem; }

/* -------------------------------------------------------------- about/bento */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.about-grid p { margin-bottom: .9rem; max-width: 58ch; }

.bento {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: .85rem;
  height: 420px;
}

.bento > * { border-radius: var(--radius-lg); overflow: hidden; }

.bento-img {
  grid-row: span 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: var(--bg-surface-alt);
}

.bento-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.1rem;
  background-color: var(--color-primary);
  color: #ffffff;
}

.bento-stat.alt { background-color: var(--color-accent); color: var(--color-primary-dark); }
.bento-stat b { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; font-weight: 800; }
.bento-stat span { font-size: .85rem; opacity: .85; }
.bento-stat i { font-size: 1.3rem; margin-bottom: .3rem; opacity: .9; }

.addr-box {
  background-color: var(--bg-surface-alt);
  border-inline-start: 4px solid var(--color-accent);
  padding: .8rem 1rem;
  border-radius: var(--radius-md);
  margin-top: 1.2rem;
}

.addr-box i { color: var(--color-accent-light); margin-inline-end: .6rem; }

/* -------------------------------------------------------------- grid + cards */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); }

.card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm), var(--shadow-md);
  transition: transform .35s var(--ease);
}

.card:hover { transform: translateY(-6px); }

.card-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--bg-surface-alt);
  display: grid;
  place-items: center;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}

.card:hover .card-thumb img { transform: scale(1.07); }

.card-thumb img.is-placeholder {
  width: 46%;
  height: auto;
  opacity: .8;
  object-fit: contain;
}

.badge-new {
  position: absolute;
  top: .75rem;
  inset-inline-start: .75rem;
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: .78rem;
  padding: .1rem .8rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

.badge-out {
  position: absolute;
  bottom: .75rem;
  inset-inline-start: .75rem;
  background-color: var(--color-danger);
  color: #ffffff;
  font-size: .78rem;
  padding: .1rem .8rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

.card-body {
  padding: .9rem 1rem 1.1rem;
  display: grid;
  gap: .5rem;
  flex: 1;
}

.card-body h3 { font-size: 1.1rem; color: var(--color-primary); }
.card-body .desc {
  color: var(--text-secondary);
  font-size: .9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-price {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-primary);
}

.card-price small { color: var(--text-secondary); font-weight: 400; font-size: .8rem; }
.card-meta { color: var(--text-secondary); font-size: .8rem; }

.card-actions {
  display: flex;
  gap: .5rem;
  align-items: center;
  margin-top: auto;
  padding-top: .5rem;
}

.chip-cat {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--color-primary-light);
  background-color: var(--bg-surface-alt);
  border-radius: var(--radius-pill);
  padding: .05rem .6rem;
}

.badge-inline {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: .05rem .6rem;
}

.badge-inline.ok { background-color: var(--color-primary); color: #ffffff; }
.badge-inline.off { background-color: var(--bg-surface-alt); color: var(--text-secondary); }

/* ------------------------------------------------------------- carousels */
.car {
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: .4rem max(16px, calc((100vw - var(--max-width)) / 2 + 16px)) 1.2rem;
  scrollbar-width: none;
}

.car::-webkit-scrollbar { display: none; }
.car > * { flex: 0 0 min(290px, 76vw); scroll-snap-align: start; }

.arrows { display: flex; gap: .5rem; }

.arrows button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  background: none;
  color: var(--color-primary);
  font-size: 1rem;
  cursor: pointer;
  transition: .25s ease;
  display: grid;
  place-items: center;
}

.arrows button:hover { background-color: var(--color-primary); color: #ffffff; }

/* ------------------------------------------------------------------ steps */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  counter-reset: step;
  margin-top: 1.8rem;
  position: relative;
}

.steps li { counter-increment: step; padding: 0 1rem 0 0; position: relative; }

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: .75rem;
  position: relative;
  z-index: 1;
}

.steps li::after {
  content: '';
  position: absolute;
  top: 22px;
  inset-inline-start: 44px;
  inset-inline-end: -1rem;
  height: 2px;
  background-color: var(--color-accent);
}

.steps li:last-child::after { display: none; }
.steps b { display: block; color: var(--color-primary); font-size: 1.1rem; }
.steps span { color: var(--text-secondary); font-size: .9rem; }
.steps i { position: absolute; top: .6rem; inset-inline-end: auto; inset-inline-start: .9rem; color: var(--color-accent-light); font-size: 1.2rem; opacity: .45; }

/* --------------------------------------------------------------- services */
.svc-item {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  border-inline-start: 5px solid var(--color-accent);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease);
}

.svc-item:hover { transform: translateY(-4px); }
.svc-item h3 { color: var(--color-primary); margin-bottom: .35rem; font-size: 1.15rem; }
.svc-item p { color: var(--text-secondary); font-size: .93rem; }

.svc-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--color-primary);
  color: var(--color-accent);
  font-size: 1.25rem;
  margin-bottom: .7rem;
}

/* ------------------------------------------------------------------ boxes */
.box {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-md);
}

.box h3 { color: var(--color-primary); margin-bottom: .6rem; }

.box ul.contact-list { list-style: none; }
.box ul.contact-list li { margin-bottom: .7rem; color: var(--text-secondary); }
.box ul.contact-list i { color: var(--color-accent-light); margin-inline-end: .6rem; width: 1.2em; text-align: center; }
.box ul.contact-list b { color: var(--color-primary); }

/* ------------------------------------------------------------------- forms */
.form-grid { display: grid; gap: .8rem; }

.field { display: block; }
.field > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .2rem; }

.field input,
.field textarea,
.field select,
.input {
  width: 100%;
  padding: .6rem .9rem;
  margin-top: .2rem;
  border: 1.5px solid var(--border-color-alt);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(217, 171, 71, .22);
}

.field textarea { resize: vertical; min-height: 96px; }
.field .req { color: var(--color-danger); }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.form-errors { margin: 0; padding: .7rem 1rem .7rem 2rem; border-radius: var(--radius-md); background-color: var(--color-danger-bg); color: var(--color-danger); font-size: .9rem; }
.form-note { color: var(--text-secondary); text-align: center; font-size: .85rem; }

/* ------------------------------------------------------------------ footer */
.ftr {
  background-color: var(--color-primary-dark);
  color: #d3e1cf;
  padding: 3rem 0 0;
}

.ftr-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.3fr;
  gap: 1.8rem;
}

.ftr img { height: 80px; width: auto; margin-bottom: .5rem; }
.ftr h4 { color: var(--color-accent); margin-bottom: .6rem; font-size: 1.05rem; }
.ftr a { display: block; color: #d3e1cf; font-size: .95rem; }
.ftr a:hover { color: var(--color-accent); }
.ftr a i { color: var(--color-accent); margin-inline-end: .4rem; font-size: .8em; }
.ftr p { font-size: .93rem; margin-bottom: .5rem; }
.ftr p i { color: var(--color-accent); margin-inline-end: .5rem; }
.ftr .tagline { color: #b9cdb4; font-size: .92rem; }

.ftr-copy {
  margin-top: 2rem;
  padding: 1rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .85rem;
  color: #a8bfa4;
}

/* --------------------------------------------------------------- utilities */
.empty-state {
  text-align: center;
  color: var(--text-secondary);
  padding: 2.5rem 1rem;
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-color-alt);
}

.empty-state i { font-size: 2.5rem; color: var(--color-accent-light); margin-bottom: .6rem; }

.working-hours {
  margin-top: .8rem;
  padding: .7rem .9rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface-alt);
  color: var(--text-secondary);
  font-size: .9rem;
}

.working-hours i { color: var(--color-accent-light); margin-inline-end: .4rem; }
.working-hours div + div { margin-top: .2rem; }

/* -------------------------------------------------------------------- flash */
.flash {
  margin: 0 0 .8rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1rem;
  font-size: .95rem;
}

.flash i { font-size: 1.2rem; }
.flash-success { border-inline-start: 4px solid var(--color-success); color: var(--color-success); }
.flash-error   { border-inline-start: 4px solid var(--color-danger); color: var(--color-danger); }
.flash-warning { border-inline-start: 4px solid var(--color-warning); color: var(--color-warning); }
.flash-info    { border-inline-start: 4px solid var(--color-accent-light); color: var(--text-secondary); }

.inline-form { display: inline; margin: 0; }

/* --------------------------------------------------------------------- cart */
.cart-list { display: grid; gap: .7rem; }

.cart-row {
  display: grid;
  grid-template-columns: 90px 1fr 90px 110px auto;
  align-items: center;
  gap: .9rem;
  padding: .7rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.cart-thumb {
  width: 90px;
  height: 68px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-alt);
}

.cart-info { display: grid; gap: .25rem; min-width: 0; }
.cart-info strong { font-size: 1rem; }
.cart-info .card-meta { font-size: .85rem; }

.cart-note,
.cart-qty {
  font: inherit;
  font-size: .88rem;
  padding: .35rem .5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-body);
  color: var(--text-primary);
  max-width: 100%;
}

.cart-qty { text-align: center; }
.cart-sum { font-weight: 700; color: var(--color-accent-dark); white-space: nowrap; }

.cart-row-simple {
  grid-template-columns: 1fr auto;
}

.totals {
  margin: 1.2rem 0;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface-alt);
  display: grid;
  gap: .45rem;
}

.totals > div { display: flex; justify-content: space-between; gap: 1rem; font-size: .95rem; }
.totals .grand {
  margin-top: .35rem;
  padding-top: .6rem;
  border-top: 1px solid var(--border-color-alt);
  font-size: 1.1rem;
  color: var(--color-accent-dark);
}

/* -------------------------------------------------------------------- table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  white-space: nowrap;
}

.table th,
.table td {
  padding: .6rem .8rem;
  text-align: right;
  border-bottom: 1px solid var(--border-color);
}

.table thead th {
  background-color: var(--bg-surface-alt);
  color: var(--text-secondary);
  font-size: .85rem;
  font-weight: 600;
}

.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background-color: var(--bg-surface-alt); }

/* Status / account badges (order_status_badge(), account_status_badge()) */
.badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.7;
}

.text-bg-primary   { background-color: var(--color-primary); color: #fff; }
.text-bg-success   { background-color: var(--color-success); color: #fff; }
.text-bg-warning   { background-color: var(--color-warning); color: #3a2a00; }
.text-bg-danger    { background-color: var(--color-danger); color: #fff; }
.text-bg-info      { background-color: var(--color-accent-light); color: var(--color-primary-dark); }
.text-bg-secondary { background-color: var(--text-secondary); color: #fff; }

/* --------------------------------------------------------------------- form */
.radio {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .93rem;
  color: var(--text-primary);
  cursor: pointer;
}

.radio input { width: auto; margin: 0; accent-color: var(--color-primary); }
fieldset.field { border: 0; padding: 0; margin: 0; display: grid; gap: .45rem; }

/* Honeypot: hidden from people, reachable by bots. */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

/* ============================================================ hero slideshow */
.hero {
  background-color: var(--color-primary-dark);
  background-image: none;
  position: relative;
  overflow: hidden;
  text-align: right;
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 130px 0 70px;
}

.slides,
.veil { position: absolute; inset: 0; }

.sl {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.sl.on { opacity: 1; animation: kb 9s ease-out forwards; }

.sl-caption {
  position: absolute;
  inset-inline-start: 5%;
  bottom: 10%;
  max-width: 560px;
  z-index: 2;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .55);
}
.sl-caption h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); margin-bottom: .35rem; }
.sl-caption p { margin-bottom: .9rem; opacity: .95; }
.sl-caption .btn { text-shadow: none; }

@keyframes kb { from { transform: scale(1); } to { transform: scale(1.08); } }

.veil {
  background: linear-gradient(270deg, rgba(10, 51, 31, .78) 0%, rgba(10, 51, 31, .5) 55%, rgba(10, 51, 31, .25) 100%);
}

.hero-t { position: relative; z-index: 2; text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }

.sl-a {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .7);
  background: rgba(10, 51, 31, .3);
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
  transition: .25s;
}

.sl-a:hover { background: var(--color-accent); color: var(--color-primary-dark); border-color: var(--color-accent); }
.sl-a.prev { right: 16px; }
.sl-a.next { left: 16px; }

.dots {
  position: absolute;
  bottom: 26px;
  inset-inline: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.dots button {
  width: 12px;
  height: 12px;
  border-radius: 8px;
  border: 0;
  background: rgba(255, 255, 255, .55);
  cursor: pointer;
  transition: .3s;
  padding: 0;
}

.dots button.on { width: 34px; background: var(--color-accent); }

/* =============================================================== dish cards */
.dish {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  transition: transform .35s var(--ease);
}

.dish:hover { transform: translateY(-6px); }

.ph {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: repeating-linear-gradient(45deg, var(--color-ivory-alt), var(--color-ivory-alt) 12px, #ece2c2 12px, #ece2c2 24px);
  display: grid;
  place-items: center;
}

.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.dish:hover .ph img { transform: scale(1.08); }
.ph img.ic { width: 84px; height: auto; opacity: .75; object-fit: contain; }

.nb {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--color-primary);
  color: #ffffff;
  font-size: .78rem;
  padding: 0 13px;
  border-radius: 14px;
  font-weight: 600;
}

.dish .bd { padding: 14px 16px 16px; display: grid; gap: 8px; }
.dish h3 { font-size: 1.15rem; color: var(--color-primary); }
.pr { color: var(--text-secondary); font-size: .85rem; }
.qty { display: flex; align-items: center; gap: 10px; }
.st { display: flex; align-items: center; border: 1.5px solid var(--color-ivory-alt); border-radius: 24px; }

.st button {
  width: 34px;
  height: 34px;
  border: 0;
  background: none;
  font-size: .72rem;
  cursor: pointer;
  color: var(--color-primary);
  display: grid;
  place-items: center;
}

.st b { min-width: 24px; text-align: center; }

.add {
  flex: 1;
  background: var(--color-primary);
  color: #ffffff;
  border: 0;
  border-radius: 24px;
  padding: 6px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: .25s;
}

.add:hover { background: var(--color-accent); color: var(--color-primary-dark); }
.add i { margin-inline-end: 6px; }

/* =================================================================== news */
.news {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: grid;
  gap: 6px;
  transition: transform .3s var(--ease);
}

.news:hover { transform: translateY(-4px); }
.news time { color: var(--color-accent-light); font-weight: 600; font-size: .85rem; }
.news time i { margin-inline-end: 6px; }
.news h3 { color: var(--color-primary); }
.news p { color: var(--text-secondary); font-size: .94rem; }

.prose { color: var(--text-primary); line-height: 1.95; }
.prose p { margin: 0 0 1rem; }

/* =============================================================== customers */
.cust { background: var(--bg-surface); border-radius: var(--radius-lg); padding: 22px 12px; text-align: center; }
.cust img { display: block; height: 58px; margin: 0 auto 8px; opacity: .8; object-fit: contain; }
.cust b { color: var(--color-primary); }
.cust small { color: var(--text-secondary); }

/* ========================================================= success partners */
/* Cards keep a fixed min width so logos never crush below a readable size,
   and stretch evenly otherwise. Logos sit on the surface colour, not white,
   because transparent PNGs must stay legible in dark mode too. */
.partners-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.partner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 14px;
  text-align: center;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.partner:hover,
.partner:focus-visible {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}
.partner:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.partner img { width: 160px; height: 96px; object-fit: contain; }
.partner b { color: var(--color-primary); }
.partner p { color: var(--text-secondary); font-size: .88rem; line-height: 1.6; margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .partner { transition: none; }
  .partner:hover,
  .partner:focus-visible { transform: none; }
}

/* ========================================================= menu tools/chips */
/* The bar that holds the dish search and the category chips.
   It must be ONE sticky element: menu.php used to emit two sibling .tools
   divs, both pinned to top:var(--header-height) at the same z-index, so once
   the page scrolled they landed on exactly the same pixels and the chips
   covered the search field. The modifier carries the sticky behaviour and the
   plain .tools stays a plain flow container, so a second .tools can never
   collide with the first. */
.tools { display: grid; gap: 10px; }

.tools.sticky-bar {
  position: sticky;
  top: var(--header-height);
  z-index: 5;
  background: var(--bg-body);
  padding: 10px 0 14px;
}

.chips { display: flex; gap: 8px; flex-wrap: wrap; }

/* Dish search. There was no rule for .menu-search at all, so the field was
   painted with the user-agent default: a 2px inset border, no padding and a
   163px intrinsic width. Sized and coloured from the same tokens as .chips. */
.menu-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 0 .95rem;
  background-color: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-pill);
  transition: border-color .25s ease, box-shadow .25s ease;
}

.menu-search:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 14%, transparent);
}

.menu-search > i {
  color: var(--text-secondary);
  flex: none;
  font-size: .95rem;
}

.menu-search input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: .7rem 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  outline: none;
  appearance: none;
}

.menu-search input[type="search"]::-webkit-search-cancel-button { display: none; }

.menu-search input[type="search"]::placeholder { color: var(--text-secondary); }

.menu-search-clear {
  flex: none;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background-color: var(--bg-surface-alt);
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.menu-search-clear:hover {
  background-color: var(--color-primary);
  color: var(--text-on-primary);
}

.chips a,
.chips button {
  border: 1.5px solid var(--color-primary);
  background: none;
  color: var(--color-primary);
  border-radius: 24px;
  padding: 3px 20px;
  cursor: pointer;
  font-weight: 600;
  transition: .25s;
}

.chips a.on,
.chips a[aria-current="page"],
.chips span.on,
.chips button.on { background: var(--color-primary); color: #ffffff; }

.chips span.on { border-color: var(--color-primary); padding: 3px 20px; border-radius: 24px; font-weight: 600; }

/* ================================================================ checkout */
.seg { display: flex; gap: 10px; flex-wrap: wrap; }
.seg label { display: flex; gap: 6px; align-items: center; border: 1.5px solid var(--color-accent); border-radius: 24px; padding: 3px 18px; }
.seg input { width: auto; margin: 0; }

/* ============================================================ about image */
.ab-img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }

/* ------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .about-grid,
  .grid-2,
  .grid-3,
  .row-2,
  .ftr-grid { grid-template-columns: 1fr; }

  .steps { grid-template-columns: 1fr 1fr; gap: 1.6rem 0; }
  .steps li::after { display: none; }
  .bento { height: 300px; }
  .scroll-hint { display: none; }
}

@media (max-width: 620px) {
  .steps { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; grid-template-rows: 200px auto auto; height: auto; }
  .bento-img { grid-row: auto; }
  .hero-badge div { padding-inline-start: .8rem; }
  .grid-4 { grid-template-columns: 1fr; }

  .cart-row {
    grid-template-columns: 70px 1fr;
    grid-template-areas: "thumb info" "qty qty" "sum sum";
    row-gap: .5rem;
  }

  .cart-thumb { grid-area: thumb; width: 70px; height: 54px; }
  .cart-info { grid-area: info; }
  .cart-qty { grid-area: qty; }
  .cart-sum { grid-area: sum; text-align: left; }
  .cart-row > .btn { grid-column: 1 / -1; justify-content: center; }
}

/* ---------------------------------------------------------------------
   Medical order sheet: collapsible meal sections.

   Native <details>/<summary>, so the fold works with no JavaScript. The
   marker is suppressed because the summary is laid out as a flex row with
   its own chevron on the left.
   --------------------------------------------------------------------- */
.meal-fold > summary {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: -.4rem -.6rem;
  padding: .7rem .6rem;
  border-radius: var(--radius-sm, 10px);
  cursor: pointer;
  list-style: none;
  transition: background-color .15s ease;
}
.meal-fold > summary::-webkit-details-marker { display: none; }
.meal-fold > summary:hover { background-color: var(--bg-surface-alt); }
.meal-fold > summary:focus-visible {
  outline: 2px solid var(--brand-gold, #d9ab47);
  outline-offset: 2px;
}

.meal-fold-title {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-green, #0f4a2a);
}

.meal-fold-badges {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-inline-start: auto;
  flex-wrap: wrap;
}

.meal-fold-chev {
  display: inline-flex;
  color: var(--text-muted, #6b7a6f);
  transition: transform .2s ease;
}
.meal-fold[open] > summary .meal-fold-chev { transform: rotate(180deg); }

@media (max-width: 620px) {
  .meal-fold > summary { flex-wrap: wrap; }
  .meal-fold-badges { margin-inline-start: 0; width: 100%; }
}

/* ---------------------------------------------------------------------
   Checkout: fields that only apply to a named organization order.
   An individual is his own recipient and pays cash, so the recipient name,
   the delivery time and the manual-transfer option stay hidden unless the
   form carries .is-org (the server adds it for a logged-in organization and
   site.js toggles it for a guest switching the order type).
   --------------------------------------------------------------------- */
.org-only { display: none; }
form.is-org .org-only { display: block; }

/* ==================================================================== */
/* ==================================================== customer reviews */
/* ==================================================================== */

.wrap-narrow { max-width: 760px; }

.reviews-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.review {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin: 0;                       /* a figure's default margins break grids */
}
.review blockquote {
  margin: 0;
  color: var(--text-primary);
  font-size: .95rem;
  line-height: 1.9;
}
.review-reply {
  background: var(--color-success-bg);
  border-inline-start: 3px solid var(--color-success);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: .9rem;
  line-height: 1.8;
}
.review-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;                /* pins the reviewer line to the card bottom */
  color: var(--text-secondary);
  font-size: .85rem;
}
.review-meta time { display: inline-flex; align-items: center; gap: 4px; }
.review-meta time i { color: var(--color-accent-light); }
.badge-type {
  background: var(--color-accent);
  color: #fff;
  border-radius: 999px;
  padding: 1px 10px;
  font-size: .78rem;
  line-height: 1.7;
}
.reviews-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-secondary);
  font-size: .9rem;
}
.review-done { display: flex; gap: 14px; align-items: flex-start; }
.review-done > i { color: var(--color-success); font-size: 1.4rem; margin-top: 3px; }
.review-done h3 { color: var(--color-primary); }

/* ---- read-only stars ---------------------------------------------- */
/* The row is emitted 1..5, and the page is RTL, so icon 1 lands on the
   right edge: a k rating paints the k RIGHTMOST stars, matching the way
   Arabic text runs. The .on class carries the gold; the rest stay dim. */
.stars-ro { display: inline-flex; gap: 3px; }
.stars-ro .fa-star { font-size: 1rem; color: rgba(217, 171, 71, .28); }
.stars-ro .fa-star.on { color: var(--color-accent); }

/* ---- interactive stars (review.php) ------------------------------- */
/* Pure CSS: no script is involved (the CSP forbids it and the form must
   work without one). The radios are written 5..1 and the container is
   row-reverse, so on this RTL page the 5-star radio lands on the far LEFT
   and the 1-star on the far RIGHT: the scale reads right-to-left like
   Arabic. Because the labels follow their inputs in the DOM, the checked
   radio plus every label after it are exactly the k stars the value k
   means, and hovering paints the same run - the rule below is the whole
   trick. The inputs are clipped out of sight but never display:none'd,
   so keyboard users can still arrow through them. */
.stars-input { display: inline-flex; flex-direction: row-reverse; gap: 6px; }
.stars-input input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.stars-input label {
  cursor: pointer;
  font-size: 1.7rem;
  line-height: 1;
  color: rgba(217, 171, 71, .28);
  transition: color .15s ease, transform .15s ease;
}
.stars-input label:hover,
.stars-input label:hover ~ label,
.stars-input input:checked ~ label { color: var(--color-accent); }
.stars-input label:hover { transform: scale(1.12); }
.stars-input input:focus-visible + label {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.stars-field {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .4rem;
}
.stars-field legend { padding: 0; }
.stars-field legend span {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .2rem;
}
.stars-field legend .req { color: var(--color-danger); }

@media (prefers-reduced-motion: reduce) {
  .stars-input label { transition: none; }
  .stars-input label:hover { transform: none; }
}
