/* ==========================================================================
   aaryans-material-grid.css  (v17 — final)
   "Nakupujte podle materiálu" homepage section — 4 cards (desktop) / 2x2 (mobile)
   Upload to: /usr/documents/upload/CSSkodyCLAUDE/aaryans-material-grid.css
   Paired with: aaryans-material-grid.js
   ========================================================================== */

/* ----- DESKTOP (≥1200px): 4 columns ----- */
.container-index-banners.aaryans-material-section {
  --ary-blue: #0076A0;
  --ary-blue-light: #65A8DC;
  --ary-dark: #2E2D2C;
  --ary-gold: #EBB21C;
  background: #fff !important;
  padding: 40px 16px 12px !important;
  margin: 10px auto 0 !important;
  max-width: 1500px !important;
  width: 100% !important;
  display: block !important;
  box-sizing: border-box !important;
}

.container-index-banners.aaryans-material-section .content {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-auto-rows: auto !important;
  grid-auto-flow: row !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  box-sizing: border-box !important;
}

.container-index-banners.aaryans-material-section .footer-banners:empty,
.container-index-banners.aaryans-material-section .footer-banner-2:empty {
  display: none !important;
}

/* ----- HEADING ----- */
.container-index-banners.aaryans-material-section .homepage-group-title.aaryans-material-title {
  grid-column: 1 / -1 !important;
  position: relative;
  display: flex !important;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 0 12px !important;
}

.container-index-banners.aaryans-material-section .homepage-group-title.aaryans-material-title .page-title-separator {
  width: 100%;
  border-bottom: 3px solid var(--ary-blue-light);
  opacity: .55;
  position: absolute;
}

.container-index-banners.aaryans-material-section .homepage-group-title.aaryans-material-title h1,
.container-index-banners.aaryans-material-section .homepage-group-title.aaryans-material-title h2 {
  margin: 0 !important;
}

/* ----- CARD (footer-banner) ----- */
.container-index-banners.aaryans-material-section .footer-banner {
  position: relative !important;
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  background: #eaeef2 !important;
  box-shadow: 0 6px 20px rgba(0, 40, 60, .06) !important;
  transition: transform .35s cubic-bezier(.2, .7, .3, 1), box-shadow .35s ease !important;
  aspect-ratio: 4 / 5;
}

.container-index-banners.aaryans-material-section .footer-banner:hover,
.container-index-banners.aaryans-material-section .footer-banner:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 40, 60, .14) !important;
}

.container-index-banners.aaryans-material-section .footer-banner > a {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
  background: transparent !important;
}

.container-index-banners.aaryans-material-section .footer-banner img {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 0 !important;
  transform: scale(1.02);
  transition: transform .6s ease, filter .3s ease;
}

.container-index-banners.aaryans-material-section .footer-banner:hover img {
  transform: scale(1.08);
  filter: none !important;
}

/* ----- NUKE LEGACY FV STUDIO CARD CHROME ----- */
.container-index-banners.aaryans-material-section .footer-banner .extended-banner-content,
.container-index-banners.aaryans-material-section .footer-banner .banner-content,
.container-index-banners.aaryans-material-section .footer-banner .banner-info,
.container-index-banners.aaryans-material-section .footer-banner .banner-info-box,
.container-index-banners.aaryans-material-section .footer-banner .banner-description,
.container-index-banners.aaryans-material-section .footer-banner .banner-text-wrapper,
.container-index-banners.aaryans-material-section .footer-banner .banner-image-title,
.container-index-banners.aaryans-material-section .footer-banner .banner-title-wrapper {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.container-index-banners.aaryans-material-section .footer-banner > a::before,
.container-index-banners.aaryans-material-section .footer-banner > a::after,
.container-index-banners.aaryans-material-section .footer-banner .extended-banner-title::before,
.container-index-banners.aaryans-material-section .footer-banner .extended-banner-title::after,
.container-index-banners.aaryans-material-section .footer-banner .extended-banner-text::before,
.container-index-banners.aaryans-material-section .footer-banner .extended-banner-text::after,
.container-index-banners.aaryans-material-section .footer-banner .extended-banner-content::before,
.container-index-banners.aaryans-material-section .footer-banner .extended-banner-content::after {
  content: none !important;
  display: none !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* ----- GRADIENT OVERLAY ----- */
.container-index-banners.aaryans-material-section .footer-banner .aaryans-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(0, 22, 35, .82) 0%,
      rgba(0, 22, 35, .45) 40%,
      rgba(0, 22, 35, .08) 75%,
      transparent 100%) !important;
  pointer-events: none;
  z-index: 1;
}

/* ----- CARD TITLE ----- */
.container-index-banners.aaryans-material-section .footer-banner .extended-banner-title {
  position: absolute !important;
  left: 20px !important;
  right: 20px !important;
  bottom: 78px !important;
  top: auto !important;
  transform: none !important;
  z-index: 2 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  font-family: 'Cocogoose', 'Cocogoose Pro', 'Bahnschrift', sans-serif !important;
  font-weight: 600 !important;
  font-size: 26px !important;
  line-height: 1.05 !important;
  letter-spacing: .2px !important;
  color: #fff !important;
  text-align: left !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .4);
  pointer-events: none;
}

.container-index-banners.aaryans-material-section .footer-banner.no-subtitle .extended-banner-title {
  bottom: 52px !important;
}

/* ----- CARD SUBTITLE ----- */
.container-index-banners.aaryans-material-section .footer-banner .extended-banner-text,
.container-index-banners.aaryans-material-section .footer-banner .aaryans-card-subtitle {
  position: absolute !important;
  left: 20px !important;
  right: 20px !important;
  bottom: 50px !important;
  top: auto !important;
  transform: none !important;
  z-index: 2 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  font-family: 'Bahnschrift', sans-serif !important;
  font-weight: 400 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  letter-spacing: .1px !important;
  color: #fff !important;
  opacity: .92;
  text-align: left !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
  pointer-events: none;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2;
  overflow: hidden !important;
}

/* ----- CTA ----- */
.container-index-banners.aaryans-material-section .footer-banner .aaryans-card-cta {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Bahnschrift', sans-serif;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  letter-spacing: .6px;
  color: #fff;
  text-transform: uppercase;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

.container-index-banners.aaryans-material-section .footer-banner .aaryans-card-cta::after {
  content: "\203A";
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  display: inline-block;
  transform: translateY(-2px);
  transition: transform .22s ease;
}

.container-index-banners.aaryans-material-section .footer-banner:hover .aaryans-card-cta::after {
  transform: translateY(-2px) translateX(5px);
}

/* ----- TABLET (768–1199px): narrower gaps, smaller text ----- */
@media (max-width: 1199px) {
  .container-index-banners.aaryans-material-section {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .container-index-banners.aaryans-material-section .content {
    gap: 12px !important;
  }

  .container-index-banners.aaryans-material-section .footer-banner .extended-banner-title {
    font-size: 20px !important;
    bottom: 68px !important;
  }

  .container-index-banners.aaryans-material-section .footer-banner.no-subtitle .extended-banner-title {
    bottom: 46px !important;
  }

  .container-index-banners.aaryans-material-section .footer-banner .extended-banner-text,
  .container-index-banners.aaryans-material-section .footer-banner .aaryans-card-subtitle {
    font-size: 12px !important;
    bottom: 46px !important;
  }
}

/* ----- MOBILE (≤767px): 2x2 grid ----- */
/* `body` prefix boosts specificity to beat Shoptet base-theme rules.
   `:has()` reset on preceding Sezónní products list neutralises the
   bottom margin that would otherwise mask our container's top padding. */
@media (max-width: 767px) {
  body .container-index-banners.aaryans-material-section {
    padding: 16px 12px 10px !important;
    margin: 20px auto 0 !important;
  }

  body .container-index-banners.aaryans-material-section .homepage-group-title.aaryans-material-title {
    margin: 0 0 20px !important;
  }

  body .container-index-banners.aaryans-material-section .content {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  body .container-index-banners.aaryans-material-section .footer-banner {
    aspect-ratio: 3 / 4;
    border-radius: 12px !important;
  }

  body .container-index-banners.aaryans-material-section .footer-banner .extended-banner-title {
    font-size: 22px !important;
    bottom: 64px !important;
    left: 14px !important;
    right: 14px !important;
  }

  body .container-index-banners.aaryans-material-section .footer-banner.no-subtitle .extended-banner-title {
    bottom: 42px !important;
  }

  body .container-index-banners.aaryans-material-section .footer-banner .extended-banner-text,
  body .container-index-banners.aaryans-material-section .footer-banner .aaryans-card-subtitle {
    font-size: 12px !important;
    bottom: 42px !important;
    left: 14px !important;
    right: 14px !important;
    -webkit-line-clamp: 2;
  }

  body .container-index-banners.aaryans-material-section .footer-banner .aaryans-card-cta {
    font-size: 11px;
    left: 14px;
    right: 14px;
    bottom: 14px;
  }

  body .container-index-banners.aaryans-material-section .homepage-group-title.aaryans-material-title h1,
  body .container-index-banners.aaryans-material-section .homepage-group-title.aaryans-material-title h2 {
    padding: 0 16px !important;
    white-space: normal;
  }

  /* Reset the preceding Sezónní products list's bottom margin so our top
     padding is actually visible (margin-collapse would otherwise hide it). */
  body :is(.products-block, ul.products, .products):has(+ .container-index-banners.aaryans-material-section) {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
}
