/* =====================================================
   HatLand — Home: hero slider, categories, promo, tabs, testimonials, blog, newsletter
   ===================================================== */

/* ---------- Hero slider ---------- */
.hl-hero { position: relative; background: var(--hl-bg); }
.hl-hero__viewport { position: relative; overflow: hidden; }
.hl-hero__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s; }
.hl-hero__slide.is-active { position: relative; opacity: 1; visibility: visible; z-index: 2; }
.hl-hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.12); transition: transform 7s cubic-bezier(.22,1,.36,1);
}
.hl-hero__slide.is-active .hl-hero__img { transform: scale(1.02); }
.hl-hero__slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to left, rgba(33,29,25,.5) 0%, rgba(33,29,25,.18) 42%, transparent 68%);
}
.hl-hero__content {
  position: relative; z-index: 3; min-height: clamp(430px, 46vw, 600px);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  color: #fff; padding-block: 46px; max-width: 560px;
}
.hl-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(6px); border-radius: 999px; padding: 8px 16px; margin-bottom: 18px;
}
.hl-hero__title { color: #fff; font-size: clamp(28px, 4.6vw, 52px); font-weight: 800; line-height: 1.45; text-shadow: 0 2px 24px rgba(0,0,0,.25); }
.hl-hero__sub { font-size: clamp(14px, 1.6vw, 16.5px); opacity: .92; margin-top: 12px; max-width: 440px; }
.hl-hero__btns { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hl-hero__slide.is-active .hl-hero__content > * { animation: hlHeroIn .8s cubic-bezier(.22,1,.36,1) both; }
.hl-hero__slide.is-active .hl-hero__content > :nth-child(2) { animation-delay: .12s; }
.hl-hero__slide.is-active .hl-hero__content > :nth-child(3) { animation-delay: .22s; }
.hl-hero__slide.is-active .hl-hero__content > :nth-child(4) { animation-delay: .32s; }
@keyframes hlHeroIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

.hl-hero__nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.9); color: var(--hl-ink); box-shadow: var(--hl-shadow);
  transition: all .2s ease; opacity: 0;
}
.hl-hero:hover .hl-hero__nav-btn { opacity: 1; }
.hl-hero__nav-btn:hover { background: var(--hl-primary); color: #fff; }
.hl-hero__nav-btn .hl-icon { width: 20px; height: 20px; }
.hl-hero__nav--prev { inset-inline-start: 22px; }
.hl-hero__nav--next { inset-inline-end: 22px; }

.hl-hero__dots {
  position: absolute; bottom: 22px; inset-inline-start: 50%; transform: translateX(50%);
  z-index: 5; display: flex; gap: 8px;
}
.hl-hero__dot {
  width: 26px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.45);
  transition: all .3s ease;
}
.hl-hero__dot.is-active { width: 44px; background: #fff; }

/* ---------- Features strip ---------- */
.hl-features { background: var(--hl-surface); border-block: 1px solid var(--hl-line); }
.hl-features__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-block: 26px; }
.hl-feature { display: flex; align-items: center; gap: 14px; }
.hl-feature__icon {
  width: 52px; height: 52px; border-radius: 16px; flex-shrink: 0;
  background: var(--hl-primary-soft); color: var(--hl-primary); display: grid; place-items: center;
}
.hl-feature__icon .hl-icon { width: 24px; height: 24px; }
.hl-feature__t { font-weight: 700; font-size: 14.5px; }
.hl-feature__s { font-size: 12.5px; color: var(--hl-ink-soft); }

/* ---------- Categories ---------- */
.hl-cats-group + .hl-cats-group { margin-top: clamp(30px, 4vw, 46px); }
.hl-cats-row {
  display: flex; gap: 18px; overflow-x: auto; padding-bottom: 8px;
  scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none;
}
.hl-cats-row::-webkit-scrollbar { display: none; }
.hl-cat-card {
  scroll-snap-align: start; flex: 0 0 218px; position: relative;
  border-radius: var(--hl-radius-lg); overflow: hidden; background: var(--hl-surface);
  border: 1px solid var(--hl-line); transition: all .3s ease;
}
.hl-cat-card:hover { transform: translateY(-5px); box-shadow: var(--hl-shadow-lg); border-color: transparent; }
.hl-cat-card__img { aspect-ratio: 1 / .92; overflow: hidden; }
.hl-cat-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hl-cat-card:hover .hl-cat-card__img img { transform: scale(1.07); }
.hl-cat-card__body { padding: 15px 17px 17px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hl-cat-card__name { font-weight: 700; font-size: 15px; }
.hl-cat-card__count { font-size: 12px; color: var(--hl-ink-soft); margin-top: 2px; }
.hl-cat-card__arrow {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--hl-bg); color: var(--hl-ink); flex-shrink: 0; transition: all .25s ease;
}
.hl-cat-card:hover .hl-cat-card__arrow { background: var(--hl-primary); color: #fff; }
.hl-cat-card__arrow .hl-icon { width: 15px; height: 15px; }

/* Carousel nav (مشترک) */
.hl-car-nav { display: flex; gap: 8px; }
.hl-car-btn {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--hl-surface); border: 1.5px solid var(--hl-line); color: var(--hl-ink);
  transition: all .2s ease;
}
.hl-car-btn:hover { background: var(--hl-ink); border-color: var(--hl-ink); color: #fff; }
.hl-car-btn .hl-icon { width: 17px; height: 17px; }

/* ---------- Promo banners ---------- */
.hl-promo__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.hl-promo-card {
  position: relative; border-radius: var(--hl-radius-lg); overflow: hidden; min-height: 300px;
  display: flex; align-items: flex-end; isolation: isolate;
}
.hl-promo-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform .7s ease; }
.hl-promo-card:hover img { transform: scale(1.05); }
.hl-promo-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(33,29,25,.62), rgba(33,29,25,.06) 55%); z-index: 0; }
.hl-promo-card__body { position: relative; z-index: 1; color: #fff; padding: 28px; }
.hl-promo-card__tag { font-size: 12.5px; font-weight: 700; background: rgba(255,255,255,.16); backdrop-filter: blur(4px); padding: 6px 13px; border-radius: 999px; display: inline-block; margin-bottom: 12px; }
.hl-promo-card__t { color: #fff; font-size: clamp(19px, 2.4vw, 25px); font-weight: 800; }
.hl-promo-card__s { opacity: .9; font-size: 13.5px; margin-top: 6px; }
.hl-promo-card__link { margin-top: 18px; }

/* ردیف کارت محصول (کاروسل افقی) — کارت‌ها مربع و هم‌اندازه */
.hl-prod-row {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: clamp(230px, 22.5vw, 285px);
  gap: 20px; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none;
  padding-bottom: 6px;
}
.hl-prod-row::-webkit-scrollbar { display: none; }
.hl-prod-row .hl-product-card { scroll-snap-align: start; }

/* ---------- Product tabs ---------- */
.hl-tabs__bar { display: inline-flex; gap: 6px; background: var(--hl-surface); border: 1.5px solid var(--hl-line); border-radius: 999px; padding: 5px; }
.hl-tab-btn { padding: 10px 22px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--hl-ink-soft); transition: all .25s ease; }
.hl-tab-btn:hover { color: var(--hl-primary); }
.hl-tab-btn.is-active { background: var(--hl-ink); color: #fff; }
.hl-tab-panel { display: none; margin-top: 26px; }
.hl-tab-panel.is-active { display: block; }

/* ---------- Testimonials ---------- */
.hl-testi { background: var(--hl-ink); color: #fff; }
.hl-testi .hl-eyebrow { color: var(--hl-accent); }
.hl-testi .hl-eyebrow::before { background: var(--hl-accent); }
.hl-testi .hl-section-head h2 { color: #fff; }
.hl-testi__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.hl-testi-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--hl-radius-lg); padding: 28px; backdrop-filter: blur(6px);
  display: flex; flex-direction: column; gap: 16px; transition: all .3s ease;
}
.hl-testi-card:hover { background: rgba(255,255,255,.09); transform: translateY(-4px); }
.hl-testi__stars { display: flex; gap: 3px; color: var(--hl-accent); }
.hl-testi__stars .hl-icon { width: 16px; height: 16px; }
.hl-testi__text { font-size: 14.5px; line-height: 2; color: rgba(255,255,255,.88); }
.hl-testi__who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.hl-testi__avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--hl-primary); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 16px;
}
.hl-testi__name { font-weight: 700; font-size: 14px; }
.hl-testi__role { font-size: 12px; color: rgba(255,255,255,.6); }

/* ---------- Blog cards ---------- */
.hl-blog__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.hl-post-card {
  background: var(--hl-surface); border: 1px solid var(--hl-line); border-radius: var(--hl-radius-lg);
  overflow: hidden; transition: all .3s ease; display: flex; flex-direction: column;
}
.hl-post-card:hover { transform: translateY(-5px); box-shadow: var(--hl-shadow-lg); }
.hl-post-card__img { aspect-ratio: 16/10; overflow: hidden; position: relative; }
.hl-post-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hl-post-card:hover .hl-post-card__img img { transform: scale(1.06); }
.hl-post-card__date {
  position: absolute; top: 14px; inset-inline-start: 14px; z-index: 2;
  background: rgba(255,255,255,.92); backdrop-filter: blur(4px); border-radius: 999px;
  padding: 6px 14px; font-size: 12px; font-weight: 700;
}
.hl-post-card__body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.hl-post-card__cat { color: var(--hl-primary); font-size: 12.5px; font-weight: 700; margin-bottom: 8px; }
.hl-post-card__t { font-size: 16.5px; font-weight: 800; line-height: 1.7; }
.hl-post-card__t a:hover { color: var(--hl-primary); }
.hl-post-card__excerpt { color: var(--hl-ink-soft); font-size: 13.5px; margin-top: 8px; }
.hl-post-card__more { margin-top: auto; padding-top: 16px; font-weight: 700; font-size: 13.5px; color: var(--hl-primary); display: inline-flex; align-items: center; gap: 6px; }
.hl-post-card__more .hl-icon { width: 15px; height: 15px; }

/* ---------- Newsletter ---------- */
.hl-news { margin-bottom: 0; }
.hl-news__box {
  background: linear-gradient(120deg, var(--hl-primary), var(--hl-primary-dark) 70%);
  border-radius: var(--hl-radius-lg); padding: clamp(30px, 5vw, 56px);
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 28px;
  color: #fff; position: relative; overflow: hidden;
}
.hl-news__box::before {
  content: ''; position: absolute; inset-inline-start: -60px; top: -80px;
  width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.09);
}
.hl-news__box::after {
  content: ''; position: absolute; inset-inline-end: 32%; bottom: -110px;
  width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.07);
}
.hl-news__t { font-size: clamp(20px, 2.6vw, 27px); color: #fff; font-weight: 800; position: relative; z-index: 1; }
.hl-news__s { opacity: .92; margin-top: 8px; font-size: 14.5px; position: relative; z-index: 1; }
.hl-news__form { position: relative; z-index: 1; display: flex; gap: 10px; min-width: min(420px, 100%); }
.hl-news__form .hl-input { border: 0; background: #fff; border-radius: 999px; padding-inline: 24px; }
.hl-news__form .hl-btn { box-shadow: 0 10px 24px -8px rgba(33,29,25,.4); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hl-features__grid { grid-template-columns: repeat(2, 1fr); }
  .hl-promo__grid, .hl-testi__grid, .hl-blog__grid { grid-template-columns: 1fr; }
  .hl-testi__grid { gap: 16px; }
  .hl-news__box { grid-template-columns: 1fr; }
  .hl-news__form { min-width: 0; }
  .hl-hero__nav-btn { display: none; }
}
@media (max-width: 560px) {
  .hl-features__grid { grid-template-columns: 1fr; gap: 14px; }
  .hl-cat-card { flex-basis: 172px; }
  .hl-news__form { flex-direction: column; }
}
