/* PECATTO Custom Header — v1.0.0 */

:root {
  --pec-black:   #0A0A0C;
  --pec-dark:    #0F0F12;
  --pec-red:     #A01020;
  --pec-text:    #EDE5DC;
  --pec-muted:   #7A6A62;
  --pec-border:  rgba(160,16,32,0.12);
}

/* ════════════════════════════════════════
   OCULTAR CABEÇALHO DO TEMA / ELEMENTOR
   (o nosso header é injectado via wp_body_open)
════════════════════════════════════════════ */
body.has-pec-header #masthead,
body.has-pec-header .site-header:not(.pec-header),
body.has-pec-header [data-elementor-type="header"],
body.has-pec-header .elementor-location-header {
  display: none !important;
}

/* Compensar o header fixo (28px topbar + 68px barra principal) */
body.has-pec-header {
  padding-top: 96px !important;
}

/* Hello Elementor / temas com #page wrapper */
body.has-pec-header #page {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* ════════════════════════════════════════
   OVERLAY ESCURO
════════════════════════════════════════════ */
.pec-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  pointer-events: none;
}

.pec-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ════════════════════════════════════════
   HEADER
════════════════════════════════════════════ */
.pec-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--pec-black);
  border-bottom: 1px solid var(--pec-border);
  transition: box-shadow 0.3s;
}

.pec-header.scrolled {
  box-shadow: 0 4px 40px rgba(0,0,0,0.6);
}

/* ── Top bar ── */
.pec-topbar {
  background: var(--pec-red);
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pec-topbar__text {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  animation: pec-ticker 28s linear infinite;
}

@keyframes pec-ticker {
  from { transform: translateX(30vw); }
  to   { transform: translateX(-100%); }
}

/* ── Main bar ── */
.pec-header__main {
  height: 68px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 0;
}

/* ── Logo ── */
.pec-logo {
  flex-shrink: 0;
  text-decoration: none;
  margin-right: 48px;
  display: flex;
  align-items: center;
}

.pec-logo__img {
  max-height: 48px;
  width: auto;
  display: block;
}

.pec-logo__mark {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pec-logo__name {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--pec-text);
  text-transform: uppercase;
}

.pec-logo__heart {
  color: var(--pec-red);
  font-size: 14px;
  line-height: 1;
}

/* ── Nav ── */
.pec-nav {
  flex: 1;
  display: flex;
  align-items: center;
  height: 100%;
}

.pec-nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  height: 100%;
  gap: 2px;
  margin: 0;
  padding: 0;
}

.pec-nav__item {
  position: static;
  height: 100%;
  display: flex;
  align-items: center;
}

.pec-nav__link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 16px;
  height: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pec-muted);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
  position: relative;
}

.pec-nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  right: 50%;
  height: 2px;
  background: var(--pec-red);
  transition: left 0.25s, right 0.25s;
}

.pec-nav__item:hover .pec-nav__link,
.pec-nav__item.active .pec-nav__link {
  color: var(--pec-text);
}

.pec-nav__item:hover .pec-nav__link::after,
.pec-nav__item.active .pec-nav__link::after {
  left: 16px;
  right: 16px;
}

.pec-nav__caret {
  width: 8px;
  height: 8px;
  opacity: 0.4;
  transition: transform 0.2s, opacity 0.2s;
}

.pec-nav__item:hover .pec-nav__caret {
  transform: rotate(180deg);
  opacity: 0.8;
}

/* ── Actions (direita) ── */
.pec-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.pec-action {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pec-muted);
  text-decoration: none;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
  position: relative;
  background: transparent;
  border: none;
  font-family: 'Inter', sans-serif;
}

.pec-action:hover {
  color: var(--pec-text);
  background: rgba(255,255,255,0.04);
}

.pec-action svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

/* Badge (carrinho e wishlist) */
.pec-action__badge {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 16px;
  height: 16px;
  background: var(--pec-red);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

/* Forçar posição igual ao carrinho, independente do wishlist plugin */
.pec-action .pwl-count {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  top: 5px !important;
  right: 5px !important;
  position: absolute !important;
}

/* Search */
.pec-action--search {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  width: auto;
  padding: 0 14px;
  gap: 8px;
  height: 38px;
  background: transparent;
}

.pec-action--search:hover {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.1);
}

.pec-action--search input[type="text"] {
  background: none;
  border: none;
  outline: none;
  color: var(--pec-text);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 300;
  width: 130px;
  letter-spacing: 0.05em;
  padding: 0;
}

.pec-action--search input[type="text"]::placeholder {
  color: var(--pec-muted);
  font-style: italic;
}

/* Divider */
.pec-actions__divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.07);
  margin: 0 4px;
  flex-shrink: 0;
}

/* ════════════════════════════════════════
   MEGA MENU
════════════════════════════════════════════ */
.pec-mega {
  position: fixed;
  top: 96px; /* topbar 28px + main bar 68px */
  left: 0;
  right: 0;
  background: var(--pec-dark);
  border-top: 1px solid var(--pec-border);
  border-bottom: 1px solid var(--pec-border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 999;
  pointer-events: none;
}

.pec-nav__item:hover .pec-mega,
.pec-mega:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.pec-mega__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 40px 44px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
}

/* Coluna esquerda: título da categoria */
.pec-mega__hero {
  border-right: 1px solid var(--pec-border);
  padding-right: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.pec-mega__cat-label {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--pec-red);
}

.pec-mega__cat-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 28px;
  font-weight: 400;
  color: var(--pec-text);
  line-height: 1.2;
  margin: 0;
}

.pec-mega__cat-desc {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: var(--pec-muted);
  line-height: 1.7;
  letter-spacing: 0.03em;
  margin: 0;
}

.pec-mega__cat-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pec-red);
  text-decoration: none;
  margin-top: 8px;
  transition: gap 0.2s;
}

.pec-mega__cat-link:hover {
  gap: 12px;
}

/* Coluna direita: subcategorias */
.pec-mega__subs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 4px 24px;
  align-content: start;
}

.pec-mega__sub {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: var(--pec-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: color 0.2s, padding-left 0.2s;
}

.pec-mega__sub:hover {
  color: var(--pec-text);
  padding-left: 4px;
}

.pec-mega__sub::before {
  content: '';
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--pec-red);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.2s;
}

.pec-mega__sub:hover::before {
  opacity: 1;
}

/* ════════════════════════════════════════
   HOMEPAGE — custom component classes
   (usadas em HTML widgets do Elementor)
════════════════════════════════════════════ */

/* ── Section eyebrow label ── */
.pec-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #A01020;
  margin: 0 0 16px;
  display: block;
}

.pec-label--dark {
  color: #A01020;
}

/* ── Hero subtitle ── */
.pec-sub {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #7A6A62;
  margin: 0;
}

/* ── Scroll indicator ── */
.pec-scroll {
  display: flex;
  justify-content: center;
}

.pec-scroll__line {
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, rgba(160,16,32,0.7), transparent);
  animation: pec-pulse-line 2.2s ease-in-out infinite;
}

@keyframes pec-pulse-line {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.12); }
}

/* ── Category cards grid ── */
.pec-cats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  width: 100%;
}

.pec-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 36px 16px 30px;
  background: #141417;
  border: 1px solid rgba(160,16,32,0.1);
  cursor: pointer;
  transition: background 0.35s, border-color 0.35s, transform 0.35s;
  text-decoration: none;
}

.pec-cat-card:hover {
  background: #1E1820;
  border-color: rgba(160,16,32,0.45);
  transform: translateY(-4px);
}

.pec-cat-card img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  transition: filter 0.35s, transform 0.35s;
}

.pec-cat-card:hover img {
  filter: brightness(1.15) saturate(1.2);
  transform: scale(1.08);
}

.pec-cat-card span {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7A6A62;
  transition: color 0.35s;
  text-align: center;
}

.pec-cat-card:hover span {
  color: #EDE5DC;
}

/* ── Decorative rings (Sobre nós) ── */
.pec-deco {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.pec-deco__ring {
  animation: pec-breathe 6s ease-in-out infinite;
}

@keyframes pec-breathe {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.05); }
}

.pec-deco__text {
  font-family: 'Playfair Display', serif;
  font-size: 12px;
  font-style: italic;
  color: #9A8A7E;
  letter-spacing: 0.08em;
  margin: 0;
}

/* ── Benefit icon ── */
.pec-ben-icon {
  width: 56px;
  height: 56px;
  border: 1px solid rgba(160,16,32,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

/* ── Newsletter form ── */
.pec-newsletter {
  max-width: 480px;
  margin: 0 auto;
}

.pec-newsletter__row {
  display: flex;
  height: 48px;
}

.pec-newsletter__row input[type="email"] {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-right: none;
  padding: 0 20px;
  color: #EDE5DC;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 300;
  outline: none;
}

.pec-newsletter__row input[type="email"]::placeholder {
  color: #7A6A62;
  font-style: italic;
}

.pec-newsletter__row input[type="email"]:focus {
  border-color: rgba(160,16,32,0.4);
}

.pec-newsletter__row button {
  background: #A01020;
  border: none;
  color: #fff;
  padding: 0 28px;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s;
  white-space: nowrap;
}

.pec-newsletter__row button:hover {
  background: #C41230;
}

.pec-newsletter__note {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: #7A6A62;
  text-align: center;
  margin: 16px 0 0;
  letter-spacing: 0.05em;
}

/* ════════════════════════════════════════
   ELEMENTOR PRODUCT GRID — homepage cards
   (Elementor WooCommerce Products widget)
════════════════════════════════════════════ */
.elementor-widget-woocommerce-products ul.products {
  gap: 2px !important;
}

.elementor-widget-woocommerce-products ul.products li.product {
  background: #161619 !important;
  border: 1px solid rgba(255,255,255,0.04) !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  transition: border-color 0.3s, transform 0.3s !important;
  overflow: hidden !important;
}

.elementor-widget-woocommerce-products ul.products li.product:hover {
  border-color: rgba(160,16,32,0.35) !important;
  transform: translateY(-3px) !important;
}

/* Image */
.elementor-widget-woocommerce-products ul.products li.product img {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  background: #1C1C20 !important;
  padding: 12px !important;
  display: block !important;
}

/* Product link wrapper */
.elementor-widget-woocommerce-products ul.products li.product a.woocommerce-loop-product__link {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  text-decoration: none !important;
  padding: 12px 14px 8px !important;
}

/* Title */
.elementor-widget-woocommerce-products ul.products li.product .woocommerce-loop-product__title {
  font-family: 'Playfair Display', serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #EDE5DC !important;
  line-height: 1.35 !important;
  margin-bottom: 8px !important;
  padding: 0 !important;
}

/* Price */
.elementor-widget-woocommerce-products ul.products li.product .price {
  color: #A01020 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  font-family: 'Inter', sans-serif !important;
}

.elementor-widget-woocommerce-products ul.products li.product .price del {
  color: #7A6A62 !important;
  font-size: 11px !important;
  opacity: 1 !important;
}

.elementor-widget-woocommerce-products ul.products li.product .price ins {
  color: #EDE5DC !important;
  text-decoration: none !important;
  font-style: normal !important;
}

/* Add to cart button */
.elementor-widget-woocommerce-products ul.products li.product a.add_to_cart_button,
.elementor-widget-woocommerce-products ul.products li.product a.button {
  display: block !important;
  width: calc(100% - 28px) !important;
  margin: 0 14px 14px !important;
  background: transparent !important;
  border: 1px solid rgba(160,16,32,0.35) !important;
  color: #EDE5DC !important;
  padding: 9px 10px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 9px !important;
  font-weight: 500 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  text-align: center !important;
  text-decoration: none !important;
  border-radius: 0 !important;
  transition: background 0.25s, border-color 0.25s !important;
  box-shadow: none !important;
}

.elementor-widget-woocommerce-products ul.products li.product a.add_to_cart_button:hover,
.elementor-widget-woocommerce-products ul.products li.product a.button:hover {
  background: var(--pec-red) !important;
  border-color: var(--pec-red) !important;
  color: #fff !important;
}

/* Wishlist button */
.elementor-widget-woocommerce-products ul.products li.product .pwl-btn {
  top: 10px !important;
  right: 10px !important;
}

/* Sale badge */
.elementor-widget-woocommerce-products ul.products li.product .onsale {
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  z-index: 5 !important;
  margin: 0 !important;
  background: rgba(10,10,12,0.65) !important;
  color: #EDE5DC !important;
  border: 1px solid rgba(237,229,220,0.2) !important;
  font-size: 9px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  padding: 4px 10px !important;
  border-radius: 0 !important;
  min-height: unset !important;
  min-width: unset !important;
  line-height: 1.4 !important;
}

/* ════════════════════════════════════════
   RESPONSIVE — mobile (esconder nav)
   (implementar mobile menu numa versão futura)
════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .pec-nav { display: none; }
  .pec-action--search input[type="text"] { width: 80px; }
  .pec-header__main { padding: 0 20px; }
}

@media (max-width: 640px) {
  .pec-action--search { display: none; }
  .pec-header__main { padding: 0 16px; }
  body.has-pec-header { padding-top: 96px !important; }
}
