/* ============================================================
   ممد پاستا — صفحه دسته‌بندی‌ها (Home)
   Requires: theme.css
   ============================================================ */

/* ---------- Header ---------- */
.site-header{position:sticky;top:0;z-index:40;
  background:color-mix(in srgb,var(--bg) 88%,transparent);
  backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  border-bottom:1px solid var(--line)}
.header-inner{max-width:1180px;height:62px;margin:auto;padding:0 16px;
  display:flex;align-items:center;justify-content:space-between}
.brand{display:flex;align-items:center;gap:11px;min-width:0}
.brand-mark{position:relative;width:40px;height:40px;border:1px solid rgba(255,255,255,.12);
  border-radius:13px;background:#7a1f2b;box-shadow:var(--shadow-xs);flex:0 0 auto;overflow:hidden}
.brand-mark img{position:absolute;left:50%;top:50%;width:100%;height:100%;max-width:none;
  transform:translate(-50%,-50%)}
.brand-copy{display:flex;flex-direction:column;gap:1px}
.brand-copy b{font-size:15px;font-weight:800}
.brand-copy small{font-size:9px;letter-spacing:1.8px;color:var(--ink-3);direction:ltr;text-align:right}

.header-cart{position:relative;width:44px;height:44px;border:1px solid var(--line);
  border-radius:13px;background:var(--surface);display:grid;place-items:center;
  box-shadow:var(--shadow-xs);transition:transform .15s}
.header-cart:active{transform:scale(.94)}
.cart-icon{position:relative;width:17px;height:16px;border:2px solid var(--ink);
  border-radius:4px 4px 6px 6px;margin-top:3px}
.cart-icon::before{content:"";position:absolute;width:9px;height:6px;border:2px solid var(--ink);
  border-bottom:0;border-radius:7px 7px 0 0;right:2px;top:-8px}
.header-cart em{position:absolute;top:-6px;left:-6px;min-width:20px;height:20px;padding:0 5px;
  border-radius:var(--r-pill);background:var(--brand);color:#fff;display:grid;place-items:center;
  font-size:11px;font-weight:700;font-style:normal;border:2px solid var(--bg);
  font-variant-numeric:tabular-nums}
.header-cart:not(.has-items) em{background:var(--ink-3)}

/* ---------- Shell + hero ---------- */
.home-shell{max-width:1180px;margin:auto;padding:16px 16px 48px}
.home-hero{padding:10px 2px 12px;display:grid;gap:4px}
.home-hero .eyebrow i{width:22px}
.home-hero h1{font-size:clamp(26px,7vw,44px);line-height:1.18;margin:6px 0 4px}
.home-hero p{max-width:540px;margin:0;color:var(--ink-2);font-size:14px;line-height:1.85}

/* ---------- کارت «چائو» با تصویر دیوارنگارهٔ ممد پاستا ---------- */
.moon-moment{position:relative;display:flex;align-items:center;gap:14px;margin-top:6px;padding:10px;
  border:1px solid rgba(255,255,255,.12);border-radius:var(--r-lg);
  background:linear-gradient(135deg,rgba(255,255,255,.08),rgba(255,255,255,.02));
  backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.moon-art{width:92px;height:118px;flex:0 0 92px;object-fit:cover;border-radius:14px;
  box-shadow:0 10px 24px rgba(0,0,0,.35)}
.moon-message{margin:0;display:flex;flex-direction:column;gap:2px;color:#f1dfbd!important;
  font-size:15px!important;line-height:1.7!important;text-shadow:0 2px 10px rgba(0,0,0,.36)}
.moon-message strong{color:#fff7e8;font-size:21px;font-weight:800}
.moon-message small{direction:ltr;text-align:right;font-size:11px;letter-spacing:.6px;color:rgba(241,223,189,.75)}
.it-flag{display:inline-flex;width:34px;height:4px;border-radius:4px;overflow:hidden;margin-top:6px}
.it-flag i{flex:1}.it-flag i:nth-child(1){background:#1f8a4c}.it-flag i:nth-child(2){background:#f3ead8}.it-flag i:nth-child(3){background:#d4342c}

/* ---------- Section head ---------- */
.section-head{display:flex;align-items:flex-end;justify-content:space-between;
  gap:12px;padding:0 2px 14px}
.section-head>div span{font-size:11px;color:var(--brand);font-weight:800}
.section-head h2{font-size:20px;margin:5px 0 0}
.section-head small{font-size:12px;color:var(--ink-2);white-space:nowrap}

/* ---------- Category grid ---------- */
.category-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.category-card{position:relative;aspect-ratio:4/5;overflow:hidden;border-radius:var(--r-lg);
  background:var(--surface-3);isolation:isolate;box-shadow:var(--shadow-sm);
  transition:transform .25s var(--ease),box-shadow .25s var(--ease)}
.category-card img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;
  transition:transform .55s var(--ease)}
.category-overlay{position:absolute;inset:0;z-index:1;
  background:linear-gradient(to top,rgba(15,10,6,.78) 0%,rgba(15,10,6,.28) 42%,rgba(15,10,6,.02) 72%)}
.category-content{position:absolute;inset:0;z-index:2;padding:13px;color:#fff;
  display:flex;flex-direction:column;justify-content:space-between}
.category-meta{align-self:flex-start;padding:6px 10px;border:1px solid rgba(255,255,255,.28);
  background:rgba(255,255,255,.16);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
  border-radius:var(--r-pill);font-size:11px;font-weight:600}
.category-bottom{display:flex;align-items:flex-end;justify-content:space-between;gap:10px}
.category-bottom>span{min-width:0}
.category-bottom strong{display:block;font-size:17px;font-weight:800;line-height:1.35}
.category-bottom small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;margin-top:3px;font-size:11px;line-height:1.6;color:rgba(255,255,255,.82)}
.category-bottom i{width:34px;height:34px;flex:0 0 34px;border-radius:50%;background:#fff;
  color:var(--ink);display:grid;place-items:center;font-size:17px;font-style:normal;
  box-shadow:0 6px 16px rgba(0,0,0,.2)}
.category-card:active{transform:scale(.985)}

/* ---------- Footer ---------- */
.site-footer{max-width:1180px;margin:auto;padding:0 16px 34px;display:flex;
  align-items:center;justify-content:center;gap:8px;color:var(--ink-3);
  font-size:11px;text-align:center;line-height:1.8}
.site-footer span{width:5px;height:5px;border-radius:50%;background:var(--brand);flex:0 0 auto}

/* ---------- Responsive ---------- */
@media(min-width:700px){
  .header-inner{height:70px;padding:0 24px}
  .home-shell{padding:26px 24px 60px}
  .home-hero{padding:22px 4px 24px;grid-template-columns:1fr auto;align-items:center}
  .moon-moment{width:380px}
  .category-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
  .section-head h2{font-size:23px}
}
@media(min-width:1040px){
  .category-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
  .category-card:hover{transform:translateY(-4px);box-shadow:var(--shadow)}
  .category-card:hover img{transform:scale(1.05)}
}
@media(max-width:359px){
  .home-shell{padding-left:11px;padding-right:11px}
  .moon-art{width:76px;flex-basis:76px;height:100px}
  .moon-message strong{font-size:18px}
  .category-grid{gap:9px}
  .category-content{padding:11px}
  .category-bottom strong{font-size:15px}
}

/* ---- خوانایی روی پس‌زمینهٔ عکس (صفحهٔ خانه) ---- */
.home-hero .eyebrow{color:#e9c98f}
.home-hero h1{color:#fff}
.home-hero p{color:rgba(255,255,255,.80)}
.section-head>div span{color:#e9c98f}
.section-head h2{color:#fff}
.section-head small{color:rgba(255,255,255,.72)}
.site-header{background:color-mix(in srgb,#171110 82%,transparent);
  border-bottom-color:rgba(255,255,255,.10)}
.site-header .brand-copy b{color:#fff}
.site-header .brand-copy small{color:rgba(255,255,255,.55)}
.header-cart{background:rgba(255,255,255,.10);border-color:rgba(255,255,255,.16)}
.cart-icon,.cart-icon::before{border-color:#fff}

/* ---- خوانایی متن بالای صفحه روی دیوارنگاره ---- */
.home-hero h1,.home-hero p,.home-hero .eyebrow,.section-head h2,.section-head span,.section-head small{
  text-shadow:0 2px 14px rgba(0,0,0,.75),0 1px 3px rgba(0,0,0,.6)}
.moon-moment{background:linear-gradient(135deg,rgba(23,17,16,.62),rgba(23,17,16,.42))}
