/* ============================================================
   Juaninno Artesanal — Hoja de estilos
   Diseño: editorial / artesanal refinado
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT@9..144,300..900,0..100&family=Cormorant+Garamond:wght@300;400;500&family=Outfit:wght@300;400;500;600&display=swap');

:root {
  /* Paleta: tierras cálidas, crema, cacao oscuro */
  --cream: #F5EFE6;
  --cream-deep: #EDE3D4;
  --paper: #FBF8F2;
  --cocoa: #2A1810;
  --cocoa-soft: #4A2E1E;
  --caramel: #B5651D;
  --caramel-deep: #8B4513;
  --gold: #C9A55C;
  --gold-soft: #D4B675;
  --ink: #1A0F08;
  --muted: #8B7355;

  /* Tipografía */
  --serif-display: 'Fraunces', Georgia, serif;
  --serif-body: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Outfit', system-ui, sans-serif;

  /* Espaciado */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  /* Layout */
  --max-width: 1280px;
  --content-width: 980px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--cocoa);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

/* ============================================================
   NAVEGACIÓN
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 242, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(42, 24, 16, 0.08);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.nav-brand {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 30;
  color: var(--cocoa);
}

.nav-brand em {
  font-style: italic;
  font-weight: 300;
  color: var(--caramel);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 400;
}

.nav-links a {
  color: var(--cocoa-soft);
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--caramel);
  transition: width 0.3s ease;
}

.nav-links a:hover::after { width: 100%; }

.nav-cta {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.7rem 1.4rem;
  background: var(--cocoa);
  color: var(--cream);
  border-radius: 999px;
  transition: all 0.25s ease;
}

.nav-cta:hover { background: var(--caramel-deep); }

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  min-height: 75vh;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--caramel-deep);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.hero-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--caramel);
}

.hero h1 {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(3rem, 7vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--cocoa);
  margin-bottom: 1.75rem;
  font-variation-settings: "opsz" 144, "SOFT" 40;
}

.hero h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--caramel-deep);
}

.hero-lede {
  font-size: 1.375rem;
  line-height: 1.55;
  color: var(--cocoa-soft);
  max-width: 36ch;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1rem 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--cocoa);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--caramel-deep);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--cocoa);
  border: 1px solid var(--cocoa);
}

.btn-ghost:hover {
  background: var(--cocoa);
  color: var(--cream);
}

.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 4px;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Slider del hero ===== */
.hero-slider {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--cream-deep);
  border-radius: 4px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.hero-slide-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(251, 248, 242, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(42, 24, 16, 0.1);
  color: var(--cocoa);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.2s ease;
}

.hero-slider:hover .hero-slider-arrow {
  opacity: 1;
}

.hero-slider-arrow:hover {
  background: var(--paper);
}

.hero-slider-prev { left: 14px; }
.hero-slider-next { right: 14px; }

.hero-slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 4;
}

.hero-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(251, 248, 242, 0.5);
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.hero-slider-dot:hover {
  background: rgba(251, 248, 242, 0.85);
}

.hero-slider-dot-active {
  background: var(--paper);
  width: 24px;
  border-radius: 4px;
}

/* Sellos vintage en esquina inferior izquierda del hero */
.hero-seals {
  position: absolute;
  bottom: -28px;
  left: -28px;
  width: 200px;
  height: 150px;
  z-index: 3;
  pointer-events: none;
}

.hero-seal {
  position: absolute;
  width: 130px;
  height: 130px;
  filter: drop-shadow(0 12px 28px rgba(42, 24, 16, 0.18));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-seal-back {
  top: 18px;
  left: 60px;
  transform: rotate(8deg);
  z-index: 1;
}

.hero-seal-front {
  top: 0;
  left: 0;
  transform: rotate(-6deg);
  z-index: 2;
}

.hero-visual:hover .hero-seal-back {
  transform: rotate(12deg) translate(6px, 4px);
}

.hero-visual:hover .hero-seal-front {
  transform: rotate(-10deg) translate(-4px, -2px);
}

/* Mantengo gentle-rotate por si se usa en otro lado, pero ya no en sellos */

/* Adorno decorativo */
.hero::before {
  content: 'J';
  position: absolute;
  top: 10%;
  right: -2%;
  font-family: var(--serif-display);
  font-size: 32rem;
  font-weight: 200;
  color: var(--cream-deep);
  opacity: 0.5;
  line-height: 1;
  pointer-events: none;
  z-index: 0;
  font-style: italic;
}

/* ============================================================
   SECCIONES
   ============================================================ */

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

.section-narrow {
  max-width: var(--content-width);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-eyebrow {
  font-family: var(--sans);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--caramel-deep);
  margin-bottom: 1rem;
  font-weight: 500;
}

.section-title {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--cocoa);
}

.section-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--caramel-deep);
}

/* ============================================================
   PRODUCTOS — GRID
   ============================================================ */

.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 3rem 2rem;
}

.producto-card {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.3s ease;
}

.producto-card:hover { transform: translateY(-4px); }

.producto-img {
  aspect-ratio: 1;
  background: var(--cream-deep);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  position: relative;
}

.producto-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.producto-card:hover .producto-img img {
  transform: scale(1.04);
}

.producto-medalla {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--paper);
  color: var(--gold-soft);
  font-family: var(--sans);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--gold);
  color: var(--caramel-deep);
}

.producto-nombre {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 0.4rem;
  color: var(--cocoa);
}

.producto-desc {
  font-family: var(--serif-body);
  font-size: 1rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.producto-precio {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--caramel-deep);
}

/* ============================================================
   HISTORIA / SECCIÓN DE TEXTO
   ============================================================ */

.historia {
  background: var(--cream);
  position: relative;
  overflow: hidden;
}

.historia-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

.historia p {
  font-size: 1.5rem;
  line-height: 1.5;
  color: var(--cocoa-soft);
  font-weight: 300;
  margin-bottom: 1.5rem;
}

.historia p:first-of-type::first-letter {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 4.5rem;
  font-weight: 400;
  float: left;
  line-height: 0.85;
  padding-right: 0.7rem;
  padding-top: 0.4rem;
  color: var(--caramel-deep);
}

.historia-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2.5rem 0;
  color: var(--gold);
  font-size: 1.2rem;
}

.historia-separator::before,
.historia-separator::after {
  content: '';
  width: 60px;
  height: 1px;
  background: var(--gold);
}

/* ============================================================
   MEDALLAS
   ============================================================ */

.medallas {
  background: var(--cocoa);
  color: var(--cream);
}

.medallas .section-title {
  color: var(--cream);
}

.medallas .section-title em {
  color: var(--gold-soft);
}

.medallas .section-eyebrow {
  color: var(--gold-soft);
}

.medallas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 4rem;
}

.medalla {
  text-align: center;
  padding: 2rem;
  border: 1px solid rgba(212, 182, 117, 0.3);
  border-radius: 4px;
  position: relative;
}

.medalla-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.medalla-year {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 300;
  font-size: 3rem;
  color: var(--gold-soft);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.medalla-label {
  font-family: var(--sans);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--cream);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.medalla-event {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 1rem;
  color: rgba(245, 239, 230, 0.7);
}

/* ============================================================
   CONTACTO / FOOTER
   ============================================================ */

.contacto {
  background: var(--cream-deep);
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contacto-info h2 {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  line-height: 1.05;
}

.contacto-info h2 em {
  font-style: italic;
  font-weight: 300;
  color: var(--caramel-deep);
}

.contacto-info p {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--cocoa-soft);
  margin-bottom: 2rem;
}

.contacto-data {
  list-style: none;
  font-family: var(--sans);
}

.contacto-data li {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(42, 24, 16, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.contacto-data li:last-child { border-bottom: none; }

.contacto-data .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.contacto-data .value {
  font-size: 1rem;
  color: var(--cocoa);
}

.contacto-data a:hover {
  color: var(--caramel-deep);
}

.contacto-cta {
  background: var(--paper);
  padding: 3rem;
  border-radius: 4px;
  border: 1px solid rgba(42, 24, 16, 0.08);
}

.contacto-cta h3 {
  font-family: var(--serif-display);
  font-weight: 400;
  font-style: italic;
  font-size: 1.875rem;
  margin-bottom: 1rem;
  color: var(--cocoa);
}

.contacto-cta p {
  margin-bottom: 2rem;
  color: var(--cocoa-soft);
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: var(--ink);
  color: rgba(245, 239, 230, 0.7);
  padding: var(--space-lg) var(--space-md) var(--space-md);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-brand {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: 2rem;
  color: var(--cream);
  margin-bottom: 1rem;
}

.footer-brand em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold-soft);
}

.footer-tagline {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 1.125rem;
  max-width: 30ch;
}

.footer h4 {
  font-family: var(--sans);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold-soft);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.footer ul {
  list-style: none;
  font-family: var(--sans);
  font-size: 0.95rem;
}

.footer ul li { margin-bottom: 0.8rem; }

.footer ul a:hover { color: var(--cream); }

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(245, 239, 230, 0.1);
  text-align: center;
  font-family: var(--sans);
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  color: rgba(245, 239, 230, 0.4);
}

/* ============================================================
   PÁGINA DE PRODUCTO INDIVIDUAL
   ============================================================ */

.producto-detalle {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.producto-detalle-img {
  aspect-ratio: 1;
  background: var(--cream-deep);
  border-radius: 4px;
  overflow: hidden;
  position: sticky;
  top: 120px;
}

.producto-detalle-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.producto-detalle-info .breadcrumb {
  font-family: var(--sans);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.producto-detalle-info .breadcrumb a {
  color: var(--caramel-deep);
}

.producto-detalle-info h1 {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: var(--cocoa);
}

.producto-detalle-info h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--caramel-deep);
}

.producto-detalle-precio {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 2rem;
  font-weight: 300;
  color: var(--caramel-deep);
  margin-bottom: 2rem;
}

.producto-detalle-desc {
  font-size: 1.25rem;
  line-height: 1.65;
  color: var(--cocoa-soft);
  margin-bottom: 2rem;
}

.producto-detalle-specs {
  list-style: none;
  font-family: var(--sans);
  margin-bottom: 2.5rem;
  border-top: 1px solid rgba(42, 24, 16, 0.1);
}

.producto-detalle-specs li {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(42, 24, 16, 0.1);
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.producto-detalle-specs .spec-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: var(--space-lg);
    min-height: auto;
  }
  .hero::before { font-size: 18rem; top: 5%; right: -10%; }
  .hero-seals { width: 160px; height: 120px; bottom: -16px; left: -16px; }
  .hero-seal { width: 100px; height: 100px; }
  .hero-seal-back { top: 14px; left: 50px; }
  .nav-links { display: none; }
  .medallas-grid, .contacto-grid, .producto-detalle, .footer-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .producto-detalle-img { position: static; }
  .footer-brand { font-size: 1.5rem; }
  .historia p { font-size: 1.25rem; }
  .section { padding: var(--space-lg) var(--space-md); }
  .productos-grid { gap: 2.5rem 1.5rem; }
}

@media (max-width: 560px) {
  .nav-inner { padding: 1rem; }
  .nav-brand { font-size: 1.2rem; }
  .nav-cta { padding: 0.5rem 1rem; font-size: 0.7rem; }
  .hero { padding: var(--space-md) 1rem var(--space-md); }
  .productos-grid { grid-template-columns: 1fr; }
  .contacto-cta { padding: 2rem 1.5rem; }
}

/* Animaciones de entrada */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    animation: fadeIn 0.8s ease-out backwards;
  }
  .fade-in-delay-1 { animation-delay: 0.1s; }
  .fade-in-delay-2 { animation-delay: 0.25s; }
  .fade-in-delay-3 { animation-delay: 0.4s; }
  .fade-in-delay-4 { animation-delay: 0.55s; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
