/* ==========================================================================
   ExiroMED — Product Archive Page Styles
   assets/css/archive-product.css
   Loaded only on post_type_archive('product') — see functions.php
   ========================================================================== */

/* ── Persian font (mirrors front-page.rtl.css) ──────────────────────────────
   IRANSansX is already used across all RTL pages in the theme.
   Declaring it here ensures it's available on the archive page too.
   ────────────────────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'IRANSansX';
  src: url('../fonts/IRANSansX-Bold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IRANSansX';
  src: url('../fonts/IRANSansX-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ── Design-token bridge ────────────────────────────────────────────────────
   The canonical tokens live on .exiro-front-page in front-page.css.
   Re-declare them here so every archive selector can resolve them without
   the front-page wrapper being present in the DOM.
   ────────────────────────────────────────────────────────────────────────── */
.exiro-products-archive {
  --warm-white:        #ffffff;
  --section-bg:        #eaeae9;
  --cream:             #f5f0ea;
  --text-dark:         #111111;
  --text-muted-dark:   #333333;
  --exiro-green:       #143931;
  --exiro-green-hover: #235247;
  --font-heading:      'Gotham', sans-serif;
  --font-body:         'Gotham', sans-serif;
  --font-fa:           'IRANSansX', sans-serif;  /* Persian — matches front-page.rtl.css */
  --card-radius:       28px;
  --card-transition:   0.42s cubic-bezier(0.22, 1, 0.36, 1);

  background: var(--warm-white);
  font-family: var(--font-body);
  letter-spacing: -0.02em;
  box-sizing: border-box;
}

.exiro-products-archive *,
.exiro-products-archive *::before,
.exiro-products-archive *::after {
  box-sizing: border-box;
}

/* ==========================================================================
   MINIMAL HEADER  (replaces the full photo-banner on the products archive)
   Boxed treatment — matches the CTA box dimensions, radius, and green colour.
   Sits inside a padded outer shell, not stuck to the viewport edge.
   ========================================================================== */

/* Outer shell: white page background + top breathing room */
.archive-minimal-header {
  --exiro-green:       #143931;
  --exiro-green-hover: #235247;
  --warm-white:        #ffffff;
  --font-body:         'Gotham', sans-serif;

  background: var(--warm-white);
  padding: 24px 24px 0;          /* top gap from browser edge, sides match grid */
}

/* The green pill — same max-width / radius as .archive-cta-box */
.archive-minimal-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: var(--exiro-green);
  border-radius: 32px;           /* identical to .archive-cta-box */
  box-shadow: 0 8px 32px rgba(20, 57, 49, 0.16);
  /* Subtle decorative circle — mirrors .archive-cta-box::before */
  position: relative;
  overflow: hidden;
}

/* Decorative circle (purely visual, matches CTA box) */
.archive-minimal-header__inner::after {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.032);
  top: -140px;
  right: -60px;
  pointer-events: none;
}

/* Logo */
.archive-minimal-header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  position: relative;
  z-index: 2;
}

.archive-minimal-header__logo img {
  height: 24px;
  width: auto;
  object-fit: contain;
}

/* Desktop nav */
.archive-minimal-header__nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 40px);
  flex: 1;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.archive-minimal-header__nav a,
.archive-minimal-header__nav li a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.25s ease;
  white-space: nowrap;
}

.archive-minimal-header__nav a:hover,
.archive-minimal-header__nav li a:hover,
.archive-minimal-header__nav li.current-menu-item > a,
.archive-minimal-header__nav li.current_page_item > a {
  color: #ffffff;
}

/* Strip default list styles WordPress wp_nav_menu adds */
.archive-minimal-header__nav ul {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 40px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.archive-minimal-header__nav li {
  margin: 0;
  padding: 0;
}

/* Mobile burger — mirrors the existing .btnMenu pattern */
.archive-minimal-header__burger {
  display: none;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  padding: 8px 0;
  position: relative;
  z-index: 2;
}

/* ── Minimal header responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .archive-minimal-header__nav {
    display: none;
  }

  .archive-minimal-header__burger {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .archive-minimal-header__burger::before {
    content: '';
    display: block;
    width: 20px;
    height: 14px;
    background-image:
            linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)),
            linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)),
            linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85));
    background-size: 100% 1.5px;
    background-repeat: no-repeat;
    background-position: top, center, bottom;
  }
}

@media (max-width: 640px) {
  .archive-minimal-header {
    padding: 16px 16px 0;
  }

  .archive-minimal-header__inner {
    padding: 0 24px;
    height: 62px;
    border-radius: 24px;
  }
}

/* ── RTL: flip inner row direction ─────────────────────────────────────── */
[dir="rtl"] .archive-minimal-header__inner,
.rtl .archive-minimal-header__inner {
  flex-direction: row-reverse;
}

[dir="rtl"] .archive-minimal-header__nav ul,
.rtl .archive-minimal-header__nav ul {
  flex-direction: row-reverse;
}

/* ── Section shell ──────────────────────────────────────────────────────────*/
.archive-products-section {
  padding: 80px 24px 100px;
}

.archive-products-container {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

/* ── Section header ─────────────────────────────────────────────────────────*/
.archive-section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 64px;
}

.archive-section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--exiro-green);
  margin-bottom: 16px;
}

.archive-section-label::before,
.archive-section-label::after {
  content: '';
  display: block;
  width: 32px;
  height: 1.5px;
  background: var(--exiro-green);
  opacity: 0.4;
}

.archive-section-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4.5vw, 58px);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 20px;
}

.archive-section-desc {
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.75;
  color: #666;
  max-width: 580px;
  margin: 0 auto;
}

/* ==========================================================================
   GRID
   Desktop  : 3 columns, first card spans 2 (featured hero)
   Tablet   : 2 columns
   Mobile   : 1 column
   ========================================================================== */
.archive-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ==========================================================================
   BASE PRODUCT CARD
   ========================================================================== */
.archive-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--section-bg);
  border-radius: var(--card-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition:
          transform var(--card-transition),
          box-shadow var(--card-transition);
}

.archive-product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(20, 57, 49, 0.14);
}

/* ── Image pane ─────────────────────────────────────────────────────────────*/
.archive-card-image {
  position: relative;
  width: 100%;
  padding-top: 68%;        /* 3:2 portrait — shows product beautifully */
  overflow: hidden;
  background: #dedad4;     /* warm placeholder matches --section-bg darker */
  flex-shrink: 0;
}

.archive-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.archive-product-card:hover .archive-card-image img {
  transform: scale(1.055);
}

/* ── Numeric index badge ────────────────────────────────────────────────────*/
.archive-card-index {
  position: absolute;
  top: 16px;
  left: 18px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(20, 57, 49, 0.52);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 500px;
  padding: 4px 11px;
  line-height: 1.6;
  z-index: 5;
}

/* ── Brand logo badge ───────────────────────────────────────────────────────*/
.archive-card-logo-wrap {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.93);
  border-radius: 10px;
  padding: 5px 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 5;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
}

.archive-card-logo {
  height: 20px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* ── Card body ──────────────────────────────────────────────────────────────*/
.archive-card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.archive-card-title {
  font-family: var(--font-heading);
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
}

.archive-card-excerpt {
  font-size: clamp(12px, 0.9vw, 13.5px);
  line-height: 1.7;
  color: #666;
  margin: 0 0 20px;
  flex: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* ── Card footer: CTA + dot ─────────────────────────────────────────────────*/
.archive-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  padding-top: 16px;
  margin-top: auto;
}

.archive-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--exiro-green);
  transition: gap 0.28s ease;
  flex-shrink: 0;
}

.archive-card-cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.28s ease;
  flex-shrink: 0;
}

.archive-product-card:hover .archive-card-cta {
  gap: 12px;
}

.archive-product-card:hover .archive-card-cta svg {
  transform: translateX(4px);
}

/* Small green pulse dot */
.archive-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--exiro-green);
  opacity: 0.22;
  transition: opacity 0.28s ease;
  flex-shrink: 0;
}

.archive-product-card:hover .archive-card-dot {
  opacity: 0.65;
}

/* ==========================================================================
   CORNER-CUT HOVER SVG
   Matches the identical pattern used on blog/about cards in the theme
   ========================================================================== */
.archive-card-corner {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 100px;
  height: 100px;
  z-index: 10;
  pointer-events: none;
}

.archive-card-corner-shape {
  fill: var(--warm-white);
  transition: fill var(--card-transition);
}

.archive-card-corner-content {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.34s ease, transform 0.34s ease;
}

.archive-card-corner-text {
  font-family: 'Gotham', 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 400;
  fill: #ffffff;
  letter-spacing: 0.04em;
}

.archive-product-card:hover .archive-card-corner-shape {
  fill: var(--exiro-green);
}

.archive-product-card:hover .archive-card-corner-content {
  opacity: 1;
  transform: translateX(0);
}

/* ==========================================================================
   FEATURED CARD — first card, spans 2 columns, horizontal layout
   ========================================================================== */
.archive-product-card.featured {
  grid-column: span 2;
  flex-direction: row;
}

.archive-product-card.featured .archive-card-image {
  flex: 0 0 54%;
  padding-top: 0;
  min-height: 360px;
}

.archive-product-card.featured .archive-card-body {
  flex: 1;
  padding: 36px 32px;
  justify-content: center;
}

.archive-product-card.featured .archive-card-title {
  font-size: clamp(20px, 1.8vw, 26px);
  margin-bottom: 14px;
}

.archive-product-card.featured .archive-card-excerpt {
  -webkit-line-clamp: 5;
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */
.archive-no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 100px 24px;
  color: #888;
}

.archive-no-products svg {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  display: block;
  opacity: 0.28;
}

.archive-no-products p {
  font-size: 18px;
  font-weight: 400;
}

/* ==========================================================================
   PAGINATION
   Full override of the generic .pg_wrap / .page-numbers styles from style.css
   so the controls match the ExiroMED dark-green design system.
   ========================================================================== */
.archive-pagination {
  margin-top: 72px;
  margin-bottom: 72px;
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Pill container that groups all the page links */
.archive-pagination .pg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--section-bg);   /* #eaeae9 — same warm grey as cards */
  border-radius: 500px;
  padding: 6px;
}

/* ── Every page link / span ─────────────────────────────────────────────── */
.archive-pagination .page-numbers {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 500px;
  background: transparent;
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
  margin: 0;
  border: none;
  outline: none;
  transition:
          background 0.25s ease,
          color      0.25s ease,
          transform  0.2s ease;
  cursor: pointer;
}

.archive-pagination .page-numbers:hover:not(.current):not(.dots) {
  background: rgba(20, 57, 49, 0.10);
  color: var(--exiro-green);
}

/* ── Active / current page ──────────────────────────────────────────────── */
.archive-pagination .page-numbers.current {
  background: var(--exiro-green);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(20, 57, 49, 0.28);
}

/* ── Prev / Next arrow spans ────────────────────────────────────────────── */
.archive-pagination .page-numbers.prev,
.archive-pagination .page-numbers.next {
  font-size: 0;             /* hide any text / entity character */
  background: var(--warm-white);
  border: 1.5px solid rgba(20, 57, 49, 0.15);
  position: relative;
}

/* Draw SVG chevrons via clip-path so no extra markup is needed */
.archive-pagination .page-numbers.prev::after,
.archive-pagination .page-numbers.next::after {
  content: '';
  display: block;
  width: 7px;
  height: 12px;
  background: var(--exiro-green);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* Next → chevron right */
.archive-pagination .page-numbers.next::after {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 12'%3E%3Cpath d='M1 1l5 5-5 5' stroke='%23143931' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 12'%3E%3Cpath d='M1 1l5 5-5 5' stroke='%23143931' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

/* Prev ← chevron left */
.archive-pagination .page-numbers.prev::after {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 12'%3E%3Cpath d='M6 1L1 6l5 5' stroke='%23143931' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 12'%3E%3Cpath d='M6 1L1 6l5 5' stroke='%23143931' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

.archive-pagination .page-numbers.prev:hover,
.archive-pagination .page-numbers.next:hover {
  background: var(--exiro-green);
  border-color: var(--exiro-green);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(20, 57, 49, 0.22);
}

/* Invert the mask colour on hover so chevron turns white */
.archive-pagination .page-numbers.prev:hover::after,
.archive-pagination .page-numbers.next:hover::after {
  background: #ffffff;
}

/* ── Dots / ellipsis ────────────────────────────────────────────────────── */
.archive-pagination .page-numbers.dots {
  background: transparent;
  color: #999;
  cursor: default;
  width: 28px;
  font-size: 14px;
  letter-spacing: 0.1em;
}

/* ── RTL mirror ─────────────────────────────────────────────────────────── */
[dir="rtl"] .archive-pagination .page-numbers.next::after {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 12'%3E%3Cpath d='M6 1L1 6l5 5' stroke='%23143931' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 12'%3E%3Cpath d='M6 1L1 6l5 5' stroke='%23143931' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

[dir="rtl"] .archive-pagination .page-numbers.prev::after {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 12'%3E%3Cpath d='M1 1l5 5-5 5' stroke='%23143931' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 12'%3E%3Cpath d='M1 1l5 5-5 5' stroke='%23143931' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

/* ==========================================================================
   CONTACT CTA SECTION
   ========================================================================== */
.archive-contact-cta {
  padding: 0 24px 96px;
}

.archive-cta-box {
  position: relative;
  background: var(--exiro-green);
  border-radius: 32px;
  padding: 64px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  overflow: hidden;
  max-width: 1280px;
  margin: 0 auto;
}

/* Decorative circles — same technique as front-page sections */
.archive-cta-box::before {
  content: '';
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  top: -180px;
  right: -100px;
  pointer-events: none;
}

.archive-cta-box::after {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.028);
  bottom: -80px;
  left: 10%;
  pointer-events: none;
}

.archive-cta-text {
  flex: 1;
  position: relative;
  z-index: 2;
}

.archive-cta-text span {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 14px;
  letter-spacing: -0.04em;
}

.archive-cta-text p {
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.60);
}

.archive-cta-btn-wrap {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.archive-cta-box button {
  outline: none;
  cursor: pointer;
  border: none;
  min-width: 200px;
  height: 56px;
  padding: 0 32px;
  font-family: inherit;
  font-size: 14px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.04em;
  font-weight: 700;
  border-radius: 500px;
  background: #fff;
  color: var(--exiro-green);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.archive-cta-box button:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.20);
}

.archive-cta-box button span.mont {
  position: relative;
  z-index: 1;
}

.archive-cta-box button img {
  height: 15px;
  width: auto;
  /* Match the green to --exiro-green */
  filter: invert(24%) sepia(47%) saturate(464%) hue-rotate(121deg) brightness(85%) contrast(92%);
}

/* ==========================================================================
   RTL OVERRIDES  (Persian / Arabic — [dir="rtl"] or .rtl body class)
   Mirrors every positional, directional, and transform value.
   ========================================================================== */

/* ── Persian font — apply IRANSansX to everything on the archive page ─────── */
[dir="rtl"] .exiro-products-archive,
.rtl .exiro-products-archive,
[dir="rtl"] .archive-minimal-header,
.rtl .archive-minimal-header {
  font-family: var(--font-fa);
  letter-spacing: 0;             /* IRANSansX looks better without negative tracking */
}

[dir="rtl"] .exiro-products-archive h1,
[dir="rtl"] .exiro-products-archive h2,
[dir="rtl"] .exiro-products-archive h3,
[dir="rtl"] .exiro-products-archive h4,
[dir="rtl"] .exiro-products-archive p,
[dir="rtl"] .exiro-products-archive span,
[dir="rtl"] .exiro-products-archive a,
.rtl .exiro-products-archive h1,
.rtl .exiro-products-archive h2,
.rtl .exiro-products-archive h3,
.rtl .exiro-products-archive h4,
.rtl .exiro-products-archive p,
.rtl .exiro-products-archive span,
.rtl .exiro-products-archive a {
  font-family: var(--font-fa);
  letter-spacing: 0;
}

/* Section title: tighter letter-spacing was for Gotham; IRANSansX needs 0 */
[dir="rtl"] .archive-section-title,
.rtl .archive-section-title {
  letter-spacing: 0;
}

/* Card titles and CTA text */
[dir="rtl"] .archive-card-title,
.rtl .archive-card-title {
  font-family: var(--font-fa);
  letter-spacing: 0;
}

/* Minimal header nav links in RTL */
[dir="rtl"] .archive-minimal-header__nav a,
[dir="rtl"] .archive-minimal-header__nav li a,
.rtl .archive-minimal-header__nav a,
.rtl .archive-minimal-header__nav li a {
  font-family: var(--font-fa);
  letter-spacing: 0;
}

/* ── Minimal header: logo on the RIGHT in RTL ───────────────────────────── */
[dir="rtl"] .archive-minimal-header__inner,
.rtl .archive-minimal-header__inner {
  flex-direction: row;  /* logo → right, burger/nav → left */
}

[dir="rtl"] .archive-minimal-header__nav ul,
.rtl .archive-minimal-header__nav ul {
  flex-direction: row-reverse;
}

/* ── Corner-cut SVG: move to bottom-LEFT in RTL ──────────────────────────── */
[dir="rtl"] .archive-card-corner,
.rtl .archive-card-corner {
  right: auto;
  left: -1px;
  bottom: -1px;
}

/* ── Corner-content text slides from the right in RTL ───────────────────── */
[dir="rtl"] .archive-card-corner-content,
.rtl .archive-card-corner-content {
  transform: translateX(6px);
}

[dir="rtl"] .archive-product-card:hover .archive-card-corner-content,
.rtl .archive-product-card:hover .archive-card-corner-content {
  transform: translateX(0);
}

/* ── Brand logo badge: move to bottom-RIGHT in RTL ──────────────────────── */
[dir="rtl"] .archive-card-logo-wrap,
.rtl .archive-card-logo-wrap {
  left: auto;
  right: 14px;
}

/* ── Numeric index badge: move to top-RIGHT in RTL ──────────────────────── */
[dir="rtl"] .archive-card-index,
.rtl .archive-card-index {
  left: auto;
  right: 18px;
}

/* ── CTA arrow slides LEFT on hover in RTL ──────────────────────────────── */
[dir="rtl"] .archive-product-card:hover .archive-card-cta svg,
.rtl .archive-product-card:hover .archive-card-cta svg {
  transform: translateX(-4px);
}

/* ── Featured card: image sits on the RIGHT in RTL ─────────────────────── */
[dir="rtl"] .archive-product-card.featured,
.rtl .archive-product-card.featured {
  flex-direction: row;
}

/* ── CTA box: flip the decorative bubble to the left ───────────────────── */
[dir="rtl"] .archive-cta-box::before,
.rtl .archive-cta-box::before {
  right: auto;
  left: -80px;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* ── Large tablet: collapse to 2-col grid ───────────────────────────────────*/
@media (max-width: 1100px) {
  .archive-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .archive-product-card.featured {
    grid-column: span 2;
  }
}

/* ── Medium: featured card goes vertical ────────────────────────────────────*/
@media (max-width: 860px) {
  .archive-product-card.featured {
    grid-column: span 1;
    flex-direction: column;
  }

  .archive-product-card.featured .archive-card-image {
    flex: none;
    padding-top: 65%;
    min-height: auto;
  }

  .archive-product-card.featured .archive-card-body {
    padding: 22px 24px 24px;
  }
}

/* ── Mobile: single-column ─────────────────────────────────────────────────*/
@media (max-width: 640px) {
  .archive-products-section {
    padding: 56px 16px 72px;
  }

  .archive-products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .archive-product-card.featured {
    grid-column: span 1;
  }

  .archive-card-image {
    padding-top: 62%;
  }

  .archive-section-header {
    margin-bottom: 44px;
  }

  .archive-contact-cta {
    padding: 0 16px 64px;
  }

  .archive-cta-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 48px 32px;
    gap: 32px;
    border-radius: 24px;
  }

  .archive-cta-btn-wrap {
    width: 100%;
  }

  .archive-cta-box button {
    width: 100%;
    justify-content: center;
  }
}

.pg_page, .pg_current {
  background: none !important;
  border: none !important;
}