/* treniraj.si v5 — home (front-page.php, SPEC §3).
   Rules: tokens only, every selector once across v5, no important-overrides, breakpoints 480/768/1024/1280.
   → white (black newsletter card) → black footer. Sections 4–6 are data-conditional; front-page.php swaps
   .tr-section--grey / .tr-section--line at render time so two identical surfaces never touch without a change. */

/* ══ 1 · Hero ══ */
.tr-hero{position:relative;display:flex;align-items:center;min-height:clamp(520px,31.25vw,800px);/* 31.25vw = 800/2560: pri širokih zaslonih hero raste s sliko 3,2:1 in je ne obrezuje po višini */background:var(--tr-black);overflow:hidden;isolation:isolate;}
.tr-hero-media{position:absolute;inset:0;z-index:-1;}
.tr-hero-media picture{display:block;width:100%;height:100%;}
.tr-hero-media::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,color-mix(in srgb,var(--tr-black) 92%,transparent) 0%,color-mix(in srgb,var(--tr-black) 55%,transparent) 55%,color-mix(in srgb,var(--tr-black) 25%,transparent) 100%);}
.tr-hero-img{width:100%;height:100%;object-fit:cover;object-position:75% 50%;} /* subject sits right of centre in the source; 75% keeps the head in frame on narrow (cover-cropped) viewports, no-op ≥1280 where the full width shows */
.tr-hero-deco{position:absolute;right:2vw;top:50%;z-index:0;transform:translateY(-50%);font-family:var(--tr-font-display);font-size:var(--tr-fs-deco);font-weight:800;line-height:.95;letter-spacing:-.03em;text-align:right;text-transform:uppercase;color:transparent;-webkit-text-stroke:1px color-mix(in srgb,var(--tr-white) 12%,transparent);pointer-events:none;user-select:none;} /* texture, not copy: pinned to the viewport edge (not the container) and 12 % stroke so it never competes with the athlete on 1281–1600; hidden ≤1280 where the figure fills the right half */
.tr-hero-inner{position:relative;z-index:1;padding-top:var(--tr-s9);padding-bottom:var(--tr-s9);}
.tr-hero-content{max-width:720px;} /* 720: »Brez kompromisov.« at the 72px --tr-fs-h1 ceiling ≈ 670px → the <br> gives exactly 2 lines on every desktop width, SL and EN heroes are the same height */
.tr-hero-title{color:var(--tr-on-dark);}
.tr-hero-accent{color:var(--tr-red-on-dark);}
.tr-hero-sub{margin-top:var(--tr-s5);max-width:52ch;font-size:var(--tr-fs-18);line-height:var(--tr-lh);color:var(--tr-on-dark-muted);}
.tr-hero-ctas{display:flex;flex-wrap:wrap;gap:var(--tr-s3);margin-top:var(--tr-s6);}

/* ══ 2 · Trust bar (white, hairline below; the only logistics promises on the homepage) ══ */
.tr-trust{background:var(--tr-white);border-bottom:var(--tr-border);}
.tr-trust-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--tr-s3) var(--tr-s5);padding:var(--tr-s5) 0;}
.tr-trust-item{display:flex;align-items:center;justify-content:center;gap:var(--tr-s3);/* 4 enake kolone, vsebina centrirana → enakomerno po širini */font-size:var(--tr-fs-14);font-weight:600;line-height:var(--tr-lh-snug);color:var(--tr-ink);}
.tr-trust-item svg{flex:none;width:24px;height:24px;color:var(--tr-red-ink);}

/* ══ 3 · Category tiles: 6-col grid, row 1 = three tiles (span 2, 4/3), row 2 = two wide tiles (span 3, 2/1) ══ */
.tr-tiles{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:var(--tr-s5);}
.tr-tiles .tr-tile{grid-column:span 2;}
.tr-tiles .tr-tile--wide{grid-column:span 3;}

/* ══ 5 · Promo band: container-inset black card, 2 columns, product photo in a white well ══ */
.tr-promo{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);align-items:center;gap:var(--tr-s7);padding:var(--tr-s8);border-radius:var(--tr-r-lg);background:var(--tr-black);overflow:hidden;isolation:isolate;}
.tr-promo-eyebrow{display:inline-block;font-size:var(--tr-fs-12);font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--tr-red-on-dark);}
.tr-promo-title{margin-top:var(--tr-s3);font-size:var(--tr-fs-h2);line-height:var(--tr-lh-tight);letter-spacing:-.02em;color:var(--tr-on-dark);}
.tr-promo-sub{margin-top:var(--tr-s2);font-size:var(--tr-fs-18);font-weight:600;line-height:var(--tr-lh-snug);color:var(--tr-on-dark-muted);}
.tr-promo-checks{display:flex;flex-direction:column;gap:var(--tr-s2);margin-top:var(--tr-s5);font-size:var(--tr-fs-15);color:var(--tr-on-dark-muted);}
.tr-promo-checks li{display:flex;align-items:center;gap:var(--tr-s3);}
.tr-promo-checks li::before{content:"\2713";flex:none;width:20px;font-weight:700;text-align:center;color:var(--tr-red-on-dark);}
.tr-promo-price{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--tr-s3);margin-top:var(--tr-s5);}
.tr-promo-price del{font-size:var(--tr-fs-18);color:var(--tr-on-dark-faint);}
.tr-promo-price ins{font-size:var(--tr-fs-h1);font-weight:800;line-height:1;letter-spacing:-.03em;text-decoration:none;color:var(--tr-on-dark);}
.tr-promo-price .tr-badge{align-self:center;}
.tr-promo-stock{margin-top:var(--tr-s3);font-size:var(--tr-fs-14);color:var(--tr-on-dark-muted);}
.tr-promo-stock.is-in{color:var(--tr-green-on-dark);}
.tr-promo-ctas{display:flex;flex-wrap:wrap;gap:var(--tr-s3);margin-top:var(--tr-s5);}
.tr-promo-ctas .added_to_cart{order:1;flex:0 0 100%;display:inline-flex;align-items:center;min-height:24px;font-size:var(--tr-fs-13);font-weight:600;color:var(--tr-on-dark-muted);text-decoration:underline;text-underline-offset:2px;} /* WC add-to-cart.js injects <a class="added_to_cart"> right after the button: give it its own row instead of shoving the second button aside */
.tr-promo-ctas .add_to_cart_button.added::after{content:"\2713";margin-left:var(--tr-s2);} /* .added is set by WC on success → »Dodaj v košarico ✓« without a JS hook */
.tr-promo-media{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;width:100%;max-width:480px;aspect-ratio:4/3;margin-left:auto;padding:var(--tr-s5);border-radius:var(--tr-r-lg);background:var(--tr-white);}
.tr-promo--cut .tr-promo-media{max-width:none;aspect-ratio:auto;padding:0;background:transparent;}
.tr-promo--cut .tr-promo-media::before{content:"";position:absolute;inset:-10% -5%;z-index:-1;background:radial-gradient(closest-side,color-mix(in srgb,var(--tr-red) 28%,transparent),transparent 70%);}
.tr-promo--cut .tr-promo-media img{width:100%;max-width:640px;height:auto;object-fit:contain;filter:drop-shadow(0 30px 40px rgba(0,0,0,.6));transition:transform var(--tr-t-slow) var(--tr-ease);}
.tr-promo--cut .tr-promo-media:hover img{transform:translateY(-6px) scale(1.02);}
.tr-promo-deco{position:absolute;right:var(--tr-s6);bottom:calc(-1 * var(--tr-s4));z-index:0;font-family:var(--tr-font-display);font-size:var(--tr-fs-deco);font-weight:800;line-height:.9;letter-spacing:-.04em;color:transparent;-webkit-text-stroke:1px var(--tr-line-dark);pointer-events:none;user-select:none;}
.tr-promo-deco span{font-size:50%;vertical-align:top;margin-left:.1em;}
.tr-promo-copy{position:relative;z-index:1;}
.tr-promo-media img{width:100%;height:100%;object-fit:contain;}



/* ══ 6 · Newsletter: rounded black card inset in the container on WHITE, 64px white space below before the footer. ══ */
.tr-nl-wrap{padding:var(--tr-section) 0;background:var(--tr-white);} /* equal white space above and below the black card (the grey band above ends at its own padding) */
.tr-promo-wrap{padding-top:0;} /* two white sections in a row: one --tr-section gap between the tiles and the black card, not two */
.tr-nl{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);align-items:center;gap:var(--tr-s6) var(--tr-s8);padding:var(--tr-s7) var(--tr-s8);border-radius:var(--tr-r-lg);background:var(--tr-black);}
.tr-nl-copy{min-width:0;}
.tr-nl-title{font-size:var(--tr-fs-h2);line-height:var(--tr-lh-tight);letter-spacing:-.02em;color:var(--tr-on-dark);}
.tr-nl-accent{color:var(--tr-red-on-dark);}
.tr-nl-sub{margin-top:var(--tr-s3);max-width:38ch;font-size:var(--tr-fs-16);line-height:var(--tr-lh);color:var(--tr-on-dark-muted);}
.tr-nl-form-wrap{min-width:0;}
.tr-nl-form{display:flex;flex-direction:column;gap:var(--tr-s3);}
.tr-nl-row{display:flex;gap:var(--tr-s2);}
.tr-nl-row .tr-btn{flex:none;height:52px;}
.tr-nl-form .tr-input{flex:1 1 auto;min-width:0;height:52px;}
.tr-nl-consent{font-size:var(--tr-fs-13);line-height:var(--tr-lh-snug);color:var(--tr-on-dark-muted);}
.tr-nl-consent a{text-decoration:underline;text-underline-offset:2px;}
.tr-nl-consent:has(input:user-invalid) span{color:var(--tr-red-on-dark);} /* required consent left unticked after a submit attempt */
.tr-nl-note{margin-top:var(--tr-s3);font-size:var(--tr-fs-12);line-height:var(--tr-lh-snug);color:var(--tr-on-dark-faint);}
.tr-nl-msg{margin-top:var(--tr-s2);font-size:var(--tr-fs-14);font-weight:600;line-height:var(--tr-lh-snug);color:var(--tr-on-dark);}
.tr-nl-msg.is-ok{color:var(--tr-green-on-dark);}
.tr-nl-msg.is-err{color:var(--tr-red-on-dark);}

/* ══ Responsive ══ */
@media (max-width:1280px){
  .tr-hero-deco{display:none;}
}
@media (max-width:1024px){
  .tr-trust-list{grid-template-columns:repeat(2,minmax(0,1fr));} /* 4 columns at ≤1024 wrap the longest promise to 2 lines; 2×2 keeps every item on one line */
  .tr-trust-item{justify-content:flex-start;align-items:flex-start;} /* in 2 columns the items share a left edge and a top line (centred only in the 4-column desktop row) */
  .tr-tiles{gap:var(--tr-s4);}
  .tr-promo{grid-template-columns:1fr 1fr;gap:var(--tr-s6);padding:var(--tr-s6);}
}
/* 8 cards: 4-col on tablet only (no 3-col orphan row); bounded range so components.css 2-col ≤768 is not out-specified */
@media (min-width:769px) and (max-width:1024px){
  .tr-bestsellers .tr-card-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--tr-s4);}
}
@media (max-width:768px){
  .tr-hero{align-items:flex-end;min-height:520px;} /* copy sits in the darkest lower part, below the athlete's face (the 900×700 source is never cropped vertically at these widths, so object-position cannot move the head) */
  .tr-hero-img{object-position:50% 50%;}
  .tr-hero-media::after{background:linear-gradient(180deg,color-mix(in srgb,var(--tr-black) 70%,transparent) 0%,color-mix(in srgb,var(--tr-black) 45%,transparent) 50%,color-mix(in srgb,var(--tr-black) 80%,transparent) 100%);}
  .tr-hero-inner{padding-top:var(--tr-s8);padding-bottom:var(--tr-s8);}
  .tr-hero-sub{font-size:var(--tr-fs-16);}
  .tr-trust-list{padding:var(--tr-s4) 0;}
  .tr-tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--tr-s3);} /* 2 columns: five 3:2 tiles one per row were ≈1.5 screens of scrolling before the promo */
  .tr-tiles .tr-tile,.tr-tiles .tr-tile--wide{grid-column:auto;}
  .tr-tiles .tr-tile--wide:last-child:nth-child(odd){grid-column:1/-1;aspect-ratio:16/9;} /* an odd last tile spans the row instead of leaving a hole */
  .tr-tiles .tr-tile-title{font-size:var(--tr-fs-16);}
  .tr-promo{grid-template-columns:minmax(0,1fr);gap:var(--tr-s5);padding:var(--tr-s5);}
  .tr-promo-media{max-width:none;margin-left:0;}
  .tr-promo-price ins{font-size:var(--tr-fs-32);}
  .tr-promo-deco{display:none;}
  .tr-nl-wrap{padding:var(--tr-section-sm) 0;}
  .tr-nl{grid-template-columns:1fr;gap:var(--tr-s5);padding:var(--tr-s5);}
  .tr-nl-title{font-size:var(--tr-fs-24);}
}
@media (max-width:480px){
  .tr-hero-ctas{flex-direction:column;}
  .tr-hero-ctas .tr-btn{width:100%;}
  .tr-trust-list{grid-template-columns:1fr;} /* one promise per line: no 3-line item next to a 1-line one */
  .tr-promo-ctas{flex-direction:column;}
  .tr-promo-ctas .tr-btn{width:100%;} /* same stacked full-width pattern as the hero CTAs */
  .tr-nl-row{flex-direction:column;}
  .tr-nl-row .tr-btn{width:100%;}
}
