/* ═══════════════════════════════════════════════════════════════
   components.css — Al-Faida Menu UI (theme-aware)
═══════════════════════════════════════════════════════════════ */

/* Torn / burnt paper edge — px offsets keep the edge uniform at any size */
:root {
  --torn: polygon(
    0% 3px, 4% 0, 9% 4px, 14% 1px, 20% 5px, 27% 0, 33% 3px, 40% 1px, 47% 4px, 53% 0,
    60% 3px, 66% 1px, 73% 5px, 80% 0, 86% 3px, 93% 1px, 100% 4px,
    calc(100% - 3px) 6%, 100% 13%, calc(100% - 4px) 21%, calc(100% - 1px) 30%, calc(100% - 5px) 39%,
    100% 48%, calc(100% - 3px) 57%, calc(100% - 1px) 66%, calc(100% - 4px) 75%, 100% 84%, calc(100% - 3px) 92%,
    calc(100% - 1px) 100%,
    94% calc(100% - 3px), 88% 100%, 82% calc(100% - 4px), 75% calc(100% - 1px), 68% calc(100% - 5px), 61% 100%,
    54% calc(100% - 3px), 47% calc(100% - 1px), 40% calc(100% - 4px), 33% 100%, 26% calc(100% - 3px),
    19% calc(100% - 1px), 12% calc(100% - 5px), 6% 100%, 0% calc(100% - 3px),
    3px 92%, 0 84%, 4px 75%, 1px 66%, 5px 57%, 0 48%, 3px 39%, 1px 30%, 4px 21%, 0 12%, 3px 5%
  );
}

/* ══════════════════════════════════════════════════════════════
   1. MASTHEAD
══════════════════════════════════════════════════════════════ */
.masthead { text-align: center; padding-block: .75rem 1.75rem; }

#logo-area {
  display: flex; justify-content: center; align-items: center;
  margin-block-end: .75rem; min-height: 140px;
}
.logo-frame { display: inline-flex; align-items: center; justify-content: center; }
.logo-img {
  width: 140px; height: 140px; object-fit: contain;
  filter: var(--logo-glow);
  transition: transform .3s var(--ease-ink);
}
.logo-frame:hover .logo-img { transform: scale(1.04); }

.brand-text-logo {
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  color: var(--accent);
}

.masthead-tagline {
  display: inline-block;
  font-style: italic; font-size: .95rem;
  color: var(--text-2);
  padding: .3rem 1.25rem;
  border-block: 1px solid var(--line);
  letter-spacing: .05em;
  margin-block-end: .65rem;
}
.since-badge { display: none; }

.header-actions {
  display: flex; align-items: center; justify-content: center;
  gap: .75rem; flex-wrap: wrap; margin-top: .6rem;
}

.lang-switcher { display:flex; gap:.2rem; font-size:.8rem; letter-spacing:.12em; }
.lang-switcher a {
  text-decoration:none; padding:.25rem .6rem; border-radius:4px;
  color: var(--text-3); font-weight:700;
  transition: color .18s, background .18s;
}
.lang-switcher a.active,
.lang-switcher a:hover { color: var(--accent); background: var(--line); }

/* Theme toggle */
.theme-toggle {
  position: absolute;
  top: 1.25rem;
  inset-inline-start: 1.25rem;
  z-index: 50;
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  color: var(--text-2);
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  transition: color .18s, border-color .18s, background .18s, transform .25s var(--ease-ink);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px) rotate(10deg); }
.theme-toggle svg { width: 17px; height: 17px; fill: currentColor; }
.theme-toggle .ic-sun { display: none; }
[data-theme="light"] .theme-toggle .ic-sun  { display: block; }
[data-theme="light"] .theme-toggle .ic-moon { display: none; }

.masthead-ornament {
  display:flex; align-items:center; gap:.6rem;
  margin-block: 1.1rem 0; color: var(--accent-2); opacity:.7;
}
.masthead-ornament::before,
.masthead-ornament::after { content:''; flex:1; height:1px; background: linear-gradient(90deg, transparent, currentColor, transparent); }
.masthead-ornament span { font-size:.75rem; }


/* ══════════════════════════════════════════════════════════════
   2. STICKY CATEGORY STRIP (light surface → dark ink, always readable)
══════════════════════════════════════════════════════════════ */
.contents-strip {
  position: sticky; top: 0; z-index: 100;
  background: var(--strip-bg);
  border-block: 1px solid var(--strip-border);
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  padding: .55rem 1.25rem;
  margin-block-end: 2rem;
  display: flex; align-items: center; gap: .35rem .55rem;
  overflow-x: auto; white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.contents-strip::-webkit-scrollbar { display: none; }

.strip-tab {
  display: inline-flex; align-items: center;
  font-family: var(--font-title);
  font-weight: 700; font-size: .9rem; letter-spacing: .03em;
  color: var(--strip-text);
  text-decoration: none;
  padding: .36rem .9rem;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer; user-select: none;
  transition: background .18s, border-color .18s, color .18s;
}
.strip-tab:hover { background: var(--strip-hover-bg); border-color: var(--strip-border); }
.strip-tab.active {
  color: var(--strip-active-tx);
  background: var(--strip-active-bg);
  border-color: var(--strip-active-bg);
}
.strip-sep { color: var(--strip-text); opacity: .35; font-size: .6rem; user-select: none; }


/* ══════════════════════════════════════════════════════════════
   3. SEARCH
══════════════════════════════════════════════════════════════ */
#filters-section { margin-block-end: 2rem; }
.search-wrap { position:relative; display:flex; align-items:center; }
.search-icon {
  position:absolute; inset-inline-start:.75rem;
  color: var(--input-fg); opacity: .55; pointer-events:none; display:flex;
}
.search-icon svg { width:17px; height:17px; }
#menu-search {
  width:100%; max-width:340px;
  padding:.62rem 1rem; padding-inline-start: 2.4rem;
  font-family:var(--font-base); font-size:.93rem;
  color: var(--input-fg);
  background: var(--input-bg);
  border:1px solid var(--input-border); border-radius:6px; outline:none;
  transition: border-color .2s, box-shadow .2s;
}
#menu-search::placeholder { color: var(--input-fg); opacity: .5; }
#menu-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--line); }


/* ══════════════════════════════════════════════════════════════
   4. FEATURES — 4 symmetric solid icons with labels below
══════════════════════════════════════════════════════════════ */
.global-features-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-block-end: 2.5rem;
  padding: 1.4rem 1rem;
  background: var(--card-bg);
  box-shadow: var(--card-scorch);
  clip-path: var(--torn);
}
.feature-item {
  display: flex; flex-direction: column; align-items: center;
  gap: .55rem; text-align: center;
}
.feature-icon {
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--feat-icon-bg);
  color: var(--feat-icon-fg);
  box-shadow: 0 3px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.25);
}
.feature-icon svg { width: 28px; height: 28px; fill: currentColor; }
.feature-label {
  font-size: .82rem; font-weight: 700; line-height: 1.3;
  color: var(--feat-label);
  letter-spacing: .02em;
}
@media (max-width: 520px) {
  .global-features-strip { gap: .4rem; padding: 1.1rem .4rem; }
  .feature-icon { width: 44px; height: 44px; }
  .feature-icon svg { width: 23px; height: 23px; }
  .feature-label { font-size: .72rem; }
}


/* ══════════════════════════════════════════════════════════════
   5. CATEGORY CARDS — darker than background, burnt paper edges
══════════════════════════════════════════════════════════════ */
.category {
  position: relative;
  margin-block-end: 2.5rem;
  scroll-margin-top: 70px;
  padding: 2rem 1.5rem 1.6rem;
  background:
    radial-gradient(ellipse at 20% 10%, var(--card-tex), transparent 60%),
    var(--card-bg);
  box-shadow: var(--card-scorch);
  clip-path: var(--torn);
}
/* Light mode: Russian folk ornament band on top of each card */
[data-theme="light"] .category { padding-top: 2.4rem; }
[data-theme="light"] .category::before {
  content: '';
  position: absolute; top: 10px; left: 16px; right: 16px; height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Cpath d='M12 0l6 6-6 6-6-6z' fill='%238E1B12'/%3E%3Cpath d='M0 6h4M20 6h4' stroke='%23A87C24' stroke-width='1.4'/%3E%3Ccircle cx='12' cy='6' r='1.6' fill='%23F3E7CC'/%3E%3C/svg%3E") repeat-x center / 24px 12px;
  opacity: .85;
}

.category-divider { display: none; }

.category-header { text-align:center; margin-block-end:1.4rem; }
.category-title {
  font-family: var(--font-title);
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  color: var(--accent);
  display: inline-flex; align-items:center; gap:.7rem;
}
.category-title::before,
.category-title::after {
  content:''; display:inline-block; width:34px; height:1px;
  background: var(--accent-2); opacity:.7;
}
.category-subtitle {
  font-style:italic; font-size:.85rem;
  color: var(--text-3); margin-top:.25rem; letter-spacing:.04em;
}

.price-header {
  display: flex; justify-content:flex-end;
  padding-inline-end: .2rem; padding-block-end: .35rem;
  border-bottom: 1px solid var(--line);
  margin-block-end: .65rem;
  font-size: .78rem; font-weight:700; letter-spacing: .1em; text-transform:uppercase;
  color: var(--accent);
}


/* ══════════════════════════════════════════════════════════════
   6. MENU ITEM
══════════════════════════════════════════════════════════════ */
.menu-item {
  display: flex; flex-direction:column;
  margin-block-end: .85rem;
  padding: .42rem .35rem;
  border-radius:4px;
  transition: background .16s;
}
.menu-item:hover { background: var(--line); }
.menu-item.unavailable { opacity:.5; }

.menu-line-primary { display: flex; align-items:center; gap: .7rem; width:100%; }

.item-thumbnail {
  width:46px; height:46px; border-radius:50%;
  border:2px solid var(--accent-2);
  object-fit:cover; flex-shrink:0; cursor:pointer;
  transition: transform .25s var(--ease-ink);
}
.item-thumbnail:hover { transform: scale(1.1); }

.item-name-wrap {
  flex-shrink:0; display:flex; align-items:center;
  gap:.45rem; flex-wrap:wrap; max-width:55%;
}
.item-name-text { font-size:1.05rem; font-weight:700; color: var(--text); line-height:1.3; }

.item-leaders {
  flex:1; height:1px; align-self:center; margin-inline:.45rem;
  background-image: repeating-linear-gradient(to right, var(--text-3) 0 3px, transparent 3px 8px);
  opacity: .6;
}

.item-price-single {
  flex-shrink: 0;
  font-size: 1.12rem; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--price);
  min-width: 5ch; text-align: end;
}
.item-price-single.price-soon { font-style:italic; font-weight:600; font-size:.85rem; color: var(--text-3); }
.price-old {
  display:inline; font-size:.85rem; font-weight:500;
  text-decoration:line-through; color: var(--text-3);
  margin-inline-end:.3rem;
}

.menu-line-secondary {
  display:flex; align-items:center; gap:.45rem; flex-wrap:wrap;
  margin-top:.25rem;
  padding-inline-start: calc(46px + .7rem);
  font-size:.84rem; color: var(--text-2);
}
.menu-item:not(.has-thumb) .menu-line-secondary { padding-inline-start:0; }
.item-alt-name { font-style:italic; color: var(--accent-2); }

.badge-stamp {
  display:inline-flex; align-items:center;
  font-size:.62rem; font-weight:800; letter-spacing:.09em; text-transform:uppercase;
  padding:.13rem .45rem; border-radius:2px;
  border:1.5px solid currentColor;
  transform: rotate(-4deg);
}
.badge-new     { color: var(--accent); }
.badge-popular { color: var(--danger); }
.badge-offer   { color: var(--price); }

.unavailable-tag {
  font-size:.68rem; font-style:italic; color: var(--text-3);
  border:1px dashed var(--text-3); padding:.08rem .38rem; border-radius:3px;
}

@media(max-width:520px) {
  .category { padding: 1.6rem 1rem 1.2rem; }
  .menu-line-primary { flex-wrap:wrap; }
  .item-name-wrap    { max-width:100%; width:calc(100% - 56px); }
  .item-leaders      { display:none; }
  .item-price-single {
    width:100%; padding-top:.35rem; margin-top:.2rem;
    border-top:1px dashed var(--line);
  }
}


/* ══════════════════════════════════════════════════════════════
   7. B2B SUPPLY CARD
══════════════════════════════════════════════════════════════ */
.b2b-frame {
  margin-block: 2.5rem;
  background: var(--b2b-bg);
  clip-path: var(--torn);
  box-shadow: inset 0 0 0 1px rgba(233,185,73,.3), inset 0 0 30px rgba(0,0,0,.45);
}
.b2b-inner { padding: 2rem 1.75rem; text-align:center; }
.b2b-inner h3 { font-family: var(--font-title); font-size:1.6rem; color: var(--b2b-title); margin-block-end:.7rem; }
.b2b-inner p  {
  font-size: 1.05rem; font-weight: 600; line-height: 1.75;
  color: var(--text-2);
  max-width: 36ch; margin: 0 auto 1.4rem;
}
.cta-btn {
  display:inline-flex; align-items:center; gap:.5rem;
  padding:.7rem 1.6rem;
  background: var(--btn-bg); color: var(--btn-fg);
  border-radius:6px; text-decoration:none;
  font-weight:700; font-size:.92rem; letter-spacing:.03em;
  box-shadow:0 4px 14px rgba(0,0,0,.3);
  transition: transform .2s var(--ease-ink), filter .2s;
}
.cta-btn svg { width: 18px; height: 18px; fill: currentColor; }
.cta-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }


/* ══════════════════════════════════════════════════════════════
   8. FOOTER
══════════════════════════════════════════════════════════════ */
#colophon {
  margin-top:2.5rem; padding-top:1.75rem;
  border-top:1px solid var(--line);
  display:grid; grid-template-columns:1fr; gap:1.5rem;
}
.footer-section-title {
  font-weight:700; font-size:.85rem; letter-spacing:.12em; text-transform:uppercase;
  color: var(--accent); margin-block-end:.6rem;
}
.footer-address, .footer-hours { font-size:.9rem; line-height:1.75; color: var(--text); margin-block-end:.45rem; }
.map-link {
  display:inline-flex; align-items:center; gap:.35rem;
  font-size:.88rem; font-weight:700; color: var(--accent); text-decoration:none;
  border-bottom:1px solid var(--line); padding-bottom: 2px;
}
.map-link svg { width: 16px; height: 16px; fill: currentColor; }
.map-link:hover { border-bottom-color: var(--accent); }

#social-links { display: flex; flex-direction: column; gap: 1.1rem; width: 100%; }
.social-group {
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  padding: 1rem .5rem;
  background: var(--card-bg);
  box-shadow: var(--card-scorch);
  clip-path: var(--torn);
}
.social-cta {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--font-title);
  color: var(--accent);
  font-size: 1.02rem; letter-spacing: .04em;
}
.social-cta svg { width: 18px; height: 18px; fill: currentColor; }
.social-row { display: flex; gap: .85rem; justify-content: center; flex-wrap: wrap; }

.social-link {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--soc-bg);
  border: 1.5px solid var(--soc-border);
  color: var(--soc-fg);
  text-decoration: none;
  transition: transform .2s var(--ease-ink), background .2s, color .2s;
}
.social-link svg { width: 22px; height: 22px; fill: currentColor; }
.social-link:hover { background: var(--soc-hover-bg); color: var(--soc-hover-fg); transform: translateY(-3px); }

/* Community: double ring + group badge */
.social-link.social-community { border: 2px solid var(--accent); box-shadow: 0 0 0 3px var(--line); }
.community-indicator {
  position: absolute; top: -5px; inset-inline-end: -5px;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--card-bg);
  border: 1.5px solid var(--card-bg);
}
.community-indicator svg { width: 12px; height: 12px; }

/* Contact: green ring */
.social-link.social-contact { border-color: #25A35A; color: #25A35A; }
.social-link.social-contact:hover { background: #25A35A; color: #fff; }

.social-link.social-no-link { opacity: .45; cursor: default; border-style: dashed; }
.social-link.social-no-link:hover { transform: none; background: var(--soc-bg); color: var(--soc-fg); }

.footer-bottom { padding-top: 1.25rem; border-top: 1px solid var(--line); text-align: center; }
.footer-copy { font-size: .85rem; color: var(--text-2); line-height: 1.8; }
.powered-by { display: inline-block; margin-top: .25rem; color: var(--accent); font-weight: 700; letter-spacing: .06em; }


/* ══════════════════════════════════════════════════════════════
   9. LIGHTBOX
══════════════════════════════════════════════════════════════ */
.plate-overlay {
  position:fixed; inset:0; z-index:1000;
  background:rgba(10,6,3,.9);
  display:none; align-items:center; justify-content:center;
}
.plate-overlay.active { display:flex; animation: fadeIn .2s ease; }
@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }
.plate-image {
  max-width: min(88vw,480px); max-height:80dvh;
  border-radius:50%; object-fit:cover;
  border:4px solid rgba(233,185,73,.5);
}
.plate-close {
  position:absolute; top:1.5rem; inset-inline-end:1.5rem;
  background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.2);
  color:#fff; width:40px; height:40px; border-radius:50%; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.plate-close svg { width: 18px; height: 18px; fill: currentColor; }


/* ══════════════════════════════════════════════════════════════
   10. WHATSAPP FLOAT
══════════════════════════════════════════════════════════════ */
.wax-seal {
  position:fixed; bottom:1.5rem; inset-inline-end:1.5rem;
  width:56px; height:56px; border-radius:50%;
  background:#1FA855; color:#fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 4px 16px rgba(0,0,0,.35);
  z-index:900; text-decoration:none;
  transition: transform .2s var(--ease-ink);
}
.wax-seal:hover { transform:scale(1.08); }
.wax-seal svg { width:30px; height:30px; }
