/*
Theme Name: IGP Importados
Theme URI: https://igpimportados.com.br
Author: Igor
Description: Tema WordPress personalizado para a loja de perfumes IGP Importados, recriando o design original do site em HTML/JS estático. Feito para uso com WooCommerce.
Version: 1.1.0
Requires PHP: 7.4
Text Domain: igp-importados
*/

/* =========================================================
   1. VARIÁVEIS DE MARCA (mesmas cores/fontes do site original)
   ========================================================= */
:root {
  --igp-bg: #F7F3EE;           /* fundo creme geral */
  --igp-bg-alt: #FFFFFF;       /* fundo branco (cards, header interno) */
  --igp-ink: #17100F;          /* texto principal */
  --igp-wine: #57161C;         /* bordô — marca, títulos, destaques */
  --igp-wine-dark: #030201;    /* quase preto — header/hero escuro */
  --igp-gold: #C6A15B;         /* dourado — acentos, hover */
  --igp-gold-light: #E0B96A;   /* dourado claro — textos sobre fundo escuro */
  --igp-cream-line: #EBE2D6;   /* linhas divisórias */
  --igp-muted: #9A8B78;        /* texto secundário / labels */
  --igp-badge-red: #B3231C;    /* badge "última unidade" */
  --igp-whats: #1EA854;        /* verde WhatsApp (escurecido p/ contraste) */

  --igp-font-display: 'Cormorant Garamond', Georgia, serif;
  --igp-font-body: 'Jost', system-ui, -apple-system, sans-serif;

  --igp-radius: 2px;
  --igp-container: 1280px;
}

/* =========================================================
   2. RESET BÁSICO
   ========================================================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--igp-bg);
  font-family: var(--igp-font-body);
  color: var(--igp-ink);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--igp-wine); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--igp-gold); }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
.igp-container {
  max-width: var(--igp-container);
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 40px);
}

/* =========================================================
   3. TIPOGRAFIA
   ========================================================= */
h1, h2, h3, .igp-serif {
  font-family: var(--igp-font-display);
  font-weight: 600;
  color: var(--igp-wine);
  margin: 0;
}
.igp-eyebrow {
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--igp-muted);
}

/* =========================================================
   4. HEADER
   ========================================================= */
.igp-header-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
}
.igp-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease;
}
/* header solto sobre o hero (home, no topo) */
.igp-header--transparent {
  background: transparent;
  position: absolute;
  top: 0; left: 0; right: 0;
}
.igp-header--transparent .igp-header-link,
.igp-header--transparent .igp-logo-sub { color: #FFFFFF; }

/* header sólido (páginas internas, ou home rolada) */
.igp-header--solid {
  background: var(--igp-bg-alt);
  border-bottom-color: var(--igp-cream-line);
}
.igp-header--solid .igp-header-link,
.igp-header--solid .igp-logo-sub { color: var(--igp-ink); }

.igp-header-nav-left,
.igp-header-nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.igp-header-nav-right { justify-content: flex-end; }

.igp-header-link {
  display: flex;
  align-items: center;
  gap: 9px;
  background: none;
  border: 0;
  padding: 4px 2px;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.igp-header-link:hover { color: var(--igp-gold); }

.igp-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.igp-logo-mark {
  font-family: var(--igp-font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--igp-wine);
}
.igp-header--transparent .igp-logo-mark { color: #FFFFFF; }
.igp-logo-sub {
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
}

.igp-icon-btn {
  position: relative;
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
  display: flex;
}
.igp-header--transparent .igp-icon-btn { color: #FFFFFF; }
.igp-header--solid .igp-icon-btn { color: var(--igp-ink); }
.igp-cart-count {
  position: absolute;
  right: -2px;
  bottom: 0;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  background: currentColor;
  color: var(--igp-bg-alt);
  font-size: 10px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* menu dropdown */
.igp-menu-panel {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  z-index: 35;
  background: var(--igp-wine);
  padding: 18px 26px;
}
.igp-menu-panel ul {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  max-width: var(--igp-container);
  margin: 0 auto;
}
.igp-menu-panel a {
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #F2E7D8;
}
.igp-menu-panel a:hover { color: var(--igp-gold-light); }

/* painel de busca — CORRIGIDO: tinha marcação no header.php mas nenhuma regra aqui,
   então abria transparente sobre o hero */
.igp-search-panel {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  z-index: 36;
  background: var(--igp-bg);
  border-bottom: 1px solid var(--igp-cream-line);
  box-shadow: 0 14px 30px rgba(3,2,1,.12);
}
.igp-search-panel[hidden] { display: none; }
.igp-search-panel input[type="search"]::placeholder { color: var(--igp-muted); }

/* =========================================================
   5. HERO (home) — duas capas alternando a cada 8s
   ========================================================= */
.igp-hero {
  position: relative;
  overflow: hidden;
  background: var(--igp-wine-dark);
  min-height: 560px;
  height: min(90vh, 780px);
  display: flex;
  align-items: center;
}
.igp-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}
.igp-hero-slide.is-active { opacity: 1; }
.igp-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center bottom;
}
.igp-hero-frasco {
  position: absolute;
  right: clamp(12px, 6vw, 90px);
  bottom: 0;
  height: 86%;
  width: auto;
  object-fit: contain;
}
@media (max-width: 860px) { .igp-hero-frasco { height: 58%; right: -4%; opacity: .55; } }
.igp-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3,2,1,.95) 0%, rgba(3,2,1,.85) 40%, rgba(3,2,1,.35) 65%, rgba(3,2,1,0) 100%);
}
.igp-hero-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding: 0 clamp(24px, 6vw, 90px);
}
.igp-hero-kicker {
  font-size: 13px;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--igp-gold-light);
  margin-bottom: 16px;
}
.igp-hero-title {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.04;
  color: #FFFFFF;
}
.igp-hero-text {
  margin-top: 18px;
  color: rgba(255,255,255,.88);
  font-size: 16px;
  max-width: 460px;
}
.igp-hero-cta {
  margin-top: 28px;
  display: inline-block;
  padding: 14px 30px;
  border: 1px solid var(--igp-gold-light);
  color: var(--igp-gold-light);
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.igp-hero-cta:hover { background: var(--igp-gold-light); color: var(--igp-wine-dark); }

/* pontos indicadores do hero */
.igp-hero-dots {
  position: absolute;
  bottom: 26px;
  left: clamp(24px, 6vw, 90px);
  z-index: 3;
  display: flex;
  gap: 10px;
}
.igp-hero-dot {
  width: 30px; height: 2px;
  border: 0; padding: 0;
  background: rgba(255,255,255,.35);
  cursor: pointer;
}
.igp-hero-dot.is-active { background: var(--igp-gold-light); }

/* =========================================================
   6. SEÇÕES GERAIS
   ========================================================= */
.igp-section { padding: 64px 0; }
.igp-section-title {
  text-align: center;
  font-size: clamp(28px, 3.6vw, 40px);
  margin-bottom: 40px;
}

/* =========================================================
   7. CARD DE PRODUTO (reutilizado em todo o site)
   ========================================================= */
.igp-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
}
.igp-product-badge {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 2;
  background: var(--igp-badge-red);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
}
/* CORRIGIDO: as fotos do catálogo são quadradas (1:1), não 3:4 */
.igp-product-image {
  aspect-ratio: 1 / 1;
  background: var(--igp-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.igp-product-image img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform .5s ease;
}
.igp-product-card:hover .igp-product-image img { transform: scale(1.04); }
.igp-product-tags {
  display: flex;
  gap: 6px;
  margin-top: 14px;
}
.igp-product-tag {
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--igp-muted);
  border: 1px solid var(--igp-cream-line);
  border-radius: 999px;
  padding: 3px 9px;
}
.igp-product-brand {
  margin-top: 12px;
  font-size: 12px;
  color: var(--igp-muted);
}
.igp-product-name {
  font-size: 15px;
  color: var(--igp-ink);
  margin-top: 2px;
}
.igp-product-price-pix {
  margin-top: 10px;
  font-size: 17px;
  font-weight: 600;
  color: var(--igp-wine);
}
.igp-product-price-full {
  font-size: 12.5px;
  color: var(--igp-muted);
  margin-top: 2px;
}
.igp-product-stock {
  margin-top: 8px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.igp-product-stock--pronta { color: var(--igp-badge-red); }
.igp-product-stock--encomenda { color: #8A6B2E; }
.igp-product-stock::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.igp-product-buy {
  margin-top: 14px;
  width: 100%;
  padding: 12px;
  background: none;
  border: 1px solid var(--igp-wine);
  color: var(--igp-wine);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  text-align: center;
  display: block;
}
.igp-product-buy:hover { background: var(--igp-wine); color: #FFF; }

/* botão de encomenda (WhatsApp) — cards sem pronta entrega */
.igp-product-buy--whats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: var(--igp-whats);
  color: var(--igp-whats);
}
.igp-product-buy--whats:hover { background: var(--igp-whats); color: #FFF; }

/* grids e carrosséis */
.igp-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
@media (max-width: 1100px) { .igp-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px)  { .igp-grid { grid-template-columns: repeat(2, 1fr); } }

.igp-carousel-wrap { position: relative; }
.igp-carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.igp-carousel::-webkit-scrollbar { display: none; }
.igp-carousel .igp-product-card {
  flex: 0 0 calc(20% - 20px);
  scroll-snap-align: start;
}
@media (max-width: 1100px) { .igp-carousel .igp-product-card { flex-basis: calc(33.33% - 16px); } }
@media (max-width: 680px)  { .igp-carousel .igp-product-card { flex-basis: calc(50% - 12px); } }

.igp-carousel-nav {
  position: absolute;
  top: 40%;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--igp-bg-alt);
  border: 1px solid var(--igp-cream-line);
  color: var(--igp-wine);
  font-size: 18px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 3;
}
.igp-carousel-nav:hover { background: var(--igp-wine); color: #FFF; border-color: var(--igp-wine); }
.igp-carousel-nav--prev { left: -6px; }
.igp-carousel-nav--next { right: -6px; }

/* =========================================================
   8. MARQUEE (marcas que trabalhamos)
   ========================================================= */
.igp-marquee-section {
  padding: 30px 0;
  border-top: 1px solid var(--igp-cream-line);
  border-bottom: 1px solid var(--igp-cream-line);
  overflow: hidden;
}
.igp-marquee-title {
  text-align: center;
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #8A6B2E;
  margin-bottom: 22px;
}
.igp-marquee-track {
  display: flex;
  gap: 64px;
  width: max-content;
  animation: igp-marquee 32s linear infinite;
}
/* desacelera ao passar o mouse, como no site original */
.igp-marquee-track:hover { animation-duration: 90s; }
.igp-marquee-track img { height: 34px; width: auto; filter: grayscale(1); opacity: .7; }
@keyframes igp-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =========================================================
   9. "ENCONTRE SEU PRÓXIMO PERFUME" (abas)
   ========================================================= */
.igp-finder {
  background: var(--igp-bg);
  padding: 70px 0;
  text-align: center;
}
.igp-finder-logo { font-size: 32px; color: var(--igp-wine); font-family: var(--igp-font-display); font-weight: 700; }
.igp-finder-sub { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--igp-muted); margin-top: 6px; }
.igp-finder-title { font-size: clamp(26px, 3.4vw, 34px); margin-top: 20px; }

.igp-tabs {
  margin-top: 40px;
  background: var(--igp-bg-alt);
  border: 1px solid var(--igp-cream-line);
  text-align: left;
}
.igp-tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--igp-cream-line);
}
.igp-tab-btn {
  flex: 1;
  padding: 18px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--igp-muted);
  cursor: pointer;
  text-align: center;
}
.igp-tab-btn.is-active { color: var(--igp-wine); border-bottom-color: var(--igp-wine); }
.igp-tabs-body { padding: 32px; }
.igp-tab-panel { display: none; }
.igp-tab-panel.is-active { display: block; }
.igp-tab-empty {
  text-align: center;
  padding: 50px 0;
  color: var(--igp-muted);
  font-style: italic;
}
.igp-tab-viewall {
  display: block;
  width: max-content;
  margin: 32px auto 0;
  padding: 14px 34px;
  border: 1px solid var(--igp-wine);
  color: var(--igp-wine);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  border-radius: 999px;
}
.igp-tab-viewall:hover { background: var(--igp-wine); color: #FFF; }

/* =========================================================
   10. COMPRE POR ENCOMENDA
   ========================================================= */
.igp-order-section {
  background: var(--igp-wine);
  color: #F2E7D8;
  padding: 70px 0 0;
}
.igp-order-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  padding-bottom: 60px;
}
@media (max-width: 860px) { .igp-order-grid { grid-template-columns: 1fr; gap: 36px; } }
.igp-order-title { color: #FFFFFF; font-size: clamp(28px, 3.4vw, 38px); }
.igp-order-text { margin-top: 16px; color: rgba(242,231,216,.9); max-width: 40ch; }
.igp-order-cta {
  margin-top: 26px;
  display: inline-block;
  padding: 15px 30px;
  background: var(--igp-gold-light);
  color: var(--igp-wine-dark);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: 999px;
}
.igp-order-cta:hover { background: #FFFFFF; color: var(--igp-wine); }
.igp-order-steps { display: flex; flex-direction: column; gap: 22px; }
.igp-order-step-num {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--igp-gold-light);
}
.igp-order-step-text { margin-top: 6px; color: #F2E7D8; }

.igp-trust-strip {
  border-top: 1px solid rgba(242,231,216,.2);
  padding: 26px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  font-size: 13px;
}
@media (max-width: 720px) { .igp-trust-strip { grid-template-columns: 1fr; } }
.igp-trust-strip strong { display: block; color: #FFFFFF; margin-bottom: 4px; }
.igp-trust-strip span { color: rgba(242,231,216,.85); }

/* =========================================================
   11. PÁGINA DE LISTAGEM (categoria)
   ========================================================= */
.igp-archive-header { padding: 40px 0 20px; }
.igp-archive-title { font-size: clamp(30px, 4vw, 42px); }
.igp-archive-desc { color: var(--igp-muted); margin-top: 8px; max-width: 60ch; }
.igp-archive-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--igp-cream-line);
  border-bottom: 1px solid var(--igp-cream-line);
  font-size: 13px;
}
.igp-archive-count { margin-right: auto; color: var(--igp-muted); }
.igp-filter-btn, .igp-sort-select {
  border: 1px solid var(--igp-cream-line);
  background: var(--igp-bg-alt);
  color: var(--igp-ink);
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
}
.igp-filter-btn:hover { border-color: var(--igp-wine); color: var(--igp-wine); }

/* painel de filtros (Marca / Preço / Disponibilidade) */
.igp-filter-panel {
  background: var(--igp-bg-alt);
  border: 1px solid var(--igp-cream-line);
  border-top: 0;
  padding: 28px clamp(18px, 3vw, 32px);
}
.igp-filter-panel[hidden] { display: none; }
.igp-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
@media (max-width: 860px) { .igp-filter-grid { grid-template-columns: 1fr; gap: 24px; } }
.igp-filter-legend {
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--igp-muted);
  margin-bottom: 14px;
}
.igp-filter-options { display: flex; flex-direction: column; gap: 10px; }
.igp-filter-option {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  cursor: pointer;
}
.igp-filter-option input { accent-color: var(--igp-wine); width: 16px; height: 16px; }
.igp-filter-price { display: flex; align-items: center; gap: 10px; }
.igp-filter-price input {
  width: 110px;
  padding: 10px 12px;
  border: 1px solid var(--igp-cream-line);
  background: var(--igp-bg);
  font-family: var(--igp-font-body);
  font-size: 14px;
}
.igp-filter-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--igp-cream-line);
}
.igp-filter-apply {
  padding: 12px 30px;
  background: var(--igp-wine);
  color: #FFF;
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
.igp-filter-apply:hover { background: var(--igp-wine-dark); }
.igp-filter-clear { font-size: 13px; color: var(--igp-muted); }
.igp-filter-clear:hover { color: var(--igp-wine); }

/* paginação */
.igp-pagination .page-numbers {
  display: inline-block;
  min-width: 38px;
  padding: 9px 10px;
  margin: 0 3px;
  border: 1px solid var(--igp-cream-line);
  font-size: 13px;
}
.igp-pagination .page-numbers.current {
  background: var(--igp-wine);
  border-color: var(--igp-wine);
  color: #FFF;
}

/* =========================================================
   12. FOOTER
   ========================================================= */
.igp-footer {
  background: var(--igp-wine-dark);
  color: rgba(255,255,255,.8);
  padding: 50px 0 26px;
  font-size: 13px;
}
.igp-footer a { color: rgba(255,255,255,.8); }
.igp-footer a:hover { color: var(--igp-gold-light); }

.igp-whatsapp-float {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 50;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

/* respeita quem pediu menos animação no sistema */
@media (prefers-reduced-motion: reduce) {
  .igp-marquee-track { animation: none; }
  .igp-hero-slide { transition: none; }
}
