/* ==========================================================================
   Home page
   ========================================================================== */

.section-title { margin-bottom: 20px; }
.section-title-row { margin-bottom: 20px; }
.section-title-row .section-title { margin-bottom: 2px; }
.section-title-row p { margin: 0; }

/* ---------- Hero carousel ---------- */
.hero { position: relative; overflow: hidden; background: var(--primary); }
.hero__slides { display: grid; }
.hero__slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-rows: 240px auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity .7s, visibility .7s;
}
.hero__slide.is-active { opacity: 1; visibility: visible; }
@media (min-width: 900px) {
  .hero__slide { grid-template-columns: 55% 45%; grid-template-rows: none; height: 520px; }
}
.hero__media { position: relative; overflow: hidden; background: linear-gradient(180deg, #ffffff 0%, #e8eef4 100%); }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 70%, var(--primary) 100%); pointer-events: none; }
@media (min-width: 900px) { .hero__media::after { background: linear-gradient(to right, transparent 72%, var(--primary) 100%); } }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 28px 40px; object-fit: contain; mix-blend-mode: multiply; }
.hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 28px var(--gutter) 72px;
  color: #fff;
}
@media (min-width: 900px) { .hero__content { padding: 40px 64px 64px 40px; } }
.hero__content h1, .hero__content h2 { margin-bottom: 10px; color: #fff; font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3.1rem); font-weight: 700; line-height: 1.12; }
.hero__content p { margin-bottom: 14px; font-size: 1.125rem; opacity: .95; }
.hero__tags { display: flex; flex-wrap: wrap; align-items: center; margin-bottom: 26px; font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; }
.hero__tags span + span::before { content: ""; display: inline-block; width: 1px; height: 18px; margin: 0 14px; background: rgba(255,255,255,.5); vertical-align: -3px; }
.btn--dark { background: #1b1c1c; border-color: #1b1c1c; color: #fff; }
.btn--dark:hover { background: #000; border-color: #000; color: #fff; }

.hero__arrow {
  position: absolute;
  top: 120px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px; height: 48px;
  border: 0;
  background: rgba(0,0,0,.25);
  color: #fff;
}
.hero__arrow:hover { background: rgba(0,0,0,.45); }
.hero__arrow--prev { left: 0; }
.hero__arrow--next { right: 0; }
@media (min-width: 900px) { .hero__arrow { top: 50%; transform: translateY(-50%); } }
.hero__controls { position: absolute; left: 0; right: 0; bottom: 22px; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 8px; }
.hero__dot { width: 10px; height: 10px; padding: 0; border: 0; background: rgba(255,255,255,.4); transition: width .2s; }
.hero__dot[aria-current="true"] { width: 24px; background: #fff; }
.hero__pause { display: grid; place-items: center; width: 22px; height: 22px; margin-left: 10px; padding: 0; border: 0; background: rgba(0,0,0,.3); color: #fff; }
.hero__pause .icon { font-size: 16px; }

/* ---------- Intro + finder ---------- */
.intro { display: grid; gap: 32px; align-items: center; }
@media (min-width: 1000px) { .intro { grid-template-columns: 55% 1fr; gap: 48px; } }
.intro__title { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem); margin-bottom: 10px; }
.intro__sub { margin-bottom: 6px; font-family: var(--font-head); font-size: 1.125rem; font-weight: 600; color: var(--primary); }
.finder { padding: 28px; background: var(--surface-muted); border: 1px solid var(--border); }
.finder h3 { margin-bottom: 16px; font-size: 1.125rem; }
.finder__fields { display: grid; gap: 16px; margin-bottom: 16px; }
@media (min-width: 560px) { .finder__fields { grid-template-columns: 1fr 1fr; } }
.finder__note { margin: 12px 0 0; font-size: .8125rem; color: var(--muted); }
.finder-card { display: flex; gap: 16px; margin-top: 16px; padding: 16px; background: #fff; border: 1px solid var(--border); }
.finder-card__img { position: relative; flex-shrink: 0; width: 110px; aspect-ratio: 1; background: var(--surface-muted); border: 1px solid var(--border); }
.finder-card__img img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 8px; object-fit: contain; mix-blend-mode: multiply; }
.finder-card h4 { margin-bottom: 4px; font-size: 1.05rem; }
.finder-card__fit { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: .8125rem; color: var(--green); font-weight: 600; }
.finder-card__fit .icon { font-size: 1.05rem; }
.finder-card p { margin: 0 0 12px; font-size: .8125rem; color: var(--muted); }
.finder-card .btn-row { gap: 8px; }

/* ---------- Order cards ---------- */
.link-inline { align-self: center; font-weight: 600; font-size: .875rem; }

/* ---------- Category tiles ---------- */
.tiles { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(6, 1fr); } }
.tile { display: flex; flex-direction: column; color: var(--heading); }
.tile:hover { text-decoration: none; color: var(--primary); }
.tile__img { position: relative; display: block; aspect-ratio: 1; padding: 12px; background: var(--surface-muted); border: 1px solid var(--border); }
.tile__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .3s; }
.tile:hover .tile__img img { transform: scale(1.04); }
.tile__label { margin-top: 10px; font-family: var(--font-head); font-size: 1.05rem; font-weight: 600; }

/* ---------- Item-code band ---------- */
.lookup-band { display: grid; gap: 28px; padding: 32px; border: 1px solid var(--border); }
@media (min-width: 1000px) { .lookup-band { grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; } }
.lookup-band h2 { font-size: 1.6rem; margin-bottom: 4px; }
.lookup-band__form > p { color: var(--muted); }
.lookup__form { display: flex; }
.lookup__form .input { flex: 1; min-width: 0; }
.lookup-band__table { padding: 20px; background: var(--surface-muted); border: 1px solid var(--border); }
.lookup-band__table h3 { margin-bottom: 12px; }
.mini-table { font-size: .8125rem; }
.mini-table th { padding: 8px 0; text-align: left; border-bottom: 1px solid var(--border-strong); font-weight: 600; color: var(--heading); }
.mini-table td { padding: 9px 0; border-bottom: 1px solid var(--border); }
.mini-table td:first-child { font-weight: 600; white-space: nowrap; padding-right: 16px; }
.mini-table td:last-child { text-align: right; }
.mini-table .quick-add { font-size: .8125rem; font-weight: 600; }
.lookup-result { display: flex; gap: 14px; align-items: center; margin-top: 14px; padding: 12px; background: #fff; border: 1px solid var(--border); color: var(--text); }
.lookup-result:hover { border-color: var(--primary); text-decoration: none; color: var(--text); }
.lookup-result img { width: 80px; height: 60px; object-fit: contain; background: var(--surface-muted); mix-blend-mode: multiply; flex-shrink: 0; }
.lookup-result strong { display: block; font-family: var(--font-head); color: var(--heading); margin: 4px 0 2px; }
.lookup-result p { margin: 0 0 4px; font-size: .8125rem; color: var(--muted); }
.lookup-result--miss > .icon { font-size: 1.6rem; color: #b45309; }

/* ---------- Stats band ---------- */
.stats-band { display: grid; gap: 28px; align-items: center; }
@media (min-width: 1000px) { .stats-band { grid-template-columns: 5fr 7fr; } }
.stats-band h2 { margin-bottom: 4px; }

.logos-title { margin-bottom: 20px; text-align: center; font-family: var(--font-head); font-weight: 600; color: var(--heading); }

/* ---------- Hero motion ---------- */
.hero__slide.is-active .hero__content > * { animation: fadeUp .8s var(--ease-out) both; }
.hero__slide.is-active .hero__content > :nth-child(2) { animation-delay: .12s; }
.hero__slide.is-active .hero__content > :nth-child(3) { animation-delay: .22s; }
.hero__slide.is-active .hero__content > :nth-child(4) { animation-delay: .32s; }
.hero__slide.is-active .hero__media img { animation: heroImage 7s var(--ease-out) both; }
@keyframes heroImage { from { opacity: 0; transform: scale(1.08) translateX(-20px); } 12% { opacity: 1; } to { opacity: 1; transform: none; } }
.hero__arrow, .hero__dot, .hero__pause { transition: background-color .2s, width .3s var(--ease-out); }

.tile__label { transition: color .2s; }
.finder-card { animation: fadeUp .45s var(--ease-out) both; }
.lookup-result { animation: fadeUp .35s var(--ease-out) both; }

/* ---------- Responsive refinements ---------- */
@media (max-width: 899px) {
  .hero__slide { grid-template-rows: 220px auto; }
  .hero__media img { padding: 20px 52px; }
  .hero__arrow { top: 86px; width: 36px; height: 44px; }
  .hero__content { padding-top: 24px; }
  .hero__content p { font-size: 1rem; }
  /* Size tags become small chips instead of a "|" separated line */
  .hero__tags { gap: 6px; font-size: .8125rem; margin-bottom: 22px; }
  .hero__tags span { padding: 4px 10px; border: 1px solid rgba(255,255,255,.45); }
  .hero__tags span + span::before { display: none; }
  .hero .btn--lg { min-height: 44px; padding: 0 22px; }
}
@media (min-width: 900px) and (max-width: 1179px) {
  .hero__slide { grid-template-columns: 50% 50%; height: 460px; }
  .hero__content { padding: 32px 48px 56px 32px; }
  .hero__content h1, .hero__content h2 { font-size: 2.2rem; }
}
/* Finder sits beside the intro only when there is room for both dropdowns */
@media (min-width: 1000px) and (max-width: 1179px) { .intro { grid-template-columns: 1fr; } }
@media (max-width: 599px) {
  .section-title-row { align-items: flex-start; }
  .lookup-band { padding: 20px; }
  .lookup__form { flex-direction: column; gap: 8px; }
  .lookup__form .btn { width: 100%; }
  .mini-table td:nth-child(2) { font-size: .75rem; }
  .promo-box { padding: 24px; }
  .promo-box .btn-row .btn, .promo-box > .btn { width: 100%; }
  .stats { gap: 16px; }
  .stat__value { font-size: 1.6rem; }
}

/* ---------- Hero arrows on phones/tablets: small round buttons inset over the image ---------- */
@media (max-width: 899px) {
  .hero__arrow {
    top: 110px;               /* middle of the 220px image row */
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--heading);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
  }
  .hero__arrow:hover, .hero__arrow:focus-visible { background: #fff; color: var(--primary); }
  .hero__arrow .icon { font-size: 1.35rem; }
  .hero__arrow--prev { left: 12px; }
  .hero__arrow--next { right: 12px; }
  .hero__arrow:active { transform: translateY(-50%) scale(.94); }
}

/* ---------- Store hero: photo slides fill the image panel ---------- */
.hero__media--photo { background: #1d3549; }
.hero__media--photo img { padding: 0; object-fit: cover; mix-blend-mode: normal; }
.hero__media--photo::after { background: linear-gradient(to bottom, transparent 60%, var(--primary) 100%); }
@media (min-width: 900px) { .hero__media--photo::after { background: linear-gradient(to right, transparent 62%, var(--primary) 100%); } }
.tile__img.is-photo { padding: 0; }
.mini-table td:nth-child(3) { font-family: var(--font-head); font-weight: 600; white-space: nowrap; padding-right: 12px; }
