/* =========================================================================
   مطعم أرزاق الندى — design tokens and custom styles.
   Bootstrap 5 RTL supplies the grid, table, form and button primitives;
   this file only adds brand look-and-feel on top of them.
   ========================================================================= */

:root {
  --color-deep-green: #12321E;
  --color-cream: #EFE6D3;
  --color-brass: #A9762C;
  --color-price: #8A5E1E;
  --color-ink: #1A1814;
  --color-muted: #6B6255;
  --color-logo-green: #62D62B;

  --font-display: 'Aref Ruqaa', 'Noto Sans Arabic', 'Segoe UI', Tahoma, serif;
  --font-body: 'IBM Plex Sans Arabic', 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;

  --header-height: 56px;
  --bottom-nav-height: 60px;
  --cart-bar-height: 60px;
}

@media (min-width: 768px) {
  :root {
    --header-height: 68px;
  }
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  font-family: var(--font-body);
  color: var(--color-ink);
  background-color: var(--color-cream);
}

@media (max-width: 767.98px) {
  body {
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  }

  body.has-cart-bar {
    padding-bottom: calc(var(--bottom-nav-height) + var(--cart-bar-height) + env(safe-area-inset-bottom, 0px));
  }
}

@media (min-width: 768px) {
  body.has-cart-bar {
    padding-bottom: var(--cart-bar-height);
  }
}

h1, h2, h3, .section-title {
  font-family: var(--font-display);
  color: var(--color-deep-green);
}

a {
  color: var(--color-deep-green);
}

/* Visible focus ring everywhere, including inside Bootstrap components. */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--color-brass);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1090;
  padding: 0.75rem 1.25rem;
  background: var(--color-deep-green);
  color: #fff;
}

/* ---- Buttons --------------------------------------------------------- */

.btn-brand {
  background-color: var(--color-deep-green);
  border-color: var(--color-deep-green);
  color: #fff;
}

.btn-brand:hover,
.btn-brand:focus {
  background-color: #0d2415;
  border-color: #0d2415;
  color: #fff;
}

.btn-outline-brand {
  background-color: transparent;
  border-color: var(--color-brass);
  color: var(--color-deep-green);
}

.btn-outline-brand:hover,
.btn-outline-brand:focus {
  background-color: var(--color-brass);
  border-color: var(--color-brass);
  color: #fff;
}

/* ---- Header / app bar ------------------------------------------------- */

.site-header {
  background-color: var(--color-cream);
  border-bottom: 2px solid var(--color-brass);
  height: var(--header-height);
  z-index: 1030;
}

.site-header .container {
  height: 100%;
}

.site-header__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-deep-green);
}

@media (min-width: 768px) {
  .site-header__name {
    font-size: 1.3rem;
  }
}

.site-header__logo {
  border-radius: 50%;
  vertical-align: middle;
  margin-left: 0.5rem;
  object-fit: cover;
}

.site-header__brand {
  display: flex;
  align-items: center;
}

.site-header__nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--color-ink);
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
}

.site-header__nav a.is-active {
  color: var(--color-deep-green);
  border-bottom-color: var(--color-brass);
}

/* ---- Hero ---------------------------------------------------------------- */

.hero {
  background: linear-gradient(180deg, var(--color-cream) 0%, #fff 100%);
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.25rem;
}

.hero__tagline {
  font-size: 1.25rem;
  color: var(--color-brass);
  font-weight: 600;
}

.hero__positioning {
  color: var(--color-muted);
  max-width: 40rem;
  margin-inline: auto;
}

.hero__hours {
  color: var(--color-ink);
  font-weight: 500;
}

.hero__delivery {
  color: var(--color-deep-green);
  font-weight: 600;
}

.hero__image {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  object-fit: cover;
  margin-bottom: 1.5rem;
}

/* ---- Signature dish ------------------------------------------------------ */

.signature__placeholder,
.signature__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0.75rem;
}

.signature__placeholder {
  background: linear-gradient(135deg, var(--color-deep-green), var(--color-brass));
  opacity: 0.15;
}

.signature__image {
  object-fit: cover;
  box-shadow: 0 6px 20px rgba(26, 24, 20, 0.15);
}

.signature__name {
  color: var(--color-brass);
}

/* ---- Section titles ------------------------------------------------------ */

.section-title {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

/* ---- Menu teaser (home page) ---------------------------------------------- */

.menu-teaser__hint {
  color: var(--color-muted);
  max-width: 40rem;
  margin-inline: auto;
}

.menu-teaser__chip {
  display: inline-block;
  background-color: rgba(18, 50, 30, 0.08);
  color: var(--color-deep-green);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---- Menu page: sticky category chip nav ----------------------------------- */

.category-nav-wrapper {
  top: var(--header-height);
  background-color: var(--color-cream);
  border-bottom: 1px solid rgba(169, 118, 44, 0.35);
  z-index: 1020;
}

.category-nav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.6rem 1rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.category-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--color-brass);
  color: var(--color-deep-green);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  min-height: 44px;
}

.category-chip.is-active {
  background-color: var(--color-deep-green);
  border-color: var(--color-deep-green);
  color: #fff;
}

.menu-page__hint {
  max-width: 34rem;
  margin-inline: auto;
}

/* ---- Menu categories & tables --------------------------------------------- */

.menu-category {
  margin-bottom: 3rem;
  scroll-margin-top: calc(var(--header-height) + 56px);
}

.menu-category__title {
  border-bottom: 3px solid var(--color-brass);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.menu-table {
  --bs-table-bg: transparent;
}

.menu-table th,
.menu-table td {
  vertical-align: middle;
}

.menu-table__name {
  font-weight: 600;
  color: var(--color-ink);
}

.menu-table__price {
  text-align: center;
  font-weight: 600;
}

.menu-table__price-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.25rem 0.5rem;
  color: var(--color-price);
  text-decoration: none;
  border-bottom: 1px dashed var(--color-price);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.menu-table__price-link:hover,
.menu-table__price-link:focus-visible {
  background-color: rgba(169, 118, 44, 0.12);
  border-radius: 0.375rem;
}

.js-order-link.is-added {
  transform: scale(1.15);
  background-color: rgba(18, 50, 30, 0.14);
  border-radius: 0.375rem;
}

.menu-table__addons {
  font-size: 0.875rem;
}

.badge-addon {
  display: inline-block;
  background-color: rgba(18, 50, 30, 0.08);
  color: var(--color-deep-green);
  border-radius: 999px;
  padding: 0.15rem 0.75rem;
  margin: 0.15rem;
}

/* Cart-quantity badge, injected by JS onto any .js-order-link once JS runs. */
.cart-badge {
  position: absolute;
  top: -6px;
  inset-inline-end: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background-color: var(--color-logo-green);
  color: #12321E;
  font-size: 0.7rem;
  line-height: 18px;
  font-weight: 700;
  text-align: center;
}

/* ---- Single-price menu list (printed-menu dotted leader) ------------------- */

.menu-list__row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(26, 24, 20, 0.08);
}

.menu-list__name {
  font-weight: 600;
  flex-shrink: 0;
}

.menu-list__leader {
  flex: 1 1 auto;
  border-bottom: 2px dotted var(--color-muted);
  margin-bottom: 0.35em;
  min-width: 1.5rem;
}

.menu-list__price {
  color: var(--color-price);
  font-weight: 700;
  white-space: nowrap;
}

.menu-list .js-order-link {
  position: relative;
}

/* ---- Floating cart bar ------------------------------------------------------ */

.cart-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 1035;
  padding: 0.5rem 1rem;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
  background-color: var(--color-deep-green);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

@media (max-width: 767.98px) {
  .cart-bar {
    bottom: var(--bottom-nav-height);
  }
}

.cart-bar__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 48px;
  border: none;
  border-radius: 0.6rem;
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0.5rem 1rem;
  font-weight: 700;
}

.cart-bar__count {
  font-weight: 500;
  opacity: 0.85;
}

.cart-bar__total {
  color: var(--color-logo-green);
}

/* ---- Cart sheet (slide-up review panel) ------------------------------------- */

.cart-sheet__backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  z-index: 1050;
}

.cart-sheet__panel {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 1051;
  max-height: 85vh;
  overflow-y: auto;
  background-color: #fff;
  border-radius: 1rem 1rem 0 0;
  padding: 0.5rem 1.25rem 1.25rem;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
}

@media (min-width: 576px) {
  .cart-sheet__panel {
    inset-inline: auto 1.25rem;
    bottom: 1.25rem;
    width: 26rem;
    border-radius: 1rem;
    max-height: 80vh;
  }
}

.cart-sheet__handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background-color: rgba(26, 24, 20, 0.2);
  margin: 0.6rem auto 0.75rem;
}

.cart-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.cart-sheet__header h2 {
  font-size: 1.3rem;
  margin: 0;
}

.cart-sheet__close {
  border: none;
  background: transparent;
  font-size: 1.1rem;
  min-width: 44px;
  min-height: 44px;
  color: var(--color-ink);
}

.cart-sheet__empty {
  color: var(--color-muted);
  text-align: center;
  padding: 1.5rem 0;
  margin: 0;
}

.cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(26, 24, 20, 0.08);
}

.cart-line__info {
  display: flex;
  flex-direction: column;
}

.cart-line__name {
  font-weight: 600;
}

.cart-line__price {
  color: var(--color-price);
  font-size: 0.9rem;
}

.cart-line__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.qty-btn {
  min-width: 36px;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--color-brass);
  background-color: transparent;
  color: var(--color-deep-green);
  font-weight: 700;
  line-height: 1;
}

.qty-btn:hover,
.qty-btn:focus-visible {
  background-color: var(--color-brass);
  color: #fff;
}

.cart-line__qty {
  display: inline-block;
  min-width: 2ch;
  text-align: center;
  font-weight: 700;
}

.cart-sheet__branch {
  margin: 1rem 0;
}

.cart-sheet__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.cart-sheet__total strong {
  color: var(--color-price);
  font-size: 1.25rem;
}

/* ---- Branches ---------------------------------------------------------------- */

.branch-card {
  background-color: #fff;
  border: 1px solid rgba(169, 118, 44, 0.35);
  border-radius: 0.75rem;
  padding: 1.25rem;
  height: 100%;
}

.branch-card__name {
  color: var(--color-deep-green);
}

.branch-card__phone {
  font-weight: 700;
}

/* ---- Footer ------------------------------------------------------------------- */

.site-footer {
  background-color: var(--color-deep-green);
  color: #fff;
}

.site-footer a {
  color: #fff;
  font-weight: 600;
}

.site-footer__copy {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  margin-bottom: 0;
}

/* ---- App-style bottom tab bar (mobile only) ------------------------------------ */

.bottom-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  height: var(--bottom-nav-height);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background-color: #fff;
  border-top: 1px solid rgba(26, 24, 20, 0.1);
  z-index: 1040;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.bottom-nav__tab {
  flex: 1 1 25%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-muted);
}

.bottom-nav__tab.is-active {
  color: var(--color-deep-green);
}

.bottom-nav__icon {
  width: 22px;
  height: 22px;
}

.bottom-nav__icon-wrap {
  position: relative;
  display: inline-flex;
}

.bottom-nav__badge {
  top: -4px;
}

/* ---- Error pages ----------------------------------------------------------------- */

.error-page {
  font-family: var(--font-body);
  background-color: var(--color-cream);
  color: var(--color-ink);
}
