/*
 * ECOCLICK DESIGN SYSTEM
 * Equivalente a: assets/css/design-system.css (WP theme asset)
 * Importado via wp_enqueue_scripts() en functions.php
 */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* ── Design Tokens ── */
:root {
  /* Brand Colors */
  --c-primary:        #0e2954;
  --c-primary-dark:   #081b3a;
  --c-primary-light:  #1a3d7a;
  --c-primary-muted:  #e8eef8;
  --c-accent:         #82c341;
  --c-accent-hover:   #6faa30;
  --c-accent-dark:    #5a9020;
  --c-accent-light:   #f2f9e8;
  --c-accent-mid:     #c8e89a;

  /* Surfaces */
  --c-surface:        #ffffff;
  --c-surface-alt:    #f7f9fc;
  --c-surface-dark:   #eef1f7;
  --c-surface-hero:   #0c2040;

  /* Text */
  --c-text:           #111827;
  --c-text-muted:     #4b5563;
  --c-text-light:     #9ca3af;
  --c-text-inverse:   #ffffff;
  --c-text-inverse-muted: rgba(255,255,255,0.72);

  /* Borders */
  --c-border:         #dde2ec;
  --c-border-light:   #eff2f8;

  /* Status */
  --c-success:        #16a34a;
  --c-success-light:  #f0fdf4;
  --c-warning:        #d97706;
  --c-warning-light:  #fffbeb;
  --c-error:          #dc2626;
  --c-error-light:    #fef2f2;
  --c-info:           #2563eb;
  --c-info-light:     #eff6ff;

  /* WhatsApp */
  --c-wa:             #25d366;
  --c-wa-hover:       #1fba58;

  /* Typography */
  --font-display:     'Outfit', -apple-system, sans-serif;
  --font-body:        'Inter', -apple-system, sans-serif;

  /* Font sizes (fluid) */
  --fs-xs:   0.75rem;    /* 12px */
  --fs-sm:   0.875rem;   /* 14px */
  --fs-base: 1rem;       /* 16px */
  --fs-md:   1.125rem;   /* 18px */
  --fs-lg:   1.25rem;    /* 20px */
  --fs-xl:   1.5rem;     /* 24px */
  --fs-2xl:  1.875rem;   /* 30px */
  --fs-3xl:  2.25rem;    /* 36px */
  --fs-4xl:  3rem;       /* 48px */
  --fs-5xl:  3.75rem;    /* 60px */

  /* Spacing (4px base) */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Layout */
  --container-max:  1280px;
  --container-sm:   768px;
  --container-md:   960px;
  --gutter:         clamp(1rem, 4vw, 2.5rem);
  --header-height:  72px;

  /* Radius */
  --r-sm:   4px;
  --r-md:   8px;
  --r-lg:   12px;
  --r-xl:   16px;
  --r-2xl:  24px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.06);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);

  /* Transitions */
  --t-fast:   150ms ease;
  --t-base:   250ms ease;
  --t-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index layers */
  --z-base:    1;
  --z-raised:  10;
  --z-sticky:  100;
  --z-overlay: 150;
  --z-modal:   200;
  --z-toast:   400;
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--c-text);
  background-color: var(--c-surface-alt);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}

ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-text);
}

h1 { font-size: clamp(2.2rem, 5vw, var(--fs-5xl)); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.5vw, var(--fs-4xl)); font-weight: 800; }
h3 { font-size: clamp(1.35rem, 2.5vw, var(--fs-3xl)); font-weight: 700; }
h4 { font-size: var(--fs-xl); font-weight: 700; }
h5 { font-size: var(--fs-lg); font-weight: 600; }
h6 { font-size: var(--fs-md); font-weight: 600; }

p { line-height: 1.75; color: var(--c-text-muted); }

/* ── Layout Helpers ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--sm { max-width: var(--container-sm); }
.container--md { max-width: var(--container-md); }

.section         { padding-block: var(--sp-20); }
.section--lg     { padding-block: var(--sp-24); }
.section--sm     { padding-block: var(--sp-12); }
.section--xs     { padding-block: var(--sp-8); }

/* ── Grid ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ── Flex helpers ── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--r-md);
  border: 2px solid transparent;
  transition: all var(--t-base);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  vertical-align: middle;
}

.btn--primary {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}
.btn--primary:hover {
  background: var(--c-accent-hover);
  border-color: var(--c-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(130, 195, 65, 0.4);
}

.btn--secondary {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.btn--secondary:hover {
  background: var(--c-primary-dark);
  border-color: var(--c-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--c-primary);
  border-color: var(--c-primary);
}
.btn--outline:hover {
  background: var(--c-primary);
  color: #fff;
}

.btn--outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.btn--outline-light:hover {
  background: rgba(255,255,255,0.12);
  border-color: #fff;
}

.btn--wa {
  background: var(--c-wa);
  color: #fff;
  border-color: var(--c-wa);
}
.btn--wa:hover {
  background: var(--c-wa-hover);
  border-color: var(--c-wa-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37,211,102,0.38);
}

.btn--ghost {
  background: transparent;
  color: var(--c-accent);
  border-color: transparent;
  padding-inline: 0;
}
.btn--ghost:hover { color: var(--c-accent-dark); }

.btn--sm { padding: 0.5rem 1.25rem; font-size: var(--fs-xs); }
.btn--lg { padding: 1rem 2.5rem; font-size: var(--fs-base); }
.btn--xl { padding: 1.1rem 3rem; font-size: var(--fs-md); }
.btn--block { width: 100%; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.2rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--r-full);
  line-height: 1.5;
}
.badge--accent   { background: var(--c-accent-light); color: #3d6b0f; }
.badge--primary  { background: var(--c-primary-muted); color: var(--c-primary); }
.badge--b2b      { background: var(--c-primary); color: #fff; }
.badge--new      { background: #e0f2fe; color: #0369a1; }
.badge--featured { background: #fef3c7; color: #92400e; }
.badge--stock    { background: var(--c-success-light); color: var(--c-success); }
.badge--gray     { background: var(--c-surface-dark); color: var(--c-text-muted); }

/* ── Section header block ── */
.section-eyebrow {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--sp-3);
}
.section-eyebrow--inv { color: var(--c-accent-mid); }

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  color: var(--c-text);
}
.section-title--inv { color: #fff; }

.section-lead {
  font-size: var(--fs-md);
  color: var(--c-text-muted);
  line-height: 1.75;
  max-width: 56ch;
  margin-top: var(--sp-4);
}
.section-lead--inv { color: var(--c-text-inverse-muted); }

/* ── Breadcrumbs ── */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  padding-block: var(--sp-4);
}
.breadcrumbs a:hover { color: var(--c-accent); }
.breadcrumbs__sep { color: var(--c-text-light); font-size: var(--fs-xs); }
.breadcrumbs__current { color: var(--c-text); font-weight: 500; }

/* ── Price display ── */
.price-display {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--c-primary);
  letter-spacing: -0.02em;
}
.price-display--xl { font-size: var(--fs-3xl); }
.price-display--lg { font-size: var(--fs-2xl); }
.price-display--md { font-size: var(--fs-xl); }
.price-display--sm { font-size: var(--fs-lg); }
.price-display--xs { font-size: var(--fs-base); }

.price-iva {
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--c-text-light);
  display: block;
  margin-top: 2px;
}

/* ── Quantity control ── */
.qty-wrap {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  height: 46px;
  background: var(--c-surface);
}
.qty-btn {
  width: 46px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-surface-dark);
  color: var(--c-text-muted);
  font-size: 1.25rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
  user-select: none;
  flex-shrink: 0;
}
.qty-btn:hover { background: var(--c-border); color: var(--c-text); }
.qty-input {
  width: 58px;
  height: 100%;
  text-align: center;
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--c-text);
  border: none;
  border-inline: 1.5px solid var(--c-border);
  background: var(--c-surface);
  outline: none;
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── Forms ── */
.form-row     { display: grid; gap: var(--sp-4); }
.form-row--2  { grid-template-columns: 1fr 1fr; }
.form-group   { display: flex; flex-direction: column; gap: var(--sp-2); }
.form-label   { font-size: var(--fs-sm); font-weight: 600; color: var(--c-text); }
.form-required{ color: var(--c-error); }

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--fs-sm);
  color: var(--c-text);
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(130,195,65,0.15);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--c-text-light); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: var(--fs-xs); color: var(--c-text-light); margin-top: var(--sp-1); }

/* ── Notices ── */
.notice {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-lg);
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.notice--info    { background: var(--c-info-light);    border-left: 4px solid var(--c-info);    color: #1e40af; }
.notice--warning { background: var(--c-warning-light); border-left: 4px solid var(--c-warning); color: #78350f; }
.notice--success { background: var(--c-success-light); border-left: 4px solid var(--c-success); color: #14532d; }
.notice--error   { background: var(--c-error-light);   border-left: 4px solid var(--c-error);   color: #7f1d1d; }

.notice__icon { flex-shrink: 0; margin-top: 1px; }

/* ── B2B teaser inline block ── */
.b2b-teaser {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  border: 1.5px dashed var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-3) var(--sp-4);
}
.b2b-teaser strong { color: var(--c-primary); font-weight: 700; }
.b2b-teaser a { color: var(--c-accent); font-weight: 600; }
.b2b-teaser a:hover { text-decoration: underline; }

/* ── Float WhatsApp button ── */
.wa-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: var(--z-toast);
  width: 56px;
  height: 56px;
  background: var(--c-wa);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  transition: transform var(--t-base), box-shadow var(--t-base);
  text-decoration: none;
}
.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(37,211,102,0.55);
}

/* ── Mock data notice (dev) ── */
.dev-notice {
  position: fixed;
  bottom: 5.5rem;
  right: 2rem;
  z-index: var(--z-toast);
  background: rgba(14,41,84,0.85);
  color: rgba(255,255,255,0.8);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: var(--r-full);
  pointer-events: none;
  backdrop-filter: blur(4px);
}

/* ── Divider ── */
hr.divider {
  height: 1px;
  background: var(--c-border-light);
  border: none;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  :root { --gutter: 1rem; }
  .hide-mobile { display: none !important; }
  .section, .section--lg { padding-block: var(--sp-12); }
  .form-row--2 { grid-template-columns: 1fr; }
}
@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}
