/* =========================================================
   STORM GLOBAL STYLE — GENERAL PAGE SYSTEM
   -----------------------------------------------------------
   This is the reusable component system for standard/commerce
   pages (homepage, category, PLP-style pages, etc.)

   This is NOT the themed skin used on the technical/education
   pages (weightblock, coverstock, layout, ball-care, lane-play).
   Those pages keep using web-page-style.css + COMMERCE-WEB-STYLE.css.
   Do not load this file on those pages, and do not load
   web-page-style.css here — they are two separate systems.
   ========================================================= */

/* ---------------------------------------------------------
   1. RESET
--------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--spi-font-body);
  color: var(--spi-black);
  background: var(--spi-white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------------------------------------------------------
   2. TOKENS
--------------------------------------------------------- */
:root {
  /* Neutrals */
  --spi-white: #ffffff;
  --spi-black: #191c1b;
  --spi-gray-100: #f7f7f7;
  --spi-gray-200: #ececec;
  --spi-gray-300: #d9d9d9;
  /* placeholder image gray */
  --spi-gray-400: #b3b3b3;
  --spi-gray-600: #6b6b6b;
  --spi-text-muted: rgba(25, 28, 27, 0.65);
  --spi-border: #e2e2e2;

  /* Overlay for image-based cards */
  --spi-overlay: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.15) 45%, rgba(0, 0, 0, 0) 70%);

  /* Radii */
  --spi-radius-sm: 8px;
  --spi-radius-md: 16px;
  --spi-radius-lg: 20px;
  --spi-radius-pill: 999px;

  /* Spacing */
  --spi-gap: 24px;
  --spi-gap-sm: 12px;
  --spi-section-y: 72px;
  --spi-section-y-mobile: 40px;
  --spi-pad-desktop: 64px;
  --spi-pad-tablet: 32px;
  --spi-pad-mobile: 16px;
  --spi-container-max: 1440px;

  /* Motion */
  --spi-ease: all 0.25s ease;

  /* Type */
  --spi-font-display: 'Oswald', sans-serif;
  --spi-font-body: 'Roboto', sans-serif;
}

/* ---------------------------------------------------------
   3. TYPOGRAPHY
--------------------------------------------------------- */
.spi-h1,
.spi-h2,
.spi-h3 {
  font-family: var(--spi-font-display);
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.spi-h1 {
  font-size: 40px;
}

.spi-h2 {
  font-size: 28px;
}

.spi-h3 {
  font-size: 18px;
}

.spi-body {
  font-family: var(--spi-font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--spi-text-muted);
}

.spi-eyebrow {
  font-family: var(--spi-font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--spi-text-muted);
}

@media (max-width: 768px) {
  .spi-h1 {
    font-size: 26px;
  }

  .spi-h2 {
    font-size: 20px;
  }

  .spi-h3 {
    font-size: 16px;
  }
}

/* ---------------------------------------------------------
   4. LAYOUT CONTAINERS
   - .spi-section-full   : edge-to-edge, no side padding
   - .spi-section-padded : side padding at every breakpoint
   - .spi-container       : centers + caps content width
--------------------------------------------------------- */
.spi-section-full {
  width: 100%;
}

.spi-section-padded {
  width: 100%;
  padding-left: var(--spi-pad-desktop);
  padding-right: var(--spi-pad-desktop);
}

.spi-container {
  max-width: var(--spi-container-max);
  margin: 0 auto;
}

/* Vertical rhythm applied to whichever wrapper is on the section */
.spi-section-full,
.spi-section-padded {
  padding-top: var(--spi-section-y);
  padding-bottom: var(--spi-section-y);
}

@media (max-width: 1024px) {

  .spi-section-padded {
    padding-left: var(--spi-pad-tablet);
    padding-right: var(--spi-pad-tablet);
  }
}

@media (max-width: 600px) {

  .spi-section-padded {
    padding-left: var(--spi-pad-mobile);
    padding-right: var(--spi-pad-mobile);
  }

  .spi-section-full,
  .spi-section-padded {
    padding-top: var(--spi-section-y-mobile);
    padding-bottom: var(--spi-section-y-mobile);
  }
}

.spi-section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

/* Filter/tag chip, e.g. "Style ✕" on Best For Your Style */
.spi-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--spi-radius-pill);
  background: var(--spi-gray-100);
  border: 1px solid var(--spi-border);
  font-size: 12px;
  font-weight: 600;
  color: var(--spi-black);
}

.spi-chip button {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  color: var(--spi-text-muted);
}

/* ---------------------------------------------------------
   5. GRID / ROW SYSTEM
   Row of equal-width cards. Wraps on tablet, becomes a
   horizontal scroller on mobile so 5-6up rows stay usable.
--------------------------------------------------------- */
.spi-row {
  display: flex;
  gap: var(--spi-gap);
}

.spi-row>* {
  flex: 1 1 0;
  min-width: 0;
}

.spi-cols-2>* {
  flex-basis: calc((100% - var(--spi-gap)) / 2);
}

.spi-cols-3>* {
  flex-basis: calc((100% - (2 * var(--spi-gap))) / 3);
}

.spi-cols-4>* {
  flex-basis: calc((100% - (3 * var(--spi-gap))) / 4);
}

.spi-cols-5>* {
  flex-basis: calc((100% - (4 * var(--spi-gap))) / 5);
}

.spi-cols-6>* {
  flex-basis: calc((100% - (5 * var(--spi-gap))) / 6);
}

@media (max-width: 1024px) {

  .spi-cols-5>*,
  .spi-cols-6>* {
    flex-basis: calc((100% - (2 * var(--spi-gap))) / 3);
  }
}

@media (max-width: 768px) {
  .spi-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .spi-row::-webkit-scrollbar {
    display: none;
  }

  .spi-row>* {
    scroll-snap-align: start;
    flex: 0 0 auto;
  }

  .spi-cols-2>* {
    width: 70%;
  }

  .spi-cols-3>*,
  .spi-cols-4>*,
  .spi-cols-5>*,
  .spi-cols-6>* {
    width: 42%;
  }
}

/* ---------------------------------------------------------
   6. BUTTONS
   (carried over as-is from the existing brand system so
   general pages match established button behavior)
--------------------------------------------------------- */
.btn {
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 600;
  transition: 0.2s ease;
  margin: 6px 0;
  display: inline-block;
  cursor: pointer;
  font-size: 14px;
  border: none;
}

.btn.default {
  border: 2px solid #191c1b !important;
  background-color: #fafdfa !important;
  color: #191c1b !important;
  box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.25) !important;
}

.btn.default:hover {
  transform: translateY(-2px);
  background-color: #fafdfa !important;
  border: 2px solid #fafdfa !important;
  color: #191c1b !important;
  box-shadow: 0px 1px 2px 3px rgba(0, 0, 0, 0.05) !important;
}

.btn.default.active {
  border: 2px solid #fafdfa !important;
  background-color: #fafdfa !important;
  color: #191c1b !important;
  box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.15) !important;
}

@media (max-width: 1024px) {
  .btn {
    padding: 6px 14px !important;
    font-weight: 700 !important;
    font-size: 10px !important;
    line-height: 20px !important;
    letter-spacing: 0.1px !important;
  }
}

/* ---------------------------------------------------------
   7. HERO
   300px tall, full-bleed image, slide controls bottom-left.
   No headline/title — CTA + slide dots only.
--------------------------------------------------------- */
.spi-hero {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
}

.spi-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.spi-hero-slide.is-active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}

.spi-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spi-hero-controls {
  position: absolute;
  left: 32px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  z-index: 2;
}

.spi-hero-dots {
  display: flex;
  gap: 8px;
}

.spi-hero-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.spi-hero-dots button.is-active {
  background: #ffffff;
}

@media (max-width: 600px) {
  .spi-hero {
    height: 220px;
  }

  .spi-hero-controls {
    left: 16px;
    bottom: 16px;
  }
}

/* ---------------------------------------------------------
   8. CATEGORY CARD
   Image fills the card, label sits bottom-left over a
   gradient. Used by "Shop By Ball Type" and
   "A Bag For Every Player".
--------------------------------------------------------- */
.spi-card-category {
  position: relative;
  border-radius: var(--spi-radius-md);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  display: block;
}

.spi-card-category img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--spi-ease);
}

.spi-card-category:hover img {
  transform: scale(1.04);
}

.spi-card-category::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--spi-overlay);
}

.spi-card-category span {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 2;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  max-width: calc(100% - 32px);
}

/* ---------------------------------------------------------
   9. RECOMMENDATION CARD
   "Best For Your Style" — image + product info stack.
--------------------------------------------------------- */
.spi-card-rec {
  background: var(--spi-white);
  border: 1px solid var(--spi-border);
  border-radius: var(--spi-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.spi-card-rec-img {
  aspect-ratio: 4 / 3;
  background: var(--spi-gray-300);
}

.spi-card-rec-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spi-card-rec-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.spi-card-rec-body dt {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 8px;
}

.spi-card-rec-body dd {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--spi-text-muted);
}

.spi-card-rec-body .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* ---------------------------------------------------------
   10. FEATURE CARD
   Full-bleed background image, gradient, title + CTA
   bottom-left. Used standalone (full width) and inside
   50/50 split containers.
--------------------------------------------------------- */
.spi-card-feature {
  position: relative;
  border-radius: var(--spi-radius-md);
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
}

.spi-card-feature img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spi-card-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--spi-overlay);
}

.spi-card-feature-content {
  position: relative;
  z-index: 2;
  padding: 28px;
  color: #fff;
}

.spi-card-feature-content h3 {
  color: #fff;
  margin-bottom: 16px;
  max-width: 380px;
}

/* Full-bleed feature standalone in a full-width section (no rounding) */
.spi-card-feature.is-flush {
  border-radius: 0;
  min-height: 320px;
}

/* ---------------------------------------------------------
   11. 50/50 SPLIT CONTAINER
--------------------------------------------------------- */
.spi-split {
  display: flex;
  width: 100%;
}

.spi-split>* {
  flex: 1 1 50%;
  min-width: 0;
}

.spi-split.has-gap {
  gap: var(--spi-gap);
}

@media (max-width: 768px) {
  .spi-split {
    flex-direction: column;
  }
}

/* ---------------------------------------------------------
   12. PRODUCT CARD
   "New Arrivals" — image, centered text below.
--------------------------------------------------------- */
.spi-card-product {
  background: var(--spi-white);
  border: 1px solid var(--spi-border);
  border-radius: var(--spi-radius-md);
  overflow: hidden;
  text-align: center;
}

.spi-card-product-img {
  aspect-ratio: 1 / 1;
  background: var(--spi-gray-300);
}

.spi-card-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spi-card-product-body {
  padding: 16px;
}

.spi-card-product-body h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 4px;
}

.spi-card-product-body span {
  font-size: 12px;
  color: var(--spi-text-muted);
}

/* ---------------------------------------------------------
   13. NAV CARD
   "Bags / Shoes / Accessories / Apparel" and
   "Apparel for Every Occasion" — image, title + CTA
   bottom-left, links out to a category/product list.
--------------------------------------------------------- */
.spi-card-nav {
  position: relative;
  border-radius: var(--spi-radius-md);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: flex-end;
}

.spi-card-nav img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spi-card-nav::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--spi-overlay);
}

.spi-card-nav-content {
  position: relative;
  z-index: 2;
  padding: 20px;
  color: #fff;
}

.spi-card-nav-content h3 {
  color: #fff;
  margin-bottom: 12px;
}

/* ---------------------------------------------------------
   14. LEARNING RESOURCES SECTION
   Section itself is full-width; its title/cards are padded
   within it. Own card style — links to the technical/
   education pages (weightblock, coverstock, layout, etc.)
--------------------------------------------------------- */
.spi-section-learning {
  width: 100%;
  background: var(--spi-gray-200);
}

.spi-card-learning {
  background: var(--spi-white);
  border-radius: var(--spi-radius-md);
  overflow: hidden;
  display: block;
}

.spi-card-learning-img {
  aspect-ratio: 16 / 10;
  background: var(--spi-gray-300);
}

.spi-card-learning-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spi-card-learning-body {
  padding: 16px 20px;
}

.spi-card-learning-body h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

/* ---------------------------------------------------------
   15. ARTICLE / VIDEO CARD
   Placeholder only — final spec to be provided.
--------------------------------------------------------- */
.spi-card-article {
  background: var(--spi-white);
  border: 1px solid var(--spi-border);
  border-radius: var(--spi-radius-md);
  overflow: hidden;
}

.spi-card-article-img {
  aspect-ratio: 16 / 10;
  background: var(--spi-gray-300);
}

.spi-card-article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spi-card-article-body {
  padding: 14px 16px;
}

.spi-card-article-body h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}

/* ---------------------------------------------------------
   16. HELPERS
--------------------------------------------------------- */
.spi-text-center {
  text-align: center;
}

.spi-mt-0 {
  margin-top: 0;
}