/* ═══════════════════════════════════════════
   Artesanías Ortiz — Estilos Principales
   ═══════════════════════════════════════════ */

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

/* ── Variables CSS ─────────────────────────── */
:root {
  --terracota:    #B85C2A;
  --terracota-d:  #9A4D23;
  --terracota-l:  #D4793F;
  --crema:        #FDF6EE;
  --marron:       #2C1A0E;
  --beige:        #F5F0EB;
  --blanco:       #FFFFFF;
  --gris-200:     #E8E2DC;
  --gris-400:     #B5ADA5;
  --gris-600:     #7A7268;
  --verde-ok:     #2E7D32;
  --rojo-err:     #C62828;

  --ff-heading: 'Playfair Display', Georgia, serif;
  --ff-body:    'Inter', system-ui, sans-serif;

  --fs-xs: .75rem;  --fs-sm: .875rem; --fs-base: 1rem;
  --fs-lg: 1.125rem; --fs-xl: 1.25rem; --fs-2xl: 1.5rem;
  --fs-3xl: 2rem;   --fs-4xl: 2.5rem; --fs-5xl: 3.25rem;

  --shadow-sm:  0 1px 3px rgba(44,26,14,.08);
  --shadow-md:  0 4px 12px rgba(44,26,14,.1);
  --shadow-lg:  0 8px 30px rgba(44,26,14,.12);
  --radius:     12px;
  --radius-sm:  8px;
  --transition: .2s ease;
  --max-w:      1200px;
  --nav-h:      72px;
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  color: var(--marron);
  background: var(--crema);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--terracota); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--terracota-d); }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── Utilidades ────────────────────────────── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.section { padding: 5rem 0; }
.section-title {
  font-family: var(--ff-heading);
  font-size: var(--fs-3xl);
  text-align: center;
  margin-bottom: .5rem;
}
.section-subtitle {
  text-align: center;
  color: var(--gris-600);
  max-width: 600px;
  margin: 0 auto 3rem;
}
.text-center { text-align: center; }

/* ── Navbar ────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  background: rgba(253,246,238,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gris-200);
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
.navbar .container {
  display: flex; align-items: center; justify-content: space-between; height: 100%;
}
.nav-logo { display: flex; align-items: center; gap: .75rem; }
.nav-logo img { height: 42px; width: auto; }
.nav-logo span {
  font-family: var(--ff-heading); font-weight: 700;
  font-size: var(--fs-xl); color: var(--marron);
}
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-weight: 500; color: var(--marron); position: relative; padding: .25rem 0;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
  background: var(--terracota); transition: width var(--transition);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:hover { color: var(--terracota); }

/* Language selector */
.lang-switch {
  display: flex; align-items: center; gap: .25rem;
  background: var(--beige); border-radius: 20px; padding: 3px;
}
.lang-switch button {
  padding: .3rem .65rem; border-radius: 18px; font-size: var(--fs-sm);
  font-weight: 600; color: var(--gris-600); transition: all var(--transition);
}
.lang-switch button.active {
  background: var(--terracota); color: var(--blanco);
}

/* Mobile menu toggle */
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: .5rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--marron); transition: all var(--transition); border-radius: 2px; }
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ── Hero ──────────────────────────────────── */
.hero {
  min-height: 85vh; display: flex; align-items: center; justify-content: center;
  padding: calc(var(--nav-h) + 2rem) 1.5rem 4rem;
  background: linear-gradient(160deg, var(--crema) 0%, var(--beige) 50%, #F0E6D8 100%);
  position: relative; overflow: hidden; text-align: center;
}
.hero::before {
  content: ''; position: absolute; top: -80px; right: -80px;
  width: 350px; height: 350px; border-radius: 50%;
  background: radial-gradient(circle, rgba(184,92,42,.1) 0%, transparent 70%);
}
.hero::after {
  content: ''; position: absolute; bottom: -60px; left: -60px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(184,92,42,.08) 0%, transparent 70%);
}
.hero-content { position: relative; z-index: 1; max-width: 750px; }
.hero-badge {
  display: inline-block; background: rgba(184,92,42,.12); color: var(--terracota);
  font-weight: 600; font-size: var(--fs-sm); padding: .4rem 1.2rem;
  border-radius: 20px; margin-bottom: 1.5rem; letter-spacing: .5px;
}
.hero h1 {
  font-family: var(--ff-heading); font-size: var(--fs-5xl); font-weight: 700;
  line-height: 1.15; margin-bottom: 1.25rem; color: var(--marron);
}
.hero h1 em { color: var(--terracota); font-style: normal; }
.hero p { font-size: var(--fs-lg); color: var(--gris-600); margin-bottom: 2rem; max-width: 600px; margin-inline: auto; }
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Botones ───────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.75rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: var(--fs-base);
  transition: all var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--terracota); color: var(--blanco); }
.btn-primary:hover { background: var(--terracota-d); color: var(--blanco); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline { border: 2px solid var(--terracota); color: var(--terracota); }
.btn-outline:hover { background: var(--terracota); color: var(--blanco); transform: translateY(-2px); }
.btn-sm { padding: .55rem 1.2rem; font-size: var(--fs-sm); }
.btn-icon { width: 42px; height: 42px; padding: 0; justify-content: center; border-radius: 50%; }

/* ── Grid de productos ─────────────────────── */
.products-section { background: var(--blanco); }
.filter-bar {
  display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 2.5rem;
}
.filter-btn {
  padding: .5rem 1.25rem; border-radius: 20px; font-weight: 500;
  font-size: var(--fs-sm); color: var(--gris-600); background: var(--beige);
  border: 1px solid transparent; transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--terracota); color: var(--terracota); }
.filter-btn.active { background: var(--terracota); color: var(--blanco); border-color: var(--terracota); }

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

/* ── Tarjeta de producto ───────────────────── */
.product-card {
  background: var(--crema); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: all var(--transition);
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card-img {
  position: relative; overflow: hidden; aspect-ratio: 4/3; background: var(--beige);
}
.product-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-badge {
  position: absolute; top: .75rem; left: .75rem;
  background: var(--terracota); color: var(--blanco);
  font-size: var(--fs-xs); font-weight: 600; padding: .25rem .65rem;
  border-radius: 12px; text-transform: uppercase; letter-spacing: .5px;
}
.product-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.product-card-body h3 {
  font-family: var(--ff-heading); font-size: var(--fs-xl); margin-bottom: .5rem;
}
.product-card-body p { color: var(--gris-600); font-size: var(--fs-sm); flex: 1; }
.product-card-footer {
  padding: 0 1.25rem 1.25rem; display: flex; align-items: center; justify-content: space-between;
}
.product-category-tag {
  font-size: var(--fs-xs); color: var(--terracota); font-weight: 500;
  text-transform: capitalize;
}

/* ── Sección Info ──────────────────────────── */
.info-section { background: var(--beige); }
.info-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem;
}
.info-card {
  background: var(--blanco); padding: 2rem; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); text-align: center;
  transition: transform var(--transition);
}
.info-card:hover { transform: translateY(-2px); }
.info-card .icon {
  width: 52px; height: 52px; margin: 0 auto 1rem;
  background: rgba(184,92,42,.1); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.info-card .icon svg { width: 24px; height: 24px; fill: var(--terracota); }
.info-card h3 { font-family: var(--ff-heading); font-size: var(--fs-lg); margin-bottom: .5rem; }
.info-card p { color: var(--gris-600); font-size: var(--fs-sm); }

/* ── Footer ────────────────────────────────── */
.footer {
  background: var(--marron); color: var(--gris-200); padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 2rem;
  margin-bottom: 2rem;
}
.footer h4 { color: var(--blanco); font-family: var(--ff-heading); font-size: var(--fs-lg); margin-bottom: 1rem; }
.footer a { color: var(--gris-200); }
.footer a:hover { color: var(--terracota-l); }
.footer-links { display: flex; flex-direction: column; gap: .5rem; }
.footer-social { display: flex; gap: 1rem; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.footer-social a:hover { background: var(--terracota); }
.footer-social svg { width: 20px; height: 20px; fill: var(--blanco); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.5rem; text-align: center; font-size: var(--fs-sm);
}

/* ── WhatsApp Flotante ─────────────────────── */
.whatsapp-float {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 900;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: var(--blanco);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(37,211,102,.4);
  transition: transform var(--transition), box-shadow var(--transition);
  animation: pulse-wa 2s infinite;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(37,211,102,.5); color: var(--blanco); }
.whatsapp-float svg { width: 28px; height: 28px; fill: currentColor; }
@keyframes pulse-wa {
  0%,100% { box-shadow: 0 4px 14px rgba(37,211,102,.4); }
  50% { box-shadow: 0 4px 24px rgba(37,211,102,.6); }
}

/* ── About page ────────────────────────────── */
.page-header {
  padding: calc(var(--nav-h) + 3rem) 0 3rem;
  background: linear-gradient(160deg, var(--crema), var(--beige));
  text-align: center;
}
.page-header h1 { font-family: var(--ff-heading); font-size: var(--fs-4xl); margin-bottom: .75rem; }
.page-header p { color: var(--gris-600); max-width: 550px; margin: 0 auto; }

.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.about-text h2 { font-family: var(--ff-heading); font-size: var(--fs-2xl); margin-bottom: 1rem; }
.about-text p { color: var(--gris-600); margin-bottom: 1rem; }
.about-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

.craft-types {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1.5rem;
}
.craft-card {
  background: var(--blanco); padding: 1.75rem; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); text-align: center;
  border-top: 3px solid var(--terracota);
  transition: transform var(--transition);
}
.craft-card:hover { transform: translateY(-3px); }
.craft-card h3 { font-family: var(--ff-heading); margin-bottom: .5rem; }
.craft-card p { color: var(--gris-600); font-size: var(--fs-sm); }

/* ── Contact page ──────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-item .icon {
  width: 44px; height: 44px; min-width: 44px; border-radius: 50%;
  background: rgba(184,92,42,.1); display: flex; align-items: center; justify-content: center;
}
.contact-item .icon svg { width: 20px; height: 20px; fill: var(--terracota); }
.contact-item h3 { font-size: var(--fs-base); margin-bottom: .25rem; }
.contact-item p { color: var(--gris-600); font-size: var(--fs-sm); }
.map-container { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.map-container iframe { width: 100%; height: 400px; border: 0; }

/* ── Placeholder de imagen ─────────────────── */
.img-placeholder {
  background: linear-gradient(135deg, var(--beige), var(--gris-200));
  display: flex; align-items: center; justify-content: center;
  color: var(--gris-400); font-size: var(--fs-sm);
}

/* ── Loading state ─────────────────────────── */
.loading-spinner {
  width: 40px; height: 40px; border: 3px solid var(--gris-200);
  border-top-color: var(--terracota); border-radius: 50%;
  animation: spin .7s linear infinite; margin: 3rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ────────────────────────────── */
@media (max-width: 768px) {
  :root { --nav-h: 64px; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--crema); flex-direction: column; gap: 0;
    padding: 1rem 0; border-bottom: 1px solid var(--gris-200);
    transform: translateY(-120%); transition: transform .3s ease;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: .75rem 1.5rem; width: 100%; }
  .hero h1 { font-size: var(--fs-3xl); }
  .hero p { font-size: var(--fs-base); }
  .about-content, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 3rem 0; }
  .section-title { font-size: var(--fs-2xl); }
}
@media (max-width: 480px) {
  .hero h1 { font-size: var(--fs-2xl); }
  .products-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; align-items: center; }
}
