/* =============================================
   NIMBO — CSS compartido del child theme
   Todos los templates heredan estas variables y componentes
============================================= */

:root {
  --cream: #F2EDE4;
  --sand:  #D9C9B0;
  --bark:  #6B4F3A;
  --espresso: #1E1209;
  --gold:  #B8935A;
  --fog:   #E8E0D5;
  --white: #FAF8F4;
  --font-display: 'Questrial', sans-serif;
  --font-body:    'Rubik', sans-serif;
  --header-h: 72px;
}

/* RESET */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--espresso);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
}

/* Cursor custom deshabilitado */
.nimbo-cursor, .nimbo-cursor-ring { display: none !important; }
body.hovering .nimbo-cursor { width: 20px; height: 20px; background: var(--gold); }
body.hovering .nimbo-cursor-ring { width: 56px; height: 56px; border-color: var(--gold); }

/* ─── REVEAL ANIMATIONS ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ─── PLACEHOLDER IMAGEN ─── */
.img-ph {
  width: 100%;
  background: linear-gradient(135deg, #ddd4c4 0%, #c8b89a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
.img-ph::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255,255,255,.06) 20px, rgba(255,255,255,.06) 21px);
}
.img-ph svg { position: relative; z-index: 1; }
.img-ph-label {
  font-family: var(--font-body);
  font-size: 9px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(80,55,35,.45);
  position: relative; z-index: 1;
  text-align: center; padding: 0 14px; line-height: 1.6;
}

/* ─── RESET Hello Elementor containers ─── */
body {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
.site-main,
.page-content,
.entry-content,
article.page,
article.post,
.elementor-section-wrap,
.hentry {
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
}
/* Hello Elementor agrega su propio header — lo ocultamos */
.elementor-location-header,
header.elementor-section {
  display: none !important;
}

/* ─── HEADER ─── */
.site-header {
  position: absolute !important;
  top: 0 !important; left: 0 !important; right: 0 !important;
  z-index: 9999 !important;
  padding: 0 5vw;
  height: var(--header-h);
  display: flex !important; align-items: center; justify-content: space-between;
  transition: background .4s, box-shadow .4s;
}
.site-header.transparent {
  background: transparent !important;
  box-shadow: none !important;
}
.site-header.transparent.scrolled {
  background: rgba(30,18,9,.25) !important;
  backdrop-filter: blur(12px) !important;
  box-shadow: none !important;
}
.site-header.transparent.scrolled .nav-link { color: var(--white); }
.site-header.transparent.scrolled .logo-light { opacity: 1; }
.site-header.transparent.scrolled .logo-dark { opacity: 0; }
.site-header.transparent.scrolled .header-cart-link svg { stroke: var(--white); }
.site-header.transparent.scrolled .hamburger span { background: var(--white); }
.site-header.solid {
  background: rgba(242,237,228,.97) !important;
  box-shadow: 0 1px 0 rgba(30,18,9,.08) !important;
  backdrop-filter: blur(8px);
}
.site-header.scrolled:not(.transparent) {
  background: rgba(242,237,228,.97) !important;
  box-shadow: 0 1px 0 rgba(30,18,9,.08) !important;
  backdrop-filter: blur(8px);
}

.logo-wrap { position: relative; height: 36px; width: 110px; }
.header-logo { height: 36px; position: absolute; top: 0; left: 0; transition: opacity .4s; }
.logo-light { opacity: 1; }
.logo-dark  { opacity: 0; }
.site-header.scrolled .logo-light,
.site-header.solid    .logo-light { opacity: 0; }
.site-header.scrolled .logo-dark,
.site-header.solid    .logo-dark  { opacity: 1; }
.site-header.transparent .logo-light { opacity: 1; }
.site-header.transparent .logo-dark  { opacity: 0; }

.header-nav { display: flex; align-items: center; gap: 36px; list-style: none; }

.nav-link {
  font-family: var(--font-body);
  font-size: 12px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--espresso);
  text-decoration: none;
  position: relative;
  transition: color .3s;
}
.site-header.transparent .nav-link { color: var(--white); }
.nav-link::after {
  content: ''; position: absolute; bottom: -3px; left: 0; right: 0;
  height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s;
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--bark); }
.site-header.transparent .nav-link.active { color: var(--gold); }

.nav-item { position: relative; }
.nav-dropdown {
  position: absolute; top: calc(100% + 18px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--white);
  border-top: 2px solid var(--gold);
  min-width: 200px; padding: 8px 0;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  box-shadow: 0 12px 40px rgba(30,18,9,.12);
}
.nav-item:hover .nav-dropdown { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.nav-dropdown a {
  display: block; padding: 10px 20px;
  font-size: 12px; letter-spacing: .08em;
  color: var(--espresso); text-decoration: none;
  transition: background .2s, color .2s;
}
.nav-dropdown a:hover { background: var(--fog); color: var(--bark); }

.header-actions { display: flex; align-items: center; gap: 24px; }
.header-cart-link { display: flex; align-items: center; text-decoration: none; position: relative; }
.header-cart-link svg { stroke: var(--espresso); fill: none; transition: stroke .3s; }
.site-header.transparent .header-cart-link svg { stroke: var(--white); }
.header-cart-link:hover svg { stroke: var(--gold); }
.cart-count {
  position: absolute; top: -6px; right: -8px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold); color: var(--white);
  font-size: 9px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
}

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 1.5px; background: var(--espresso); transition: transform .35s, opacity .35s, background .3s; }
.site-header.transparent .hamburger span { background: var(--white); }
.site-header.scrolled .hamburger span,
.site-header.solid    .hamburger span { background: var(--espresso); }
.hamburger.open span { background: var(--cream) !important; }
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
/* Forzar que ningún estilo externo (Elementor/WC) pise el color */
button.hamburger, button.hamburger:hover, button.hamburger:focus { background: none !important; border: none !important; box-shadow: none !important; outline: none !important; color: inherit !important; }

/* ─── MOBILE MENU ─── */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--espresso);
  z-index: 999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .4s cubic-bezier(.16,1,.3,1);
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu-logo { position: absolute; top: 20px; left: 5vw; height: 32px; }
.mobile-nav-link {
  font-family: var(--font-display);
  font-size: clamp(32px, 8vw, 52px);
  font-weight: 300; color: var(--cream) !important;
  text-decoration: none; letter-spacing: .02em;
  padding: 14px 0;
  opacity: 0; transform: translateY(20px);
  transition: opacity .4s, transform .4s, color .3s;
  text-align: center;
}
.mobile-menu.open .mobile-nav-link { opacity: 1; transform: none; }
.mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: .06s; }
.mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: .12s; }
.mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: .18s; }
.mobile-menu.open .mobile-nav-link:nth-child(5) { transition-delay: .24s; }
.mobile-menu.open .mobile-nav-link:nth-child(6) { transition-delay: .30s; }
.mobile-menu.open .mobile-nav-link:nth-child(7) { transition-delay: .36s; }
.mobile-nav-link:hover, .mobile-nav-link:focus, .mobile-nav-link.current-menu-item { color: var(--cream) !important; opacity: 1 !important; }
.mobile-menu-sub { display: flex; gap: 28px; margin-top: 8px; opacity: 0; transition: opacity .4s .4s; }
.mobile-menu.open .mobile-menu-sub { opacity: 1; }
.mobile-menu-sub a { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.4); text-decoration: none; transition: color .3s; }
.mobile-menu-sub a:hover { color: var(--gold); }

/* ─── FOOTER ─── */
.site-footer {
  background: var(--espresso); padding: 80px 7vw 48px;
  width: 100vw !important; max-width: none !important;
  margin-left: calc(-50vw + 50%) !important;
  position: relative;
}
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 40px;
}
.footer-brand-name {
  font-family: var(--font-display); font-size: 36px; font-weight: 300;
  color: var(--white); letter-spacing: .05em; margin-bottom: 20px;
}
.footer-tagline { font-size: 13px; color: rgba(242,237,228,.45); line-height: 1.7; margin-bottom: 36px; max-width: 260px; }
.footer-social { display: flex; gap: 16px; }
.footer-social a {
  width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  color: var(--sand); font-size: 12px; text-decoration: none;
  transition: border-color .3s, color .3s;
}
.footer-social a:hover { border-color: var(--gold); color: var(--gold); }
.footer-col-title { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin-bottom: 24px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { font-size: 13px; color: rgba(242,237,228,.5); text-decoration: none; transition: color .3s; }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; }
.footer-copy { font-size: 11px; color: rgba(242,237,228,.25); letter-spacing: .05em; }
.footer-legal { display: flex; gap: 28px; }
.footer-legal a { font-size: 11px; color: rgba(242,237,228,.25); text-decoration: none; transition: color .3s; }
.footer-legal a:hover { color: var(--sand); }

/* ─── PRODUCT CARD (compartido en categorías y relacionados) ─── */
.product-card { display: block; text-decoration: none; color: inherit; }
.product-img-wrap { position: relative; overflow: hidden; margin-bottom: 14px; }
.product-img-wrap img,
.product-img-wrap .img-ph { transition: transform .8s cubic-bezier(.16,1,.3,1); display: block; width: 100%; }
.product-card:hover .product-img-wrap img,
.product-card:hover .img-ph { transform: scale(1.04); }
.product-badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.badge { font-size: 9px; letter-spacing: .2em; text-transform: uppercase; padding: 5px 10px; }
.badge-new    { background: var(--espresso); color: var(--sand); }
.badge-unique { background: var(--gold); color: var(--white); }
.badge-era    { background: var(--bark); color: var(--fog); }
.product-quick {
  position: absolute; bottom: 10px; right: 10px;
  width: 36px; height: 36px;
  background: var(--white); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; transform: translateY(6px);
  transition: opacity .3s, transform .3s, background .3s;
  z-index: 2;
}
.product-card:hover .product-quick { opacity: 1; transform: none; }
.product-quick:hover { background: var(--gold); }
.product-quick svg { width: 14px; height: 14px; stroke: var(--espresso); fill: none; stroke-width: 1.5; }
.product-quick:hover svg { stroke: var(--white); }
.product-subcat { font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--bark); opacity: .6; margin-bottom: 5px; }
.product-name { font-family: var(--font-display); font-size: 16px; font-weight: 300; color: var(--espresso); margin-bottom: 5px; line-height: 1.2; }
.product-price { font-size: 14px; color: var(--espresso); }
.product-price del { color: var(--bark); opacity: .45; font-size: .875em; margin-left: 4px; }

/* ─── BOTONES COMPARTIDOS ─── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 18px 40px;
  background: var(--espresso); color: var(--white);
  font-family: var(--font-body); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; border: none; cursor: pointer;
  transition: background .3s, gap .3s;
}
.btn-primary:hover { background: var(--bark); gap: 16px; }
.btn-gold {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 18px 40px;
  background: var(--gold); color: var(--white);
  font-family: var(--font-body); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; border: none; cursor: pointer;
  transition: background .3s, gap .3s;
}
.btn-gold:hover { background: #a37d4a; gap: 16px; }
.btn-outline {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 17px 40px;
  background: transparent; color: var(--white);
  border: 1px solid rgba(255,255,255,.25);
  font-family: var(--font-body); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: border-color .3s, gap .3s;
}
.btn-outline:hover { border-color: var(--sand); gap: 16px; }

/* ─── SUBCATEGORY FILTER BAR ─── */
.subcat-bar {
  position: relative; z-index: 10;
  background: rgba(242,237,228,.97);
  border-bottom: 1px solid rgba(30,18,9,.07);
  padding: 0 7vw;
}
.subcat-inner { display: flex; align-items: center; overflow-x: auto; scrollbar-width: none; }
.subcat-inner::-webkit-scrollbar { display: none; }
.subcat-btn {
  flex-shrink: 0;
  padding: 20px 28px;
  font-family: var(--font-body); font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  color: rgba(30,18,9,.45); background: none; border: none; border-bottom: 2px solid transparent;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: color .3s, border-color .3s;
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
  position: relative;
}
.subcat-btn::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.subcat-btn:hover { color: var(--espresso); }
.subcat-btn:hover::after, .subcat-btn.active::after { transform: scaleX(1); }
.subcat-btn.active { color: var(--espresso); }
.subcat-icon {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--fog); transition: background .3s;
}
.subcat-btn:hover .subcat-icon, .subcat-btn.active .subcat-icon { background: var(--gold); }
.subcat-icon svg {
  width: 18px; height: 18px; stroke: var(--espresso); fill: none;
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s;
}
.subcat-btn:hover .subcat-icon svg, .subcat-btn.active .subcat-icon svg { stroke: var(--white); }
.subcat-divider { width: 1px; height: 32px; background: rgba(30,18,9,.08); flex-shrink: 0; margin: 0 4px; }
.subcat-count { font-size: 9px; color: var(--bark); opacity: .7; }

/* ─── PRODUCTS GRID ─── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 20px;
  padding: 64px 7vw 100px;
}
.products-grid .product-card { animation: cardIn .5s cubic-bezier(.16,1,.3,1) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.products-grid .product-card.hidden { display: none; }

.products-empty {
  grid-column: 1/-1; text-align: center; padding: 80px 0;
  display: none;
}
.products-empty.visible { display: block; }
.products-empty h3 { font-family: var(--font-display); font-size: 28px; font-weight: 300; color: var(--espresso); margin-bottom: 10px; }
.products-empty p { font-size: 13px; color: var(--bark); opacity: .6; }

/* ─── WOOCOMMERCE OVERRIDES ─── */
.woocommerce-notices-wrapper { padding: 0 7vw; }
.woocommerce-message, .woocommerce-error, .woocommerce-info {
  background: var(--fog); border-top: 3px solid var(--gold); padding: 16px 20px;
  font-size: 13px; color: var(--espresso); margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.woocommerce-message a.button,
.woocommerce-error a.button {
  background: var(--espresso); color: var(--white);
  padding: 10px 20px; font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  text-decoration: none; transition: background .3s;
}
.woocommerce-message a.button:hover { background: var(--bark); }

/* ─── PRODUCTO ─── */
.product-info-col { padding-left: 8vw; }
.product-gallery-col { position: sticky; top: 88px; }

/* Botón añadir al carrito — override WooCommerce */
.single_add_to_cart_button,
.product-info-col .single_add_to_cart_button,
button.single_add_to_cart_button {
  background: var(--gold) !important;
  color: var(--white) !important;
  border: none !important;
  font-family: var(--font-body) !important;
  font-size: 12px !important;
  letter-spacing: .18em !important;
  text-transform: uppercase !important;
  padding: 16px 40px !important;
  cursor: pointer !important;
  transition: background .3s !important;
}
.single_add_to_cart_button:hover {
  background: var(--bark) !important;
}

/* ─── RESEÑAS COMPACTAS ─── */
.nimbo-reviews #reviews { font-family: var(--font-body); }
.nimbo-reviews #reviews h2 { display: none; }
.nimbo-reviews .woocommerce-Reviews-title { display: none; }
.nimbo-reviews .commentlist { list-style: none; }
.nimbo-reviews .commentlist li { padding: 20px 0; border-bottom: 1px solid rgba(30,18,9,.08); }
.nimbo-reviews .commentlist li:last-child { border-bottom: none; }
.nimbo-reviews .comment-text { font-size: 13px; color: var(--bark); line-height: 1.75; }
.nimbo-reviews .meta { font-size: 11px; color: var(--bark); opacity: .5; margin-bottom: 8px; }
.nimbo-reviews .star-rating { color: var(--gold); font-size: 12px; }
.nimbo-reviews .star-rating span { color: var(--gold); }
.nimbo-reviews #reply-title { font-family: var(--font-display); font-size: 18px; font-weight: 300; color: var(--espresso); }
.nimbo-reviews .comment-form-rating label { font-size: 12px; color: var(--bark); }
.nimbo-reviews textarea, .nimbo-reviews input[type="text"], .nimbo-reviews input[type="email"] {
  width: 100%; padding: 12px; border: 1px solid rgba(30,18,9,.12); background: var(--white);
  font-family: var(--font-body); font-size: 13px; color: var(--espresso); outline: none;
}
.nimbo-reviews .form-submit input[type="submit"] {
  background: var(--gold); color: var(--white); border: none; padding: 14px 32px;
  font-family: var(--font-body); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; cursor: pointer;
  transition: background .3s;
}
.nimbo-reviews .form-submit input[type="submit"]:hover { background: var(--bark); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .header-nav { display: none; }
  .hamburger { display: flex; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
  .footer-top { grid-template-columns: repeat(3, 1fr) !important; gap: 24px; }
  .footer-top .footer-brand { grid-column: span 3; margin-bottom: 8px; }
  .product-main-grid { grid-template-columns: 1fr !important; }
  .product-info-col { padding-left: 0 !important; }
  .product-title-block { display: none !important; }
  .product-title-mobile { display: block !important; }
  .product-gallery-col { position: static !important; }
}
@media (max-width: 600px) {
  :root { --header-h: 60px; }
  .logo-wrap { height: 28px; }
  .header-logo { height: 28px; }
  .products-grid { grid-template-columns: 1fr 1fr; gap: 16px 10px; }
  .footer-bottom { flex-direction: column; gap: 14px; text-align: center; }
  .footer-top { grid-template-columns: repeat(3, 1fr) !important; gap: 20px; }
  .footer-top .footer-brand { grid-column: span 3; }
}
