/* =========================================================
   SAFEP.CO PRAGMA — Editorial Professional Stylesheet
   Tipografía: Fraunces (display) + Inter Tight (body)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter+Tight:wght@300;400;500;600;700&display=swap');

:root {
  /* === COLORES === */
  --ink:        #1a1a1f;          /* texto principal, casi negro */
  --ink-soft:   #4a4a52;          /* texto secundario */
  --ink-mute:   #8a8a92;          /* texto sutil, metadata */
  --paper:      #faf8f5;          /* fondo principal, crema cálida */
  --paper-2:    #f3efe7;          /* fondo de cards y secciones */
  --line:       #e3ddd1;          /* bordes sutiles */
  --line-strong:#c9c1ad;          /* bordes fuertes */
  --brand:      #4a2870;          /* violeta SafeP profundo */
  --brand-soft: #6d4499;          /* violeta más claro */
  --brand-pale: #ede8f3;          /* fondo violeta muy sutil */
  --accent:     #c8923a;          /* dorado mostaza para "Oferta" */
  --accent-bg:  #faf0d8;
  --success:    #2a6e4a;
  --danger:     #a8332a;

  /* === TIPOGRAFÍA === */
  --font-display: 'Fraunces', 'Times New Roman', Georgia, serif;
  --font-body:    'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;

  /* === ESPACIADO === */
  --container: 1240px;
  --gutter: 2rem;
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 14px;

  /* === SOMBRAS === */
  --shadow-sm: 0 1px 2px rgba(26,26,31,.04), 0 1px 3px rgba(26,26,31,.06);
  --shadow:    0 4px 12px rgba(26,26,31,.06), 0 2px 4px rgba(26,26,31,.04);
  --shadow-lg: 0 12px 32px rgba(26,26,31,.10), 0 4px 8px rgba(26,26,31,.05);
}

/* =========================================================
   RESET Y BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(circle at 20% 0%, rgba(74,40,112,.025) 0%, transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(200,146,58,.02) 0%, transparent 50%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'ss02', 'kern';
}

/* Sutil grano para textura editorial */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}
main, header, footer, nav { position: relative; z-index: 2; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brand-soft); }
button { font-family: inherit; cursor: pointer; }

/* === TIPOGRAFÍA === */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 .5em;
  font-variation-settings: 'opsz' 144;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }
p  { margin: 0 0 1em; color: var(--ink-soft); }
strong { color: var(--ink); font-weight: 600; }

/* =========================================================
   LAYOUT
   ========================================================= */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container-narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* =========================================================
   NAVEGACIÓN
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, .92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
  gap: 2rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--ink);
  letter-spacing: -.015em;
}
.brand:hover { color: var(--brand); }
.brand-mark {
  width: 32px; height: 32px;
  background: var(--brand);
  display: inline-grid; place-items: center;
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 6px;
  transform: rotate(-3deg);
}
.brand-tag {
  font-size: .68rem;
  color: var(--ink-mute);
  letter-spacing: .15em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 500;
  margin-left: .25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: var(--ink-soft);
  font-size: .95rem;
  font-weight: 500;
  position: relative;
  padding: .25rem 0;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 100%; height: 2px;
  background: var(--brand);
}

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--ink);
  color: var(--paper) !important;
  padding: .55rem 1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 500;
  transition: background .2s;
}
.cart-link:hover { background: var(--brand); color: var(--paper) !important; }
.cart-count {
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  font-size: .75rem;
  padding: 1px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
    background: transparent;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    padding: .4rem .6rem;
    font-size: 1.2rem;
    color: var(--ink);
  }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem var(--gutter);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: .75rem 0; border-bottom: 1px solid var(--line); }
  .nav-links li:last-child a { border: none; }
}

/* =========================================================
   HERO / HOME
   ========================================================= */
.hero {
  padding: 6rem var(--gutter) 5rem;
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-eyebrow {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: .75rem;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 32px; height: 1px;
  background: var(--brand);
}
.hero h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.5rem);
  font-weight: 500;
  margin-bottom: 1.5rem;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--brand);
}
.hero-lead {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
  max-width: 520px;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, var(--brand-pale) 0%, var(--paper-2) 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-visual::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(74,40,112,.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(200,146,58,.1) 0%, transparent 50%);
}
.hero-visual-content {
  position: absolute;
  inset: 0;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--ink);
}
.hero-stat {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 600;
  line-height: 1;
  color: var(--brand);
}
.hero-stat-label {
  font-size: .85rem;
  color: var(--ink-soft);
  margin-top: .5rem;
  max-width: 200px;
  line-height: 1.4;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 3rem; padding: 3rem var(--gutter); }
  .hero-visual { aspect-ratio: 16/10; }
}

/* =========================================================
   BOTONES
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--brand);
  color: var(--paper);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-secondary:hover {
  background: var(--paper-2);
  border-color: var(--ink);
  color: var(--ink);
}
.btn-brand {
  background: var(--brand);
  color: var(--paper);
}
.btn-brand:hover {
  background: var(--brand-soft);
  color: var(--paper);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-success {
  background: var(--success);
  color: var(--paper);
}
.btn-success:hover {
  background: #1f5739;
  color: var(--paper);
  transform: translateY(-1px);
}
.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}
.btn-danger:hover { background: var(--danger); color: var(--paper); }
.btn-block { width: 100%; }
.btn-sm { padding: .5rem 1rem; font-size: .85rem; }
.btn-lg { padding: 1.1rem 2rem; font-size: 1.05rem; }

/* =========================================================
   SECCIONES
   ========================================================= */
section { padding: 5rem 0; }
.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 3rem;
  gap: 2rem;
  flex-wrap: wrap;
}
.section-eyebrow {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .75rem;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin: 0;
}
.section-link {
  color: var(--ink);
  font-weight: 500;
  font-size: .95rem;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}
.section-link:hover { color: var(--brand); border-color: var(--brand); }

/* =========================================================
   GRID DE PRODUCTOS
   ========================================================= */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}
.producto-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .25s ease;
  display: flex;
  flex-direction: column;
}
.producto-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-strong);
}
.producto-card-img {
  aspect-ratio: 1/1;
  background: var(--paper-2);
  position: relative;
  overflow: hidden;
}
.producto-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.producto-card:hover .producto-card-img img { transform: scale(1.04); }
.producto-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.producto-card-cat {
  font-size: .7rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
  margin-bottom: .5rem;
}
.producto-card h3 {
  font-size: 1.25rem;
  margin: 0 0 .5rem;
  line-height: 1.3;
}
.producto-card-desc {
  font-size: .9rem;
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
  flex: 1;
  line-height: 1.5;
}
.producto-card-precio {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  margin-bottom: 1rem;
}
.precio-actual {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
}
.precio-tachado {
  font-size: .9rem;
  color: var(--ink-mute);
  text-decoration: line-through;
}
.badge-oferta {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--accent);
  color: var(--ink);
  font-size: .7rem;
  font-weight: 600;
  padding: .35rem .75rem;
  border-radius: 100px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* =========================================================
   BLOG / ARTÍCULOS
   ========================================================= */
.blog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  max-width: var(--container);
  margin: 0 auto;
  padding: 4rem var(--gutter);
}
.blog-layout > * { min-width: 0; }
@media (max-width: 1000px) {
  .blog-layout { grid-template-columns: 1fr; gap: 3rem; }
  .sidebar { order: 2; }
}

.sidebar { display: flex; flex-direction: column; gap: 2rem; }
.sidebar-block {
  background: var(--paper-2);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.sidebar-block h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--line-strong);
}
.sidebar-block ul { list-style: none; padding: 0; margin: 0; }
.sidebar-block li { margin-bottom: .65rem; font-size: .9rem; line-height: 1.4; }
.sidebar-block li a { color: var(--ink-soft); }
.sidebar-block li a:hover { color: var(--brand); }

.banner-sidebar { padding: 0; overflow: hidden; }
.banner-sidebar img { width: 100%; display: block; transition: opacity .2s; }
.banner-sidebar:hover img { opacity: .9; }

.banner-top {
  margin-bottom: 3rem;
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
  box-shadow: var(--shadow);
}
.banner-top img { width: 100%; }

.posts-list { display: flex; flex-direction: column; gap: 3rem; }
.post-item {
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}
.post-item:last-child { border-bottom: none; }
.post-cat {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .75rem;
}
.post-item h2 {
  font-size: 2rem;
  margin: 0 0 .75rem;
  line-height: 1.2;
}
.post-item h2 a { color: var(--ink); }
.post-item h2 a:hover { color: var(--brand); }
.post-meta {
  font-size: .85rem;
  color: var(--ink-mute);
  margin-bottom: 1rem;
}
.post-resumen { color: var(--ink-soft); margin-bottom: 1rem; }
.read-more {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 500;
  font-size: .95rem;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}
.read-more:hover { color: var(--brand); border-color: var(--brand); }
.read-more::after { content: '→'; transition: transform .2s; }
.read-more:hover::after { transform: translateX(3px); }

/* Artículo individual */
.article-content {
  max-width: 720px;
}
.article-content h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}
.article-meta {
  color: var(--ink-mute);
  font-size: .9rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.article-body {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--ink);
}
.article-body p { color: var(--ink); margin-bottom: 1.25em; }
.article-body h2 { font-size: 1.7rem; margin: 2.5rem 0 1rem; }
.article-body h3 { font-size: 1.3rem; margin: 2rem 0 .75rem; }
.article-body ul, .article-body ol { margin: 1rem 0 1.5rem 1.5rem; }
.article-body li { margin-bottom: .5rem; }
.article-body blockquote {
  border-left: 3px solid var(--brand);
  padding: .5rem 0 .5rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.1rem;
}
.article-body img { border-radius: var(--radius); margin: 2rem 0; }
.article-body strong { color: var(--ink); }
.article-body a { border-bottom: 1px solid currentColor; }

/* ── Tablas en artículos (Ishikawa / Causa Raíz) ─────────── */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.article-body th {
  background: var(--brand);
  color: #fff;
  text-align: left;
  padding: 0.65rem 0.85rem;
  font-weight: 600;
  border: 1px solid var(--brand);
}
.article-body td {
  padding: 0.6rem 0.85rem;
  border: 1px solid #d1d5db;
  vertical-align: top;
  color: var(--ink);
}
.article-body tr:nth-child(even) td {
  background: #f9f7ff;
}

/* =========================================================
   TIENDA — filtros y cabecera
   ========================================================= */
.tienda-header {
  padding: 4rem var(--gutter) 2rem;
  max-width: var(--container);
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}
.tienda-header .eyebrow {
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 1rem;
}
.tienda-header h1 { margin-bottom: 1rem; }

.filtros {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.filtro-chip {
  display: inline-flex;
  align-items: center;
  padding: .55rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  font-size: .85rem;
  color: var(--ink-soft);
  background: var(--paper);
  transition: all .2s;
}
.filtro-chip:hover { border-color: var(--ink); color: var(--ink); }
.filtro-chip.activo {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.tienda-body { padding: 3rem var(--gutter); max-width: var(--container); margin: 0 auto; }

/* =========================================================
   PRODUCTO INDIVIDUAL
   ========================================================= */
.producto-detalle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding: 4rem var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
}
@media (max-width: 860px) {
  .producto-detalle { grid-template-columns: 1fr; gap: 2rem; padding: 2rem var(--gutter); }
}
.producto-detalle-img {
  aspect-ratio: 1/1;
  background: var(--paper-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}
.producto-detalle-img img { width: 100%; height: 100%; object-fit: cover; }
.producto-detalle-info .breadcrumb {
  font-size: .85rem;
  color: var(--ink-mute);
  margin-bottom: 1.5rem;
}
.producto-detalle-info .breadcrumb a { color: var(--ink-mute); }
.producto-detalle-info h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 1rem; }
.producto-detalle-info .precio-grande {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--ink);
  margin: 1.5rem 0;
}

/* =========================================================
   CARRITO
   ========================================================= */
.carrito-page {
  padding: 4rem var(--gutter);
  max-width: 1100px;
  margin: 0 auto;
}
.carrito-page h1 { margin-bottom: 2rem; }
.carrito-tabla {
  width: 100%;
  border-collapse: collapse;
}
.carrito-tabla th {
  text-align: left;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 1rem 0;
  border-bottom: 1px solid var(--line-strong);
}
.carrito-tabla td {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.carrito-tabla .col-img { width: 100px; }
.carrito-tabla .col-img img {
  width: 80px; height: 80px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--paper-2);
}
.carrito-tabla .col-cant { width: 130px; }
.carrito-tabla .col-acc  { width: 50px; text-align: right; }
.carrito-tabla .producto-nombre { font-weight: 600; color: var(--ink); }
.carrito-tabla .producto-cat { font-size: .8rem; color: var(--ink-mute); }
.cant-control {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.cant-control button {
  background: var(--paper);
  border: none;
  width: 32px; height: 32px;
  font-size: 1rem;
  color: var(--ink);
}
.cant-control button:hover { background: var(--paper-2); }
.cant-control input {
  width: 40px;
  text-align: center;
  border: none;
  background: var(--paper);
  font-family: var(--font-body);
  font-size: .9rem;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.cant-control input:focus { outline: none; }
.btn-icono {
  background: transparent;
  border: none;
  color: var(--ink-mute);
  font-size: 1.1rem;
  padding: .25rem;
  transition: color .2s;
}
.btn-icono:hover { color: var(--danger); }

.carrito-resumen {
  background: var(--paper-2);
  padding: 2rem;
  border-radius: var(--radius-lg);
  margin-top: 2rem;
  border: 1px solid var(--line);
}
.carrito-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-display);
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.carrito-total .label { font-size: 1.1rem; }
.carrito-total .valor { font-size: 2rem; font-weight: 600; color: var(--ink); }

.carrito-vacio {
  text-align: center;
  padding: 5rem 2rem;
}
.carrito-vacio h2 { font-size: 2rem; }
.carrito-vacio p { color: var(--ink-soft); margin-bottom: 2rem; }

/* =========================================================
   FORMULARIOS
   ========================================================= */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: .4rem;
}
.form-control {
  width: 100%;
  padding: .75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(74,40,112,.1);
}
textarea.form-control { min-height: 140px; resize: vertical; line-height: 1.5; }
.form-help { font-size: .8rem; color: var(--ink-mute); margin-top: .35rem; }

/* =========================================================
   ALERTAS
   ========================================================= */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  border-left: 4px solid;
  font-size: .95rem;
}
.alert-success { background: #e8f3ec; border-color: var(--success); color: var(--success); }
.alert-error   { background: #f6e5e3; border-color: var(--danger);  color: var(--danger);  }
.alert-info    { background: var(--brand-pale); border-color: var(--brand); color: var(--brand); }
.alert-warning { background: var(--accent-bg); border-color: var(--accent); color: #6b4a16; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 4rem var(--gutter) 2rem;
  margin-top: 6rem;
}
.footer-content {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
@media (max-width: 860px) {
  .footer-content { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
.footer-brand h3 {
  color: var(--paper);
  font-size: 1.5rem;
  margin-bottom: .5rem;
}
.footer-brand p {
  color: rgba(250,248,245,.6);
  font-size: .9rem;
  max-width: 320px;
}
.footer-col h4 {
  color: var(--paper);
  font-size: .8rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: .6rem; }
.footer-col a {
  color: rgba(250,248,245,.7);
  font-size: .9rem;
}
.footer-col a:hover { color: var(--paper); }
.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(250,248,245,.1);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .85rem;
  color: rgba(250,248,245,.5);
}

/* =========================================================
   WHATSAPP FLOTANTE
   ========================================================= */
.whatsapp-float {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 200;
  background: #25d366;
  color: white !important;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(37,211,102,.4);
  transition: transform .2s;
}
.whatsapp-float:hover { transform: scale(1.08); color: white !important; }
.whatsapp-float svg { width: 28px; height: 28px; fill: white; }

/* =========================================================
   UTILIDADES
   ========================================================= */
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.flex { display: flex; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }

/* =========================================================
   ANIMACIONES SUTILES
   ========================================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s ease-out backwards; }
.fade-up:nth-child(1) { animation-delay: .05s; }
.fade-up:nth-child(2) { animation-delay: .12s; }
.fade-up:nth-child(3) { animation-delay: .19s; }
.fade-up:nth-child(4) { animation-delay: .26s; }
.fade-up:nth-child(5) { animation-delay: .33s; }
.fade-up:nth-child(6) { animation-delay: .4s; }

/* =============================================
   BLOG — Breadcrumb, tiempo lectura, relacionados
   Pegar al final de tu CSS principal
   ============================================= */

/* Breadcrumb */
.breadcrumb-blog {
    font-size: .8rem;
    color: #999;
    margin-bottom: 1.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    align-items: center;
}
.breadcrumb-blog a {
    color: #777;
    text-decoration: none;
}
.breadcrumb-blog a:hover {
    color: var(--brand);
    text-decoration: underline;
}
.breadcrumb-blog span:last-child {
    color: #444;
    font-weight: 500;
    /* truncar si el título es muy largo */
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tiempo de lectura */
.lectura-tiempo {
    font-size: .8rem;
    color: #aaa;
}

/* Artículos relacionados */
.relacionados-blog {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}
.relacionados-blog h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.relacionados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.relacionado-card {
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg, 10px);
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
}
.relacionado-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.09);
    transform: translateY(-2px);
}
.relacionado-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}
.relacionado-info {
    padding: .8rem;
    flex: 1;
}
.relacionado-info strong {
    font-size: .88rem;
    display: block;
    margin-bottom: .35rem;
    line-height: 1.35;
    color: #222;
}
.relacionado-info p {
    font-size: .78rem;
    color: #888;
    margin: 0;
    line-height: 1.4;
}
