/* Makan style.css — generated by css_build.py. Do not edit directly.  */
/* Source: static/css/{base,layout,grammar,entity-detail,state}.css    */
/* Ownership registry: CSS_OWNERSHIP in css_build.py (canonical).      */
/* CSS_OWNERSHIP.md is a documentation projection — not the authority. */


/* ── base.css ────────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────────────────────────
   base.css — Layer 1
   Reset + design tokens. No .mk-* rules. No class rules of any kind.
   Owner: base layer (CSS_OWNERSHIP.md)
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Reset ───────────────────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: 'Segoe UI', system-ui, -apple-system, Tahoma, Arial, sans-serif;
  line-height: 1.5;
  direction: rtl;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Design tokens ───────────────────────────────────────────────────────── */

:root {
  /* Colour */
  --clr-bg:           #f9f5f0;
  --clr-surface:      #ffffff;
  --clr-nav:          #1a1a1a;
  --clr-nav-text:     #ffffff;
  --clr-accent:       #c8a96e;
  --clr-text:         #1a1a1a;
  --clr-text-muted:   #666666;
  --clr-border:       #e8e0d4;
  --clr-pill-bg:      #f0e8d8;
  --clr-pill-text:    #5a4a2a;
  --clr-save-active:  #c8a96e;
  --clr-wa:           #25d366;

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;

  /* Shadow */
  --shadow-card: 0 1px 6px rgba(0,0,0,.09);
  --shadow-nav:  0 1px 3px rgba(0,0,0,.15);

  /* Layout */
  --max-w:  600px;
  --nav-h:  52px;

  /* Spacing scale */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;

  /* Typography scale */
  --text-xs:   .7rem;
  --text-sm:   .8rem;
  --text-base: 1rem;
  --text-lg:   1.2rem;
  --text-xl:   1.5rem;
  --text-2xl:  1.85rem;
}



/* ── layout.css ──────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────────────────────────
   layout.css — Layer 2
   Global frame: nav, content container, breadcrumb.
   Defines vertical rhythm, max-width, containment.
   Owner: layout layer (CSS_OWNERSHIP.md)
   No entity, card, badge, or detail-slot selectors permitted here.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Nav bar ─────────────────────────────────────────────────────────────── */

.mk-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 var(--space-4);
  background: var(--clr-nav);
  box-shadow: var(--shadow-nav);
}

.mk-logo {
  color: var(--clr-nav-text);
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: .04em;
}

.mk-heart {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--clr-nav-text);
  font-size: 1.25rem;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  transition: background .15s;
}

.mk-heart:hover {
  background: rgba(255,255,255,.12);
}

#nav-heart-icon {
  line-height: 1;
}

#nav-heart-count {
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--clr-accent);
  color: #fff;
  border-radius: 99px;
  padding: 1px 6px;
  line-height: 1.4;
}

/* ── Content container ───────────────────────────────────────────────────── */

.mk-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-3) 48px;
}

@media (min-width: 560px) {
  .mk-content {
    padding: 0 var(--space-5) 48px;
  }
}

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */

.mk-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: var(--space-3) 0 0;
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.mk-breadcrumb::-webkit-scrollbar {
  display: none;
}

.mk-breadcrumb-item {
  color: var(--clr-text-muted);
  transition: color .15s;
}

a.mk-breadcrumb-item:hover {
  color: var(--clr-text);
}

.mk-breadcrumb-sep {
  color: var(--clr-border);
  margin: 0 2px;
  user-select: none;
}



/* ── grammar.css ─────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────────────────────────
   grammar.css — Layer 3
   Visual encoding of UI Grammar v1 primitives.
   Defines what a list, row, and card *mean* visually.
   Card layout rules only — content internals belong in entity-detail.css.
   Owner: grammar layer (CSS_OWNERSHIP.md)
   No mk-store-* detail slots. No badge/state selectors.
   No cross-layer selectors (.mk-a .mk-b forbidden).
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Page title ──────────────────────────────────────────────────────────── */

.mk-page-title {
  font-size: var(--text-xl);
  font-weight: 800;
  padding: var(--space-4) 0 var(--space-1);
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--clr-text);
}

/* ── EntityList ──────────────────────────────────────────────────────────── */

.mk-entity-list {
  width: 100%;
}

.mk-entity-list--rows {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--clr-border);
  background: var(--clr-surface);
  margin: var(--space-2) 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.mk-entity-list--cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin: var(--space-3) 0;
}



/* ── EntityRow ───────────────────────────────────────────────────────────── */

.mk-entity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--space-4);
  color: var(--clr-text);
  border-bottom: 1px solid var(--clr-border);
  transition: background .12s;
  min-height: 52px;
  font-size: var(--text-base);
  font-weight: 500;
}

.mk-entity-row:last-child {
  border-bottom: none;
}

.mk-entity-row:hover {
  background: var(--clr-pill-bg);
}

.mk-entity-row--collapsible {
  cursor: pointer;
  user-select: none;
}

/* Depth modifiers — structural variation via explicit modifier, never ancestry */

.mk-entity-row--depth-2 {
  padding-right: 32px;
  background: #fdfaf6;
}

.mk-entity-row--depth-3 {
  padding-right: 48px;
  background: #faf7f2;
}

.mk-entity-row__chevron {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  transition: transform .2s;
  margin-right: var(--space-1);
  flex-shrink: 0;
}

/* Chevron rotation driven by data attr — no ancestry selector needed */
/* app.js sets data-collapsed="false" on the row when expanded */

.mk-entity-count {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--clr-pill-text);
  background: var(--clr-pill-bg);
  border-radius: 99px;
  padding: 2px var(--space-2);
  flex-shrink: 0;
  margin-right: auto;
  margin-left: var(--space-2);
  min-width: 26px;
  text-align: center;
}

/* ── Collapsible body ────────────────────────────────────────────────────── */

.mk-collapsible-body {
  overflow: hidden;
}

/* Collapsed state — owned by state.css, declared here as structural contract */
/* .collapsed { display: none } — defined in state.css */

/* ── Home tree ───────────────────────────────────────────────────────────── */

.mk-home-tree {
  margin-top: var(--space-4);
}

/* ── Category filter ─────────────────────────────────────────────────────── */

.mk-cat-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: var(--space-3) 0;
}

.mk-cat-btn {
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 99px;
  border: 1.5px solid var(--clr-border);
  background: var(--clr-surface);
  cursor: pointer;
  color: var(--clr-text-muted);
  transition: border-color .15s, color .15s, background .15s;
}

.mk-cat-btn:hover {
  border-color: var(--clr-accent);
  color: var(--clr-text);
  background: var(--clr-pill-bg);
}

/* ── StoreCard — layout shell ────────────────────────────────────────────── */

.mk-store-card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(0,0,0,.18);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s, transform .15s;
  position: relative;
}

.mk-store-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  transform: translateY(-1px);
}

/* ── Card photo slot ─────────────────────────────────────────────────────── */

.mk-card-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--clr-pill-bg);
  overflow: hidden;
  flex-shrink: 0;
}

.mk-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Card body ───────────────────────────────────────────────────────────── */

.mk-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) 14px 14px;
  flex: 1;
}

.mk-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--clr-text);
  line-height: 1.3;
}

.mk-card-category {
  font-size: var(--text-xs);
  color: var(--clr-accent);
  font-weight: 600;
  letter-spacing: .02em;
}

.mk-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: 2px;
}

.mk-card-desc {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mk-card-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: var(--space-2);
  padding: 6px var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--clr-wa);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
}

/* ── Card save button ────────────────────────────────────────────────────── */

.mk-card-save {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  background: rgba(255,255,255,.85);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: var(--text-base);
  backdrop-filter: blur(4px);
  transition: background .15s;
}

.mk-card-save:hover {
  background: rgba(255,255,255,1);
}



/* ── entity-detail.css ───────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────────────────────────
   entity-detail.css — Layer 4
   Slot schema for entity expansion (store detail view).
   Invariant layout rules: consistent spacing, consistent grouping.
   This is a schema renderer, not a page stylesheet.
   No page context. No conditional styling. No grammar-layer redefinitions.
   Owner: entity-detail layer (CSS_OWNERSHIP.md)
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Photo slot ──────────────────────────────────────────────────────────── */

.mk-store-photo-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--clr-pill-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: var(--space-3);
}

.mk-store-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Name slot ───────────────────────────────────────────────────────────── */

.mk-store-name {
  font-size: var(--text-2xl);
  font-weight: 800;
  margin-top: 14px;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--clr-text);
}

/* ── Description slot ────────────────────────────────────────────────────── */

.mk-store-desc {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  line-height: 1.6;
  margin-top: var(--space-2);
}

/* ── Badges slot ─────────────────────────────────────────────────────────── */

.mk-store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-2);
}

/* ── Actions slot ────────────────────────────────────────────────────────── */

.mk-store-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.mk-btn-wa,
.mk-btn-phone {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-md);
  font-size: .95rem;
  font-weight: 700;
  text-align: center;
  transition: filter .15s;
}

.mk-btn-wa:hover,
.mk-btn-phone:hover {
  filter: brightness(1.08);
}

.mk-btn-wa {
  background: var(--clr-wa);
  color: #fff;
}

.mk-btn-phone {
  background: var(--clr-accent);
  color: #fff;
}

/* ── Hours slot ──────────────────────────────────────────────────────────── */

.mk-store-hours {
  margin-top: var(--space-5);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.mk-hours-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) 14px;
  font-size: .88rem;
  border-bottom: 1px solid var(--clr-border);
}

.mk-hours-row:last-child {
  border-bottom: none;
}

.mk-hours-day {
  color: var(--clr-text-muted);
}

.mk-hours-val {
  font-weight: 700;
  color: var(--clr-text);
}

/* ── Items slot ──────────────────────────────────────────────────────────── */

.mk-store-items {
  margin-top: var(--space-5);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.mk-item-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-2) 14px;
  font-size: .9rem;
  border-bottom: 1px solid var(--clr-border);
}

.mk-item-row:last-child {
  border-bottom: none;
}

.mk-item-name {
  color: var(--clr-text);
}

.mk-item-price {
  font-weight: 700;
  color: var(--clr-accent);
  flex-shrink: 0;
  margin-right: var(--space-2);
}

/* ── Save/share slot ─────────────────────────────────────────────────────── */

.mk-store-save {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.mk-save-btn,
.mk-share-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px var(--space-2);
  border-radius: var(--radius-md);
  font-size: .9rem;
  font-weight: 600;
  border: 2px solid var(--clr-border);
  background: var(--clr-surface);
  cursor: pointer;
  color: var(--clr-text);
  transition: border-color .15s, color .15s, background .15s;
}

.mk-save-btn:hover,
.mk-share-btn:hover {
  border-color: var(--clr-accent);
}



/* ── state.css ───────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────────────────────────
   state.css — Layer 5
   Orthogonal state modifiers. Applied additionally — never replace structure.
   Reusable at any layer. Last in concat order: overlays everything beneath.
   Owner: state layer (CSS_OWNERSHIP.md)
   May NOT redefine any grammar or entity-detail class.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Accordion state ─────────────────────────────────────────────────────── */

.collapsed {
  display: none;
}

/* ── Chevron rotation state ──────────────────────────────────────────────── */
/* Driven by data-collapsed attr set by app.js. Attribute selector is         */
/* not a cross-layer selector — it targets a data attribute, not a class.     */

[data-collapsed="false"] .mk-entity-row__chevron {
  transform: rotate(90deg);
}

/* ── Save interaction state ──────────────────────────────────────────────── */

.mk-save-btn.saved {
  border-color: var(--clr-save-active);
  color: var(--clr-save-active);
  background: #fdf8ef;
}

.mk-card-save.saved {
  color: var(--clr-save-active);
}

/* ── Category filter active state ────────────────────────────────────────── */

.mk-cat-btn.active {
  border-color: var(--clr-accent);
  color: var(--clr-text);
  background: var(--clr-pill-bg);
}

/* ── Badge pills ─────────────────────────────────────────────────────────── */

.mk-new-badge {
  background: var(--clr-accent);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 2px var(--space-2);
}

.mk-nbhd-badge {
  background: rgba(26,26,26,.7);
  color: #fff;
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
  padding: 2px 7px;
  backdrop-filter: blur(4px);
}

.mk-bdg-delivery,
.mk-bdg-open247,
.mk-bdg-tabby,
.mk-bdg-tamara {
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: 99px;
  padding: 2px 9px;
  white-space: nowrap;
}

.mk-bdg-delivery {
  background: #e8f4e8;
  color: #2a6a2a;
}

.mk-bdg-open247 {
  background: #e8eef8;
  color: #1a3a7a;
}

.mk-bdg-tabby {
  background: #f0f0f0;
  color: #333;
}

.mk-bdg-tamara {
  background: #f5e8f5;
  color: #5a1a7a;
}

