@import url("/css/typography.css");
@import url("/css/components.css");
@import url("/css/hero.css");
@import url("/css/product.css");
@import url("/css/forms.css");

:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-soft: #efe7da;
  --text: #17202a;
  --muted: #5c6670;
  --primary: #0e5f63;
  --primary-dark: #083d40;
  --accent: #9f273f;
  --brand-gold: #f7c66a;
  --line: rgba(23, 32, 42, 0.14);
  --shadow: 0 20px 50px rgba(23, 32, 42, 0.16);
  --white: #ffffff;
  --hero-ink: #111318;
  --hero-gold: #f7c66a;
  --whatsapp: #1f8f55;
  --whatsapp-dark: #177a50;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--type-base);
  line-height: var(--leading-normal);
}

body.modal-open {
  overflow: hidden;
}

body.theme-modern {
  --bg: #eef5f8;
  --surface-soft: #dcebef;
  --primary: #1b4d89;
  --primary-dark: #113052;
  --accent: #e0792f;
}

body.theme-premium {
  --bg: #f2f0eb;
  --surface-soft: #dfd8cb;
  --primary: #20242c;
  --primary-dark: #111318;
  --accent: #b88a44;
}

body.theme-bright {
  --bg: #f6f9ef;
  --surface-soft: #e4edd2;
  --primary: #2c704d;
  --primary-dark: #1a452f;
  --accent: #c9404b;
}

body.theme-heritage {
  --primary: #0e5f63;
  --primary-dark: #083d40;
  --accent: #9f273f;
  --hero-gold: #f7c66a;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
  background: #07193a;
  box-shadow: 0 6px 18px rgba(7, 25, 58, 0.18);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  gap: clamp(14px, 3vw, 34px);
}

.nav-links a,
.header-cta {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.header-cta {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero {
  position: relative;
  min-height: min(720px, calc(100vh - 68px));
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--hero-ink);
  background-image: url("assets/hero.webp");
  background-position: center;
  background-size: cover;
}

.hero picture,
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero img {
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 12, 0.78), rgba(8, 10, 12, 0.58) 46%, rgba(8, 10, 12, 0.18)),
    linear-gradient(0deg, rgba(8, 10, 12, 0.16), rgba(8, 10, 12, 0.04));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  padding: 80px clamp(20px, 6vw, 72px);
  color: var(--white);
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: var(--type-xs);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--hero-gold);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 620px;
  margin-bottom: 18px;
  font-size: var(--type-2xl);
  line-height: var(--leading-tight);
}

h2 {
  margin-bottom: 18px;
  font-size: var(--type-xl);
  line-height: var(--leading-tight);
}

h3 {
  margin-bottom: 8px;
  font-size: var(--type-xl);
  line-height: var(--leading-snug);
}

.hero-copy {
  max-width: 620px;
  color: var(--white);
  font-size: var(--type-lg);
  line-height: var(--leading-relaxed);
}

.hero-actions,
.theme-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.theme-choice {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: var(--primary);
  color: var(--white);
}

.hero .button.primary {
  background: var(--primary);
  color: var(--white);
  border: 1px solid var(--primary);
}

.button.secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.hero .button.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.56);
}

.button.whatsapp {
  background: var(--whatsapp);
  color: var(--white);
}

.button.whatsapp:hover {
  background: var(--whatsapp-dark);
}

.button.full {
  width: 100%;
}

.theme-panel,
.intro-section,
.trust-section,
.products-section,
.regular-section,
.quality-section,
.contact-section {
  padding: clamp(44px, 7vw, 86px) clamp(20px, 5vw, 72px);
}

.theme-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.theme-panel h2 {
  margin-bottom: 0;
  font-size: clamp(24px, 3vw, 36px);
}

.theme-choice {
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--line);
}

.theme-choice.active {
  background: var(--primary);
  color: #fff;
}

.intro-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}

.intro-copy p {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (min-width: 769px) and (max-width: 1200px) {
  .stats-grid {
    margin-right: 80px; /* FIX: Keep the third stat card clear of the WhatsApp float zone. */
  }
}

.stats-grid div,
.product-card,
.quality-list div,
.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(23, 32, 42, 0.08);
}

.stats-grid div {
  min-height: 150px;
  padding: 20px;
}

.stats-grid strong {
  display: block;
  color: var(--primary);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
}

.stats-grid span {
  color: var(--muted);
  font-weight: 700;
}

.trust-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(24px, 5vw, 58px);
  background: var(--soft);
}

.trust-section h2,
.trust-section p {
  margin-top: 0;
}

.trust-section p {
  color: var(--muted);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.trust-grid div {
  display: grid;
  gap: 8px;
  min-height: 140px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(23, 32, 42, 0.08);
}

.trust-grid strong {
  color: var(--primary);
  font-size: 18px;
}

.trust-grid span {
  color: var(--muted);
  font-weight: 700;
}

.products-section {
  background: var(--surface-soft);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.category-slider-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-slider-viewport {
  flex: 1;
  overflow: hidden;
}

.category-track {
  display: flex;
  gap: 18px;
  transition: transform 0.35s ease;
  will-change: transform;
}

.category-card {
  flex: 0 0 auto;
  min-height: 280px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  box-shadow: 0 18px 44px rgba(23, 32, 42, 0.16);
  transform: translateY(-3px);
}

.product-card,
.regular-card {
  padding: clamp(22px, 3vw, 32px);
}

.product-card {
  display: flex; /* FIX: Make product cards align evenly in carousel/grid rows. */
  flex-direction: column;
}

.product-card p,
.regular-card p,
.quality-list p,
.contact-details p {
  color: var(--muted);
}

.product-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.regular-section {
  background: var(--bg);
}

.section-heading-row {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(260px, 0.65fr);
  gap: clamp(20px, 5vw, 60px);
  align-items: end;
  margin-bottom: 24px;
}

.section-heading-row h2 {
  margin-bottom: 0;
}

.section-heading-row p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.regular-grid {
  display: flex;
  gap: 16px;
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.regular-card {
  display: grid;
  min-height: 230px;
  align-content: start;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(23, 32, 42, 0.08);
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}

.regular-card:hover {
  box-shadow: 0 18px 44px rgba(23, 32, 42, 0.16);
  transform: translateY(-3px);
}

.regular-card > picture,
.regular-card > img,
.regular-card > .fabric-placeholder {
  width: calc(100% + clamp(44px, 6vw, 64px));
  height: 190px;
  margin: calc(clamp(22px, 3vw, 32px) * -1) calc(clamp(22px, 3vw, 32px) * -1) 8px;
}

.regular-card > picture img,
.regular-card > img,
.regular-card > .fabric-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.regular-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.regular-meta span {
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.fabric-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 68%, #fff), color-mix(in srgb, var(--accent) 74%, #fff)), repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.18) 0 8px, rgba(255, 255, 255, 0.04) 8px 16px);
  color: #fff;
  font-size: 42px;
  font-weight: 900;
}

.fabric-detail-button {
  width: fit-content;
  margin-top: auto;
}

.regular-empty {
  grid-column: 1 / -1;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.fabric-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  padding: 20px;
}

.fabric-modal.open {
  display: grid;
  place-items: center;
}

.fabric-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 16, 22, 0.7);
}

.fabric-modal-content,
.category-modal-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(300px, 1fr);
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.category-modal-content {
  display: block;
  width: min(980px, 100%);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.modal-image-wrap {
  display: grid;
  place-items: center;
  min-height: 420px;
  background: #fff;
}

.modal-image-wrap img,
.modal-image-wrap .fabric-placeholder {
  width: 100%;
  height: 100%;
  min-height: 420px;
}

.modal-image-wrap img {
  object-fit: contain;
  background: #fff;
}

.modal-copy {
  padding: clamp(24px, 4vw, 44px);
}

.fabric-detail-list {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 16px;
  margin: 24px 0;
}

.fabric-detail-list dt {
  color: var(--muted);
  font-weight: 800;
}

.fabric-detail-list dd {
  margin: 0;
}

.subcategory-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.subcategory-chip {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.subcategory-chip.active {
  background: var(--primary);
  color: #fff;
}

.category-fabric-list h3 {
  margin-bottom: 12px;
}

.category-modal-fabric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.category-fabric-item {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.category-fabric-item:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.quality-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: clamp(28px, 5vw, 64px);
}

.quality-list {
  display: grid;
  gap: 14px;
}

.quality-list div {
  padding: 22px;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

address {
  margin-top: 24px;
  color: var(--text);
  font-style: normal;
}

address a {
  color: var(--primary);
  font-weight: 800;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 4vw, 34px);
}

label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 800;
}

.field-label {
  display: inline;
}

.required-mark {
  color: var(--accent);
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
}

.human-check {
  display: grid;
  gap: 8px;
}

.human-check span {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.honeypot-field {
  position: absolute; /* FIX: Keep honeypot in DOM for bots but off-screen for buyers. */
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.contact-form small,
.enquiry-form small {
  color: var(--muted); /* FIX: Clarify GSTIN is optional without adding another required marker. */
  font-size: 0.82rem;
  font-weight: 700;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--primary);
  font-weight: 800;
}

#contact,
#about,
#categories,
#regular-fabrics {
  scroll-margin-top: 112px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(20px, 5vw, 72px);
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.86);
}

.site-footer p {
  margin: 0;
}

.footer-brand {
  max-width: 420px;
}

.footer-brand img {
  display: block;
  width: min(220px, 100%);
  height: auto;
  margin-bottom: 12px;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.brand-slogan {
  margin: 4px 0 10px !important;
  color: var(--brand-gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-legal {
  width: 100%;
  margin-left: auto !important;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .header-cta {
    margin-left: auto;
  }

  .hero {
    min-height: 650px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(8, 10, 12, 0.72), rgba(8, 10, 12, 0.5));
  }

  .page-hero.product-listing-hero {
    background-image: url("/assets/backgrounds/products-hero-bg-960.webp");
  }

  .page-hero.resources-hero {
    background-image: url("/assets/backgrounds/resources-hero-bg-960.webp");
  }

  .page-hero.product-listing-hero,
  .page-hero.resources-hero {
    min-height: 420px;
    background-position: center right;
  }

  .page-hero.product-listing-hero::before,
  .page-hero.resources-hero::before {
    background:
      linear-gradient(90deg, rgba(247, 244, 238, 0.98) 0%, rgba(247, 244, 238, 0.92) 58%, rgba(247, 244, 238, 0.42) 100%),
      linear-gradient(0deg, rgba(247, 244, 238, 0.55), rgba(247, 244, 238, 0.16));
  }

  .theme-panel,
  .intro-section,
  .trust-section,
  .section-heading-row,
  .quality-section,
  .contact-section,
  .fabric-modal-content,
  .category-modal-content {
    grid-template-columns: 1fr;
  }

  .theme-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats-grid,
  .trust-grid,
  .regular-grid {
    grid-template-columns: 1fr;
  }

  .category-modal-fabric-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }

  .modal-image-wrap,
  .modal-image-wrap img,
  .modal-image-wrap .fabric-placeholder {
    min-height: 280px;
  }

}

@media (max-width: 520px) {
  .brand {
    width: 100%;
  }

  .header-cta {
    width: 100%;
    text-align: center;
  }

  .nav-links {
    gap: 8px;
  }

  h1 {
    font-size: 42px;
  }

  .theme-choice,
  .button {
    width: 100%;
  }

}

/* ── Issue 2: Photo carousel in fabric detail modal ─────────────────────── */
.modal-carousel {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 420px;
  background: #fff;
  overflow: hidden;
}

.modal-carousel img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: contain;
  background: #fff;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: background 0.15s;
}

.carousel-btn:hover {
  background: #fff;
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s;
}

.carousel-dot.active {
  background: #fff;
}

/* ── Issue 3: Enquiry popup modal ───────────────────────────────────────── */
.enquiry-modal-content {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.enquiry-modal-content .modal-copy {
  padding: clamp(32px, 5vw, 52px);
}

.enquiry-modal-content h2 {
  margin-bottom: 6px;
}

.enquiry-modal-content > .modal-copy > p {
  margin-bottom: 18px;
  color: var(--muted);
}

.enquiry-form {
  display: grid;
  gap: 14px;
  margin-top: 4px;
}

@media (max-width: 860px) {
  .modal-carousel,
  .modal-carousel img {
    min-height: 280px;
  }

}

/* ── Horizontal Fabric Slider ───────────────────────────────────────────── */
.regular-slider-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.regular-slider-viewport {
  flex: 1;
  overflow: hidden;
}

/* Slider arrow buttons */
.slider-btn {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  min-height: 0;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(23, 32, 42, 0.18);
  transition: background 0.18s, transform 0.15s, opacity 0.18s;
}

.slider-btn:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: scale(1.08);
}

.slider-btn:disabled {
  opacity: 0.3;
  cursor: default;
  transform: none;
}

/* Subtle "click to view" hint on card */
.card-click-hint {
  margin: 0;
  padding: 0 clamp(22px, 3vw, 32px) clamp(14px, 2vw, 20px);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 860px) {
  .slider-btn {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

}

@media (max-width: 520px) {
  .regular-slider-wrap {
    gap: 6px;
  }

  .category-slider-wrap {
    gap: 6px;
  }

  .slider-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

}

/* Modern conversion upgrade */
.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 12px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
}

.skip-link:focus {
  top: 12px;
}

.nav-toggle {
  display: none;
  width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle-line {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.hero-modern h1 {
  max-width: 760px;
}

.button.secondary.solid,
.button.secondary.dark,
.button.link-button {
  background: var(--primary);
  color: var(--white);
  border: 0;
}

.button.secondary.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.hero .button.secondary.ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.56);
}

.button.secondary.dark {
  background: var(--primary-dark);
}

.button.link-button {
  width: fit-content;
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--line);
}

.hero-proof,
.capability-list,
.modal-actions,
.card-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-proof {
  margin-top: 22px;
  max-width: 100%;
}

.hero-proof span,
.capability-list span {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}

.capability-list span {
  border-color: var(--line);
  background: var(--surface);
  color: var(--primary);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-strip a,
.trust-strip span {
  display: grid;
  min-height: 74px;
  place-items: center;
  padding: 16px;
  background: var(--surface);
  color: var(--primary-dark);
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.category-card {
  padding: 0;
  overflow: hidden;
}

.category-card picture,
.category-card img {
  display: block;
  width: 100%;
}

.category-card img {
  height: 180px;
  object-fit: cover;
}

.category-card-content {
  padding: 22px;
}

.category-card .product-icon {
  display: none;
}

.resources-section,
.catalog-section,
.product-detail-page,
.article-page,
.page-hero {
  padding: clamp(44px, 7vw, 86px) clamp(20px, 5vw, 72px);
}

.resource-grid,
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.resource-grid article,
.resource-card,
.catalog-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(23, 32, 42, 0.08);
}

.resource-grid article,
.resource-card {
  padding: 22px;
}

.resource-grid span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.page-hero.compact {
  background: var(--surface-soft);
}

.page-hero.product-listing-hero,
.page-hero.resources-hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(380px, 46vw, 560px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  isolation: isolate;
  background-color: #efe4d2;
  background-position: center right;
  background-size: cover;
}

.page-hero.product-listing-hero {
  background-image: url("/assets/backgrounds/products-hero-bg.webp");
}

.page-hero.resources-hero {
  background-image: url("/assets/backgrounds/resources-hero-bg.webp");
}

.page-hero.product-listing-hero::before,
.page-hero.resources-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(247, 244, 238, 0.96) 0%, rgba(247, 244, 238, 0.88) 39%, rgba(247, 244, 238, 0.42) 63%, rgba(247, 244, 238, 0.08) 100%),
    linear-gradient(0deg, rgba(247, 244, 238, 0.38), rgba(247, 244, 238, 0.08));
}

.page-hero.product-listing-hero::after,
.page-hero.resources-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 34%;
  background: linear-gradient(0deg, rgba(247, 244, 238, 0.9), rgba(247, 244, 238, 0));
}

.page-hero h1,
.article-page h1 {
  max-width: 14ch;
  color: var(--text);
  font-size: var(--type-2xl);
  line-height: var(--leading-tight);
}

.page-hero.product-listing-hero h1,
.page-hero.resources-hero h1 {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.32);
}

.page-hero p,
.article-page p,
.article-page li {
  max-width: var(--measure-article);
  color: var(--muted);
  font-size: var(--type-base);
  line-height: var(--leading-relaxed);
}

.page-hero.product-listing-hero p,
.page-hero.resources-hero p {
  color: color-mix(in srgb, var(--text) 76%, var(--muted));
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.catalog-count {
  color: var(--muted);
  font-weight: 900;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.catalog-card {
  overflow: hidden;
  display: flex; /* FIX: Equalize catalog card heights and pin actions consistently. */
  flex-direction: column;
}

.catalog-card picture,
.catalog-card img,
.catalog-card-image {
  display: block;
  width: 100%;
}

.catalog-card-image {
  height: 230px;
  object-fit: cover;
}

.catalog-card-body {
  padding: 22px;
  display: flex; /* FIX: Allow product card actions to sit at the bottom. */
  flex: 1;
  flex-direction: column;
}

.product-card-description {
  display: -webkit-box; /* FIX: Clamp long descriptions so product card rows stay aligned. */
  max-height: calc(1.5em * 3);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-height: 1.5;
}

.regular-card > p:not(.card-click-hint) {
  display: -webkit-box; /* FIX: Keep homepage regular fabric card descriptions equal height. */
  max-height: calc(1.5em * 3);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-height: 1.5;
}

.category-card-content > p:not(.card-click-hint) {
  display: -webkit-box; /* FIX: Keep homepage category card descriptions equal height. */
  max-height: calc(1.5em * 3);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-height: 1.5;
}

.catalog-card-body .card-actions {
  margin-top: auto; /* FIX: Align product CTAs across cards in the same row. */
}

.mini-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mini-specs div {
  padding: 10px;
  background: var(--surface-soft);
  border-radius: 8px;
}

.mini-specs dt,
.spec-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.mini-specs dd {
  margin: 0;
  color: var(--text);
  font-weight: 800;
}

.product-detail-page {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.detail-gallery {
  display: grid;
  gap: 12px;
}

.detail-gallery picture,
.detail-gallery img {
  display: block;
  width: 100%;
}

.detail-gallery-image {
  max-height: 520px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.image-fallback {
  display: flex; /* FIX: Branded fallback replaces broken images without exposing alt text. */
  width: 100%;
  aspect-ratio: 4 / 3;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background:
    linear-gradient(135deg, #0f5e56, #14877e),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.12) 0 8px, rgba(255, 255, 255, 0.03) 8px 16px);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.catalog-card .image-fallback,
.catalog-card-image.image-fallback {
  height: 230px;
}

.detail-gallery .image-fallback,
.detail-gallery-image.image-fallback {
  min-height: 320px;
}

.spec-table {
  width: 100%;
  margin: 22px 0;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
}

.spec-table th,
.spec-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.benefit-list {
  padding-left: 20px;
  color: var(--muted);
}

.text-link {
  color: var(--primary);
  font-weight: 900;
}

.article-page a:not(.button),
.article-body a,
.product-description a {
  color: #14877e; /* FIX: Legitimate content links must be visibly links, not random teal text. */
  cursor: pointer;
  font-weight: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-page a:not(.button):hover,
.article-body a:hover,
.product-description a:hover {
  text-decoration-thickness: 2px; /* FIX: Hover strengthens link affordance without changing body text color. */
}

.article-page p strong,
.article-page li strong,
.product-description strong,
.product-card-description strong {
  color: inherit; /* FIX: Emphasis in body copy should not create teal fragments. */
  font-weight: 600;
}

.article-page {
  max-width: 760px;
  margin: 0 auto;
}

.article-page h1 {
  max-width: 100%;
  margin-bottom: 14px;
  font-size: clamp(1.65rem, 1.6vw + 1.15rem, 2.25rem);
  line-height: 1.18;
}

.article-page h2 {
  margin-top: 34px;
  margin-bottom: 12px;
  max-width: 100%;
  font-size: clamp(1.3rem, 0.85vw + 1.05rem, 1.65rem);
  line-height: 1.28;
}

.article-page h3 {
  margin-top: 24px;
  max-width: 100%;
  color: var(--text);
  font-size: clamp(1.08rem, 0.5vw + 0.98rem, 1.25rem);
  line-height: 1.35;
}

.article-page p,
.article-page li {
  max-width: 100%;
  font-size: clamp(1rem, 0.18vw + 0.96rem, 1.0625rem);
  line-height: 1.68;
}

.article-page ul,
.article-page ol {
  max-width: 100%;
  padding-left: 1.35rem;
}

.article-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 26px;
  overflow-wrap: anywhere;
}

.article-page th,
.article-page td {
  border: 1px solid var(--line);
  padding: 11px 12px;
  font-size: 0.96rem;
  line-height: 1.5;
  text-align: left;
  vertical-align: top;
}

.article-page th {
  background: var(--surface-soft);
  color: var(--text);
}

.article-meta {
  font-weight: 900;
}

.sitemap-list {
  display: grid;
  gap: 12px;
  padding-left: 20px;
  font-size: 18px;
  font-weight: 800;
}

.contact-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-form .wide,
.contact-form .full {
  grid-column: 1 / -1;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer a {
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 1024px) {
  .catalog-grid,
  .resource-grid,
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .site-header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px 12px;
  }

  .nav-toggle {
    grid-column: 1;
    grid-row: 1;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    justify-self: start;
  }

  .site-header .brand {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    min-width: 0;
  }

  .site-header .brand > span:last-child {
    min-width: 0;
  }

  .site-header .brand strong,
  .site-header .brand small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-links {
    grid-column: 1 / -1;
    display: none;
  }

  .nav-links.open {
    display: grid;
    gap: 8px;
  }

  .header-cta {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }

  .catalog-grid,
  .resource-grid,
  .blog-grid,
  .product-detail-page,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .trust-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .hero-content {
    padding-inline: 16px;
  }

  .trust-strip a,
  .trust-strip span {
    min-height: 60px;
  }
}
