@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;0,900;1,400;1,600;1,700&display=swap');

:root {
  --berry: #e11d48;
  --berry-dark: #9f1239;
  --berry-soft: #fff1f2;
  --leaf: #15803d;
  --leaf-soft: #ecfdf5;
  --gold: #f59e0b;
  --cream: #fffaf4;
  --ink: #1c1917;
  --muted: #78716c;
  --line: #ece7e1;
  --radius: 1.5rem;
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; scroll-padding-top: 6rem; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--cream);
  background-image:
    radial-gradient(1200px 600px at 100% -10%, rgba(225, 29, 72, .07), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(21, 128, 61, .06), transparent 60%);
  color: var(--ink);
}

::selection { background: #fecdd3; color: #881337; }

.font-display { font-family: 'Playfair Display', Georgia, serif; }

/* ---------- Layout helpers ---------- */
.container-x { width: 100%; max-width: 80rem; margin-inline: auto; padding-inline: 1.25rem; }
@media (min-width: 768px) { .container-x { padding-inline: 2rem; } }

.section { padding-block: 4.5rem; }
@media (min-width: 1024px) { .section { padding-block: 6.5rem; } }

.text-balance { text-wrap: balance; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  border-radius: 9999px; font-weight: 700; letter-spacing: -.01em;
  padding: .8rem 1.4rem; font-size: .875rem; line-height: 1.1;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  border: 1px solid transparent; cursor: pointer; text-align: center;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible { outline: 3px solid rgba(225,29,72,.35); outline-offset: 2px; }
.btn i { font-size: .95em; }

.btn-primary { background: linear-gradient(135deg, #f43f5e, #be123c); color: #fff; box-shadow: 0 14px 30px -12px rgba(190,18,60,.6); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -14px rgba(190,18,60,.65); }

.btn-dark { background: #1c1917; color: #fff; }
.btn-dark:hover { background: #292524; transform: translateY(-2px); }

.btn-light { background: #fff; color: #1c1917; border-color: var(--line); }
.btn-light:hover { border-color: #fecdd3; color: var(--berry-dark); transform: translateY(-2px); }

.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255,255,255,.22); }

.btn-outline { background: transparent; border-color: #d6d3d1; color: #44403c; }
.btn-outline:hover { border-color: var(--berry); color: var(--berry-dark); background: #fff1f2; }

.btn-wa { background: #16a34a; color: #fff; box-shadow: 0 14px 30px -14px rgba(22,163,74,.7); }
.btn-wa:hover { background: #15803d; transform: translateY(-2px); }

.btn-sm { padding: .55rem .95rem; font-size: .75rem; }
.btn-lg { padding: 1rem 1.8rem; font-size: .95rem; }
.btn-block { width: 100%; }

/* ---------- Cards & surfaces ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(28,25,23,.04); min-width: 0;
}
.card-hover { transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease; }
.card-hover:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -28px rgba(28,25,23,.35); border-color: #fecdd3; }

.glass { background: rgba(255, 250, 244, .82); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }

.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .7rem; border-radius: 9999px;
  font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}

.kicker {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .72rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase;
  color: var(--berry-dark);
}
.kicker::before { content: ''; width: 1.75rem; height: 2px; background: var(--berry); border-radius: 99px; }

/* ---------- Navigation ---------- */
#site-header { position: sticky; top: 0; z-index: 60; }
.nav-shell { transition: box-shadow .25s ease, background .25s ease, border-color .25s ease; border-bottom: 1px solid transparent; }
.nav-shell.scrolled { background: rgba(255,250,244,.92); border-color: var(--line); box-shadow: 0 10px 30px -20px rgba(28,25,23,.4); }

.nav-link { position: relative; font-size: .82rem; font-weight: 600; color: #57534e; padding-block: .4rem; transition: color .2s ease; }
.nav-link:hover { color: var(--berry-dark); }
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--berry); border-radius: 99px; transition: width .25s ease;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--berry-dark); }

/* ---------- Forms ---------- */
.label { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #57534e; margin-bottom: .4rem; }
.field {
  width: 100%; border-radius: .9rem; border: 1px solid #e7e5e4; background: #fff;
  padding: .75rem .95rem; font-size: .875rem; color: var(--ink); transition: border-color .2s, box-shadow .2s, background .2s;
}
.field::placeholder { color: #a8a29e; }
.field:focus { outline: none; border-color: #fb7185; box-shadow: 0 0 0 4px rgba(225,29,72,.12); background: #fff; }
.field.error { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.1); }
.field-hint { font-size: .7rem; color: #a8a29e; margin-top: .35rem; }
.field-error { font-size: .7rem; color: #dc2626; margin-top: .35rem; display: none; }
.field-error.show { display: block; }

.check { display: flex; align-items: flex-start; gap: .6rem; font-size: .78rem; color: #57534e; line-height: 1.45; }
.check input { margin-top: .15rem; width: 1rem; height: 1rem; accent-color: var(--berry); flex: none; }

/* ---------- Tabs & filters ---------- */
.tab-btn { border-radius: 9999px; padding: .6rem 1.1rem; font-size: .8rem; font-weight: 700; color: #57534e; background: #fff; border: 1px solid var(--line); transition: all .2s; white-space: nowrap; }
.tab-btn:hover { border-color: #fecdd3; color: var(--berry-dark); }
.tab-btn.active { background: #1c1917; color: #fff; border-color: #1c1917; }

.filter-btn { border-radius: 9999px; padding: .6rem 1.15rem; font-size: .8rem; font-weight: 700; color: #57534e; background: #fff; border: 1px solid var(--line); transition: all .2s; white-space: nowrap; }
.filter-btn:hover { border-color: #fecdd3; color: var(--berry-dark); }
.filter-btn.active { background: var(--berry); color: #fff; border-color: var(--berry); box-shadow: 0 10px 20px -12px rgba(225,29,72,.8); }

.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .65rem; border-radius: .6rem; background: #faf7f2; border: 1px solid #f0ebe4; color: #57534e; font-size: .68rem; font-weight: 700; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.65,.3,1), transform .7s cubic-bezier(.2,.65,.3,1); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .animate-float, .animate-bounce { animation: none !important; }
}

@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.animate-float { animation: float 6s ease-in-out infinite; }

@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.45); } 70% { box-shadow: 0 0 0 16px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.pulse-ring { animation: pulseRing 2.4s infinite; }

/* ---------- Ratings ---------- */
.stars { display: inline-flex; gap: .1rem; color: #f59e0b; font-size: .8rem; }
.stars .fa-regular { color: #d6d3d1; }
.rating-bar { height: .45rem; border-radius: 99px; background: #f5f0ea; overflow: hidden; }
.rating-bar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg,#fbbf24,#f59e0b); }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(28,25,23,.65); backdrop-filter: blur(6px); animation: fadeIn .2s ease; }
.modal-panel {
  position: relative; z-index: 1; width: 100%; max-width: 32rem; max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: 1.75rem; box-shadow: 0 40px 100px -20px rgba(0,0,0,.5);
  animation: popIn .25s cubic-bezier(.2,.8,.3,1);
}
.modal-panel.wide { max-width: 56rem; }
.modal-panel.slim { max-width: 26rem; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
body.no-scroll { overflow: hidden; }

.modal-close { position: absolute; top: 1rem; right: 1rem; z-index: 2; width: 2.35rem; height: 2.35rem; border-radius: 9999px; display: grid; place-items: center; background: #f5f5f4; color: #57534e; transition: .2s; }
.modal-close:hover { background: #e7e5e4; color: #1c1917; }

/* ---------- Lightbox ---------- */
#lightbox { position: fixed; inset: 0; z-index: 120; display: none; align-items: center; justify-content: center; padding: 1.5rem; background: rgba(12,10,9,.92); }
#lightbox.open { display: flex; }
#lightbox img { max-width: 100%; max-height: 88vh; border-radius: 1rem; box-shadow: 0 40px 100px rgba(0,0,0,.6); }
#lightbox button { position: absolute; top: 1.2rem; right: 1.2rem; width: 2.75rem; height: 2.75rem; border-radius: 9999px; background: rgba(255,255,255,.15); color: #fff; font-size: 1.1rem; display: grid; place-items: center; }
#lightbox button:hover { background: rgba(255,255,255,.28); }

/* ---------- Toast ---------- */
#toastWrap { position: fixed; left: 50%; bottom: 5.5rem; transform: translateX(-50%); z-index: 140; display: flex; flex-direction: column; gap: .5rem; width: min(92vw, 24rem); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: .65rem; background: #1c1917; color: #fff; border-radius: .9rem; padding: .8rem 1rem; font-size: .8rem; font-weight: 500; box-shadow: 0 20px 50px -20px rgba(0,0,0,.6); animation: toastIn .25s ease; }
.toast i { margin-top: .1rem; }
.toast.success i { color: #4ade80; }
.toast.error i { color: #fb7185; }
.toast.info i { color: #60a5fa; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Floating actions ---------- */
.float-stack { position: fixed; right: 1rem; bottom: 5.25rem; z-index: 70; display: flex; flex-direction: column; gap: .6rem; }
@media (min-width: 1024px) { .float-stack { right: 1.5rem; bottom: 1.5rem; } }
.float-btn { width: 3.1rem; height: 3.1rem; border-radius: 9999px; display: grid; place-items: center; color: #fff; font-size: 1.25rem; box-shadow: 0 14px 30px -10px rgba(0,0,0,.4); transition: transform .2s; }
.float-btn:hover { transform: translateY(-3px) scale(1.04); }
.float-wa { background: #16a34a; }
.float-top { background: #1c1917; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.float-top.show { opacity: 1; pointer-events: auto; }
#scrollProgress { position: fixed; top: 0; left: 0; height: 3px; z-index: 80; background: linear-gradient(90deg,#f43f5e,#f59e0b); width: 0%; transition: width .1s linear; }

/* ---------- Bottom mobile nav ---------- */
.mobile-dock { position: fixed; inset-inline: 0; bottom: 0; z-index: 65; border-top: 1px solid var(--line); background: rgba(255,250,244,.96); backdrop-filter: blur(14px); padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 1024px) { .mobile-dock { display: none; } }
.dock-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .22rem; height: 3.9rem; font-size: .62rem; font-weight: 700; color: #78716c; }
.dock-btn i { font-size: 1.02rem; }
.dock-btn.active { color: var(--berry-dark); }
.dock-btn.active i { color: var(--berry); }
.dock-wa { color: #15803d; }
.dock-wa i { color: #16a34a; }

/* ---------- Tables ---------- */
.table-x { width: 100%; border-collapse: collapse; font-size: .8rem; }
.table-x th { text-align: left; padding: .7rem .75rem; background: #faf7f2; color: #78716c; font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; }
.table-x td { padding: .8rem .75rem; border-top: 1px solid #f2ede6; vertical-align: middle; }
.table-x tr:hover td { background: #fffbf7; }

/* ---------- Status ---------- */
.status { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .6rem; border-radius: 9999px; font-size: .65rem; font-weight: 800; letter-spacing: .03em; }
.status::before { content: ''; width: .4rem; height: .4rem; border-radius: 9999px; background: currentColor; }
.status-pendiente { background: #fef3c7; color: #b45309; }
.status-confirmado { background: #dbeafe; color: #1d4ed8; }
.status-camino { background: #ede9fe; color: #6d28d9; }
.status-entregado { background: #dcfce7; color: #15803d; }
.status-cancelado { background: #fee2e2; color: #b91c1c; }

/* ---------- Misc ---------- */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f6f1ea; }
::-webkit-scrollbar-thumb { background: #d8cfc4; border-radius: 99px; border: 2px solid #f6f1ea; }
::-webkit-scrollbar-thumb:hover { background: #bfb3a5; }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] .faq-icon { transform: rotate(45deg); }
.faq-icon { transition: transform .25s ease; }

.avatar { display: grid; place-items: center; border-radius: 9999px; font-weight: 800; background: #ffe4e6; color: #9f1239; }

.hero-mask { background: linear-gradient(90deg, rgba(20,15,12,.88) 0%, rgba(20,15,12,.72) 40%, rgba(20,15,12,.25) 100%); }

.grain::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 18px 18px; mix-blend-mode: overlay;
}

.step-num { width: 2.4rem; height: 2.4rem; border-radius: 9999px; display: grid; place-items: center; font-weight: 800; font-size: .8rem; }

.empty { text-align: center; padding: 3rem 1rem; color: #a8a29e; }
.empty i { font-size: 2rem; margin-bottom: .75rem; display: block; color: #d6d3d1; }

@media print { .no-print { display: none !important; } }

/* ---------- Responsive safety (mobile first) ---------- */
html, body { max-width: 100%; }
body { overflow-x: clip; }

/* En celular la barra inferior ya ofrece WhatsApp y navegación:
   ocultamos los botones flotantes para que no tapen el contenido. */
@media (max-width: 1023px) {
  body { padding-bottom: calc(3.9rem + env(safe-area-inset-bottom)); }
  .float-stack { display: none; }
}

/* Pantallas muy angostas (320–380 px) */
@media (max-width: 380px) {
  .container-x { padding-inline: 1rem; }
  .section { padding-block: 3.25rem; }
  .btn-lg { padding: .85rem 1.25rem; font-size: .85rem; }
  .badge { font-size: .62rem; letter-spacing: .04em; }
  .tab-btn, .filter-btn { padding: .5rem .85rem; font-size: .72rem; }
  .modal-panel { border-radius: 1.25rem; }
}
