/*
  components.css
  ---------------------------------------------------------------------------
  استایل کامپوننت‌های مشترک (Header, Mega Menu, Search Overlay, Hero,
  Section Header, Product Card/Grid, Article Card/Grid, CTA, Factory,
  Slogan Marquee, Footer, Floating UI, Modal).
  هر کامپوننت دقیقاً یک‌بار تعریف می‌شود و در چند بخش صفحه/فایل بازاستفاده می‌شود
  (طبق Component Map). Mobile-first: حالت پایه = موبایل، سپس min-width.
  ---------------------------------------------------------------------------
*/

.container-custom {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

@media (min-width: 768px) {
  .container-custom {
    padding-inline: var(--space-4);
  }
}

/* =========================================================================
   HEADER — Phase 2.2 independent bands
   ========================================================================= */


body.is-header-compact {
  --header-top-current-height: var(--header-row1-compact-height);
}

.site-header-top {
  position: sticky;
  top: 0;
  z-index: calc(var(--z-header) + 20);
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--duration-base) var(--ease-standard);
}

.header-row1 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--header-top-current-height);
  padding-inline: var(--space-3);
  transition: min-height var(--duration-slow) var(--ease-standard), padding var(--duration-slow) var(--ease-standard);
}

body.is-header-compact .header-row1 {
  min-height: var(--header-row1-compact-height);
}

body.is-header-compact .site-header-top {
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .header-row1 {
    padding-inline: var(--space-4);
  }
}

.header-logo {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.header-logo img {
  display: block;
  width: auto;
  height: 46px;
  object-fit: contain;
  transition: height var(--duration-slow) var(--ease-standard);
}

@media (min-width: 992px) {
  .header-logo img {
    height: 54px;
  }

  body.is-header-compact .header-logo img {
    height: 42px;
  }
}

.header-search-trigger {
  display: none;
}

@media (min-width: 992px) {
  .header-search-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    justify-self: center;
    width: min(100%, 560px);
    padding: 10px var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    text-align: right;
    transition: border-color var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard);
  }

  .header-search-trigger:hover,
  .header-search-trigger:focus-visible {
    border-color: var(--color-burgundy);
    box-shadow: 0 0 0 3px var(--focus-ring-burgundy);
  }
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  white-space: nowrap;
}

.header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  color: var(--color-primary);
}

.header-icon-btn:hover {
  background: var(--color-surface);
}

@media (min-width: 992px) {
  .header-icon-btn[data-search-open] {
    display: none;
  }
}

.btn-contact-experts {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px var(--space-4);
  background: var(--color-primary);
  color: var(--color-text-on-dark);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
  transition: background var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard), transform var(--duration-base) var(--ease-standard);
}

.btn-contact-experts:hover {
  background: var(--color-burgundy);
  border-color: var(--color-burgundy);
  color: var(--color-text-on-dark);
  transform: translateY(-1px);
}

/* ---- Independent Navigation Band ---- */

.site-header-nav {
  position: sticky;
  top: var(--header-top-current-height);
  z-index: var(--z-header);
  background: var(--color-primary);
  color: var(--color-text-on-dark);
  border-bottom: 1px solid rgba(var(--color-white-rgb), .08);
  max-height: var(--header-row2-height);
  opacity: 1;
  overflow: visible;
  transition: max-height var(--duration-slow) var(--ease-standard), opacity var(--duration-base) var(--ease-standard), transform var(--duration-slow) var(--ease-standard);
}

.site-header-nav.is-hidden {
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  border-bottom-color: transparent;
  overflow: hidden;
}

.header-nav-inner {
  min-height: var(--header-row2-height);
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: stretch;
  gap: var(--space-4);
}

.main-nav-links {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: clamp(14px, 2vw, 30px);
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
}

.main-nav-links>li {
  display: flex;
  align-items: stretch;
  position: relative;
}

.main-nav-links a,
.main-nav-links button.nav-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding-inline: 4px;
  background: transparent;
  border: 0;
  color: black;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  position: relative;
  white-space: nowrap;
}

.main-nav-links a::after,
.main-nav-links button.nav-link-btn::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--color-burgundy);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--duration-base) var(--ease-standard);
}

.main-nav-links a:hover::after,
.main-nav-links a:focus-visible::after,
.main-nav-links button.nav-link-btn:hover::after,
.main-nav-links button.nav-link-btn:focus-visible::after,
.main-nav-links .has-mega.is-open button.nav-link-btn::after {
  transform: scaleX(1);
}

.nav-contact-group {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.nav-contact-start {
  justify-content: flex-start;
}

.nav-contact-end {
  justify-content: flex-end;
}

.nav-contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding-inline: 7px;
  color: var(--color-metal-light);
  border-radius: var(--radius-sm);
  font-size: 12px;
  white-space: nowrap;
  transition: color var(--duration-base) var(--ease-standard), background var(--duration-base) var(--ease-standard);
}

.nav-contact-link:hover,
.nav-contact-link:focus-visible {
  color: var(--color-white);
  background: var(--overlay-light-06);
}

.nav-whatsapp:hover {
  color: #d7eadf;
}

/* ---- Mega Menu ---- */

.mega-menu {
  position: absolute;
  top: calc(100% + 1px);
  transform: translateX(50%) translateY(-8px);
  width: min(1120px, calc(100vw - 32px));
  max-height: min(72vh, 620px);
  overflow: auto;
  background: var(--color-surface-alt);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-standard), transform var(--duration-base) var(--ease-standard), visibility 0s linear var(--duration-base);
  z-index: var(--z-mega-menu);
  left: -1500%;
}

/* توجه: عمداً فقط .is-open (کنترل‌شده با JS) استفاده می‌شود، نه یک قانون
   موازی .has-mega:hover — وجود هم‌زمان هر دو باعث می‌شد CSS خام (بدون تأخیر
   بستن ۲۰۰ms) و JS (با تأخیر) گاهی با هم ناهماهنگ شوند و منو رفتار لرزان/
   نامرتب نشان دهد. اکنون فقط یک منبع کنترل وجود دارد. */
.has-mega.is-open .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(50%) translateY(0);
  transition-delay: 0s;
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  gap: var(--space-3);
}

.mega-menu-column {
  display: block;
  min-width: 0;
  padding: var(--space-2);
  border-inline-start: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: background var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard);
}

.mega-menu-column:first-child {
  border-inline-start: 0;
}

.mega-menu-column:hover,
.mega-menu-column:focus-visible {
  background: var(--color-surface);
  border-color: var(--color-metal);
}

.mega-menu-column img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
}

.mega-menu-column h3 {
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0 0 6px;
  font-weight: var(--font-weight-bold);
}

.mega-menu-column .mega-menu-desc {
  min-height: 44px;
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-2);
}

.mega-menu-column>span {
  display: inline-flex;
  color: var(--color-burgundy);
  font-size: 0.75rem;
  font-weight: var(--font-weight-medium);
}

.mega-menu-footer {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.mega-menu-footer a {
  bottom: 0%;
  padding-top: 20%;
  color: var(--color-burgundy);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

@media (max-width: 1199.98px) and (min-width: 992px) {
  .header-nav-inner {
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-2);
  }

  .nav-contact-link span {
    display: none;
  }

  .main-nav-links {
    gap: 15px;
  }

  .nav-contact-group {
    gap: 2px;
  }
}

@media (max-width: 991.98px) {
  .site-header-nav {
    display: none;
  }

  .header-row1 {
    grid-template-columns: auto 1fr auto;
  }

  .header-actions {
    gap: 2px;
  }

  .btn-contact-experts {
    padding-inline: 10px;
  }
}

@media (max-width: 575.98px) {
  .header-row1 {
    min-height: 68px;
    padding-inline: 12px;
    gap: 8px;
  }

  body.is-header-compact .header-row1 {
    min-height: 60px;
  }

  .header-logo img {
    height: 40px;
  }

  .btn-contact-experts {
    font-size: 0;
    width: 40px;
    padding: 0;
  }

  .btn-contact-experts::before {
    content: "↗";
    font-size: 18px;
    line-height: 1;
  }
}

/* =========================================================================
   SEARCH OVERLAY
   ========================================================================= */

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-search-overlay);
  background: var(--overlay-dark-55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-base) var(--ease-standard);
}

.search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.search-overlay-panel {
  width: 100%;
  height: 100%;
  background: var(--color-surface-alt);
  padding: var(--space-4);
  transform: scale(0.98);
  transition: transform var(--duration-base) var(--ease-standard);
  overflow-y: auto;
}

.search-overlay.is-open .search-overlay-panel {
  transform: scale(1);
}

@media (min-width: 992px) {
  .search-overlay-panel {
    width: 58vw;
    max-width: 760px;
    height: auto;
    max-height: 80vh;
    margin-top: 8vh;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
  }
}

.search-overlay-input-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: var(--space-2);
}

.search-overlay-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: var(--font-size-lg);
  background: transparent;
  color: var(--color-text);
}

.search-overlay-close {
  border: none;
  background: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}

.search-overlay-close:hover {
  background: var(--color-surface);
}

.search-overlay-hint {
  margin-top: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* =========================================================================
   SEARCH PAGE (/search/) — کلاس‌های اختصاصی، مجزا از Search Overlay
   طبق بازخورد: صفحه نتایج نباید کلاس‌های Overlay را دوباره‌استفاده کند.
   ========================================================================= */

.search-page-form {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-alt);
  max-width: 640px;
}

.search-page-form input {
  flex: 1;
  border: none;
  outline: none;
  font-size: var(--font-size-md);
  background: transparent;
  color: var(--color-text);
}

.search-page-meta {
  margin-block: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.search-result-card {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
}

.search-result-card .media-card-media {
  width: 96px;
  min-width: 96px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.search-result-card .media-card-media img {
  object-fit: cover;
}

.search-empty-state {
  text-align: center;
  padding-block: var(--space-6);
  color: var(--color-text-muted);
}

/* =========================================================================
   404 / ERROR PAGE
   ========================================================================= */

.error-page {
  padding-block: var(--space-7);
}

.error-page-code {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-black);
  color: var(--color-metal);
  margin-bottom: var(--space-2);
  line-height: 1;
}

/* =========================================================================
   HERO (Swiper — چند اسلاید، فقط در Homepage بارگذاری می‌شود)
   ========================================================================= */

.hero {
  position: relative;
  color: var(--color-text-on-dark);
  overflow: hidden;
}

.hero .swiper-slide {
  position: relative;
}

.hero-media {
  position: relative;
  aspect-ratio: 4 / 5;
}

@media (min-width: 992px) {
  .hero-media {
    aspect-ratio: 16 / 7;
  }
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--overlay-dark-15) 0%, var(--overlay-dark-75) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-4);
  padding-bottom: var(--space-6);
}

@media (min-width: 768px) {
  .hero-content {
    padding: var(--space-6);
    justify-content: center;
    max-width: 640px;
  }
}

.hero-heading {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-3);
}

@media (min-width: 768px) {
  .hero-heading {
    font-size: var(--font-size-4xl);
  }
}

.hero-description {
  font-size: var(--font-size-md);
  color: var(--color-text-on-dark-muted);
  margin-bottom: var(--space-4);
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* کنترل‌های Swiper — بازطراحی‌شده هماهنگ با هویت برند (نه ظاهر پیش‌فرض Swiper) */
.hero .swiper-button-next,
.hero .swiper-button-prev {
  width: 40px;
  height: 40px;
  background: var(--overlay-dark-55);
  border-radius: 50%;
  color: var(--color-white);
}

.hero .swiper-button-next::after,
.hero .swiper-button-prev::after {
  font-size: 16px;
}

.hero .swiper-pagination-bullet {
  background: var(--color-white);
  opacity: 0.5;
}

.hero .swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--color-burgundy);
}

@media (max-width: 767.98px) {

  .hero .swiper-button-next,
  .hero .swiper-button-prev {
    display: none;
  }

  /* در موبایل فقط Swipe لمسی + Pagination */
}

/* =========================================================================
   BUTTONS (کلاس‌های مشترک CTA)
   ========================================================================= */

.btn-brand-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
  background: var(--color-burgundy);
  color: var(--color-white);
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-medium);
  transition: background var(--duration-base) var(--ease-standard);
  border: 1px solid var(--color-burgundy);
}

.btn-brand-primary:hover {
  background: var(--color-burgundy-dark);
  border-color: var(--color-burgundy-dark);
  color: var(--color-white);
}

.btn-brand-outline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
  background: transparent;
  color: var(--color-text-on-dark);
  border: 1px solid var(--color-border-on-dark);
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-medium);
  transition: border-color var(--duration-base) var(--ease-standard), background var(--duration-base) var(--ease-standard);
}

.btn-brand-outline:hover {
  border-color: var(--color-text-on-dark);
  background: var(--overlay-light-06);
  color: var(--color-text-on-dark);
}

/* نسخه روی پس‌زمینه روشن (خارج از Hero) */
.btn-brand-outline--on-light {
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-brand-outline--on-light:hover {
  border-color: var(--color-primary);
  background: var(--color-surface);
  color: var(--color-text);
}

/* =========================================================================
   SECTION HEADER (مشترک بین Products / Articles / Factory / ...)
   ========================================================================= */

.section {
  padding-block: var(--space-6);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.section-header h2 {
  font-size: var(--font-size-2xl);
}

@media (min-width: 768px) {
  .section-header h2 {
    font-size: var(--font-size-3xl);
  }
}

.section-header p {
  color: var(--color-text-muted);
  margin: var(--space-1) 0 0 0;
}

.section-divider {
  height: 1px;
  background: var(--color-border);
  border: none;
  margin: var(--space-4) 0;
}

/* =========================================================================
   PRODUCT TOOLBAR
   ========================================================================= */

.product-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.product-toolbar-controls {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.product-toolbar select {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-1) var(--space-2);
  background: var(--color-surface-alt);
  color: var(--color-text);
  font-size: var(--font-size-sm);
}

/* =========================================================================
   MEDIA CARD — Base مشترک + Variants (Product / Project / Article)
   طبق درخواست بازخورد: Base مشترک برای Media/Body/Meta/CTA، اما هر نوع محتوا
   ارائه بصری/معنایی خودش را دارد (نسبت تصویر، Object-fit، وجود Meta).
   ========================================================================= */

.product-grid,
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

@media (min-width: 768px) {

  .product-grid,
  .article-grid {
    gap: var(--space-4);
  }

  .article-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.media-card {
  display: block;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard);
}

.media-card:hover {
  border-color: var(--color-metal);
  box-shadow: var(--shadow-md);
}

.media-card-media {
  position: relative;
  background: var(--color-surface);
  overflow: hidden;
}

.media-card-media img {
  width: 100%;
  height: 100%;
}

.media-card-body {
  padding: var(--space-3);
}

.media-card-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-1);
}

.media-card-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.media-card-meta {
  display: flex;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.media-card-cta {
  font-size: var(--font-size-sm);
  color: var(--color-burgundy);
  font-weight: var(--font-weight-medium);
}

/* ---- Variant: Product Card — عکس محصول روی زمینه یکدست، Aspect 4:5 ---- */
.product-card .media-card-media {
  aspect-ratio: 4 / 5;
}

.product-card .media-card-media img {
  object-fit: cover;
}

.product-card .media-card-media .img-secondary {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-standard);
}

@media (hover: hover) {
  .product-card:hover .media-card-media .img-secondary {
    opacity: 1;
  }
}

/* ---- Variant: Project Card — تصویر پروژه، Aspect 16:9 ---- */
.project-card .media-card-media {
  aspect-ratio: 16 / 9;
}

.project-card .media-card-media img {
  object-fit: cover;
}

/* ---- Variant: Article Card — کاور مقاله، Aspect 16:9 + Meta (دسته/تاریخ) ---- */
.article-card .media-card-media {
  aspect-ratio: 16 / 9;
}

.article-card .media-card-media img {
  object-fit: cover;
}

.article-card .media-card-title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}

/* =========================================================================
   FACTORY / ABOUT SECTION
   ========================================================================= */

.factory-section {
  background: var(--color-primary);
  color: var(--color-text-on-dark);
}

.factory-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  align-items: center;
}

@media (min-width: 992px) {
  .factory-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* استفاده در صفحه About: تراز از بالا به‌جای وسط‌چین (متن بلندتر از تصویر) */
.factory-grid--align-start {
  align-items: start;
}

.factory-media {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.factory-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.factory-media .swiper-button-next,
.factory-media .swiper-button-prev {
  width: 36px;
  height: 36px;
  background: var(--overlay-dark-55);
  border-radius: 50%;
  color: var(--color-white);
}

.factory-media .swiper-button-next::after,
.factory-media .swiper-button-prev::after {
  font-size: 14px;
}

.factory-media .swiper-pagination-bullet {
  background: var(--color-white);
  opacity: 0.5;
}

.factory-media .swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--color-burgundy);
}

.factory-content p,
.factory-content h2 {
  color: var(--color-text);
  max-width: 56ch;
}

/* =========================================================================
   SLOGAN MARQUEE
   ========================================================================= */

.slogan-strip {
  background: var(--color-surface);
  border-block: 1px solid var(--color-border);
  overflow: hidden;
  padding-block: var(--space-3);
}

.slogan-track {
  display: flex;
  gap: var(--space-6);
  white-space: nowrap;
  width: max-content;
  animation: slogan-scroll 32s linear infinite;
}

.slogan-track span {
  font-size: var(--font-size-md);
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.slogan-track span::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-burgundy);
  display: inline-block;
}

@keyframes slogan-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .slogan-track {
    animation: none;
  }
}

/* =========================================================================
   CONTACT CTA BAND
   ========================================================================= */

.contact-cta {
  background: var(--color-burgundy);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: flex-start;
}

@media (min-width: 768px) {
  .contact-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.contact-cta h2 {
  font-size: var(--font-size-2xl);
}

.contact-cta p {
  color: var(--overlay-light-85);
  margin: var(--space-1) 0 0 0;
}

.contact-cta .btn-brand-outline {
  color: var(--color-white);
  border-color: var(--overlay-light-50);
}

.contact-cta .btn-brand-outline:hover {
  border-color: var(--color-white);
  background: var(--overlay-light-12);
}

/* =========================================================================
   FOOTER
   ========================================================================= */

.site-footer {
  background: var(--color-primary);
  color: var(--color-text-on-dark-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  padding-block: var(--space-6);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-col h3 {
  color: var(--color-text-on-dark);
  font-size: var(--font-size-md);
  margin-bottom: var(--space-3);
}

.footer-col ul li+li {
  margin-top: var(--space-2);
}

.footer-col a:hover {
  color: var(--color-text-on-dark);
}

.footer-map-frame {
  aspect-ratio: 16 / 9;
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-on-dark-muted);
  font-size: var(--font-size-sm);
  border: 1px dashed var(--color-border-on-dark);
  cursor: pointer;
}

.footer-map-frame--on-light {
  background: var(--color-surface);
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

/* .footer-bottom {
  
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  
} */
.footer-bottom {
  /* border-top: 2px solid var(--color-border-on-dark); */
  padding-block: var(--space-3);
  gap: var(--space-1);
  font-size: var(--font-size-sm);
  position: relative;
}

.designer-link {
  color: var(--color-burgundy-dark)
}

.designer-link {
  display: inline-block;
  animation: designerAttention 2.8s ease-in-out infinite
}

@keyframes designerAttention {

  0%,
  72%,
  100% {
    transform: none;
    text-shadow: none
  }

  80% {
    transform: translateY(-2px) scale(1.3);
    text-shadow: 0 0 16px rgb(255, 255, 255)
  }

  90% {
    transform: rotate(-2deg) scale(1.05)
  }
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: right;
  }
}

/* =========================================================================
   FLOATING UI
   ========================================================================= */

.floating-back-to-top {
  position: fixed;
  bottom: var(--space-4);
  left: var(--space-4);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--duration-base) var(--ease-standard), transform var(--duration-base) var(--ease-standard);
  z-index: var(--z-floating);
}

.floating-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.floating-qa {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  background: var(--color-burgundy);
  color: var(--color-white);
  border: none;
  box-shadow: var(--shadow-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  z-index: var(--z-floating);
}

.floating-qa:hover {
  background: var(--color-burgundy-dark);
}

@media (max-width: 575.98px) {
  .floating-back-to-top {
    bottom: var(--space-3);
    left: var(--space-3);
    width: 40px;
    height: 40px;
  }

  .floating-qa {
    bottom: var(--space-3);
    right: var(--space-3);
    padding: var(--space-2) var(--space-3);
  }

  .floating-qa span.qa-label {
    display: none;
  }

  /* در موبایل کوچک فقط آیکون، برای جلوگیری از پوشاندن محتوا */
}

/* =========================================================================
   PAGE BANNER + BREADCRUMB (کامپوننت جدید Phase 2 — صفحات داخلی)
   استفاده: تمام صفحات به‌جز Homepage (about/contact/articles/projects/products/...)
   ========================================================================= */

.page-banner {
  background: var(--color-primary);
  color: var(--color-text-on-dark);
  padding-block: var(--space-5);
}

.page-banner h1 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-2);
}

.breadcrumb-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-sm);
  color: var(--color-text-on-dark-muted);
}

.breadcrumb-nav a {
  color: var(--color-text-on-dark-muted);
}

.breadcrumb-nav a:hover {
  color: var(--color-text-on-dark);
}

.breadcrumb-nav .sep {
  opacity: 0.5;
}

.breadcrumb-nav .current {
  color: var(--color-text-on-dark);
}

/* =========================================================================
   PRODUCT GALLERY (Product Detail)
   ========================================================================= */

.product-gallery-main {
  aspect-ratio: 4 / 3;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-2);
}

.product-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-4);
}

.product-gallery-thumbs {
  display: flex;
  gap: var(--space-2);
}

.product-gallery-thumbs button {
  width: 72px;
  height: 72px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  overflow: hidden;
}

.product-gallery-thumbs button.is-active {
  border-color: var(--color-burgundy);
}

.product-gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-1);
}

/* =========================================================================
   SPEC TABLE (Product Detail — از Bootstrap Table استفاده می‌کند، تکمیلی)
   ========================================================================= */

.spec-table th {
  width: 40%;
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
  background: var(--color-surface);
}

/* =========================================================================
   CATEGORY CARD (Products Index — معرفی ۵ دسته با تصویر/توضیح/لینک واقعی)
   ========================================================================= */

.category-card {
  display: block;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard);
}

.category-card:hover {
  border-color: var(--color-metal);
  box-shadow: var(--shadow-md);
}

.category-card-media {
  aspect-ratio: 16 / 9;
  background: var(--color-surface);
}

.category-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-body {
  padding: var(--space-3);
}

.category-card-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-1);
}

.category-card-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

/* Grid اختصاصی کارت‌های دسته (متفاوت از product-grid: هدفش نمایش ۵ دسته، نه محصولات) */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }
}

@media (min-width: 992px) {
  .category-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* اندازه کوچک‌تر تیتر بخش برای Sectionهای فرعی (مثل «راهکار مناسب شما چیست؟») */
.heading-sm {
  font-size: var(--font-size-xl);
}

/* فاصله چپ آیکون Chevron مگامنو (به‌جای style Inline) */
.mega-menu-chevron {
  margin-inline-start: var(--space-1);
}

/* =========================================================================
   SOLUTION FINDER ("راهکار مناسب شما چیست؟" — Homepage، اختیاری)
   ========================================================================= */

.solution-finder-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .solution-finder-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.solution-finder-item {
  display: block;
  text-align: center;
  padding: var(--space-4) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  transition: border-color var(--duration-base) var(--ease-standard);
}

.solution-finder-item:hover {
  border-color: var(--color-burgundy);
}

.solution-finder-item .need {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.solution-finder-item .answer {
  display: block;
  font-weight: var(--font-weight-medium);
}

/* =========================================================================
   VALUE CARD (About — کارت ساده بدون تصویر)
   ========================================================================= */

.value-card {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  height: 100%;
}

.value-card h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}

.value-card p {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  margin: 0;
}

/* =========================================================================
   CONTACT INFO LIST (Contact Page)
   ========================================================================= */

.contact-info-list li {
  display: flex;
  gap: var(--space-2);
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-size-sm);
}

.contact-info-list li strong {
  color: var(--color-text);
  min-width: 90px;
}

/* =========================================================================
   MODAL (Q&A) — از modal بوت‌استرپ استفاده می‌کند؛ استایل تکمیلی
   ========================================================================= */

.qa-modal .modal-content {
  border-radius: var(--radius-lg);
  border: none;
}

.qa-modal .modal-header {
  border-bottom: 1px solid var(--color-border);
}

.qa-modal .form-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.qa-modal .form-control {
  border-color: var(--color-border);
}

.qa-modal .form-control:focus {
  border-color: var(--color-burgundy);
  box-shadow: 0 0 0 0.2rem var(--focus-ring-burgundy);
}

/* =========================================================================
   DETAIL COVER (تصویر بزرگ بالای صفحه مقاله/پروژه — نه یک Card، یک Hero محلی)
   ========================================================================= */

.detail-cover {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-4);
  background: var(--color-surface);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* =========================================================================
   PHASE 2.2 — HERO / PRODUCTS / FOOTER / MOTION REFINEMENT
   ========================================================================= */

/* Hero composition */
.hero-content {
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: none;
  padding: clamp(24px, 5vw, 72px);
  padding-inline: clamp(24px, 8vw, 140px);
}

.hero-heading,
.hero-description {
  width: min(100%, 860px);
}

.hero-description {
  margin-inline: auto;
}

.hero-actions {
  justify-content: center;
  align-items: center;
  width: 100%;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.hero-actions .btn-brand-primary,
.hero-actions .btn-brand-outline {
  min-width: 170px;
  min-height: 46px;
  justify-content: center;
}

.hero .swiper-pagination {
  z-index: 3;
}

@media (max-width: 575.98px) {
  .hero-content {
    padding: 24px 18px 56px;
  }

  .hero-heading {
    font-size: clamp(1.55rem, 8vw, 2rem);
  }

  .hero-description {
    font-size: .95rem;
    line-height: 1.7;
  }

  .hero-actions {
    flex-direction: column;
    width: min(100%, 300px);
  }

  .hero-actions .btn-brand-primary,
  .hero-actions .btn-brand-outline {
    width: 100%;
  }
}

/* Active-slide content entrance */
.hero .swiper-slide .hero-content>* {
  opacity: 0;
  transform: translateY(14px);
}

.hero .swiper-slide-active .hero-content>* {
  animation: hero-content-in 700ms var(--ease-standard) both;
}

.hero .swiper-slide-active .hero-content> :nth-child(2) {
  animation-delay: 100ms;
}

.hero .swiper-slide-active .hero-content> :nth-child(3) {
  animation-delay: 180ms;
}

@keyframes hero-content-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Product categories/filter */
.products-home-section {
  background:
    radial-gradient(circle at 10% 10%, rgba(var(--color-burgundy-rgb), .045), transparent 28%),
    var(--color-background);
}

.section-kicker {
  display: inline-block;
  color: var(--color-burgundy);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  margin-bottom: 4px;
  letter-spacing: .02em;
}

.product-category-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.product-filter-btn {
  appearance: none;
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  border-radius: 999px;
  padding: 8px 15px;
  font: inherit;
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: color var(--duration-base) var(--ease-standard), background var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard), transform var(--duration-base) var(--ease-standard);
}

.product-filter-btn:hover,
.product-filter-btn:focus-visible,
.product-filter-btn.is-active {
  color: var(--color-white);
  background: var(--color-burgundy);
  border-color: var(--color-burgundy);
}

.product-filter-btn:active {
  transform: translateY(1px);
}

.product-toolbar--refined {
  padding-block: 4px var(--space-3);
}

.product-toolbar--refined strong {
  color: var(--color-text);
  font-weight: var(--font-weight-bold);
}

.product-grid-home .product-card.is-filtered-out {
  display: none;
}

.product-grid-home .product-card {
  transition: border-color var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard), transform var(--duration-base) var(--ease-standard);
}

@media (hover: hover) {
  .product-grid-home .product-card:hover {
    transform: translateY(-3px);
  }
}

.product-card .media-card-media {
  background: var(--color-surface);
}

.product-card .media-card-media>img {
  transition: opacity 450ms var(--ease-standard), transform 700ms var(--ease-standard);
}

.product-card .media-card-media .img-secondary {
  object-fit: cover;
  opacity: 0;
}

@media (hover: hover) {
  .product-card:hover .media-card-media>img:first-child {
    opacity: 0;
    transform: scale(1.025);
  }

  .product-card:hover .media-card-media .img-secondary {
    opacity: 1;
    transform: scale(1.025);
  }
}

.product-card-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(var(--color-white-rgb), .20) 48%, transparent 66%);
  transform: translateX(-120%);
}

@media (hover: hover) {
  .product-card:hover .product-card-light {
    opacity: 1;
    animation: product-light-sweep 900ms ease-out 1;
  }
}

@keyframes product-light-sweep {
  to {
    transform: translateX(120%);
  }
}

.product-view-more {
  display: flex;
  justify-content: center;
  margin-top: var(--space-5);
}

/* Shared scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 650ms var(--ease-standard), transform 650ms var(--ease-standard);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

[data-reveal][data-reveal-delay="1"] {
  transition-delay: 80ms;
}

[data-reveal][data-reveal-delay="2"] {
  transition-delay: 160ms;
}

[data-reveal][data-reveal-delay="3"] {
  transition-delay: 240ms;
}

@media (prefers-reduced-motion: reduce) {

  [data-reveal],
  [data-reveal].is-revealed,
  .hero .swiper-slide .hero-content>*,
  .hero .swiper-slide-active .hero-content>* {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
}

/* Consultation + footer integrated field */
.consultation-footer-bridge {
  background: var(--color-primary);
  color: var(--color-text-on-dark);
  padding-top: var(--space-6);
}

.contact-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--color-border-on-dark);
  border-bottom: 0;
  background:
    linear-gradient(135deg, rgba(var(--color-burgundy-rgb), .22), transparent 48%),
    var(--color-primary-light);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}

.contact-cta::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  left: -100px;
  top: -120px;
  border-radius: 50%;
  background: rgba(var(--color-burgundy-rgb), .16);
  filter: blur(8px);
  pointer-events: none;
}

.consultation-eyebrow {
  display: block;
  color: var(--color-metal-light);
  font-size: var(--font-size-sm);
  margin-bottom: 6px;
}

.contact-cta h2 {
  color: var(--color-white);
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  margin-bottom: var(--space-2);
  max-width: 26ch;
}

.contact-cta p {
  color: var(--color-text-on-dark-muted);
  margin: 0;
}

.consultation-cta-button {
  position: relative;
  flex: 0 0 auto;
  min-width: 170px;
  justify-content: center;
  animation: consultation-pulse 2.6s ease-in-out infinite;
}

@keyframes consultation-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(var(--color-burgundy-rgb), .30);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(var(--color-burgundy-rgb), 0);
  }
}

/* Footer */
.site-footer {
  background: var(--color-primary);
  color: var(--color-text-on-dark-muted);
  border-top: 1px solid rgba(var(--color-white-rgb), .05);
}

.footer-grid {
  grid-template-columns: 1.25fr 1fr 1fr 1.25fr;
  gap: clamp(24px, 4vw, 56px);
  padding-block: var(--space-6);
}

.footer-brand {
  display: inline-flex;
  margin-bottom: var(--space-3);
}

.footer-brand img {
  width: 96px;
  height: auto;
  object-fit: contain;
  filter: grayscale(.15);
}

.footer-brand-col p {
  color: var(--color-text-on-dark-muted);
  font-size: var(--font-size-sm);
  max-width: 28ch;
}

.footer-primary-link {
  display: inline-flex;
  color: var(--color-white);
  font-size: var(--font-size-sm);
  border-bottom: 1px solid var(--color-burgundy);
  padding-bottom: 3px;
}

.footer-col h3 {
  position: relative;
  padding-bottom: 9px;
  margin-bottom: var(--space-3);
}

.footer-col h3::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  background: var(--color-burgundy);
}

.footer-col a {
  transition: color var(--duration-base) var(--ease-standard), padding-right var(--duration-base) var(--ease-standard);
}

.footer-col a:hover {
  color: var(--color-white);
  padding-right: 3px;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.footer-contact-list svg {
  flex: 0 0 auto;
  margin-top: 3px;
  color: var(--color-metal);
}

.footer-contact-list span,
.footer-contact-list a {
  color: var(--color-text-on-dark-muted);
}

.footer-contact-list a:hover {
  color: var(--color-white);
}

.footer-map-frame {
  position: relative;
  margin-top: var(--space-3);
  aspect-ratio: 16 / 7;
  border-radius: var(--radius-md);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(var(--color-burgundy-rgb), .18), transparent),
    var(--color-primary-light);
}

.footer-map-frame::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed var(--color-border-on-dark);
  border-radius: var(--radius-sm);
}

.footer-map-frame span {
  position: relative;
  z-index: 1;
  color: var(--color-metal-light);
}

@media (max-width: 991.98px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-cta {
    align-items: flex-start;
  }
}

@media (max-width: 575.98px) {
  .product-category-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 12px;
    scrollbar-width: thin;
  }

  .product-filter-btn {
    flex: 0 0 auto;
  }

  .contact-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .consultation-cta-button {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile contact/header safety */
@media (max-width: 575.98px) {
  .floating-qa {
    right: 12px;
    bottom: 12px;
  }

  .floating-back-to-top {
    left: 12px;
    bottom: 12px;
  }

  .hero-actions {
    position: relative;
    z-index: 4;
  }
}

.footer-map-frame {
  width: 100%;
  border: 1px dashed var(--color-border-on-dark);
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.footer-map-frame:focus-visible {
  outline: 2px solid var(--color-burgundy);
  outline-offset: 2px;
}

.footer-map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}


/* =========================================================================
   FINAL FRONTEND REFINEMENT — persistent two-band header / centered search
   ========================================================================= */
:root {
  --header-row1-height: 72px;
  --header-row1-compact-height: 72px;
  --header-row2-height: 48px;
  --header-top-current-height: 72px;
}

.site-header-top {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-row1-height);
}

.site-header-nav {
  position: fixed;
  inset: var(--header-row1-height) 0 auto 0;
  height: var(--header-row2-height);
  max-height: var(--header-row2-height);
  overflow: visible;
}

.site-header-nav.is-hidden {
  max-height: var(--header-row2-height);
  opacity: 1;
  transform: none;
  pointer-events: auto;
  overflow: visible;
}

body.is-header-compact {
  --header-top-current-height: 72px;
}

.header-row1 {
  min-height: var(--header-row1-height);
  height: var(--header-row1-height);
  grid-template-columns: auto minmax(0, 1fr) auto;
}

body {
  padding-top: calc(var(--header-row1-height) + var(--header-row2-height));
}

.main-nav-links {
  align-items: stretch;
  justify-content: center;
  gap: clamp(10px, 1.6vw, 26px);
  min-width: 0;
}

.main-nav-links>a,
.main-nav-links>.has-mega {
  display: flex;
  align-items: stretch;
  position: relative;
}

.main-nav-links a,
.main-nav-links button.nav-link-btn {
  height: 100%;
  padding-inline: 5px;
}

.header-actions {
  min-width: max-content;
}

.btn-contact-experts {
  min-height: 38px;
  padding: 8px 14px;
}

.header-nav-inner {
  min-height: var(--header-row2-height);
  height: var(--header-row2-height);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.header-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 44px;
  height: 36px;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: var(--color-white);
  overflow: hidden;
  white-space: nowrap;
  transition: width 480ms cubic-bezier(.22, .61, .36, 1), background .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.header-search-trigger .search-label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width 480ms ease, opacity 220ms ease;
}

.site-header-nav.is-scrolled .header-search-trigger,
body.is-search-expanded .header-search-trigger {
  width: min(430px, 55vw);
  background: rgba(255, 255, 255, .09);
  border-color: rgba(255, 255, 255, .28);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .14);
}

.site-header-nav.is-scrolled .header-search-trigger .search-label,
body.is-search-expanded .header-search-trigger .search-label {
  max-width: 330px;
  opacity: .82;
}

.nav-contact-link {
  font-size: 11px;
}

.mega-menu-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mega-menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-burgundy);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 12px;
}

.mobile-nav {
  width: min(390px, 92vw);
  background: var(--color-surface-alt);
}

.mobile-nav .offcanvas-header {
  border-bottom: 1px solid var(--color-border);
  padding: 18px;
}

.mobile-nav .offcanvas-body {
  padding: 16px;
}

.mobile-nav-list>li>a,
.mobile-nav-list .accordion-button {
  display: flex;
  width: 100%;
  align-items: center;
  min-height: 48px;
  padding: 12px 10px;
  color: var(--color-text);
  font-weight: 600;
  border-radius: 10px;
}

.mobile-nav-list>li>a:hover,
.mobile-nav-list .accordion-button:hover {
  background: var(--color-surface);
}

.mobile-nav-list .accordion-button {
  background: transparent;
  box-shadow: none;
}

.mobile-nav-list .accordion-button:not(.collapsed) {
  color: var(--color-burgundy);
  background: var(--color-surface);
}

.mobile-nav-list .accordion-body {
  display: grid;
  gap: 4px;
  padding: 4px 10px 12px 0;
}

.mobile-nav-list .accordion-body a {
  display: block;
  padding: 9px 12px;
  color: var(--color-text-muted);
  border-inline-start: 2px solid var(--color-border);
}

.mobile-nav-list .accordion-body a:hover {
  color: var(--color-burgundy);
  border-color: var(--color-burgundy);
}

.mobile-all-products {
  font-weight: 700;
  color: var(--color-burgundy) !important;
}

.mobile-nav-contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.mobile-nav-contact a {
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
}

.mobile-nav-contact span,
.mobile-nav-contact strong {
  display: block;
}

.mobile-nav-contact span {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.mobile-nav-contact strong {
  font-size: 13px;
}

.mobile-nav-footer {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Continuous conveyor marquee */
.slogan-strip {
  overflow: hidden;
}

.slogan-track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: slogan-conveyor 28s linear infinite;
  will-change: transform;
}

.slogan-group {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--space-6);
  padding-inline-end: var(--space-6);
}

.slogan-group span {
  flex: none;
}

@keyframes slogan-conveyor {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-50%, 0, 0);
  }
}

.product-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 260px;
  aspect-ratio: 4/5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #e9e9e7, #cfcfcd);
  color: #555;
  text-align: center;
  font-size: 13px;
}

.product-image-placeholder--large {
  min-height: 420px;
  aspect-ratio: 4/3;
}

.product-card-category {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--color-burgundy);
  font-size: 11px;
  font-weight: 700;
}

.developer-credit a {
  color: var(--color-metal-light);
  font-weight: 700;
  letter-spacing: .02em;
}

.developer-credit a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

@media (max-width:991.98px) {
  body {
    padding-top: calc(68px + 46px);
  }

  .site-header-top {
    height: 68px;
  }

  .site-header-nav {
    inset: 68px 0 auto 0;
    height: 46px;
    max-height: 46px;
  }

  .header-row1 {
    height: 68px;
    min-height: 68px;
    grid-template-columns: auto 1fr auto;
  }

  .main-nav-links {
    display: none;
  }

  .header-search-trigger {
    width: 42px;
    height: 34px;
  }

  .site-header-nav.is-scrolled .header-search-trigger {
    width: min(300px, 62vw);
  }

  .site-header-nav.is-scrolled .header-search-trigger .search-label {
    max-width: 220px;
  }

  .header-nav-inner {
    height: 46px;
    min-height: 46px;
    grid-template-columns: 1fr auto 1fr;
  }

  .nav-contact-link span {
    display: none;
  }

  .nav-contact-start {
    justify-content: flex-start;
  }

  .nav-contact-end {
    justify-content: flex-end;
  }

  .btn-contact-experts {
    font-size: 12px;
    width: auto;
    min-width: 118px;
    padding: 7px 10px;
  }

  .header-actions {
    gap: 4px;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .mega-menu {
    display: none;
  }
}

@media (max-width:575.98px) {
  body {
    padding-top: 114px;
  }

  .header-row1 {
    padding-inline: 10px;
    gap: 6px;
  }

  .header-logo img {
    height: 38px;
  }

  .btn-contact-experts {
    min-width: 0;
    width: auto;
    padding-inline: 9px;
    font-size: 11px;
  }

  .header-icon-btn {
    width: 38px;
    height: 38px;
  }

  .header-search-trigger {
    width: 40px;
  }

  .site-header-nav.is-scrolled .header-search-trigger {
    width: calc(100vw - 116px);
  }

  .site-header-nav.is-scrolled .header-search-trigger .search-label {
    max-width: calc(100vw - 170px);
    font-size: 11px;
  }

  .nav-contact-link {
    padding-inline: 4px;
  }

  .nav-contact-end .nav-contact-link:last-child {
    display: none;
  }

  .mobile-nav-contact {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slogan-track {
    animation: none;
  }

  .header-search-trigger,
  .header-search-trigger .search-label {
    transition: none;
  }
}

.mega-menu-grid--with-subitems {
  align-items: stretch;
}

.mega-menu-column-head {
  display: block;
  color: inherit;
}

.mega-menu-column-head:hover {
  color: inherit;
}

.mega-menu-column-head h3 {
  margin-bottom: 10px;
}

.mega-menu-sublist {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
  padding-top: 30px;
  padding-bottom: 0px;
}

.mega-menu-sublist li a {
  display: block;
  padding: 6px 8px;
  border-radius: 7px;
  color: var(--color-text-muted);
  font-size: 11px;
  line-height: 1.55;
}

.mega-menu-sublist li a:hover {
  background: var(--color-surface);
  color: var(--color-burgundy);
}

.mobile-parent-category {
  margin-top: 7px;
  font-weight: 800 !important;
  color: var(--color-burgundy) !important;
  border-inline-start: 0 !important;
  background: rgba(109, 46, 46, .05);
}

@media (max-width:1199.98px) and (min-width:992px) {
  .mega-menu {
    width: min(980px, calc(100vw - 24px));
    padding: 12px;
  }

  .mega-menu-sublist li a {
    font-size: 10px;
  }
}

/* Targeted final fixes: category image slots, article card media, and factory gallery sizing */
.mega-menu-column-head {
  display: block;
  min-width: 0;
  overflow: hidden;
}
.mega-menu-column-head > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  object-position: center;
  margin: 0 0 var(--space-2);
  border-radius: var(--radius-sm);
}
.mega-menu-column-head .mega-menu-icon { margin-top: 0; }
.article-card .media-card-media {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.article-card .media-card-media img,
.article-card .media-card-media video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  zoom: 1 !important;
}
.article-card .media-card-body {
  display: block;
  position: relative;
  padding: var(--space-3);
}
.factory-media .swiper,
.factory-media .swiper-wrapper,
.factory-media .swiper-slide {
  width: 100%;
  height: 100%;
}
.factory-media .swiper-slide { overflow: hidden; }
.factory-media .swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.contact-map-embed {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 250px;
  overflow: hidden;
  border-radius: var(--radius-md);
}
.contact-map-embed iframe { display: block; width: 100%; height: 100%; min-height: 250px; border: 0; }
@media (max-width: 575.98px) {
  .mega-menu-column-head > img { aspect-ratio: 16 / 9; }
  .contact-map-embed { min-height: 220px; }
}
