/* ============================================================
   ALLAN SPORTS - Design Tokens
   Preto/Branco/Cinza + Verde (ação) + Azul discreto (links/foco)
   Tipografia: Poppins (display, tracked, uppercase em títulos)
              Inter (corpo, legibilidade)
   Assinatura visual: recorte diagonal ("speed cut") em CTAs e
   divisores de seção, remetendo a velocidade/esporte.
   ============================================================ */

:root {
  --c-black: #0a0a0a;
  --c-black-soft: #161616;
  --c-white: #ffffff;
  --c-gray-50: #f6f6f7;
  --c-gray-100: #eeeeef;
  --c-gray-300: #d4d4d8;
  --c-gray-500: #8b8b93;
  --c-gray-700: #4a4a52;
  --c-green: #14b866;
  --c-green-dark: #0e9a54;
  --c-blue: #3457d5;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 2px 10px rgba(10,10,10,.06);
  --shadow-md: 0 10px 30px rgba(10,10,10,.09);
  --shadow-lg: 0 20px 50px rgba(10,10,10,.14);

  --font-display: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  --ease: cubic-bezier(.22,.9,.32,1);
}

* { box-sizing: border-box; }

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

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5, .font-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: 2px solid var(--c-blue);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-gray-100);
  transition: box-shadow .3s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.topbar {
  background: var(--c-black);
  color: var(--c-gray-300);
  font-size: .78rem;
  letter-spacing: .02em;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.brand-text::after { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--c-green); margin-left: 4px; border-radius: 2px; }

.search-wrapper .search-input {
  border-radius: 999px;
  border: 1.5px solid var(--c-gray-100);
  padding: .7rem 1.2rem .7rem 2.7rem;
  background: var(--c-gray-50);
  font-size: .92rem;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.search-wrapper .search-input:focus,
.d-lg-none .search-input:focus {
  border-color: var(--c-black);
  background: var(--c-white);
  box-shadow: none;
}
.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-gray-500);
  pointer-events: none;
}
.d-lg-none .search-input { border-radius: 999px; padding: .65rem 1rem .65rem 2.6rem; border: 1.5px solid var(--c-gray-100); background: var(--c-gray-50); }

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--c-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--c-gray-100);
  max-height: 420px;
  overflow-y: auto;
  z-index: 1050;
  padding: .5rem;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .6rem;
  border-radius: var(--radius-sm);
  transition: background .15s;
}
.search-result-item:hover { background: var(--c-gray-50); }
.search-result-item img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; background: var(--c-gray-100); }
.search-result-item .name { font-weight: 600; font-size: .88rem; }
.search-result-item .meta { font-size: .75rem; color: var(--c-gray-500); }
.search-result-item .price { font-weight: 700; color: var(--c-green-dark); font-size: .85rem; }
.search-empty { padding: 1.2rem; text-align: center; color: var(--c-gray-500); font-size: .88rem; }

.header-icon {
  font-size: 1.25rem;
  color: var(--c-black);
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background .2s var(--ease);
}
.header-icon:hover { background: var(--c-gray-50); }

.main-nav { gap: 1.8rem; padding-bottom: 1rem; }
.main-nav .nav-link {
  font-size: .86rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--c-black-soft);
  padding: 0;
  position: relative;
}
.main-nav .nav-link::after {
  content: '';
  position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; background: var(--c-green);
  transition: width .25s var(--ease);
}
.main-nav .nav-link:hover::after { width: 100%; }

.mobile-nav a { display: block; padding: .6rem 0; font-weight: 600; border-bottom: 1px solid var(--c-gray-100); }

/* ============================================================
   BOTÕES
   ============================================================ */
.btn-whatsapp {
  background: var(--c-green);
  color: var(--c-white);
  border: none;
  border-radius: 999px;
  font-weight: 600;
  padding: .65rem 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.btn-whatsapp:hover { background: var(--c-green-dark); color: var(--c-white); transform: translateY(-1px); }

.btn-hero {
  background: var(--c-white);
  color: var(--c-black);
  border-radius: 2px 999px 999px 2px;
  padding: .85rem 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .85rem;
  display: inline-block;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--c-black); }

.btn-view-product {
  width: 100%;
  border: 1.5px solid var(--c-black);
  background: transparent;
  color: var(--c-black);
  border-radius: 999px;
  font-weight: 600;
  font-size: .85rem;
  padding: .55rem;
  margin-top: .8rem;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.btn-view-product:hover { background: var(--c-black); color: var(--c-white); }

.whatsapp-float {
  position: fixed;
  bottom: 22px; right: 22px;
  width: 60px; height: 60px;
  background: var(--c-green);
  color: var(--c-white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  box-shadow: var(--shadow-lg);
  z-index: 1200;
  animation: pulse-green 2.4s infinite;
}
@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(20,184,102,.45), var(--shadow-lg); }
  70% { box-shadow: 0 0 0 14px rgba(20,184,102,0), var(--shadow-lg); }
  100% { box-shadow: 0 0 0 0 rgba(20,184,102,0), var(--shadow-lg); }
}

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero-slider { position: relative; background: var(--c-black); }
.hero-img { height: 78vh; min-height: 440px; object-fit: cover; opacity: .92; }
.hero-caption {
  position: absolute;
  left: 0; right: 0; bottom: 10%;
  color: var(--c-white);
}
.hero-subtitle {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--c-green);
  margin-bottom: .6rem;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.05;
  max-width: 720px;
  margin-bottom: .8rem;
  text-shadow: 0 2px 20px rgba(0,0,0,.35);
}
.hero-text { max-width: 520px; color: var(--c-gray-300); margin-bottom: 1.4rem; }
.hero-slider .carousel-control-prev,
.hero-slider .carousel-control-next { width: 5%; opacity: .6; }
.hero-slider .carousel-indicators [data-bs-target] { width: 8px; height: 8px; border-radius: 50%; background: var(--c-white); opacity: .5; }
.hero-slider .carousel-indicators .active { opacity: 1; background: var(--c-green); }

/* ============================================================
   SEÇÕES / TÍTULOS
   ============================================================ */
.bg-light-gray { background: var(--c-gray-50); }

.section-heading { margin-bottom: 2.2rem; position: relative; }
.section-heading h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  text-transform: uppercase;
  letter-spacing: -.01em;
  position: relative;
  display: inline-block;
  padding-bottom: .6rem;
}
.section-heading h2::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 46px; height: 4px;
  background: var(--c-green);
  border-radius: 2px;
}
.section-heading p { margin-top: .4rem; }

/* ============================================================
   CATEGORIAS
   ============================================================ */
.category-card {
  position: relative;
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--c-gray-100);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s var(--ease);
}
.category-card:hover { box-shadow: var(--shadow-md); }
.category-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.category-card:hover img { transform: scale(1.06); }
.category-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10,10,10,.78) 100%);
  display: flex; align-items: flex-end;
  padding: 1rem;
}
.category-card-overlay span {
  color: var(--c-white);
  font-weight: 700;
  text-transform: uppercase;
  font-size: .95rem;
  letter-spacing: .02em;
}

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.product-card {
  background: var(--c-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--c-gray-100);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

.product-card-image { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--c-gray-50); overflow: hidden; }
.product-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.product-card:hover .product-card-image img { transform: scale(1.05); }

.badge-tag {
  position: absolute; top: 10px; left: 10px;
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  padding: .28rem .6rem; border-radius: 999px;
  color: var(--c-white); letter-spacing: .03em;
}
.badge-new { background: var(--c-blue); }
.badge-best { background: var(--c-black); top: 42px; }
.badge-promo { background: var(--c-green); top: 74px; }

.favorite-btn {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px;
  background: rgba(255,255,255,.92);
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-black);
  transition: background .2s, color .2s, transform .2s;
}
.favorite-btn:hover { background: var(--c-white); transform: scale(1.08); }
.favorite-btn.active { color: #e0245e; }
.favorite-btn.active i::before { content: "\f415"; } /* bi-heart-fill fallback via JS class swap preferred */

.product-card-body { padding: 1rem 1.1rem 1.2rem; flex-grow: 1; display: flex; flex-direction: column; }
.product-brand { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-gray-500); font-weight: 700; }
.product-name { font-size: .95rem; font-weight: 600; margin: .25rem 0 .1rem; line-height: 1.3; font-family: var(--font-body); }
.product-name a { color: var(--c-black); }
.product-category { font-size: .78rem; color: var(--c-gray-500); }

.product-price { margin-top: .6rem; display: flex; align-items: baseline; gap: .5rem; }
.price-old { text-decoration: line-through; color: var(--c-gray-500); font-size: .82rem; }
.price-new { font-weight: 800; font-size: 1.05rem; color: var(--c-black); }

/* ============================================================
   SCROLL HORIZONTAL (Mais Vendidos / Marcas)
   ============================================================ */
.horizontal-scroll {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.horizontal-scroll .scroll-item { flex: 0 0 240px; scroll-snap-align: start; }
.horizontal-scroll::-webkit-scrollbar { height: 6px; }
.horizontal-scroll::-webkit-scrollbar-thumb { background: var(--c-gray-300); border-radius: 3px; }

.brands-scroll { align-items: center; }
.brand-logo-item {
  flex: 0 0 150px;
  height: 90px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--c-gray-100);
  border-radius: var(--radius-sm);
  padding: 1rem;
  filter: grayscale(1);
  opacity: .7;
  transition: filter .25s, opacity .25s;
}
.brand-logo-item:hover { filter: grayscale(0); opacity: 1; }

/* ============================================================
   SOBRE / ABOUT
   ============================================================ */
.section-about { background: var(--c-black); }
.about-img { box-shadow: var(--shadow-lg); }
.about-list { list-style: none; padding: 0; margin: 1.2rem 0; }
.about-list li { padding: .35rem 0; color: var(--c-gray-300); }
.about-list i { color: var(--c-green); margin-right: .6rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--c-black-soft); color: var(--c-gray-300); }
.footer-brand { font-family: var(--font-display); text-transform: uppercase; color: var(--c-white); font-weight: 800; }
.footer-title { text-transform: uppercase; font-size: .82rem; letter-spacing: .06em; color: var(--c-white); margin-bottom: 1rem; }
.footer-links li { margin-bottom: .5rem; font-size: .88rem; }
.footer-links a { color: var(--c-gray-300); transition: color .2s; }
.footer-links a:hover { color: var(--c-green); }
.social-icons { display: flex; gap: .7rem; margin-top: 1rem; }
.social-icons a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--c-gray-700);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, border-color .2s;
}
.social-icons a:hover { background: var(--c-green); border-color: var(--c-green); }
.map-embed iframe, .map-embed-full iframe { width: 100%; border-radius: var(--radius-md); border: 0; }
.map-embed iframe { height: 150px; }
.map-embed-full iframe { height: 320px; }

.footer-credit {
  display: block;
  margin-top: .4rem;
  font-size: .78rem;
  color: var(--c-gray-500);
}
.footer-credit strong { color: var(--c-gray-300); }

/* ============================================================
   PÁGINA DE CATEGORIA / MARCA
   ============================================================ */
.category-banner {
  background: var(--c-black);
  color: var(--c-white);
  padding: 3rem 0;
  text-align: center;
}
.category-banner h1 { text-transform: uppercase; font-size: clamp(1.6rem, 3vw, 2.4rem); }
.category-banner p { color: var(--c-gray-300); max-width: 600px; margin: .6rem auto 0; }

.filters-panel { background: var(--c-gray-50); border-radius: var(--radius-md); padding: 1.4rem; }
.filters-title { text-transform: uppercase; font-size: .9rem; letter-spacing: .04em; margin-bottom: 1rem; }
.filter-group { margin-bottom: 1rem; }
.filter-label { font-size: .8rem; font-weight: 600; color: var(--c-gray-700); }

.empty-state { text-align: center; padding: 4rem 1rem; color: var(--c-gray-500); }
.empty-state i { font-size: 2.6rem; margin-bottom: 1rem; display: block; color: var(--c-gray-300); }

.pagination .page-link { border-radius: 999px !important; margin: 0 .2rem; border: none; color: var(--c-black); }
.pagination .page-item.active .page-link { background: var(--c-black); }

/* ============================================================
   PÁGINA DE PRODUTO
   ============================================================ */
.breadcrumb { font-size: .82rem; }
.breadcrumb a { color: var(--c-gray-500); }
.breadcrumb-item.active { color: var(--c-black); font-weight: 600; }

.product-gallery .main-image-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--c-gray-50);
  aspect-ratio: 1/1;
  margin-bottom: 1rem;
  cursor: zoom-in;
}
.main-product-image { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }

.gallery-thumbs { display: flex; gap: .7rem; flex-wrap: wrap; }
.gallery-thumb {
  width: 76px; height: 76px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--c-gray-50);
  transition: border-color .2s;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--c-black); }

.product-detail-brand { text-transform: uppercase; font-size: .8rem; font-weight: 700; color: var(--c-gray-500); letter-spacing: .05em; }
.product-detail-title { font-size: clamp(1.5rem, 3vw, 2.1rem); text-transform: uppercase; margin: .3rem 0 .8rem; }
.product-detail-meta { display: flex; gap: 1.2rem; font-size: .85rem; color: var(--c-gray-500); margin-bottom: 1rem; }
.product-detail-price { margin-bottom: 1rem; }
.product-detail-price .price-new { font-size: 1.7rem; }
.product-detail-short { color: var(--c-gray-700); }

.option-group { margin-top: 1.2rem; }
.option-label { display: block; font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .6rem; }
.option-pills { display: flex; gap: .6rem; flex-wrap: wrap; }
.option-pill {
  border: 1.5px solid var(--c-gray-300);
  background: var(--c-white);
  border-radius: 999px;
  padding: .45rem 1.1rem;
  font-size: .85rem;
  font-weight: 600;
  transition: border-color .2s, background .2s, color .2s;
}
.option-pill:hover:not(.disabled) { border-color: var(--c-black); }
.option-pill.selected { background: var(--c-black); color: var(--c-white); border-color: var(--c-black); }
.option-pill.disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }

.share-buttons a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--c-gray-300);
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: .4rem;
  transition: background .2s, color .2s;
}
.share-buttons a:hover { background: var(--c-black); color: var(--c-white); }

.product-detail-description { color: var(--c-gray-700); line-height: 1.7; }

.lightbox-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10,10,10,.94);
  z-index: 2000;
  align-items: center; justify-content: center;
}
.lightbox-overlay.show { display: flex; }
.lightbox-overlay img { max-width: 90vw; max-height: 88vh; border-radius: var(--radius-md); }
.lightbox-close {
  position: absolute; top: 24px; right: 28px;
  background: transparent; border: none; color: var(--c-white); font-size: 1.6rem;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 991px) {
  .hero-img { height: 58vh; min-height: 340px; }
  .section-heading { margin-bottom: 1.6rem; }
}
@media (max-width: 575px) {
  .hero-title { font-size: 1.7rem; }
  .whatsapp-float { width: 54px; height: 54px; font-size: 1.4rem; bottom: 16px; right: 16px; }
}
