/* =========================
   Base & Resets
   ========================= */
:root {
  --hero-height: clamp(180px, 45vh, 430px);
  --hero-img-max: 470px;
  --hero-title-safe-offset: 48px;
  --ai-pink: #ff6e8c;
  --ai-pink-dark: #ff3460;
  --safe-top: env(safe-area-inset-top, 0px);
}

@media (max-width: 950px) {
  :root { --hero-title-safe-offset: 36px; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Naskh Arabic', Arial, sans-serif;
  background: #fafbfc;
  margin: 0;
  padding: 0;
  direction: rtl;
  color: #333;
  line-height: 1.6;
}

/* === Center main content on landing === */
.landing #main-content{
  width: min(1180px, 92vw);
  margin-inline: auto;
  padding-inline: 14px;
  display: block;
}
.landing #main-content > *{ width:100%; }

img { max-width: 100%; height: auto; display: block; }

/* hidden attribute compatibility (JS toggles) */
[hidden]{ display:none !important; }

/* =========================
   HERO HEADER
   ========================= */
.hero-header {
  position: relative;
  height: var(--hero-height);
  overflow: visible; /* اجازه بده محتوای مشاوره بیرون نزنه CLS */
  border-bottom-left-radius: 32px;
  border-bottom-right-radius: 32px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  min-height: 330px;
  max-height: var(--hero-img-max);
  object-fit: cover;
  object-position: center 20%;
  filter: brightness(0.81) saturate(1.05);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30,30,33,0.17) 13%, rgba(255,255,255,0.02) 87%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* منو و لوگو */
.hero-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  padding: calc(18px + var(--safe-top)) 4vw 0 4vw;
  position: relative;
}

/* =========================
   Desktop nav (main-nav)
   ========================= */
.main-nav ul {
  display: flex;
  gap: 32px;
  background: rgba(0,0,0,0.17);
  border-radius: 14px;
  padding: 8px 30px;
  margin: 0;
  list-style: none;
}

.main-nav a,
.dropbtn {
  color: #fff;
  font-size: 17px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: color .18s;
  text-decoration: none;
}

.main-nav a:hover,
.dropbtn:hover { color: #ffd6e1; }

.dropdown { position: relative; }

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  min-width: 160px;
  box-shadow: 0 4px 18px rgba(0,0,0,.09);
  border-radius: 10px;
  z-index: 1000;
}

.dropdown-content a {
  color: #303034;
  padding: 10px 14px;
  display: block;
  text-decoration: none;
  border-radius: 7px;
  transition: background .18s;
}

.dropdown-content a:hover { background: #f2f2f7; }

/* باز شدن با کلیک (JS کلاس open می‌دهد) */
.dropdown.open .dropdown-content{ display:block; }

/* لوگو (درصورت استفاده) */
.hero-logo {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  margin-left: 40px;
  margin-top: -24px;
}
.site-logo-large {
  width: 90px;
  height: auto;
  filter: drop-shadow(0 3px 12px rgba(0,0,0,0.18));
  background: #fff0;
}

/* =========================
   TITLES
   ========================= */
.hero-center {
  position: absolute;
  top: calc(50% + var(--hero-title-safe-offset));
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 12;
  text-align: center;
  width: 660px;
  max-width: 95vw;
}

.hero-title {
  font-size: clamp(22px, 5vw, 37px);
  color: #fff;
  text-shadow: 0 4px 16px #0003;
  margin: 0 0 18px 0;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
}

.hero-desc {
  font-size: clamp(13px, 3.3vw, 20px);
  color: #ffeaea;
  margin: 0 0 26px 0;
  text-shadow: 0 2px 8px #0005;
  line-height: 1.6;
}

/* =========================
   Landing Hero: CTA + Trust + Quick links (matches index.html)
   ========================= */
.landing .hero-title-wrap{
  display:inline-block;
  background: rgba(15,15,17,.40);
  -webkit-backdrop-filter: saturate(160%) blur(7px);
  backdrop-filter: saturate(160%) blur(7px);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 10px 26px rgba(0,0,0,.18);
  max-width: min(92vw, 820px);
}

/* دکمه‌های CTA */
.landing .hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:center;
  margin-top:12px;
}
.landing .hero-actions a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:12px;
  text-decoration:none;
  font-weight:900;
  border:1px solid rgba(255,255,255,.20);
  color:#fff;
  background:rgba(255,255,255,.14);
}
.landing .hero-actions a.primary{
  background:#00a37a;
  border-color:rgba(0,163,122,.55);
}
.landing .hero-actions a:hover{ filter:brightness(.97); }

/* Trust pills زیر CTA */
.landing .hero-trust{
  list-style:none;
  margin:10px 0 0;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:center;
}
.landing .hero-trust li{
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.18);
  color:#fff;
  padding:7px 10px;
  border-radius:999px;
  font-size:12.5px;
  line-height:1;
  white-space:nowrap;
}

/* Quick links روی هرو */
.landing .hub-quick{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:16px 0 0;
  justify-content:center;
}
.landing .hub-quick a{
  text-decoration:none;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.22);
  color:#fff;
  padding:8px 12px;
  border-radius:999px;
  font-size:14px;
  line-height:1;
}
.landing .hub-quick a:hover{ background:rgba(255,255,255,.28); }

/* =========================
   AI advisor (Inline Box)
   ========================= */
.ai-advisor {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #fff;
  padding: 12px 16px;
  border-radius: 13px;
  box-shadow: 0 3px 12px #0001;
  gap: 8px;
  max-width: 360px;
  width: 100%;
}

.ai-advisor #ai-question {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 15px;
  background: #f9f9f9;
}

.ai-advisor #ai-ask {
  width: 100%;
  padding: 10px 0;
  background: #28a745;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: background .2s;
}
.ai-advisor #ai-ask:hover { background: #218838; }

.ai-advisor #ai-response {
  color: #555;
  font-size: 14px;
  text-align: right;
  min-height: 18px;
  max-height: 160px;
  overflow-y: auto;
  white-space: pre-wrap;
  padding-right: 4px;
}

/* پاسخ‌های کارت‌دار داخل چت */
.chat-card {
  display: flex;
  align-items: center;
  gap: 13px;
  background: #fff;
  border-radius: 13px;
  box-shadow: 0 2px 10px #0001;
  padding: 8px 14px 8px 10px;
  margin: 7px 0;
  border: 1px solid #f7c9da;
  font-size: 14px;
  position: relative;
  transition: box-shadow .14s, border-color .14s;
}
.chat-card img {
  width: 46px; height: 46px;
  object-fit: contain;
  border-radius: 8px;
  background: #f7f7fa;
  border: 1px solid #eee;
}
.chat-card .info {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.chat-card .title {
  color: #b02460; font-weight: 700; font-size: 14px;
  line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px;
}
.chat-card .price { color: #535; font-size: 13px; font-weight: 500; }
.chat-card .add-to-cart {
  background: var(--ai-pink); color: #fff; border: none; border-radius: 9px;
  width: 36px; height: 36px; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  margin-right: 8px; transition: background .18s;
}
.chat-card .add-to-cart:hover { background: var(--ai-pink-dark); }

#chat .msg { direction: rtl; }

/* =========================
   سبد خرید کوچک
   ========================= */
.cart-box {
  position: absolute;
  top: 30px; left: 30px;
  background: var(--ai-pink);
  color: #fff;
  padding: 7px 16px 7px 12px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 20px;
  display: flex; align-items: center; gap: 7px;
  z-index: 12; box-shadow: 0 3px 12px #0002;
  cursor: pointer; transition: background .2s;
}
.cart-box:hover { background: var(--ai-pink-dark); }
.cart-icon { width: 32px; height: 32px; }

/* =========================================================
   Mobile Nav (Stable, no :has)
   - Desktop: main-nav visible, hamburger hidden
   - Mobile: main-nav hidden, hamburger + mobile-menu enabled
   ========================================================= */
.hamburger { display: none; }

@media (max-width: 900px) {
  /* موبایل: فقط همبرگر */
  .main-nav { display: none !important; }
  .hamburger{
    position: absolute;
    top: 16px;
    right: 14px;
    width: 58px;
    height: 58px;
    border: none;
    background: rgba(255, 110, 140, .55);
    border: 1px solid rgba(255, 110, 140, .55);
    border-radius: 14px;
    cursor: pointer;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 6px;
    z-index: 10010;
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    backdrop-filter: blur(6px) saturate(120%);
    color: #fff;
    box-shadow: 0 10px 26px rgba(255,110,140,.35);
  }
  .hamburger .menu-label,
  .hamburger .hamburger-label{
    font-size: 11px;
    line-height: 1;
    margin-bottom: 2px;
    color: #fff;
  }
  .hamburger .bar{
    display:block;
    width:20px;
    height:2px;
    background:#fff;
    border-radius:2px;
  }
  .hamburger .bar:nth-child(3){ width:16px; }
  .hamburger .bar:nth-child(4){ width:12px; }

  /* پنل منو: شیشه‌ای صورتی */
  #mobile-menu{
    position:absolute;
    top:74px;
    right:12px;
    width:min(82vw,360px);
    background: rgba(255,236,244,.78);
    border: 1px solid rgba(255,150,180,.45);
    border-radius:14px;
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    backdrop-filter: blur(10px) saturate(120%);
    box-shadow: 0 18px 60px rgba(255,110,140,.22);
    transform: scale(.96) translateY(-8px);
    opacity:0;
    visibility:hidden;
    transition: .2s ease;
    z-index:10011;
    overflow:auto;
    max-height:70vh;
  }
  #mobile-menu.open{
    transform: scale(1) translateY(0);
    opacity:1;
    visibility:visible;
  }

  #mobile-menu ul{ list-style:none; padding:0; margin:0; }
  #mobile-menu li{ margin:0; }

  #mobile-menu .mm-title{
    color:#b02460;
    font-size:13px;
    padding:6px 12px 8px;
  }

  #mobile-menu .mm-subtitle{
    color:#b02460;
    font-weight:700;
    font-size:13px;
    padding:6px 12px 8px;
    border-radius:8px;
  }

  #mobile-menu a{
    display:block;
    padding:10px 12px;
    border-radius:10px;
    text-decoration:none;
    color:#3e1a2a;
    font-size:16px;
  }
  #mobile-menu a:hover{
    background: rgba(255,255,255,.45);
  }

  /* اگر divider دارید، به‌صورت خط جداکننده */
  #mobile-menu .divider{
    height: 1px;
    margin: 10px 0;
    background: linear-gradient(
      to left,
      rgba(255,105,150,.35),
      rgba(255,105,150,.15),
      rgba(255,105,150,.35)
    );
    border: none;
  }

  /* بک‌دراپ (اگر در HTML وجود دارد) */
  .mm-backdrop{ display:none !important; }
}

/* =========================
   محصولات و دسته‌بندی (Homepage)
   ========================= */
.products-section {
  padding: 44px 0 10px 0;
  background: #fff;
  margin: 24px auto 12px auto;
  max-width: 1080px;
  border-radius: 22px;
  box-shadow: 0 2px 16px rgba(0,0,0,.09);
}
.products-section h2,
#categories h2 {
  margin: 0 0 30px 0;
  text-align: center;
  color: var(--ai-pink-dark);
  font-size: 28px;
}

/* گرید پرفروش‌ها */
#bestseller-products {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: auto;
  gap: 16px;
}
/* موبایل: 2 ستونه */
@media (max-width: 700px) {
  #bestseller-products {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0;
  }
  #bestseller-products .square-card { width: 100%; }
}

/* کارت مربع محصول (صفحه اصلی و دسته) */
.products-grid-square {
  max-width: 1500px;
  margin: 40px auto 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px,1fr));
  gap: 56px 38px;
  padding: 0 20px;
}

.square-card { text-align: center; position: relative; }
.square-card figure {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f2f3f7;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 0 22px 0; overflow: hidden;
}
.square-card img { max-width: 80%; max-height: 80%; object-fit: contain; }
.square-card h2 { font-size: 20px; color: #222; margin: 0 0 8px 0; line-height: 1.6; }
.square-card .volume { color: #a30035; font-size: 19px; display: block; margin-bottom: 10px; }
.square-card .price { font-weight: 700; font-size: 18px; display: block; margin-bottom: 18px; }
.square-card .add-to-cart {
  background: var(--ai-pink); color: #fff; width: 60px; height: 45px;
  border: none; border-radius: 12px; font-size: 28px; cursor: pointer; transition: background .2s;
}
.square-card .add-to-cart:hover { background: var(--ai-pink-dark); }

@media (max-width: 780px) {
  .products-grid-square { gap: 40px 20px; }
  .square-card h2 { font-size: 17px; }
  .square-card .price { font-size: 16px; }
}

/* =========================
   دسته‌بندی‌ها
   ========================= */
#categories {
  margin: 30px auto 20px auto;
  max-width: 1150px;
  padding: 12px;
}

.category-section { margin: 36px 0 12px 0; }
.category-section h3 { color: #222; font-size: 21px; margin-bottom: 18px; }

.categories-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  justify-items: center;
  align-items: stretch;
}

.category-card{
  background: linear-gradient(145deg, #f3f3fa 60%, #fff2f7 100%);
  border-radius: 19px;
  box-shadow: 0 2px 7px rgba(46,140,255,0.06);
  padding: 14px 12px;
  width: 100%;
  max-width: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform .12s, box-shadow .16s, background .16s;
  text-decoration: none;
}

.category-card:hover{
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 10px 25px rgba(46,140,255,0.11);
  background: linear-gradient(145deg, #fff 55%, #f8e6f0 100%);
}

.category-card img{
  width: 96px;
  height: 96px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  margin: 0 auto 10px;
}

.category-card span{
  display: block;
  font-size: 15px;
  color: #303034;
  text-align: center;
  margin-top: 8px;
}

/* موبایلِ کارت‌ها */
@media (max-width: 600px) {
  .categories-row{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .category-card{ max-width: none; padding: 12px 8px; }
  .category-card img{ width: 90px; height: 90px; }
  .category-card span{ font-size: 14px; }
}

/* =========================
   Footer
   ========================= */
footer {
  background: #23222c;
  color: #eee;
  margin-top: 54px;
  padding: 28px 0 0 0;
  position: relative;
  overflow: hidden;
  background-image: url("/images/footer-bg.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
footer::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(40, 0, 0, 0.67);
  z-index: 0;
}
.footer-content, .footer-bottom { position: relative; z-index: 2; }

.footer-content {
  max-width: 1200px; margin: 0 auto; display: flex; gap: 60px;
  justify-content: space-between; padding: 0 34px; flex-wrap: wrap;
}
.footer-content div { flex: 1 1 300px; min-width: 210px; }
.footer-content ul { list-style: none; padding: 0; margin: 0; }
.footer-content a { color: #fff; text-decoration: none; transition: color .2s; }
.footer-content a:hover { color: #ffd6e1; }

.footer-bottom {
  text-align: center;
  background: rgba(27, 27, 36, 0.74);
  padding: 12px 0;
  margin-top: 18px;
  border-radius: 0 0 16px 16px;
  font-size: 14px;
  color: #f6c8d2;
}

@media (max-width: 900px) {
  .footer-content { flex-direction: column; gap: 22px; padding: 0 7vw; }
}

/* =========================
   Global Banner (در صورت وجود)
   ========================= */
/* =========================
   Global Banner (matches index.html #global-banner + gb-*)
   ========================= */
#global-banner{
  position: sticky;
  top: 0;
  z-index: 9999;
  background: rgba(255,110,140,.16);
  border-bottom: 1px solid rgba(255,110,140,.22);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  backdrop-filter: blur(8px) saturate(120%);
  padding: 8px 10px;
}

#global-banner .gb-inner{
  width: min(1180px, 92vw);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13.5px;
  line-height: 1.7;
  text-align: center;
}

#global-banner strong{ font-weight: 900; }

#global-banner .gb-link{
  color: #b02460;
  font-weight: 900;
  text-decoration: underline;
  background: rgba(255,255,255,.35);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
}

#global-banner .gb-close{
  border: none;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255,255,255,.32);
  color: #6a1345;
  font-size: 18px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 700px){
  #global-banner .gb-inner{ font-size: 12.7px; }
}

/* =========================
   Hero title glass background برای صفحات دسته
   ========================= */
.category-hero-title > h1 {
  font-size: clamp(20px, 4vw, 32px);
  margin: 0 0 14px 0;
  padding: 10px 20px;
  border-radius: 16px;

  background: linear-gradient(
    90deg,
    rgba(5, 5, 15, 0.70),
    rgba(5, 5, 15, 0.45)
  );
  color: #fff;

  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);

  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  line-height: 1.5;
}

@media (max-width: 700px) {
  .category-hero-title > h1 {
    font-size: 15px;
    padding: 6px 12px;
    margin-bottom: 10px;
    line-height: 1.7;
  }
}

/* جایگزین سازگاری‌گرا برای صفحات دسته (بدون :has) */
@media (max-width: 700px) {
  body.is-category .hero-row { padding-left: 92px; }
  body.is-category .main-nav { margin-top: 0 !important; }
  body.is-category .main-nav ul {
    max-width: calc(100vw - 136px);
    flex-wrap: nowrap; gap: 10px; padding: 6px 12px; margin: 0 auto;
  }
  body.is-category .main-nav a {
    display: block; max-width: 46vw; font-size: 16px; line-height: 1.25;
    white-space: normal; overflow-wrap: anywhere; text-align: center;
  }
}

/* =========================
   Responsive tweaks
   ========================= */
@media (max-width: 1200px) {
  .hero-center { width: 95vw; left: 50%; }
}

@media (max-width: 950px) {
  .hero-title { font-size: 20px; }
  .site-logo-large { width: 52px; }
  .main-nav ul { padding: 6px 8px; gap: 13px; }
  .cart-box { left: 6px; top: 13px; }
  .hero-center { width: 95vw; }
}

@media (max-width: 700px) {
  .site-logo-large { width: 32px; }

  /* فقط لندینگ: فضای کافی برای CTA/چیپ‌ها/مشاوره */
  body.landing{
    --hero-height: clamp(520px, 86vh, 760px);
    --hero-img-max: 760px;
  }

  /* مشکل اصلی: پایین‌تر آوردن مرکز محتوا + لحاظ safe-area */
  .hero-center{
    top: calc(62% + var(--hero-title-safe-offset) + var(--safe-top));
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(680px, 96vw);
    padding: 0 4vw;
    text-align: center;
  }

  /* موبایل خوانا + حرفه‌ای */
  .hero-title{
    font-size: clamp(18px, 4.8vw, 24px);
    letter-spacing: 0;
    margin: 0 0 10px 0;
  }
  .hero-desc{
    font-size: clamp(12.5px, 3.4vw, 15px);
    margin: 0 0 14px 0;
    line-height: 1.7;
  }

  .ai-advisor{ max-width: min(420px, 92vw); }
  .ai-advisor #ai-question{ font-size: 13px; }
  .ai-advisor #ai-ask{ font-size: 13px; padding: 10px 0; }
}

/* =========================
   Reduced Motion (دسترسی و پرفورمنس)
   ========================= */
.wave-hand { font-size: 23px; display: inline-block; animation: waveHand 1.4s ease-in-out infinite; }
@keyframes waveHand {
  0%,100% { transform: rotate(0deg); }
  20% { transform: rotate(15deg); }
  40% { transform: rotate(-11deg); }
  60% { transform: rotate(15deg); }
  80% { transform: rotate(-10deg); }
}

@media (prefers-reduced-motion: reduce) {
  .wave-hand { animation: none !important; }
  .category-card:hover,
  .square-card .add-to-cart:hover,
  .cart-box:hover { transform: none !important; transition: none !important; }
}

/* =========================
   Sunscreen category SEO/UX blocks
   ========================= */
.category-subtitle{
  margin: 0;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(0,0,0,.28);
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
  font-size: clamp(12px, 2.8vw, 16px);
  line-height: 1.7;
}

.category-intro{
  max-width: 1080px;
  margin: 16px auto 10px;
  padding: 14px 16px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(0,0,0,.08);
}
.category-intro p{ margin: 0; font-size: 15px; color: #333; }
.category-intro .price-range{
  display: inline-block;
  margin-right: 6px;
  color: #b02460;
  font-weight: 800;
}

.trust-badges{
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.trust-badges li{
  background: #f7f7fa;
  border: 1px solid #eee;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  color: #444;
}

.quick-picks{
  max-width: 1080px;
  margin: 10px auto 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.quick-picks .chip{
  border: 1px solid rgba(255,110,140,.35);
  background: #fff;
  color: #4a2232;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13.5px;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .12s, color .12s, border-color .12s;
  user-select: none;
}
.quick-picks .chip:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(255,110,140,.14);
}
.quick-picks .chip.active{
  background: var(--ai-pink);
  color: #fff;
  border-color: rgba(255,110,140,.65);
}
.quick-picks .pick-count{
  margin-right: auto;
  font-size: 13px;
  color: #666;
  padding: 4px 8px;
}

.compare-wrap{
  max-width: 1080px;
  margin: 0 auto 18px;
  padding: 14px 16px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(0,0,0,.08);
}
.compare-wrap h2{
  margin: 0 0 10px 0;
  font-size: 18px;
  color: #b02460;
}
.table-scroll{ overflow:auto; border-radius: 12px; border: 1px solid #f1d1dd; }
.compare-table{
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}
.compare-table th, .compare-table td{
  padding: 10px 12px;
  border-bottom: 1px solid #f3e3ea;
  text-align: right;
  font-size: 14px;
  vertical-align: middle;
}
.compare-table thead th{
  position: sticky;
  top: 0;
  background: #fff7fa;
  z-index: 1;
  font-weight: 800;
  color: #6a1345;
}
.compare-table a{
  color: #b02460;
  text-decoration: none;
  font-weight: 800;
}
.compare-table a:hover{ text-decoration: underline; }

.compare-note{
  margin: 10px 0 0;
  font-size: 12.5px;
  color: #666;
}

.is-hidden{ display: none !important; }

@media (max-width: 700px){
  .category-intro{ margin: 12px 10px 10px; }
  .quick-picks{ margin: 10px 10px 12px; }
  .compare-wrap{ margin: 0 10px 14px; }
  .quick-picks .chip{ font-size: 12.8px; padding: 7px 10px; }
}

/* =========================
   Category header stabilization (override)
   ========================= */
body.is-category .hero-header{
  height: auto;
  min-height: clamp(380px, 55vh, 560px);
  overflow: hidden;
}

body.is-category .hero-center{
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  margin: 0 auto;
  padding: calc(84px + var(--safe-top)) 14px 18px;
}

@media (max-width:700px){
  body.is-category .hero-center{
    padding-top: calc(96px + var(--safe-top));
  }
}

/* =========================
   Category layout + grid (override)
   ========================= */
body.is-category main.category-products{
  width: min(1180px, 92vw);
  margin-inline: auto;
  padding-inline: 14px;
}

body.is-category .products-grid-square{
  max-width: 100%;
  padding: 0;
  margin: 18px auto 50px;
  gap: 22px 14px;
}

@media (max-width:700px){
  body.is-category .products-grid-square{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }

  body.is-category .square-card h2{
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 6px;
    min-height: 44px;
  }

  body.is-category .square-card .add-to-cart{
    width: 100%;
    height: 40px;
    font-size: 16px;
  }
}

/* =========================
   Category cards look (override)
   ========================= */
body.is-category .square-card{
  background:#fff;
  border:1px solid #eee;
  border-radius: 18px;
  padding: 12px 12px 14px;
  box-shadow: 0 2px 14px rgba(0,0,0,.06);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

body.is-category .square-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0,0,0,.12);
  border-color: rgba(255,110,140,.35);
}

body.is-category .square-card figure{
  border-radius: 16px;
  margin: 0 0 12px 0;
  position: relative; /* برای badge ها */
  overflow: hidden;
}

/* =========================
   Badges + sticky quick-picks + flash (category)
   ========================= */
body.is-category .card-badges{
  position:absolute;
  top:10px;
  right:10px;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  z-index: 2;
}

body.is-category .badge{
  background: rgba(255,255,255,.92);
  border:1px solid rgba(255,110,140,.35);
  color:#6a1345;
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  box-shadow:0 8px 20px rgba(0,0,0,.08);
}

body.is-category .badge-spf{
  border-color: rgba(46,204,113,.40);
  color:#0d6a44;
  background: rgba(46,204,113,.14);
}

body.is-category .quick-picks{
  position: sticky;
  top: calc(52px + var(--safe-top));
  z-index: 60;
  background: rgba(250,251,252,.88);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
          backdrop-filter: blur(8px) saturate(120%);
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,110,140,.18);
}

body.is-category .square-card.flash{
  outline: 3px solid rgba(255,110,140,.35);
  outline-offset: 4px;
}
