/* ============================================================
   LOJA.CSS v3 — Página Loja (is_shop) — Magnaverso
   Banner: 1920×300 desktop | 400×300 mobile (obrigatório)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Ms+Madi&display=swap');
/*
  Se você tiver Story Script .woff2 no tema:
  @font-face {
    font-family: var(--mgv-font-decorative);
    src: url('../fonts/StoryScript.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
  }
  Substitua 'Ms Madi' por 'Story Script' nas regras abaixo.
*/

/* ── Body ───────────────────────────────────────────────────── */
body.woocommerce-shop {
  background-color: transparent !important;
  font-family: var(--mgv-font-body) !important;
}
body.woocommerce-shop .woocommerce-products-header,
body.woocommerce-shop .woocommerce-breadcrumb,
body.woocommerce-shop .woocommerce-result-count,
body.woocommerce-shop .woocommerce-ordering {
  display: none !important;
}

/* ════════════════════════════════════════════════════════════
   BANNER ROTATIVO
   Proporção travada: 1920×300 = aspect-ratio 6.4/1
   Mobile: 400×300 = 4/3 (imagem diferente via data-mobile-src)
   ════════════════════════════════════════════════════════════ */

.mgv-loja-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #0d3d27;
  /* Desktop: altura fixa proporcional a 1920×300 */
  height: 300px;
  user-select: none;
}

.mgv-loja-banner__track {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ── Slide base ──────────────────────────────────────────────── */
.mgv-loja-banner__slide {
  position: absolute;
  inset: 0;
  /* Desktop: usa data-desktop-src via CSS var injetada inline */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.65s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  outline: none !important;
}

.mgv-loja-banner__slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.42) 0%,
    rgba(13, 61, 39, 0.30) 60%,
    rgba(0, 0, 0, 0.12) 100%
  );
  z-index: 1;
}

.mgv-loja-banner__slide--active {
  opacity: 1;
  z-index: 2;
}

/* ── Conteúdo do slide ──────────────────────────────────────── */
.mgv-loja-banner__content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 24px;
  max-width: 780px;
  pointer-events: none; /* o clique é no <a> pai */
}

.mgv-loja-banner__title {
  margin: 0 0 8px;
  font-family: var(--mgv-font-cursive) !important;
  font-size: clamp(2.2rem, 4.5vw, 4.5rem);
  font-weight: 400;
  line-height: 1.05;
  color: #FFEFA6;
  text-shadow: -2px 3px 6px rgba(0, 0, 0, 0.75);
}

.mgv-loja-banner__subtitle {
  margin: 0 0 16px;
  font-family: var(--mgv-font-display);
  font-size: clamp(0.75rem, 1.2vw, 0.92rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.mgv-loja-banner__btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 24px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
  font-family: var(--mgv-font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  pointer-events: auto;
  transition: background 0.2s ease, border-color 0.2s ease;
}

a.mgv-loja-banner__slide:hover .mgv-loja-banner__btn {
  background: rgba(61, 204, 126, 0.28);
  border-color: rgba(61, 204, 126, 0.75);
}

/* ── Setas ───────────────────────────────────────────────────── */
.mgv-loja-banner__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.18s ease, border-color 0.18s ease;
  outline: none !important;
}

.mgv-loja-banner__nav:hover {
  background: rgba(13, 92, 58, 0.6);
  border-color: rgba(61, 204, 126, 0.65);
}

.mgv-loja-banner__nav--prev { left: 14px; }
.mgv-loja-banner__nav--next { right: 14px; }

/* ── Dots ────────────────────────────────────────────────────── */
.mgv-loja-banner__dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 7px;
  align-items: center;
}

.mgv-loja-banner__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: transparent;
  cursor: pointer;
  padding: 0;
  outline: none !important;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mgv-loja-banner__dot--active,
.mgv-loja-banner__dot:hover {
  background: #ffffff;
  border-color: #ffffff;
  transform: scale(1.3);
}

/* ════════════════════════════════════════════════════════════
   MOBILE — troca de imagem e altura
   Breakpoint: ≤ 600px → imagem mobile (400×300)
   ════════════════════════════════════════════════════════════ */

@media (max-width: 600px) {

  .mgv-loja-banner {
    height: 300px; /* mesma altura em px, mas agora é 4:3 (400×300) */
  }

  /*
   * O JS (woocommerce.php) troca o background-image pelo
   * atributo data-mobile-src em telas ≤ 600px.
   * O CSS garante que cover + center funcionem corretamente.
   */
  .mgv-loja-banner__slide {
    background-size: cover;
    background-position: center center;
  }

  /* Subtitle some em mobile para não poluir */
  .mgv-loja-banner__subtitle {
    display: none;
  }

  .mgv-loja-banner__title {
    font-size: clamp(1.9rem, 8vw, 2.8rem);
  }

  .mgv-loja-banner__nav {
    width: 34px;
    height: 34px;
    font-size: 1.3rem;
  }

  .mgv-loja-banner__nav--prev { left: 6px; }
  .mgv-loja-banner__nav--next { right: 6px; }
}

/* ════════════════════════════════════════════════════════════
   CORPO PRINCIPAL
   ════════════════════════════════════════════════════════════ */

.mgv-loja-main {
  width: 100%;
  padding: 0 0 48px;
}

.mgv-loja-cat-block {
  margin-bottom: 8px;
}

.mgv-loja-cat-block + .mgv-loja-cat-block {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Faixa título da categoria ───────────────────────────────── */
.mgv-loja-cat-band {
  width: 100%;
  padding: 14px 0 12px;
  background: linear-gradient(
    135deg,
    rgba(13, 61, 39, 0.94) 0%,
    rgba(13, 92, 58, 0.90) 100%
  );
  border-bottom: 2px solid rgba(61, 204, 126, 0.28);
}

.mgv-loja-cat-band--featured {
  background: linear-gradient(
    135deg,
    rgba(9, 50, 32, 0.97) 0%,
    rgba(13, 75, 49, 0.95) 100%
  );
  border-bottom-color: rgba(255, 239, 166, 0.35);
}

.mgv-loja-cat-band__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.mgv-loja-cat-band__star {
  font-size: 1.4rem;
  color: #FFEFA6;
  flex-shrink: 0;
  line-height: 1;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

.mgv-loja-cat-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.mgv-loja-cat-icon--thumb {
  border-radius: 8px;
  filter: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.mgv-loja-cat-band__text {
  flex: 1;
}

/* ── TÍTULO — Story Script ───────────────────────────────────── */
.mgv-loja-cat-title {
  margin: 0 0 2px;
  font-family: var(--mgv-font-cursive) !important;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  color: #FFEFA6;
  text-shadow: -1px 2px 5px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.01em;
}

.mgv-loja-cat-band--featured .mgv-loja-cat-title {
  color: #ffffff;
}

.mgv-loja-cat-desc {
  margin: 0;
  font-family: var(--mgv-font-body);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.4;
}

.mgv-loja-cat-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff !important;
  text-decoration: none !important;
  font-family: var(--mgv-font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  outline: none !important;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.mgv-loja-cat-link:hover {
  background: rgba(61, 204, 126, 0.2);
  border-color: rgba(61, 204, 126, 0.55);
  color: #ffffff !important;
  text-decoration: none !important;
}

/* ── Carrossel ───────────────────────────────────────────────── */
.u-section-loja,
.mgv-loja-carousel-wrap {
  background: linear-gradient(
    180deg,
    rgba(13, 115, 113, 0.10) 0%,
    rgba(26, 195, 92, 0.05) 100%
  ) !important;
  padding: 18px 0 22px !important;
}

.mgv_carousel_loja .u-repeater-item {
  flex: 0 0 282px !important;
  min-width: 282px !important;
  max-width: 282px !important;
  box-sizing: border-box !important;
}

/* ── Estado vazio ────────────────────────────────────────────── */
.mgv-loja-empty {
  max-width: 500px;
  margin: 60px auto;
  text-align: center;
  padding: 0 18px;
  font-family: var(--mgv-font-display);
  color: rgba(255, 255, 255, 0.8);
}

.mgv-loja-empty p { font-size: 1.1rem; margin-bottom: 20px; }

.mgv-loja-empty__btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--mgv-gradient-btn-confirm);
  color: #ffffff !important;
  text-decoration: none !important;
  font-family: var(--mgv-font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Responsivo geral ────────────────────────────────────────── */
@media (max-width: 767px) {

  .mgv-loja-cat-band__inner {
    padding: 0 14px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .mgv-loja-cat-icon { width: 38px; height: 38px; }

  .mgv-loja-cat-title {
    font-size: clamp(1.7rem, 6vw, 2.4rem);
  }

  .mgv-loja-cat-link {
    width: 100%;
    justify-content: center;
  }

  .mgv_carousel_loja .u-repeater-item {
    flex: 0 0 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
  }
}
