/* =============================================
   Khabco — Home Page CSS
   فایل: assets/css/home.css
   ============================================= */

/* ──────────────────────────────────────────────
   UTILS
────────────────────────────────────────────── */
.home-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--c-text);
  position: relative;
  padding-right: 16px;
}

.section-title::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 26px;
  background: linear-gradient(180deg, var(--c-primary-light), var(--c-primary));
  border-radius: 4px;
}

.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--trans-fast);
}

.section-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transform: scaleX(-1);
}

.section-link:hover {
  color: var(--c-primary-light);
}

/* ──────────────────────────────────────────────
   HERO SLIDER
────────────────────────────────────────────── */
.hero-section {
  padding: 35px 0 0px;
  background: #fff;
}

.hero-swiper-wrapper {
  width: 100%;
  max-width: var(--container, 1200px);
  margin: 0 auto;
  padding: 0 var(--container-pad, 20px) 56px;
  box-sizing: border-box;
  position: relative; /* containing block for .hero-controls */
}

.hero-swiper {
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
  position: relative;
}

.hero-slide {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 380px;
  background: #eee;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  display: block;
}

/* ── کارت کنترل‌ها ── */
.hero-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  height: 45px;
  width: fit-content;
  position: absolute;
  bottom: 56px; /* = padding-bottom رپر — کنترل‌ها دقیقاً روی لبه پایین slider */
  left: 0; right: 0;
  margin: 0 auto;
  z-index: 10;
  white-space: nowrap;
}

.hero-controls::before,
.hero-controls::after {
  content: "";
  width: 25px;
  height: 26px;
  border-bottom: 8px solid #fff;
  background: none;
  position: absolute;
  top: 26px;
}

.hero-controls::before {
  right: -16.4px;
  border-left: 8px solid #fff;
  border-radius: 0 0 0 39px;
  transform: rotate(3deg);
}

.hero-controls::after {
  left: -16.4px;
  border-right: 8px solid #fff;
  border-radius: 0 0 39px 0;
  transform: rotate(-3deg);
}

.hero-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  color: #0f4f59;
  padding: 0;
}

.hero-nav-btn:hover {
  color: #0f4f59;
}

.hero-nav-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

/* پیگینیشن */
.hero-pagination {
  position: static;
  display: flex;
  align-items: center;
  width: auto;
}

.hero-pagination .swiper-pagination-bullet {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c8c8c8;
  opacity: 1;
  margin: 0;
  transition: all 0.4s ease;
}

.hero-pagination .swiper-pagination-bullet-active {
  background: #0f4f59;
  transform: scale(1.2);
}

/* ──────────────────────────────────────────────
   BRANDS MARQUEE  (CSS-only — no Swiper)
────────────────────────────────────────────── */
.brands-section {
  background: #fff;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  padding: 0;
  overflow: hidden;
}

.brands-inner {
  max-width: var(--container, 1200px);
  margin: 0 auto;
  padding: 0 var(--container-pad, 20px);
  display: flex;
  align-items: center;
  height: 80px;
  gap: 24px;
}

.brands-label {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 4px;
}

.brands-title {
  font-size: 20px;
  font-weight: 600;
  color: #0f4f59;
  white-space: nowrap;
}

.brands-sub {
  margin-top: 5px;
  font-size: 13px;
  color: #2e2e2e;
  white-space: nowrap;
}

.brands-divider {
  width: 1px;
  height: 60px;
  background: #e8e8e8;
  flex-shrink: 0;
}

.brands-track-wrapper {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.brand-slide {
  width: 130px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-item img {
  height: 52px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  opacity: 0.55;
  transition: opacity 0.3s ease;
  display: block;
}

.brand-logo-item img:hover { opacity: 1; }

.brand-logo-item:hover img { opacity: 1; }


/* ──────────────────────────────────────────────
   CATEGORIES SECTION
────────────────────────────────────────────── */
.cats-section {
  padding: 45px 0 45px;
  background: #fff;
}

.cats-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.cats-section-link {
  font-size: 0.875rem;
  color: var(--color-primary, #2563eb);
  text-decoration: none;
}

.cats-section-link:hover {
  text-decoration: underline;
}

.cats-slider {
  overflow: hidden;
  width: 100%;
  padding-bottom: 40px;
}

.cats-slider .swiper-wrapper {
  align-items: flex-start;
}

.cats-slider .swiper-slide {
  display: flex;
  justify-content: center;
}

/* ─── CIRCLE CARD ─── */
.cat-circle-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
  position: relative;
}

.cat-circle-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background-color: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cat-circle-img img {
  width: 100%;
  height: 100%;
  transition: transform 0.25s ease;
}

.cat-circle-card:hover .cat-circle-img img {
  transform: translate3d(0%, 3%, 100px) scale(1.25);
  transition: transform 0.5s ease;
}

.cat-circle-title {
  font-weight: 400;
  color: #374151;
  text-align: center;
}

/* ─── PAGINATION DOTS ─── */
.cats-pagination {
  bottom: 0;
  display: flex;
  justify-content: center;
}

.cats-pagination .swiper-pagination-bullet {
  width: 7px;
  height: 7px;
  background: #d1d5db;
  opacity: 1;
  border-radius: 50%;
  transition: background 0.2s, width 0.2s;
}

.cats-pagination .swiper-pagination-bullet-active {
  background: var(--color-primary, #0f4f59);
  width: 24px;
  border-radius: 4px;
}

/* ─── SVG ANIMATION ─── */
.cat-circle-card .button-sound__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  pointer-events: none;
}

.cats-slider .swiper-wrapper .swiper-slide a.item svg circle {
  transition: 0.8s;
  stroke-linecap: round;
  stroke-dasharray: 1.01;
  stroke-dashoffset: 1.01;
  stroke-width: 0.3px;
  transform: rotate(5deg);
  transform-origin: center;
}

.cats-slider .swiper-wrapper .swiper-slide:hover .item svg circle {
  stroke-dashoffset: 2.02;
  transform: rotate(90deg) scale(1.02);
}

/* ──────────────────────────────────────────────
   بنر تبلیغاتی
────────────────────────────────────────────── */
.sidebar-ad-banners {
  max-width: var(--container, 1200px);
  margin:0 auto 45px;
  padding: 0 var(--container-pad, 20px);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.sidebar-ad-item {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-ad-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.sidebar-ad-item a {
  display: block;
  text-decoration: none;
}

.sidebar-ad-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

/* ──────────────────────────────────────────────
   MATTRESS SECTION
────────────────────────────────────────────── */
.mattress-section {
  max-width: var(--container, 1250px);
  margin: 0 auto 3rem;
  padding: 0 var(--container-pad, 20px);
  box-sizing: border-box;
}

.mattress-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.mattress-section__slider {
  position: relative;
}

.mattress-swiper {
  width: 100%;
}

/* دکمه‌های ناوبری */
.mattress-section__slider .swiper-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  background: #0f4f59;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  color: #f0f9f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.mattress-nav-prev {
  right: -20px;
}

.mattress-nav-next {
  left: -20px;
}

.mattress-section__slider .swiper-nav-btn:hover {
  background: #f0f9f9;
  border-color: #0f4f59;
  color: #0f4f59;
}

.mattress-section__slider .swiper-nav-btn.swiper-button-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.mattress-section__title {
  font-size: 20px;
  color: #0f4f59;
}

.mattress-section__view-all {
  background: #f0f9f9;
  color: #0f4f59;
  border: 1px solid #0f4f59;
  padding: 9px 20px;
  border-radius: 50px;
  font-variation-settings: "wght" 450;
}

/* فقط wrapper باید visible باشه، نه swiper اصلی */
.mattress-swiper.swiper {
    overflow: hidden; /* ← از visible به hidden برگردون */
    padding-bottom: 12px
}

.mattress-swiper .swiper-wrapper {
    overflow: visible !important;
}

/* ──────────────────────────────────────────────
   بنر تبلیغاتی میانی
────────────────────────────────────────────── */
.promo-banner-section {
    max-width: var(--container, 1200px);
    margin: 0 auto 45px;
    padding: 0 16px;
    direction: rtl;
}

.promo-banner-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
    align-items: stretch;
}

.promo-banner-item {
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.promo-banner-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.promo-banner-item a {
    display: block;
    height: 100%;
    text-decoration: none;
}

.promo-banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* بنر بزرگ — aspect-ratio ارتفاع سطر گرید را تعیین می‌کند */
.promo-banner-large {
    grid-column: 1;
    aspect-ratio: 2000 / 730;
}

.promo-banner-large img {
    object-position: center center;
}

/* ──────────────────────────────────────────────
   بنر میانی
────────────────────────────────────────────── */
.promo-section {
  padding: 0 0 56px;
}

.promo-banner {
  border-radius: var(--r-xl);
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, var(--c-primary) 0%, #0e6878 45%, #0d8a9e 100%);
  padding: 52px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.promo-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.promo-banner::after {
  content: '';
  position: absolute;
  left: -80px;
  top: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.promo-content {
  position: relative;
  z-index: 1;
}

.promo-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--r-full);
  margin-bottom: 16px;
}

.promo-title {
  font-size: 30px;
  font-weight: 900;
  color: #fff;
  line-height: 1.45;
  margin-bottom: 10px;
}

.promo-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
  margin-bottom: 24px;
  max-width: 440px;
}

.promo-features {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.promo-feature {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.promo-feature svg {
  width: 16px;
  height: 16px;
  stroke: var(--c-primary-light);
  fill: none;
  stroke-width: 2.5;
}

.promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--r-full);
  background: #fff;
  color: var(--c-primary);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: var(--trans-base);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.promo-btn:hover {
  background: #f0f9f9;
  color: var(--c-dark);
  transform: translateY(-2px);
}

.promo-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transform: scaleX(-1);
}

.promo-visual {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  gap: 12px;
}

.promo-stat {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  text-align: center;
  backdrop-filter: blur(8px);
  min-width: 110px;
}

.promo-stat-num {
  font-size: 30px;
  font-weight: 900;
  color: #fff;
  display: block;
  margin-bottom: 4px;
  line-height: 1;
}

.promo-stat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

/* ── شبکه‌های اجتماعی داخل promo ── */
.promo-socials {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.promo-socials__label {
  font-size: 12px;
  color: rgba(255,255,255,.6);
  white-space: nowrap;
}

.promo-socials__icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.promo-social {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  transition: all .2s ease;
  position: relative;
}

.promo-social svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.promo-social img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  filter: grayscale(1) brightness(1.8);
  opacity: 0.85;
  transition: filter .25s, opacity .25s, transform .25s;
}
.promo-social:hover img {
  filter: none;
  opacity: 1;
  transform: scale(1.12);
}

.promo-social:hover {
  transform: translateY(-3px);
  background: #fff;
  border-color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
}

/* tooltip */
.promo-social[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}

.promo-social[data-tooltip]:hover::after {
  opacity: 1;
}

/* ──────────────────────────────────────────────
   MATTRESS PROTECTOR SECTION
────────────────────────────────────────────── */
.protector-section {
  max-width: var(--container, 1250px);
  margin: 0 auto 3rem;
  padding: 0 var(--container-pad, 20px);
  box-sizing: border-box;
}

.protector-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.protector-section__slider {
  position: relative;
}

.protector-swiper.swiper {
  width: 100%;
  overflow: hidden;
  padding-bottom: 12px;
}

.protector-swiper .swiper-wrapper {
  overflow: visible !important;
}

.protector-section__slider .swiper-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  background: #0f4f59;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  color: #f0f9f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.protector-nav-prev { right: -20px; }
.protector-nav-next { left:  -20px; }

.protector-section__slider .swiper-nav-btn:hover {
  background: #f0f9f9;
  border-color: #0f4f59;
  color: #0f4f59;
}

.protector-section__slider .swiper-nav-btn.swiper-button-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.protector-section__title {
  font-size: 20px;
  color: #0f4f59;
}

.protector-section__view-all {
  background: #f0f9f9;
  color: #0f4f59;
  border: 1px solid #0f4f59;
  padding: 9px 20px;
  border-radius: 50px;
  font-variation-settings: "wght" 450;
}

/* =============================================
   Section Blog
   ============================================= */

.section-blog {
    width: 100%;
    padding: 0 0 45px;
}

.blog-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.blog-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.blog-header-right {
    text-align: right;
}

.blog-section-title {
    font-size: 20px;
    color: #0f4f59;
    margin: 0 0 4px;
}

.blog-section-subtitle {
    font-size: 14px;
    color: #222222;
    margin: 0;
}

.blog-header-left {
    display: flex;
    align-items: center;
    color: rgb(15, 79, 89);
    font-variation-settings: "wght" 450;
    background: rgb(240, 249, 249);
    border-width: 1px;
    border-style: solid;
    border-color: rgb(15, 79, 89);
    border-image: initial;
    padding: 9px 20px;
    border-radius: 50px;
}

.blog-swiper {
    overflow: visible;
    clip-path: inset(0 0 -40px 0);
    padding-bottom: 48px;
}

.blog-swiper .swiper-slide {
    height: auto;
    position: relative;
    overflow: visible !important;
}

.blog-swiper .swiper-slide::after {
    content: '';
    position: absolute;
    width: 90%;
    height: 10px;
    left: 0;
    right: 0;
    bottom: -8px;
    margin: 0 auto;
    background: #e8e8e8;
    border-radius: 0 0 20px 20px;
    transition: background 0.3s ease;
    z-index: 0;
}

.blog-swiper .swiper-slide:hover::after {
    background: #0f4f59;
}

/* ── Pagination ── */
.blog-swiper-pagination {
    bottom: 0 !important;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.blog-swiper-pagination .swiper-pagination-bullet {
    width: 7px;
    height: 7px;
    background: #ccc;
    border-radius: 50%;
    opacity: 1;
    transition: background 0.2s, transform 0.2s;
    cursor: pointer;
}

.blog-swiper-pagination .swiper-pagination-bullet-active {
    background: #0f4f59;
    transform: scale(1.3);
}








/* ── SEO Text Sections ── */
.kh-seo-about {
    padding: 28px 0;
    background: var(--c-off-white);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.kh-seo-about__grid {
    display: block;
    width: 100%;
}

.kh-seo-about p {
    font-size: 14px;
    line-height: 1.9;
    color: var(--c-text);
    text-align: justify;
    margin: 0;
}

.kh-seo-about__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--c-text);
    text-align: center;
    margin-bottom: 16px;
}

.kh-seo-about a {
    color: var(--c-primary);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color var(--trans-fast);
}

.kh-seo-about a:hover {
    text-decoration-color: var(--c-primary);
}

/* ── Mattress Section Desc ── */
.mattress-section__header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mattress-section__desc {
    font-size: 13px;
    color: var(--c-muted);
    margin: 0;
}

/* ── دسترسی‌پذیری: بزرگ‌کردن ناحیه لمسی نقطه‌های pagination
   بدون تغییر ظاهر (طبق استاندارد حداقل ۲۴×۲۴ پیکسل) ── */
.swiper-pagination-bullet {
    position: relative;
}
.swiper-pagination-bullet::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 24px; height: 24px;
    transform: translate(-50%, -50%);
}
