/* ═══════════════════════════════════════════════════════════
   T1 AUTO PARTS — Homepage (marketplace layout)
   Light gray canvas + white panels, Amazon / Walmart style.
   The YMM card styles live in shop.css and are not touched here.
═══════════════════════════════════════════════════════════ */

:root { --canvas: #EEF0F3; }

/* ── Hero: dark band that fades into the gray canvas ── */
#t1-hero.t1-hero--home { padding: 46px 0 150px; }
#t1-hero.t1-hero--home::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 170px;
  background: linear-gradient(to bottom, rgba(238,240,243,0) 0%, var(--canvas) 92%);
  pointer-events: none;
}
.t1-hero--home .t1-h1 { font-size: clamp(34px, 4.6vw, 58px); }
.t1-hero--home .t1-hero-sub { margin: 10px auto 26px; max-width: 520px; }

/* Popular searches under the YMM card */
.t1-popular {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px;
  margin-top: 18px; font-size: 13px;
}
.t1-popular-label { display: inline-flex; align-items: center; gap: 5px; color: var(--g400); font-weight: 600; }
.t1-popular a {
  color: #E5E7EB; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.13);
  padding: 5px 12px; border-radius: var(--rfull); transition: background var(--tr), border-color var(--tr);
}
.t1-popular a:hover { background: rgba(230,59,46,.18); border-color: var(--red); color: var(--white); }

/* ── Canvas ── */
.t1-home { background: var(--canvas); padding-bottom: 48px; display: flow-root; }

/* ── Panels ── */
.t1-panel {
  background: var(--white); border-radius: 12px;
  padding: 20px 22px 22px; margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(17,24,39,.05);
}
.t1-panel--tight { padding: 16px 22px; }
.t1-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.t1-panel-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--fd); font-size: 25px; font-weight: 700; line-height: 1.1; color: var(--navy);
}
.t1-panel-badge {
  font-family: var(--fb); font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  background: var(--red); color: var(--white); padding: 4px 8px; border-radius: 5px;
}
.t1-panel-sub { font-size: 13px; color: var(--g500); margin-top: 3px; }
.t1-panel-link {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  color: var(--red); font-size: 14px; font-weight: 600;
}
.t1-panel-link:hover { color: var(--red-dk); text-decoration: underline; }

/* ── Top-pick quad cards (overlap the hero) ── */
.t1-quads {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
  margin-top: -112px; margin-bottom: 16px;
}
.t1-quad {
  display: flex; flex-direction: column;
  background: var(--white); border-radius: 12px; padding: 16px 16px 14px;
  box-shadow: 0 6px 20px rgba(17,24,39,.10);
}
.t1-quad-title { font-family: var(--fd); font-size: 20px; font-weight: 700; line-height: 1.15; color: var(--navy); margin-bottom: 12px; }
.t1-quad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; margin-bottom: 12px; }
.t1-quad-item { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.t1-quad-img {
  display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden;
  background: #F6F7F9; transition: box-shadow var(--tr);
}
.t1-quad-img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; mix-blend-mode: multiply; transition: transform .3s; }
.t1-quad-item:hover .t1-quad-img img { transform: scale(1.06); }
.t1-quad-name {
  font-size: 12px; line-height: 1.3; color: var(--g700);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.t1-quad-item:hover .t1-quad-name { color: var(--red); }
.t1-quad-price { font-family: var(--fd); font-size: 16px; font-weight: 700; line-height: 1; }
.t1-quad-price del { font-size: 12px; opacity: .6; margin-right: 3px; }
.t1-quad-price del .woocommerce-Price-amount { color: var(--g400) !important; }
.t1-quad-price ins { text-decoration: none; }
.t1-quad-link { margin-top: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--red); }
.t1-quad-link:hover { text-decoration: underline; }

/* ── Trust bar ── */
.t1-trustbar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--white); border-radius: 12px; margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(17,24,39,.05);
}
.t1-trustbar-item { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-right: 1px solid var(--g100); }
.t1-trustbar-item:last-child { border-right: none; }
.t1-trustbar-icon {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #FEF2F2; color: var(--red);
}
.t1-trustbar-item strong { display: block; font-size: 14px; color: var(--navy); }
.t1-trustbar-item em { display: block; font-style: normal; font-size: 12px; color: var(--g500); }

/* ── Horizontal rails ── */
.t1-rail { position: relative; }
.t1-rail-track {
  display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 2px 2px 8px; margin: -2px -2px 0;
}
.t1-rail-track::-webkit-scrollbar { display: none; }
.t1-rail-track > .t1-pcard { flex: 0 0 212px; scroll-snap-align: start; }
.t1-rail-btn {
  position: absolute; z-index: 3; top: 38%; transform: translateY(-50%);
  width: 42px; height: 64px; border-radius: 8px;
  background: rgba(255,255,255,.96); color: var(--navy);
  box-shadow: 0 2px 10px rgba(17,24,39,.18); border: 1px solid var(--g200);
  font-size: 30px; line-height: 1; padding-bottom: 4px;
  opacity: 0; pointer-events: none; transition: opacity .2s, background var(--tr);
}
.t1-rail-btn:hover { background: var(--white); color: var(--red); }
.t1-rail-prev { left: -8px; }
.t1-rail-next { right: -8px; }
.t1-rail.can-prev .t1-rail-prev,
.t1-rail.can-next .t1-rail-next { opacity: 1; pointer-events: auto; }
@media (hover: none) { .t1-rail-btn { display: none; } }

/* Category circles */
.t1-cats-track { gap: 18px; }
.t1-catcircle { flex: 0 0 124px; scroll-snap-align: start; text-align: center; }
.t1-catcircle-img {
  display: block; width: 112px; height: 112px; margin: 0 auto 8px;
  border-radius: 50%; overflow: hidden; background: #F3F4F6;
  border: 2px solid transparent; transition: border-color var(--tr), transform var(--tr);
}
.t1-catcircle-img img { width: 100%; height: 100%; object-fit: contain; padding: 16px; mix-blend-mode: multiply; }
.t1-catcircle:hover .t1-catcircle-img { border-color: var(--red); transform: translateY(-2px); }
.t1-catcircle-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--navy);
}
.t1-catcircle:hover .t1-catcircle-name { color: var(--red); }
.t1-catcircle-count { display: block; font-size: 11px; color: var(--g500); margin-top: 2px; }

/* ── Promo banners ── */
.t1-promos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.t1-promo {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 6px;
  min-height: 196px; padding: 26px 30px; border-radius: 14px; color: var(--white);
  transition: transform var(--tr), box-shadow var(--tr);
}
.t1-promo:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(17,24,39,.18); color: var(--white); }
.t1-promo--fit  { background: linear-gradient(120deg, #E63B2E 0%, #B42318 100%); }
.t1-promo--ship { background: linear-gradient(120deg, #1A1A2E 0%, #2F2F55 100%); }
.t1-promo-kicker { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; opacity: .8; }
.t1-promo-title { font-family: var(--fd); font-size: 30px; font-weight: 700; line-height: 1.05; max-width: 72%; }
.t1-promo-text { font-size: 14px; opacity: .85; max-width: 62%; }
.t1-promo-cta {
  margin-top: auto; width: fit-content;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); color: var(--navy);
  padding: 9px 16px; border-radius: var(--rfull); font-size: 13px; font-weight: 700;
}
.t1-promo--fit .t1-promo-cta { color: var(--red-dk); }
.t1-promo-art { position: absolute; z-index: -1; right: -14px; bottom: -30px; opacity: .14; color: var(--white); }

/* ── Shop by make ── */
.t1-makes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.t1-make {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border: 1px solid var(--g200); border-radius: 10px;
  transition: border-color var(--tr), box-shadow var(--tr);
}
.t1-make-badge {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy); color: var(--white);
  font-family: var(--fd); font-size: 19px; font-weight: 700; transition: background var(--tr);
}
.t1-make-name { font-size: 14px; font-weight: 600; color: var(--navy); }
.t1-make:hover { border-color: var(--red); box-shadow: 0 4px 12px rgba(230,59,46,.10); }
.t1-make:hover .t1-make-badge { background: var(--red); }

/* ── Brands ── */
.t1-brands { display: flex; align-items: center; gap: 24px; }
.t1-brands-label { flex-shrink: 0; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--g500); }
.t1-brands-list { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.t1-brands-list span { font-family: var(--fd); font-size: 20px; font-weight: 700; letter-spacing: .5px; color: var(--g300); transition: color var(--tr); }
.t1-brands-list span:hover { color: var(--navy); }

/* ── Help band ── */
.t1-helpband {
  display: flex; align-items: center; gap: 20px;
  background: var(--navy); color: var(--g400);
  border-radius: 14px; padding: 26px 30px; margin-top: 8px;
}
.t1-helpband-icon {
  width: 58px; height: 58px; flex-shrink: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--red); color: var(--white);
}
.t1-helpband h2 { font-family: var(--fd); font-size: 28px; font-weight: 700; color: var(--white); line-height: 1.1; }
.t1-helpband p { font-size: 14px; max-width: 560px; margin-top: 4px; }
.t1-helpband .t1-btn { margin-left: auto; flex-shrink: 0; }

/* ═════════════ RESPONSIVE ═════════════ */
@media (max-width: 1100px) {
  .t1-quads { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: -96px; }
  .t1-makes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .t1-promos { grid-template-columns: 1fr; }
  .t1-trustbar { grid-template-columns: 1fr 1fr; }
  .t1-trustbar-item:nth-child(2) { border-right: none; }
  .t1-trustbar-item:nth-child(-n+2) { border-bottom: 1px solid var(--g100); }
  .t1-brands { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (max-width: 768px) {
  #t1-hero.t1-hero--home { padding: 30px 0 120px; }
  .t1-popular { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -14px; padding-right: 14px; }
  .t1-popular::-webkit-scrollbar { display: none; }
  .t1-popular a, .t1-popular-label { flex-shrink: 0; }
  .t1-panel { padding: 16px; border-radius: 10px; }
  .t1-panel-title { font-size: 21px; }
  .t1-rail-track > .t1-pcard { flex-basis: 172px; }
  .t1-catcircle { flex-basis: 96px; }
  .t1-catcircle-img { width: 86px; height: 86px; }
  .t1-makes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .t1-make { padding: 10px; gap: 8px; }
  .t1-make-badge { width: 32px; height: 32px; font-size: 16px; }
  .t1-make-name { font-size: 13px; }
  .t1-promo { padding: 22px; min-height: 0; }
  .t1-promo-title { font-size: 24px; max-width: 100%; }
  .t1-promo-text { max-width: 100%; }
  .t1-helpband { flex-direction: column; text-align: center; padding: 24px 20px; }
  .t1-helpband .t1-btn { margin-left: 0; width: 100%; }
}
@media (max-width: 600px) {
  /* Quad cards become a swipeable row */
  .t1-quads {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-right: -14px; padding-right: 14px;
  }
  .t1-quads::-webkit-scrollbar { display: none; }
  .t1-quad { flex: 0 0 82%; scroll-snap-align: start; }
  .t1-trustbar { grid-template-columns: 1fr; }
  .t1-trustbar-item { border-right: none; border-bottom: 1px solid var(--g100); padding: 12px 16px; }
  .t1-trustbar-item:last-child { border-bottom: none; }
  .t1-makes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
