/*
  Lovelane Meleara — Estilos globales
  Paleta: Vino (#8B1E3F), Rosa (#F6CED8), Blanco (#FFFFFF), Gris claro (#F2F2F2), Dorado (#D4AF37)
*/

:root {
  --vino: #8B1E3F;
  --rosa: #F6CED8;
  --blanco: #FFFFFF;
  --gris: #F2F2F2;
  --gris-700: #555555;
  --gris-900: #222222;
  --dorado: #D4AF37;
  --sombra: 0 12px 32px rgba(139, 30, 63, 0.14);
}

#centrado{ text-align: center; justify-content: center; align-items: center;}
/* Tipografías */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;700&family=Poppins:wght@300;400;500;600&display=swap');

/* Reset básico */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
ul { list-style: none; padding: 0; margin: 0; }
a { color: inherit; text-decoration: none; }

body {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--gris-900);
  background: var(--blanco);
  line-height: 1.6;
}

.container { width: min(1200px, 92%); margin: 0 auto; }
.section { padding: clamp(56px, 6vw, 96px) 0; }
.section--soft { background: var(--gris); }
.section-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(28px, 3.2vw, 40px);
  color: var(--vino);
  margin: 0 0 20px;
}
.section-subtitle {
  color: var(--gris-700);
  margin: 0 0 36px;
}

.hr-accent {
  width: 80px; height: 4px; background: linear-gradient(90deg, var(--dorado), rgba(212,175,55,0.4));
  border: 0; margin: 16px 0 0;
}

/* Navbar */
.navbar {
  position: sticky; top: 0; z-index: 999;
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.06);
}
.navbar__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--vino); }
.brand__logo { width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(120% 120% at 0% 0%, var(--rosa) 0%, #fff 40%, var(--dorado) 100%); box-shadow: inset 0 0 0 2px rgba(212,175,55,0.3); }
.brand__img { width: 36px; height: 36px; object-fit: contain; }
.footer__img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.nav { display: flex; align-items: center; gap: clamp(8px, 2vw, 20px); flex-wrap: wrap; }
.nav a { padding: 10px 12px; border-radius: 10px; color: var(--gris-900); font-weight: 500; }
.nav a:hover { background: var(--rosa); color: var(--vino); }
.nav__badge { display: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--vino); color: #fff; font-size: 12px; line-height: 20px; display: inline-flex; align-items: center; justify-content: center; }
.nav-cta { display: flex; gap: 10px; align-items: center; }

/* Nav agrupada con dropdown */
.nav__groups { display: flex; align-items: center; gap: clamp(10px, 2vw, 24px); }
.nav-group { position: relative; }
.nav-group__btn { background: transparent; border: 0; padding: 10px 12px; border-radius: 10px; font-weight: 600; color: var(--gris-900); cursor: pointer; }
.nav-group__btn:hover { background: var(--rosa); color: var(--vino); }
.nav-dropdown { position: absolute; top: 100%; left: 0; min-width: 220px; background: #fff; border: 1px solid #eee; border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,0.08); padding: 8px; display: none; z-index: 1000; }
.nav-dropdown a { display: block; padding: 10px 12px; border-radius: 8px; }
.nav-dropdown a:hover { background: var(--gris); }
.nav-group:hover .nav-dropdown { display: block; }
.nav-group.open .nav-dropdown { display: block; }

@media (max-width: 760px) {
  .nav__groups { gap: 8px; }
}

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer; border-radius: 14px; padding: 12px 18px; font-weight: 600; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease; }
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(90deg, #8b1e3f 60%, #e75480 100%);
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(139,30,63,0.10);
}
.btn--primary:hover {
  background: linear-gradient(90deg, #e75480 60%, #8b1e3f 100%);
  color: #fffbe6;
}
.btn--light { background: var(--blanco); color: var(--vino); box-shadow: var(--sombra); }
.btn--ghost { background: transparent; color: var(--vino); box-shadow: none; border: 2px solid var(--vino); }
.btn--gold {
  background: linear-gradient(90deg, #ffd700 60%, #fffbe6 100%);
  color: #3a2a00;
  border: none;
  box-shadow: 0 2px 8px rgba(139,30,63,0.10);
}
.btn--gold:hover {
  background: linear-gradient(90deg, #ffe066 60%, #fffbe6 100%);
  color: #7a5a00;
}
.btn--icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: .02em;
  transition: background .22s, color .22s, box-shadow .22s, transform .18s;
}
.btn--icon span {
  font-size: 1.2em;
  transition: transform .22s;
}
.btn--icon:hover span {
  transform: scale(1.18) rotate(-8deg);
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,0.08), var(--sombra); }
.btn:focus-visible { outline: 3px solid rgba(212,175,55,.5); outline-offset: 2px; }

/* Hero */
.hero {
  position: relative; min-height: 76vh; display: grid; place-items: center; color: var(--blanco);
  background: linear-gradient(rgba(139, 30, 63, 0.35), rgba(139, 30, 63, 0.55)), url('https://images.unsplash.com/photo-1519681393784-d120267933ba?q=80&w=1600&auto=format&fit=crop') center/cover no-repeat;
}
.hero__content { text-align: center; padding: 24px; }
.hero__title { font-family: 'Playfair Display', serif; font-size: clamp(34px, 5vw, 60px); margin: 0 0 12px; letter-spacing: .4px; }
.hero__tagline { font-size: clamp(16px, 2.2vw, 20px); opacity: .95; margin-bottom: 24px; }
.hero__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Grids y tarjetas */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card { background: var(--blanco); border-radius: 18px; overflow: hidden; box-shadow: var(--sombra); display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease, opacity .6s ease; animation: fadeUp .6s ease both; }
.card__media { position: relative; aspect-ratio: 4/3; background: var(--gris); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(139,30,63,.18); }
.card:hover .card__media img { transform: scale(1.05); }
.card__badge { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,0.92); color: var(--vino); padding: 6px 10px; border-radius: 999px; font-size: 12px; border: 1px solid rgba(139,30,63,.15); }
.card__body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card__title { font-weight: 600; color: var(--gris-900); margin: 0; }
.card__desc { color: var(--gris-700); font-size: 14px; margin: 0; }
.card__price { font-weight: 700; color: var(--vino); }
.card__actions { margin-top: auto; display: flex; gap: 10px; align-items: center; }

.badge-gold { color: #3a2a00; background: linear-gradient(135deg, #fff6cc 0%, #ffeaa7 40%, #ffd166 100%); border: 1px solid rgba(212,175,55,0.35); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 6px 18px rgba(212,175,55,0.25); }

/* Promoción */
.promo { background: linear-gradient(135deg, #fff 0%, var(--rosa) 100%); border-radius: 22px; padding: clamp(18px, 3vw, 32px); box-shadow: var(--sombra); display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: center; }
.promo__title { font-family: 'Playfair Display', serif; color: var(--vino); margin: 0 0 8px; font-size: clamp(24px, 2.6vw, 34px); }
.promo__desc { margin: 0 0 14px; color: var(--gris-700); }
.promo__media { border-radius: 18px; overflow: hidden; box-shadow: var(--sombra); }
@media (max-width: 900px) { .promo { grid-template-columns: 1fr; } }

/* Footer */
.footer { background: #2a0c17; color: #fbeff2; padding: 36px 0 16px; }
.footer a { color: #ffeacc; }
.footer__grid { display: grid; grid-template-columns: 1.2fr repeat(2, 1fr); gap: 24px; }
.footer__brand { display: flex; gap: 12px; align-items: center; }
.footer__logo { width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(120% 120% at 0% 0%, var(--rosa) 0%, #fff 40%, var(--dorado) 100%); box-shadow: inset 0 0 0 2px rgba(212,175,55,0.3); }
.footer__copy { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 22px; padding-top: 16px; font-size: 14px; color: #ffe7ee; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr; } }

/* Formularios */
.form { display: grid; gap: 14px; }
.form-row { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.label { font-weight: 600; color: var(--gris-900); }
.input, .select, .textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid #e9e9e9; background: #fff; outline: none; transition: border-color .18s ease, box-shadow .18s ease; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--vino); box-shadow: 0 0 0 4px rgba(139,30,63,.10); }
.textarea { min-height: 120px; resize: vertical; }
.help { font-size: 13px; color: var(--gris-700); }

.alert { border-radius: 12px; padding: 12px 14px; background: #fff8fa; color: var(--vino); border: 1px solid rgba(139,30,63,.18); }
.LoveMe { display: flex; flex-direction: column; row-gap: 0;}
red{ color: #FF0000;}
/* Tablas (carrito) */
.table { width: 100%; border-collapse: collapse; border-radius: 14px; overflow: hidden; box-shadow: var(--sombra); background: #fff; }
.table th, .table td { padding: 14px 16px; text-align: left; }
.table thead { background: var(--gris); }
.table tr + tr { border-top: 1px solid #eee; }
.normal { color: var(--gris-900); margin: -0.5vh;}
/* Utilidades */
.m-0 { margin: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; } .mt-24 { margin-top: 24px; }
.text-center { text-align: center; }
.flex { display: flex; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }

/* Chips/etiquetas */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 10px; border-radius: 999px; background: var(--gris); color: var(--gris-900); font-size: 13px; border: 1px solid #eee; }
.chip--accent { background: var(--rosa); color: var(--vino); border-color: rgba(139,30,63,.25); }

/* WhatsApp botón flotante */
.whatsapp-float { position: fixed; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: white; display: grid; place-items: center; box-shadow: 0 8px 26px rgba(37,211,102,.35); z-index: 999; }
.whatsapp-float:hover { filter: brightness(1.05); }

/* Secciones específicas sugeridas */
/* Catálogo */
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
@media (max-width: 900px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .product-grid { grid-template-columns: 1fr; } }

/* Cotización */
.estimator { border-radius: 18px; background: #fff; box-shadow: var(--sombra); padding: 18px; }
.estimator__result { font-weight: 700; color: var(--vino); font-size: 18px; }

/* Contacto */
.map { width: 100%; height: 320px; border-radius: 18px; overflow: hidden; box-shadow: var(--sombra); }

/* Blog */
.article-card .card__media { aspect-ratio: 16/9; }

/* Animaciones y responsividad avanzada */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes zoomIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

.hero__title { animation: fadeUp .7s ease both; }
.hero__tagline { animation: fadeUp .9s ease both; }
.section-title { animation: fadeUp .6s ease both; }

/* Entrada progresiva en grillas */
.product-grid > * { animation: fadeUp .6s ease both; }
.product-grid > *:nth-child(2) { animation-delay: .05s; }
.product-grid > *:nth-child(3) { animation-delay: .1s; }
.product-grid > *:nth-child(4) { animation-delay: .15s; }
.product-grid > *:nth-child(5) { animation-delay: .2s; }
.product-grid > *:nth-child(6) { animation-delay: .25s; }

#featured-products > * { animation: fadeUp .6s ease both; }
#featured-products > *:nth-child(2) { animation-delay: .05s; }
#featured-products > *:nth-child(3) { animation-delay: .1s; }

/* Ajustes móviles de la barra */
@media (max-width: 780px) {
  .navbar__inner { height: auto; padding: 8px 0; }
  .nav { padding: 6px 0; }
}

/* Prefiere menor movimiento */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Accesibilidad */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* --- Mejoras Lovelane 2025 para cotización y formularios dinámicos --- */

/* Filas de formulario mejoradas */
.form-row {
  align-items: flex-end;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(139,30,63,0.07);
  transition: box-shadow .22s, background .22s;
  margin-bottom: 12px;
  padding: 12px 10px;
  position: relative;
  animation: fadeInRow .6s cubic-bezier(.4,1.3,.6,1) both;
}
@keyframes fadeInRow {
  from {opacity:0; transform:translateY(20px) scale(.98);}
  to   {opacity:1; transform:translateY(0) scale(1);}
}

/* Animación al eliminar (usar con JS agregando/removiendo la clase .row-exit) */
.form-row.row-exit {
  animation: fadeOutRow .38s cubic-bezier(.9,.2,.3,1) forwards;
}
@keyframes fadeOutRow {
  to { opacity: 0; transform: translateY(-12px) scale(.97); height: 0; margin: 0; padding: 0; }
}

/* Botones de eliminar y agregar línea */
.btn.cf-remove, .btn.cat-remove {
  color: var(--vino);
  border: 2px solid var(--vino);
  background: #fff0f6;
  transition: background .2s, color .2s, border-color .2s;
  font-size: 15px;
  padding: 8px 12px;
  margin-left: 8px;
}
.btn.cf-remove:hover, .btn.cat-remove:hover {
  background: var(--vino);
  color: #fff;
  border-color: var(--dorado);
  box-shadow: 0 6px 20px rgba(139,30,63,0.17);
  transform: scale(1.05) rotate(-2deg);
}

/* Botón agregar línea */
.btn#addCustom, .btn#addCatalogRow {
  border: 2px dashed var(--vino);
  background: #fff6fa;
  color: var(--vino);
  font-weight: 600;
  transition: background .2s, color .2s, border-color .2s;
  margin-top: 6px;
  margin-bottom: 14px;
  letter-spacing: .03em;
}
.btn#addCustom:hover, .btn#addCatalogRow:hover {
  background: var(--dorado);
  color: #3a2a00;
  border-color: var(--vino);
  transform: scale(1.05);
}

/* Chips más vistosos */
.chips {
  padding: 8px 0 4px 0;
  gap: 10px;
}
.chip {
  border: 1.6px solid var(--dorado);
  background: linear-gradient(100deg, #fffbe6 60%, #fff2f8 100%);
  color: var(--vino);
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(212,175,55,0.07);
  transition: background .17s, color .17s, border-color .17s;
}
.chip input:checked + label,
.chip input:checked {
  background: var(--vino);
  color: #fff;
  border-color: var(--vino);
}

/* Subtotales y totales destacados */
.estimator__result, #cfTotal, #grandTotal {
  font-size: 1.25em !important;
  color: var(--dorado) !important;
  text-shadow: 0 1px 7px #fffbe699, 0 0 2px var(--vino);
  font-family: 'Playfair Display', serif;
  letter-spacing: .02em;
  font-weight: 700;
  margin-top: 6px;
}
#cfExtras, #discountAmount { color: var(--vino); }

/* Renglón visual al separar secciones */
.section-title:not(:first-child) { margin-top: 40px; border-top: 2px dashed var(--gris); padding-top: 24px; }

/* Responsive tuning para custom-rows y cat-rows */
@media (max-width: 540px) {
  .form-row { flex-direction: column; gap: 8px; padding: 10px 6px; }
  .btn.cf-remove, .btn.cat-remove { margin-left: 0; margin-top: 8px; width: 100%; }
}

/* Mejoras para el hover de filas */
.form-row:hover {
  background: #fff6fa;
  box-shadow: 0 8px 28px rgba(139,30,63,0.11);
  z-index: 2;
}
.img1 { width: 100%; height: 100%;  object-fit: cover;  border-radius: 8px; display: block; }
