/*
Theme Name: Essentia
Theme URI:
Author: Antigravity
Author URI:
Description: Custom WooCommerce theme for Essentia
Version: 1.0.0
Text Domain: essentia
*/

/* =========================================================
   Design tokens
   Per-page styles live in assets/css/<page>.css (loaded
   conditionally from functions.php). This file holds only
   tokens + globals shared across pages.
   ========================================================= */
:root {
  /* Fonts */
  --title: 'Cormorant Garamond', Georgia, serif;
  --body: 'Montserrat', Arial, sans-serif;

  /* Brand colors */
  --primary: #3210b9;
  --primary-2: #4f19df;
  --ink: #20136d;
  --accent-purple: #4a0eaa;   /* agrupa #4a0eaa y #4816dc (imperceptible) */
  --accent-gold: #feae48;
  --color-sale: #e63946;
  --color-success: #2a854f;
  --lavender: #f5efff;
  --white: #fff;

  /* Neutrals / surfaces */
  --muted: #8e88b6;
  --gray: #666;
  --bg-warm: #fefaf7;         /* agrupa blancos cálidos casi idénticos */
  --bg-lavender: #f9f6fe;     /* agrupa blancos lavanda casi idénticos */
  --border-light: #f2edf9;    /* agrupa #f2edf9 / #eee8f7 / #ede8f4 */

  /* Gradients */
  --gradient-primary: linear-gradient(180deg, #5516de 0%, #4312bf 100%);

  /* Type scale (valores ya presentes en el diseño) */
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-smd: 14px;
  --fs-md: 15px;
  --fs-lg: 16px;
  --fs-xl: 18px;
  --fs-2xl: 20px;
  --fs-3xl: 24px;
  --fs-4xl: 32px;
  --fs-5xl: 40px;
  --fs-6xl: 64px;

  /* Spacing scale (steps que coinciden con el diseño; los off-scale
     se dejan literales a propósito — el diseño no usa una grid estricta) */
  --sp-1: 8px;
  --sp-2: 12px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 40px;
  --sp-6: 60px;
  --sp-7: 80px;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 24px;
  --r-pill: 50px;
}

/* =========================================================
   Reset & base
   ========================================================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--white);
  font-size: var(--fs-md);
  line-height: 1.55;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.container { width: min(1248px, calc(100% - 84px)); margin: 0 auto; }
.icon {
  width: var(--fs-3xl);
  height: var(--fs-3xl);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left !important; }
.bg-alt { background: var(--bg-lavender); }
.bg-white { background: var(--white); }
.flex-row-reverse { flex-direction: row-reverse; }
.text-lead { font-size: var(--fs-xl); color: var(--ink); max-width: 600px; margin: 0 auto; }
.p-0 { padding: 0 !important; }
.pt-25 { padding-top: 25px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-8 { margin-bottom: var(--sp-1) !important; }
.mb-24 { margin-bottom: var(--sp-4); }
.mb-40 { margin-bottom: var(--sp-5) !important; }
.mb-80 { margin-bottom: var(--sp-7); }
.section-md { padding: var(--sp-6) 0; }
.section-lg { padding: var(--sp-7) 0; }
.section-title { font-family: var(--title); font-size: var(--fs-4xl); color: var(--ink); margin-top: 0; margin-bottom: var(--sp-5); text-align: center; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-lg);
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  text-decoration: none;
  transition: opacity 0.2s;
}
.btn:hover { opacity: 0.9; }
.btn-primary { background: var(--gradient-primary); color: #fff; }
.btn-outline { border: 1px solid var(--accent-purple); color: var(--accent-purple); background: transparent; }
.btn-block { width: 100%; display: block; box-sizing: border-box; text-align: center; }

/* =========================================================
   Decorative separators (skeleton compartido + variantes)
   ========================================================= */
.section-caption,
.title-lines,
.leaf-separator,
.brand-separator,
.hero-icon-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}
.section-caption::before, .section-caption::after,
.title-lines::before, .title-lines::after,
.leaf-separator::before, .leaf-separator::after,
.brand-separator::before, .brand-separator::after,
.hero-icon-top::before, .hero-icon-top::after {
  content: "";
  display: block;
  width: var(--sp-5);
}
.section-caption {
  color: var(--accent-purple);
  font-weight: bold;
  letter-spacing: 0.1em;
  margin-bottom: 30px;
  text-transform: uppercase;
}
.section-caption::before, .section-caption::after,
.title-lines::before, .title-lines::after { height: 2px; background-color: var(--accent-gold); }
.leaf-separator { color: var(--primary); margin: 0 0 15px; }
.leaf-separator::before, .leaf-separator::after { height: 1px; background: linear-gradient(90deg, transparent, var(--primary)); }
.leaf-separator::after { background: linear-gradient(90deg, var(--primary), transparent); }
.leaf-separator svg { width: var(--fs-3xl); height: var(--fs-3xl); }
.brand-separator { margin: 0; }
.brand-separator::before, .brand-separator::after { height: 2px; background-color: #965be7; }
.brand-separator .shape { width: 8px; height: 8px; background-color: #965be7; transform: rotate(45deg); }
.hero-icon-top { color: var(--primary); margin-bottom: var(--sp-3); }
.hero-icon-top::before, .hero-icon-top::after { height: 1px; background-color: var(--ink); opacity: 0.2; }

/* =========================================================
   Page hero (base compartida)
   ========================================================= */
.page-hero-alt { background: var(--bg-lavender); padding: 25px 0; text-align: center; }
.page-title { font-family: var(--title); font-size: var(--fs-6xl); color: var(--ink); margin: 0 0 var(--sp-3); }
.page-description { font-size: var(--fs-xl); max-width: 500px; margin: 0 auto var(--sp-5); color: var(--ink); }
.hero-features { display: flex; justify-content: flex-start; gap: var(--sp-5); }
.hero-feature { text-align: center; color: var(--ink); }
.hero-feature-text { font-weight: 600; font-size: var(--fs-sm); }
/* Hero split layout (shop + promociones) */
.cat-hero-inner { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2; }
.cat-hero-content { width: 50%; padding: var(--sp-6) var(--sp-5) var(--sp-6) 0; text-align: left; }
.cat-hero-content .page-description { max-width: none; margin: 0 0 var(--sp-5) 0; }

/* =========================================================
   Feature card (marcas + nosotros)
   ========================================================= */
.feature-card { border: 1px solid #eaeaea; border-radius: 20px; padding: 15px; background: #fff; height: 100%; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; gap: 20px; }
.feature-icon { flex-shrink: 0; width: var(--fs-6xl); height: var(--fs-6xl); background-color: #f0ebf5; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); margin: 0; }
.feature-icon svg { width: 28px; height: 28px; }
.feature-content { flex-grow: 1; }
.feature-title { font-size: var(--fs-xl); color: var(--ink); margin-top: 0; margin-bottom: var(--sp-1); font-weight: bold; }
.feature-desc { color: var(--gray); margin: 0; font-size: var(--fs-md); }

/* =========================================================
   Teaser card (home + promociones)
   ========================================================= */
.category-teasers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.teaser-card { background-size: contain; background-position: left center; background-repeat: no-repeat; border-radius: var(--r-md); overflow: hidden; display: flex; align-items: stretch; padding: 0; }
.teaser-card--reverse { background-position: right center; }
.teaser-card__content { text-align: left; flex-grow: 1; padding: var(--sp-4) var(--sp-4) var(--sp-4) 144px; }
.teaser-card--reverse .teaser-card__content { padding: var(--sp-4) 144px var(--sp-4) var(--sp-4); }
.teaser-card__content h3 { font-family: var(--title); font-size: var(--fs-3xl); line-height: 1.6rem; color: var(--ink); margin: 0 0 10px; }
.teaser-card__content p { margin: 0 0 var(--sp-3); color: #000; }
.teaser-card__content a {
  color: var(--accent-purple);
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

/* =========================================================
   CTA actions (nosotros + promociones)
   ========================================================= */
.cta-actions { display: flex; justify-content: center; gap: var(--sp-3); }
.cta-actions .btn { display: inline-flex; align-items: center; justify-content: center; padding: var(--sp-2) var(--sp-4); border-radius: var(--r-pill); font-weight: 600; font-size: var(--fs-md); text-decoration: none; transition: all 0.3s ease; }
.cta-actions .btn:not(.btn-outline) { background-color: #26107b; color: #fff; border: 1px solid #26107b; }
.cta-actions .btn-outline { background-color: #fff; color: #5a32fa; border: 1px solid #c2a8f9; }
.cta-actions .btn:hover { opacity: 0.9; }

/* =========================================================
   Header
   ========================================================= */
.top-strip {
  background: linear-gradient(90deg, #f7f2ff 0%, #f2ecfb 50%, #f7f2ff 100%);
  border-bottom: 1px solid #eee8f7;
}
.top-strip__inner {
  min-height: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
}
.top-benefit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: var(--fs-xs);
  font-weight: 700;
}
.top-benefit .icon { width: 20px; height: 20px; color: var(--primary); }

.site-nav {
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 40;
}
.nav-inner {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
  height: 100%;
}
.nav-links li {
  display: flex;
  align-items: center;
  position: relative;
}
.nav-links a {
  font-weight: 600;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  padding: var(--sp-1) 0;
  color: var(--ink);
  position: relative;
}
.nav-links .current-menu-item a,
.nav-links .current_page_item a {
  color: var(--primary);
}
.nav-links .current-menu-item a::after,
.nav-links .current_page_item a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary);
}
/* Submenu */
.nav-links .menu-item-has-children > a { padding-right: var(--sp-3); }
.nav-links .menu-item-has-children > a::before { content: "▼"; font-size: 9px; position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: var(--ink); opacity: 0.5; }
.nav-links .menu-item-has-children:hover > a::before { color: var(--primary); opacity: 1; }
.nav-links .sub-menu { display: none; position: absolute; top: 100%; left: -20px; background: #fff; min-width: 240px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); border-radius: var(--r-md); padding: var(--sp-2) 0; z-index: 100; list-style: none; margin: 0; border: 1px solid var(--border-light); }
.nav-links li:hover > .sub-menu { display: block; }
.nav-links .sub-menu li { display: block; width: 100%; }
.nav-links .sub-menu a { display: block; padding: 10px var(--sp-4); text-transform: none; font-size: var(--fs-smd); font-weight: 500; letter-spacing: normal; color: var(--ink); width: 100%; box-sizing: border-box; }
.nav-links .sub-menu a::after { display: none; }
.nav-links .sub-menu a:hover { background: #fcf8f5; color: var(--primary); }
.nav-actions {
  display: flex;
  gap: var(--sp-3);
}
.icon-btn {
  background: none;
  border: none;
  padding: var(--sp-1);
  display: flex;
  align-items: center;
  position: relative;
  color: var(--ink);
}

/* Header search */
.nav-search { position: relative; display: flex; align-items: center; }
.nav-search.is-open > .search-toggle { color: var(--primary); }
.nav-search-form {
  position: absolute;
  top: calc(100% + var(--sp-2));
  right: 0;
  display: none;
  align-items: center;
  gap: var(--sp-1);
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--r-pill);
  padding: 6px 6px 6px var(--sp-3);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  z-index: 100;
}
.nav-search.is-open .nav-search-form { display: flex; }
.nav-search-form input[type="search"] {
  border: none;
  outline: none;
  background: transparent;
  width: 220px;
  color: var(--ink);
  font-size: var(--fs-smd);
}
.nav-search-form .search-submit { color: var(--primary); padding: 6px; }

/* =========================================================
   Pre-footer feature band
   ========================================================= */
.feature-band {
  background: var(--white);
  padding: var(--sp-5) 0;
  margin-top: var(--sp-6);
  border-top: 1px solid var(--border-light);
}
.feature-band__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}
.feature-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  border-right: 1px solid var(--border-light);
}
.feature-item:last-child {
  border-right: none;
}
.feature-item .icon {
  width: var(--fs-4xl);
  height: var(--fs-4xl);
  color: var(--primary);
}
.feature-item strong {
  display: block;
  font-size: var(--fs-smd);
  color: var(--primary);
}
.feature-item span {
  font-size: var(--fs-sm);
  color: var(--ink);
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--bg-warm);
  padding: 64px 0 0;
  border-top: 1px solid var(--border-light);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 2fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}
.footer-col h4 {
  font-family: var(--title);
  color: var(--ink);
  font-size: var(--fs-lg);
  margin: 0 0 var(--sp-3) 0;
  font-weight: bold;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: var(--sp-2);
}
.footer-links a {
  color: var(--ink);
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--primary);
}

.newsletter-box {
  background: #f3edf7;
  border-radius: var(--r-md);
  padding: var(--sp-4);
}
.newsletter-box h3 {
  margin: 0 0 var(--sp-1);
  color: var(--accent-purple);
  font-size: var(--fs-xl);
  font-family: var(--title);
  font-weight: bold;
}
.newsletter-box p {
  margin: 0 0 var(--sp-3);
  color: var(--ink);
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.newsletter-box input {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 6px;
  padding: 0 var(--sp-3);
  font-size: var(--fs-sm);
  outline: none;
  background: #fff;
  color: var(--ink);
}
.newsletter-box button {
  width: 100%;
  height: 44px;
  margin-top: var(--sp-2);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 700;
  background: var(--gradient-primary);
}
.form-message { min-height: 18px; margin-top: var(--sp-1); color: var(--color-success); font-size: var(--fs-xs); font-weight: 600; }
.form-message.is-error { color: var(--color-sale); }
.social-col { text-align: center; }
.socials { display: flex; gap: var(--sp-2); justify-content: center; }
.social-link {
  width: var(--sp-5);
  height: var(--sp-5);
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: block;
  position: relative;
  transition: transform .18s ease, background .18s ease;
  text-decoration: none;
}
.social-link:hover { transform: translateY(-2px); background: var(--primary); }
.social-link .icon {
  width: 20px;
  height: 20px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.copyright {
  text-align: center;
  color: var(--ink);
  font-size: var(--fs-sm);
  padding: var(--sp-4) 0 28px;
}
