:root {
  --marble: #fdfbf8;
  --cream: #fcf0f3;
  --beige: #f5e4e9;
  --border: #d8b3c0;
  --gold-light: #e8d5a8;
  --gold: #c9a96e;
  --gold-dark: #79572e;
  --text-dark: #2c1f0e;
  --text-mid: #5a4535;
  --brown-soft: #745763;
  --pink-pastel: #f9d5e5;
  --pink-deep: #873c5a;
  --font-ar-display: "El Messiri", sans-serif;
  --font-ar-body: "Cairo", sans-serif;
  --font-en-display: "Playfair Display", serif;
  --font-en-body: "Raleway", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--text-dark);
  font-family: var(--font-ar-body);
  -webkit-font-smoothing: antialiased;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button {
  border: 0;
  background: none;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
a {
  color: inherit;
}
img {
  display: block;
  max-width: 100%;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid var(--pink-deep);
  outline-offset: 3px;
}
button:focus-visible,
a:focus-visible {
  border-radius: 8px;
}
p {
  line-height: 1.7;
}
h2,
h3,
p {
  margin-top: 0;
}
svg {
  flex-shrink: 0;
}
.app {
  max-width: 1240px;
  margin: auto;
  background: var(--marble);
  min-height: 100vh;
}
header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 16px 18px 0;
  background: linear-gradient(120deg, #fdfbf8, #fbeaf0);
  color: var(--text-dark);
  border-bottom: 1px solid var(--border);
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.brand-logo {
  width: 49px;
  height: 56px;
  flex-shrink: 0;
}
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-name-ar {
  font-family: var(--font-ar-display);
  font-size: 1.1rem;
  color: var(--pink-deep);
  font-weight: 700;
}
.brand-name-en {
  font-family: var(--font-en-display);
  font-size: 0.62rem;
  letter-spacing: 1px;
}
#language {
  margin-inline-start: auto;
  min-width: 44px;
  min-height: 44px;
  font-size: 0.8rem;
  color: var(--pink-deep);
}
.search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding-inline: 10px;
  background: #fff;
  gap: 8px;
}
.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: none;
  color: var(--text-dark);
  height: 42px;
  font-size: 0.8rem;
}
.search-box input::placeholder {
  color: var(--text-mid);
}
.search-box button {
  color: var(--pink-deep);
  min-width: 40px;
  min-height: 40px;
}
.chips-wrap {
  padding: 10px 0 12px;
}
.chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chip {
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 9px 15px;
  min-height: 44px;
  font-size: 0.75rem;
  color: var(--pink-deep);
}
.chip.active {
  background: var(--pink-deep);
  color: white;
  border-color: var(--pink-deep);
}
main {
  padding-top: 16px;
}
#status {
  text-align: center;
  font-size: 0.85rem;
  padding: 0 16px;
}
#status:not(:empty) {
  padding: 24px 16px;
}
#spotlight {
  margin: 0 18px 16px;
  border-inline-start: 3px solid var(--gold);
  background: var(--cream);
  padding: 12px;
  font-size: 0.8rem;
}
#spotlight a {
  text-decoration: none;
}
#spotlight span {
  display: block;
  color: var(--text-mid);
}
.grid {
  padding: 0 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.card {
  background: white;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 3px 12px #873c5a09;
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-link {
  text-decoration: none;
  display: block;
  height: 100%;
}
.card-media {
  aspect-ratio: 1;
  position: relative;
  background: var(--beige);
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.badge {
  position: absolute;
  top: 7px;
  inset-inline-start: 7px;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--pink-deep);
  color: white;
}
.card-body {
  padding: 10px 10px 44px;
  text-align: start;
}
.card-name-ar {
  font-family: var(--font-ar-display);
  font-size: 0.98rem;
  margin: 0 0 3px;
}
.card-name-en {
  font-family: var(--font-en-display);
  font-size: 0.65rem;
  color: var(--text-mid);
  margin-bottom: 8px;
}
.price-ar {
  font-size: 0.82rem;
  font-weight: 700;
}
.price-ar del {
  font-size: 0.65rem;
  color: var(--brown-soft);
}
.fav-btn {
  position: absolute;
  bottom: 0;
  inset-inline-end: 3px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brown-soft);
}
.fav-btn svg {
  width: 17px;
}
.active > svg {
  fill: var(--pink-pastel);
  stroke: var(--pink-deep);
}
.unavailable .card-media img {
  filter: grayscale(0.6);
  opacity: 0.6;
}
.availability-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2c1f0e75;
  color: white;
  font-size: 0.75rem;
  padding: 10px;
  text-align: center;
}
.sheet {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  border: 0;
  padding: 0;
  background: white;
  border-radius: 24px 24px 0 0;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--text-dark);
}
.sheet::backdrop {
  background: #2c1f0e80;
}
.sheet[open] {
  animation: enter 0.18s ease-out;
}
@keyframes enter {
  from {
    transform: translateY(30px);
    opacity: 0.5;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.sheet-media {
  height: 250px;
  position: relative;
  background: var(--beige);
  overflow: hidden;
}
.sheet-media img,
.sheet-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.sheet-close {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2c1f0ebf;
  color: white;
  display: grid;
  place-items: center;
  z-index: 3;
}
.play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 50px;
  height: 50px;
  background: #2c1f0ebf;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  z-index: 2;
}
.sheet-body {
  padding: 20px 20px max(24px, env(safe-area-inset-bottom));
}
.sheet-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sheet-name-ar {
  font-family: var(--font-ar-display);
  font-size: 1.4rem;
  margin: 0;
}
.sheet-heart {
  color: var(--brown-soft);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}
.sheet-name-en {
  font-family: var(--font-en-display);
  font-size: 0.85rem;
  color: var(--brown-soft);
  margin-bottom: 10px;
}
.sheet-desc {
  font-size: 0.85rem;
  color: var(--text-mid);
}
fieldset {
  border: 0;
  border-top: 1px solid var(--beige);
  padding: 12px 0;
  margin: 12px 0;
}
legend,
.block-label {
  font-size: 0.86rem;
  font-weight: 700;
}
.block-label {
  margin: 18px 0 8px;
}
fieldset > p {
  font-size: 0.8rem;
}
.variant-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.variant-chip {
  min-height: 44px;
  border: 1px solid var(--border);
  background: var(--cream);
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 0.8rem;
}
.variant-chip.active {
  background: var(--gold-light);
  border-color: var(--gold-dark);
}
.addon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--cream);
  border: 1px solid var(--beige);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  min-height: 48px;
  cursor: pointer;
}
.addon-row input {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  accent-color: var(--gold-dark);
}
.addon-price {
  font-size: 0.78rem;
}
.quantity-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0;
  font-size: 0.85rem;
}
.quantity-row > div {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  direction: ltr;
}
.quantity-row button {
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
}
.quantity-row output {
  min-width: 38px;
  text-align: center;
}
.price-summary {
  padding: 16px;
  background: var(--cream);
  border-radius: 14px;
  margin-bottom: 20px;
}
#unitPrice {
  font-size: 0.8rem;
  margin-bottom: 4px;
}
.total-price {
  font-family: var(--font-ar-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}
.ingredients-text,
.allergen-note {
  font-size: 0.8rem;
  color: var(--text-mid);
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.meta-chip {
  font-size: 0.72rem;
  background: var(--cream);
  border: 1px solid var(--beige);
  border-radius: 10px;
  padding: 5px 10px;
}
.allergen-note {
  margin: 12px 0;
}
.unavailable-note {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-weight: 700;
}
.share-btn {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--pink-deep);
  color: white;
  border-radius: 12px;
  padding: 12px 20px;
  min-height: 44px;
}
#shareStatus {
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}
footer {
  text-align: center;
  padding: 30px 18px 100px;
  color: var(--text-mid);
}
footer .fa {
  font-family: var(--font-ar-display);
  color: var(--gold-dark);
}
footer .fe {
  font-family: var(--font-en-display);
  font-size: 0.7rem;
  margin: 6px 0 24px;
}
#ratingQuestion {
  font-size: 0.9rem;
}
.rating-row {
  display: flex;
  justify-content: center;
  gap: 4px;
}
.rating-row button {
  flex: 1;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 3px;
  font-size: 0.65rem;
  min-height: 64px;
}
.rating-row button span {
  display: block;
}
.rating-row button span:first-child {
  font-size: 1.4rem;
}
.rating-row button[aria-pressed="true"] {
  background: var(--cream);
  border-color: var(--gold-dark);
}
#ratingStatus,
#privacy {
  font-size: 0.72rem;
  margin-top: 16px;
}
#privacy {
  color: var(--text-mid);
}
.empty-state {
  text-align: center;
  padding: 30px;
}
html[lang="en"] body {
  font-family: var(--font-en-body);
}
html[lang="en"] .card-name-ar,
html[lang="en"] .sheet-name-ar {
  font-family: var(--font-en-display);
}
@media (min-width: 600px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* V1.5.2: restrained rose surfaces, responsive grids and branch contact sheet. */
.search-box:focus-within {
  border-color: var(--pink-deep);
  box-shadow: 0 0 0 2px #873c5a25;
}
.search-box input::-webkit-search-cancel-button {
  display: none;
}
#language {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff9;
}
.chip {
  background: #fff9;
}
.chip:hover:not(.active),
.variant-chip:hover {
  background: var(--beige);
}
.card-body {
  border-top: 1px solid var(--beige);
}
.card:focus-within {
  border-color: var(--pink-deep);
}
.price-ar,
.total-price {
  color: var(--pink-deep);
}
.badge-new {
  background: #fce4ed;
  color: #742f4a;
  border: 1px solid #d8b3c0;
}
.badge-featured {
  background: #f4e6cc;
  color: #654722;
  border: 1px solid var(--gold);
}
.variant-chip.active {
  background: var(--pink-deep);
  border-color: var(--pink-deep);
  color: #fff;
}
.addon-row input {
  accent-color: var(--pink-deep);
}
.addon-row:has(input:checked) {
  border-color: var(--pink-deep);
}
.rating-row {
  max-width: 460px;
  margin-inline: auto;
}
.rating-row button {
  background: #fff;
  border-color: var(--border);
}
.rating-row button[aria-pressed="true"] {
  border-color: var(--pink-deep);
  background: var(--cream);
}
.whatsapp-fab {
  position: fixed;
  z-index: 11;
  bottom: max(16px, env(safe-area-inset-bottom));
  inset-inline-end: max(16px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 28px;
  background: var(--pink-deep);
  color: #fff;
  box-shadow: 0 4px 18px #873c5a30;
  border: 1px solid #fff;
  font-size: 0.8rem;
}
.whatsapp-fab svg {
  width: 24px;
  height: 24px;
}
.branch-dialog {
  position: fixed;
  inset: auto 0 0;
  margin: 0 auto;
  width: 100%;
  max-width: 510px;
  max-height: 90dvh;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  padding: 24px 20px max(20px, env(safe-area-inset-bottom));
  background: var(--marble);
  color: var(--text-dark);
}
.branch-dialog::backdrop {
  background: #37232c80;
}
.branch-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.branch-heading h2 {
  font-family: var(--font-ar-display);
  font-size: 1.4rem;
  margin-bottom: 4px;
  color: var(--pink-deep);
}
.branch-heading p {
  font-size: 0.8rem;
  color: var(--text-mid);
}
#branchClose {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--cream);
  color: var(--pink-deep);
  display: grid;
  place-items: center;
}
.branch-list {
  display: grid;
  gap: 10px;
}
.branch-row {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: white;
  text-decoration: none;
  min-height: 76px;
}
.branch-row > svg {
  color: var(--pink-deep);
}
.branch-row strong {
  display: block;
  font-size: 0.85rem;
}
.branch-row small {
  display: block;
  margin-top: 4px;
  color: var(--text-mid);
  font-size: 0.72rem;
}
.branch-row:hover {
  background: var(--cream);
  border-color: var(--pink-deep);
}
#branchFeedback {
  margin: 14px 0 0;
  min-height: 1.7em;
  font-size: 0.8rem;
  color: var(--pink-deep);
}
@media (max-width: 1359px) {
  /* Reserve a contact rail below the viewport so the FAB cannot cover product controls. */
  body {
    height: 100dvh;
    overflow: hidden;
  }
  .whatsapp-fab {
    inset-inline-end: 16px;
    bottom: max(10px, env(safe-area-inset-bottom));
  }
  body::after {
    content: "";
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    height: calc(74px + env(safe-area-inset-bottom));
    background: #fdfbf8f5;
    border-top: 1px solid var(--beige);
    z-index: 10;
    pointer-events: none;
  }
  .app {
    height: calc(100dvh - 74px - env(safe-area-inset-bottom));
    min-height: 0;
    overflow-y: auto;
    scroll-padding-block: 12px;
  }
}
@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding-inline: 24px;
  }
  header {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 42%);
    gap: 0 30px;
    padding-inline: 24px;
  }
  .brand-row {
    margin-bottom: 0;
  }
  .search-box {
    align-self: center;
  }
  .chips-wrap {
    grid-column: 1 / -1;
    padding-top: 14px;
  }
  .chips {
    flex-wrap: wrap;
    overflow: visible;
  }
  .brand-name-ar {
    font-size: 1.25rem;
  }
  .card-body {
    padding: 14px 14px 44px;
  }
  .card-name-en {
    font-size: 0.75rem;
  }
  .badge {
    font-size: 0.68rem;
  }
  .branch-dialog {
    inset: 0;
    margin: auto;
    height: fit-content;
    border-radius: 24px;
  }
}
@media (min-width: 1000px) {
  .sheet {
    inset: 0;
    margin: auto;
    width: calc(100% - 64px);
    max-width: 900px;
    height: fit-content;
    border-radius: 24px;
  }
  .sheet[open] {
    display: grid;
    grid-template-columns: 44% 56%;
  }
  .sheet-media {
    height: min(560px, 85dvh);
    position: sticky;
    top: 0;
  }
  .sheet-media img,
  .sheet-media video {
    object-fit: contain;
  }
  .sheet-body {
    padding: 26px;
  }
}
@media (min-width: 1600px) {
  .grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1360px) {
  .whatsapp-fab {
    width: 52px;
    padding: 12px;
    inset-inline-end: 8px;
  }
  .whatsapp-fab span {
    display: none;
  }
}

.website-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 14px;
  margin-top: 12px;
  color: var(--pink-deep);
  font-size: 0.82rem;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  border-radius: 12px;
}
.website-link span {
  direction: ltr;
  font-size: 0.75rem;
}
.branch-dialog > .website-link {
  display: flex;
  border-top: 1px solid var(--border);
  border-radius: 0;
}
