/* ============================================================
   YARN-DYED.CSS — Arihant Fabrics
   Role: Page-specific styles for yarn-dyed.html
   Loads after: base.css · layout.css · components.css · utilities.css
   Scope: Yarn-dyed fabric page only — not shared
   ============================================================ */


/* ── Page-scoped design tokens ── */
:root {
  --page-accent:       var(--accent-yarn); /* #b47840 */
  --cert-bg:           #EAF3DE;
  --cert-text:         #27500A;
  --cert-border:       #C0DD97;
  --spec-label-colour: #7a5228;  /* amber — spec row labels */
}


/* ============================================================
   1. PAGE HERO
   Vertical stripe overlay (90deg) on amber→white gradient.
   90deg matches the homepage yarn-dyed card and the prototype.
   ============================================================ */

.page-hero--yarn {
  position: relative;
  background: linear-gradient(
    to bottom,
    rgba(180, 120, 64, 0.12) 0%,
    var(--color-white)        100%
  );
  padding: 28px var(--page-padding-inline) 36px;
  overflow: hidden;
}

/* Vertical stripe texture — fades out downward */
.page-hero--yarn::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(180, 120, 64, 0.025) 0px,
    rgba(180, 120, 64, 0.025) 1px,
    transparent               1px,
    transparent               8px
  );
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
          mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
  pointer-events: none;
}

.page-hero__inner          { position: relative; max-width: var(--max-width); margin-inline: auto; }

.page-hero__eyebrow        { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.page-hero__label          { font-family: var(--font-body); font-size: 10px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(180, 120, 64, 0.55); white-space: nowrap; }
.page-hero__rule           { flex: 1; border: none; border-top: 0.5px solid rgba(180, 120, 64, 0.35); margin: 0; }

.page-hero__heading        { font-family: var(--font-heading); font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; color: var(--accent-yarn); line-height: 1; margin: 0 0 7px; letter-spacing: -0.5px; }
.page-hero__subheading     { font-family: var(--font-heading); font-size: clamp(1.25rem, 1.25rem + (1vw - 0.2rem) * 1.25, 2rem); font-style: italic; color: rgba(180, 120, 64, 0.48); margin: 0 0 18px; line-height: 1.3; }
.page-hero__body           { font-family: var(--font-body); font-size: 0.875rem; color: var(--color-navy); line-height: var(--line-height-body); margin: 0 0 10px; max-width: 62ch; }
.page-hero__note           { font-family: var(--font-body); font-size: 11px; color: rgba(10, 37, 117, 0.38); margin: 0; display: flex; align-items: center; gap: 6px; line-height: 1.5; }

@media (max-width: 767px) {
  .page-hero--yarn { padding: 2.5rem 24px; }
}


/* ============================================================
   2. ANCHOR NAV
   Sticky below the site header. FILTER BY label frozen left.
   Active underline: navy (consistent with greige page).
   ============================================================ */

.anchor-nav-wrapper {
  background: var(--color-white);
  border-top:    1px solid rgba(10, 37, 117, 0.18);
  border-bottom: 1px solid rgba(10, 37, 117, 0.15);
  position: sticky;
  top: var(--header-height);
  z-index: 100;
  overflow: hidden;
}

.anchor-nav-inner      { display: flex; align-items: stretch; height: 46px; padding: 0 var(--page-padding-inline); }
.anchor-filter-label   { font-family: var(--font-body); font-size: 10px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(10, 37, 117, 0.38); white-space: nowrap; flex-shrink: 0; display: flex; align-items: center; padding-right: 12px; }
.anchor-divider        { width: 1px; background: rgba(10, 37, 117, 0.15); flex-shrink: 0; align-self: stretch; margin: 10px 0; }

.anchor-links-scroll {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
  flex: 1;
  padding-left: 14px;
  min-width: 0;
}

.anchor-links-scroll::-webkit-scrollbar { display: none; }

.anchor-link {
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(10, 37, 117, 0.65); /* was 0.45 — increased to pass WCAG AA 4.5:1 */
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  padding: 0 14px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .anchor-link { transition: color 0.18s ease; }
}

.anchor-link:hover { color: var(--color-navy); text-decoration: none; }

.anchor-link:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: -3px;
  border-radius: 2px;
}

.anchor-link.is-active {
  color: var(--color-navy);
  font-weight: 500;
}

.anchor-link.is-active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--color-navy);
}

@media (max-width: 767px) {
  .anchor-nav-inner { padding: 0 24px; }
  .anchor-link      { padding: 0 10px; font-size: 12px; }
  .anchor-link.is-active::after { left: 10px; right: 10px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .anchor-link { padding: 0 12px; }
  .anchor-link.is-active::after { left: 12px; right: 12px; }
}


/* ============================================================
   3. FABRIC SECTIONS — outer container
   ============================================================ */

.fabric-section {
  padding: min(3rem, 4vw) var(--page-padding-inline) min(3.5rem, 4.5vw);
  border-bottom: 0.5px solid var(--color-border);
  background: var(--color-bg-light);
}

.fabric-card-wrap {
  max-width: var(--max-width);
  margin-inline: auto;
}

/* Footer reveal shadow — prevents upward shadow bleed via clip-path */
.fabric-section:last-child {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
  clip-path: inset(0 -60px -60px -60px);
}

@media (max-width: 767px) {
  .fabric-section { padding: 2rem 24px 2.5rem; }
}


/* ============================================================
   4. FABRIC CARDS — shared card structure
   Used by all 5 yarn-dyed fabric sections.
   ============================================================ */

.fabric-card {
  background: var(--color-white);
  border: 1px solid rgba(10, 37, 117, 0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ── Card header ── */

.fabric-card__header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(10, 37, 117, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.fabric-eyebrow {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(10, 37, 117, 0.65); /* was 0.45 — increased to pass WCAG AA 4.5:1 */
  margin: 0 0 4px;
}

.fabric-name {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 2px;
  line-height: 1.1;
}

.fabric-sub {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(10, 37, 117, 0.5);
  margin: 0;
}

.fabric-cert-col   { flex-shrink: 0; text-align: right; }

.fabric-badge-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.fabric-badge {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--cert-bg);
  color: var(--cert-text);
  border: 1px solid var(--cert-border);
  display: inline-block;
}

.fabric-cert-note {
  font-family: var(--font-body);
  font-size: 10px;
  color: rgba(10, 37, 117, 0.65); /* was 0.45 — increased to pass WCAG AA 4.5:1 */
  margin: 6px 0 0;
  text-align: right;
}

/* ── Card body ── */

.fabric-card__body { padding: 16px 24px 20px; }

/* 3-column spec row — Yarn count | Width | Composition */

.fabric-specs-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 1px solid rgba(10, 37, 117, 0.08);
}

.fabric-spec-cell                  { padding: 12px 0; }
.fabric-spec-cell:not(:last-child) { padding-right: 20px; border-right: 1px solid rgba(10, 37, 117, 0.08); }
.fabric-spec-cell:not(:first-child){ padding-left: 20px; }

/* Spec label with extending rule */
.fabric-spec-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--spec-label-colour);
  margin: 0 0 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fabric-spec-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(10, 37, 117, 0.08);
}

.fabric-spec-big  { font-family: var(--font-body); font-size: 15px; font-weight: 500; color: var(--color-navy); margin: 0 0 2px; }
.fabric-spec-note { font-family: var(--font-body); font-size: 11px; color: rgba(10, 37, 117, 0.5); margin: 0; }

/* ── Construction list — used by Stripes, Checks, Special Constructions ── */

.fabric-constructions-row { padding: 14px 0 0; }

.fabric-construction-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fabric-construction-item { font-family: var(--font-body); font-size: 12px; color: rgba(10, 37, 117, 0.6); line-height: 1.55; }
.fabric-umbrella           { font-size: 13px; font-weight: 500; color: var(--color-navy); margin-right: 2px; }


/* ============================================================
   5. STRIPES & CHECKS — bottom row layout
   3-column grid: Weave Constructions spans 2 cols (left),
   Colour & Texture Effects spans 1 col (right).
   Source: prototype .yd-constructions-cell + .yd-effects-cell.
   Breakpoint: 767px (our project standard, not prototype's 640px).
   ============================================================ */

.fabric-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.fabric-constructions-col {
  grid-column: span 2;
  padding: 14px 20px 0 0;
  border-right: 1px solid rgba(10, 37, 117, 0.08);
}

.fabric-effects-col {
  padding: 14px 0 0 20px;
  display: flex;
  flex-direction: column;
}

.fabric-effects-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--spec-label-colour);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fabric-effects-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(10, 37, 117, 0.08);
}

.fabric-effects-grid { display: flex; flex-wrap: wrap; gap: 6px; }

/* Effects pills — same style as greige .fabric-pill */
.fabric-effects-pill {
  font-family: var(--font-body);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(10, 37, 117, 0.04);
  color: rgba(10, 37, 117, 0.6);
  border: 1px solid rgba(10, 37, 117, 0.10);
  display: inline-block;
}

.fabric-effects-note {
  font-family: var(--font-body);
  font-size: 10px;
  color: rgba(10, 37, 117, 0.38);
  font-style: italic;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(10, 37, 117, 0.06);
}

@media (max-width: 767px) {
  .fabric-bottom-row { grid-template-columns: 1fr; }

  .fabric-constructions-col {
    grid-column: span 1;
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid rgba(10, 37, 117, 0.08);
    padding-bottom: 14px;
  }

  .fabric-effects-col {
    padding-left: 0;
    padding-top: 14px;
  }
}


/* ============================================================
   6. DOBBY & JACQUARD — pattern type pill grid
   ============================================================ */

.fabric-patterns-row { padding: 14px 0 0; }

.fabric-pattern-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* Pattern pills — same style as greige .fabric-pill */
.fabric-pattern-pill {
  font-family: var(--font-body);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(10, 37, 117, 0.04);
  color: rgba(10, 37, 117, 0.65);
  border: 1px solid rgba(10, 37, 117, 0.10);
  display: inline-block;
}


/* ============================================================
   7. MOBILE RESPONSIVE — card header + spec row
   ============================================================ */

@media (max-width: 767px) {
  .fabric-card__header { flex-direction: column; }
  .fabric-cert-col     { text-align: left; }
  .fabric-badge-row    { justify-content: flex-start; }
  .fabric-cert-note    { text-align: left; }

  .fabric-specs-row                           { grid-template-columns: 1fr; }
  .fabric-spec-cell:not(:last-child)          { padding-right: 0; border-right: none; border-bottom: 1px solid rgba(10, 37, 117, 0.08); padding-bottom: 12px; }
  .fabric-spec-cell:not(:first-child)         { padding-left: 0; padding-top: 12px; }
}

/* Composition note spacing — appears below pill group in spec cell */
.fabric-spec-cell .fabric-spec-note { margin-top: 4px; }
