/* ═══════════════════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES
   ═══════════════════════════════════════════════════════════════ */
:root {
  --cat-accent: 37, 99, 168;
  --tab-h: 64px;
}

/* ═══════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════ */
.prod-hero {
  min-height: 68vh;
  display: flex;
  align-items: center;
}

/* floating chip animation */
.float-slow   { animation: floatY 5s ease-in-out infinite; }
.float-slower { animation: floatY 7s ease-in-out infinite 1s; }
@keyframes floatY {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}

/* ═══════════════════════════════════════════════════════════════
   CATEGORY NAV
   ═══════════════════════════════════════════════════════════════ */
.cat-nav-outer {
  box-shadow: 0 1px 0 rgba(255,255,255,.6), 0 4px 16px -8px rgba(23,63,112,.10);
}

.cat-tabs-scroll {
  position: relative;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}
.cat-tabs-scroll::-webkit-scrollbar { display: none; }

#catTabs {
  display: flex;
  align-items: stretch;
  min-width: max-content;
  padding-bottom: 2px;
}

/* ─── Individual tab ─── */
.cat-tab {
  position: relative;
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: color .25s ease, background .25s ease;
  white-space: nowrap;
  border-radius: 10px 10px 0 0;
  margin-right: 2px;
}
.cat-tab:hover { background: rgba(37,99,168,.06); }
.cat-tab.active { background: rgba(var(--cat-accent), .08); }

.cat-tab-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.cat-tab-label {
  font-size: .875rem;
  font-weight: 600;
  color: #27374d;
  transition: color .25s;
  line-height: 1.2;
}
.cat-tab.active .cat-tab-label { color: rgb(var(--cat-accent)); }
.cat-tab-sub {
  font-size: .7rem;
  color: #71809b;
  font-weight: 500;
  transition: color .25s;
}
.cat-tab.active .cat-tab-sub { color: rgba(var(--cat-accent), .75); }

/* ─── Sliding bottom indicator ─── */
.tab-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2.5px;
  border-radius: 9999px;
  background: rgb(var(--cat-accent));
  box-shadow: 0 0 10px rgba(var(--cat-accent), .5);
  transition: left .38s cubic-bezier(.65, 0, .35, 1), width .38s cubic-bezier(.65, 0, .35, 1), background .4s;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   CATEGORY HEADER
   ═══════════════════════════════════════════════════════════════ */
.cat-header-wrap {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .cat-header-wrap {
    grid-template-columns: 1fr 280px;
    gap: 4rem;
  }
}

/* ─── Header animations ─── */
.header-anim {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .45s ease, transform .45s ease;
}
.header-anim--in {
  opacity: 1;
  transform: translateY(0);
}

.cat-badge {
  display: inline-flex;
  align-items: center;
  padding: .25rem .9rem;
  border-radius: 9999px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  border: 1px solid;
  transition: background .4s, color .4s, border-color .4s;
}

.cat-title {
  margin-top: 1rem;
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 500;
  line-height: 1.08;
  color: #0f1b2d;
  letter-spacing: -.02em;
}

.cat-desc {
  margin-top: .9rem;
  font-size: 1rem;
  line-height: 1.75;
  color: #3d4f63;
  max-width: 580px;
}

/* ─── Spec chips ─── */
.spec-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.5rem;
}

.spec-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  padding: .55rem 1rem;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(255,255,255,.65));
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: .75rem;
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 4px 16px -8px rgba(23,63,112,.14);
  transition: box-shadow .25s, transform .25s;
}
.spec-chip:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -8px rgba(var(--cat-accent), .22); }

.spec-chip-key {
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgb(var(--cat-accent));
}
.spec-chip-val {
  font-size: .875rem;
  font-weight: 600;
  color: #0f1b2d;
}

/* ─── CTA button ─── */
.cat-cta {
  margin-top: 1.75rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: .875rem;
  font-size: .875rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, rgb(var(--cat-accent)), rgba(var(--cat-accent), .78));
  box-shadow: 0 8px 28px -10px rgba(var(--cat-accent), .55);
  transition: box-shadow .3s, transform .2s, background .4s;
  position: relative;
  overflow: hidden;
}
.cat-cta:hover {
  box-shadow: 0 14px 36px -10px rgba(var(--cat-accent), .65);
  transform: translateY(-2px);
}

/* ─── Stats cluster ─── */
.stats-cluster {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.stat-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,255,255,.6));
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 1rem;
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 4px 20px -8px rgba(23,63,112,.1);
  transition: transform .25s, box-shadow .25s;
}
.stat-pill:hover { transform: translateX(4px); box-shadow: 0 8px 28px -8px rgba(var(--cat-accent),.2); }

.stat-num {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: rgb(var(--cat-accent));
  transition: color .4s;
  white-space: nowrap;
}
.stat-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #71809b;
  text-align: right;
}

.origins-note {
  margin-top: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  font-weight: 500;
  color: #71809b;
}

/* ═══════════════════════════════════════════════════════════════
   BENTO GRID
   ═══════════════════════════════════════════════════════════════ */
.bento-grid {
  display: grid;
  gap: 14px;
  margin-top: 3.5rem;

  /* Mobile: 1-column stacked */
  grid-template-columns: 1fr;
  grid-template-rows: auto;
}

@media (min-width: 640px) {
  .bento-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 280px 280px 200px;
  }
  .bento-card--0 { grid-column: 1 / 2; grid-row: 1 / 3; }
  .bento-card--1 { grid-column: 2 / 3; grid-row: 1 / 2; }
  .bento-card--2 { grid-column: 2 / 3; grid-row: 2 / 3; }
  .bento-card--3 { grid-column: 1 / 3; grid-row: 3 / 4; }
}

@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 320px 320px 220px;
    gap: 16px;
  }
  .bento-card--0 { grid-column: 1 / 2; grid-row: 1 / 3; }
  .bento-card--1 { grid-column: 2 / 4; grid-row: 1 / 2; }
  .bento-card--2 { grid-column: 2 / 3; grid-row: 2 / 3; }
  .bento-card--3 { grid-column: 3 / 4; grid-row: 2 / 3; }
}

/* ─── Bento card ─── */
.bento-card {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  background: #dbe7f6;
  cursor: pointer;

  /* Entry animation */
  opacity: 0;
  transform: translateY(28px) scale(.97);
  filter: blur(4px);
  transition:
    opacity .5s cubic-bezier(.22, 1, .36, 1),
    transform .5s cubic-bezier(.22, 1, .36, 1),
    filter .5s ease,
    box-shadow .3s ease;
  transition-delay: var(--delay, 0ms);
}

.bento-card--in {
  opacity: 1;
  transform: none;
  filter: none;
}

.bento-card:hover {
  box-shadow: 0 24px 60px -20px rgba(var(--cat-accent), .35), 0 4px 16px -4px rgba(23,63,112,.12);
}

/* Mobile explicit height */
@media (max-width: 639px) {
  .bento-card { height: 260px; }
}

/* ─── Image ─── */
.bento-img-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.bento-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.22, 1, .36, 1);
}

.bento-card:hover .bento-img {
  transform: scale(1.07);
}

/* ─── Shimmer overlay (always) ─── */
.bento-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,27,45,.68) 0%, rgba(15,27,45,.2) 40%, transparent 70%);
  pointer-events: none;
}

/* ─── Tag badge ─── */
.bento-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 9999px;
  padding: .3rem .85rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  z-index: 2;
  transition: background .25s;
}

.bento-card:hover .bento-tag {
  background: rgba(var(--cat-accent), .75);
  border-color: rgba(var(--cat-accent), .4);
}

/* ─── Overlay panel (slides up on hover) ─── */
.bento-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  z-index: 3;
  pointer-events: none;
}

.bento-overlay-inner {
  transform: translateY(16px);
  opacity: 0;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1), opacity .3s ease;
}

.bento-card:hover .bento-overlay-inner {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.bento-grade {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(var(--cat-accent), 1);
  margin-bottom: .3rem;
  /* ensure it reads on dark bg */
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}

.bento-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
  margin-bottom: .65rem;
}

.bento-cta {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.4);
  padding-bottom: 1px;
  transition: border-color .2s, color .2s;
}
.bento-cta:hover { border-color: rgba(var(--cat-accent), .8); color: rgb(var(--cat-accent)); }

/* ─── Large card gradient ─── */
.bento-card--0 .bento-shimmer {
  background: linear-gradient(to top, rgba(15,27,45,.72) 0%, rgba(15,27,45,.22) 35%, transparent 60%);
}
.bento-card--3 .bento-shimmer {
  background: linear-gradient(to right, rgba(15,27,45,.72) 0%, rgba(15,27,45,.3) 50%, transparent 80%);
}

/* ═══════════════════════════════════════════════════════════════
   SHOWCASE EXIT ANIMATION
   ═══════════════════════════════════════════════════════════════ */
#productShowcase {
  transition: opacity .3s ease, transform .3s ease, filter .3s ease;
}

#productShowcase.showcase-exit {
  opacity: 0;
  transform: translateY(-12px) scale(.99);
  filter: blur(3px);
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   ALL GRADES MINI CARDS
   ═══════════════════════════════════════════════════════════════ */
.grade-mini-card {
  border-radius: 1.125rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(188, 210, 238, .5);
  box-shadow: 0 1px 2px rgba(15,27,45,.04), 0 8px 24px -12px rgba(15,27,45,.1);
  cursor: pointer;
  transition: transform .3s ease, box-shadow .3s ease;
}
.grade-mini-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -16px rgba(var(--cat-accent), .3);
}

.grade-mini-img-wrap {
  position: relative;
  height: 160px;
  overflow: hidden;
}
.grade-mini-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.grade-mini-card:hover .grade-mini-img { transform: scale(1.06); }

.grade-mini-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grade-mini-body {
  padding: 1rem 1.1rem 1.25rem;
}
.grade-mini-badge {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  display: block;
  margin-bottom: .3rem;
}
.grade-mini-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f1b2d;
  line-height: 1.2;
}
.grade-mini-sub {
  font-size: .72rem;
  color: #71809b;
  margin-top: .15rem;
  margin-bottom: .75rem;
}
.grade-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: gap .2s;
}
.grade-mini-btn:hover { gap: .55rem; }

/* ═══════════════════════════════════════════════════════════════
   NEW SECTIONS
   ═══════════════════════════════════════════════════════════════ */

/* Certification marquee ticker */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-track { animation: marquee 30s linear infinite; display:flex; gap:2.5rem; white-space:nowrap; width:max-content; }
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }

/* Process step connector */
.step-connector {
  position: absolute;
  top: 2.4rem;
  left: calc(20% + 2rem);
  right: calc(20% + 2rem);
  height: 1px;
  background: linear-gradient(90deg, #bcd2ee, #2563a8 50%, #38bdf8);
  opacity: 0.35;
}

/* Incoterms table hover */
.inco-table tr { transition: background .18s; }

/* ═══════════════════════════════════════════════════════════════
   ACCENT TRANSITION
   ═══════════════════════════════════════════════════════════════ */
.tab-indicator,
.cat-badge,
.spec-chip-key,
.stat-num,
.cat-cta,
.grade-mini-badge,
.bento-grade {
  transition-property: color, background, border-color, box-shadow, background-color;
  transition-duration: .4s;
}

/* Dropdown handled by CSS hover in styles.css — no override needed */

/* ═══════════════════════════════════════════════════════════════
   UTILITY
   ═══════════════════════════════════════════════════════════════ */
.gradient-animated-hero {
  background: linear-gradient(90deg, #38bdf8, #2563a8, #38bdf8);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradShift 4s linear infinite;
}
@keyframes gradShift {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  letter-spacing: .18em;
}

/* ═══════════════════════════════════════════════════════════════
   LIGHTBOX
   ═══════════════════════════════════════════════════════════════ */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

#lightbox.lb-open {
  opacity: 1;
  pointer-events: auto;
}

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 20, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.lb-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .875rem;
  width: 100%;
  max-width: min(90vw, 1100px);
  transform: scale(.92) translateY(18px);
  transition: transform .38s cubic-bezier(.16,1,.3,1);
}

#lightbox.lb-open .lb-content {
  transform: none;
}

/* ── Close button ── */
.lb-close-btn {
  position: absolute;
  top: -3.25rem;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  transition: background .2s, transform .25s;
}
.lb-close-btn:hover {
  background: rgba(255,255,255,.18);
  transform: rotate(90deg);
}

/* ── Prev / Next arrows ── */
.lb-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(calc(-50% - 2.2rem)); /* shift up to align with image, not caption */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  transition: background .2s, transform .25s;
  z-index: 2;
}
.lb-nav-btn:hover { background: rgba(255,255,255,.2); }

.lb-prev { left: -4.5rem; }
.lb-prev:hover { transform: translateY(calc(-50% - 2.2rem)) translateX(-3px); }

.lb-next { right: -4.5rem; }
.lb-next:hover { transform: translateY(calc(-50% - 2.2rem)) translateX(3px); }

/* ── Image ── */
.lb-img-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.25rem;
  overflow: hidden;
  max-height: 72vh;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
}

.lb-img {
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 1.25rem;
  box-shadow: 0 40px 100px -24px rgba(0,0,0,.75);
  transition: opacity .18s ease;
}

/* ── Caption ── */
.lb-caption {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  padding: 0 .25rem;
  gap: 1rem;
}

.lb-caption-body { flex: 1; }

.lb-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  line-height: 1.4;
}

.lb-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .3rem;
}

.lb-grade {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
}

.lb-tag {
  font-size: .68rem;
  font-weight: 600;
  padding: .15rem .55rem;
  border-radius: 9999px;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.13);
  color: rgba(255,255,255,.5);
}

.lb-counter {
  font-size: .72rem;
  font-weight: 600;
  color: rgba(255,255,255,.3);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: .15rem;
}

/* ── Dot indicators ── */
.lb-dots {
  display: flex;
  gap: .45rem;
  align-items: center;
}
.lb-dot {
  width: .4rem;
  height: .4rem;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  transition: background .2s, transform .2s;
}
.lb-dot.active {
  background: #fff;
  transform: scale(1.35);
}

/* ── Expand icon on bento cards ── */
.bento-expand-icon {
  position: absolute;
  top: .75rem;
  right: .75rem;
  z-index: 4;
  width: 2rem;
  height: 2rem;
  border-radius: .5rem;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transform: scale(.75);
  transition: opacity .22s, transform .22s;
  pointer-events: none;
}
.bento-card:hover .bento-expand-icon {
  opacity: 1;
  transform: scale(1);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .lb-prev { left: .4rem; }
  .lb-next { right: .4rem; }
  .lb-close-btn { top: -2.75rem; }
  .lb-content { max-width: 95vw; gap: .625rem; }
  .lb-nav-btn { width: 2.4rem; height: 2.4rem; background: rgba(0,0,0,.5); }
}
