/* ============================================================
   SIMO & GENA · BABY STORE — Estilos compartidos
   styles.css · Martin Romero Studio
   ============================================================ */

/* VARIABLES & RESET */
:root {
  --lila: #8b86ae;          /* oscurecido para mejor contraste de texto */
  --verde: #C0D49F;
  --amarillo: #EEC575;
  --turquesa: #3E9A85;      /* botones + texto grande (antes #7EC3B0) */
  --turquesa-hover: #348573;
  --turquesa-ink: #2c7a68;  /* texto chico de acento (tags, links) */
  --naranja: #d97e37;       /* oscurecido para texto sobre blanco */
  --mint: #C5E4D5;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Quicksand', sans-serif; background: #FDFCF8; color: #3a3535; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: 'Nunito', sans-serif; }

/* ── ACCESIBILIDAD ── */
:focus-visible { outline: 3px solid var(--turquesa-ink); outline-offset: 2px; border-radius: 4px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .fade-up { opacity: 1 !important; transform: none !important; }
}

/* ── NAVBAR ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(253,252,248,.96);
  backdrop-filter: blur(14px);
  border-bottom: 2px solid var(--mint);
  transition: all .3s;
}
.navbar-inner {
  max-width: 1500px; height: 85px;
  width: 100%;
  margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  box-sizing: border-box;
}
.nav-right { display: flex; align-items: center; gap: 24px; }

/* Logo — desborda visualmente el navbar sin cambiar su altura */
.nav-logo { flex-shrink: 0; display: flex; height: 56px; overflow: visible; }
.nav-logo img {
  height: 40px;
  width: auto;
  display: block;
  position: relative;
  top: 10px;
}

.nav-links { display: flex; gap: 32px; list-style: none; margin-left: 40px; }
.nav-links a { font-weight: 700; font-size: .9rem; color: #555; text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--turquesa); }
.nav-actions { display: flex; gap: 10px; align-items: center; margin-left: 16px; }

.cart-icon-btn {
  position: relative; background: var(--turquesa); border: none;
  border-radius: 50%; width: 42px; height: 42px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .2s; flex-shrink: 0;
}
.cart-icon-btn:hover { background: var(--turquesa-hover); transform: scale(1.08); }
.cart-icon-btn svg { width: 18px; height: 18px; stroke: white; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.cart-badge {
  position: absolute; top: -5px; right: -5px;
  background: var(--naranja); color: white;
  font-size: .62rem; font-weight: 900;
  width: 18px; height: 18px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  border: 2px solid #FDFCF8;
}
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--lila); border-radius: 2px; transition: all .3s; }
.mobile-menu { display: none; flex-direction: column; background: white; border-top: 1px solid var(--mint); }
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 14px 24px; font-weight: 700; color: #555; text-decoration: none; border-bottom: 1px solid #f0f0f0; font-size: .95rem; }

/* ── BOTONES GLOBALES ── */
.btn-primary {
  background: var(--turquesa); color: white;
  font-family: 'Quicksand', sans-serif; font-weight: 800; font-size: 1rem;
  padding: 14px 28px; border-radius: 50px; border: none; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  transition: all .25s; box-shadow: 0 4px 20px rgba(126,195,176,.35);
}
.btn-primary:hover { background: var(--turquesa-hover); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(126,195,176,.45); }
.btn-secondary {
  background: transparent; color: var(--lila);
  font-family: 'Quicksand', sans-serif; font-weight: 800; font-size: 1rem;
  padding: 14px 28px; border-radius: 50px; border: 2px solid var(--lila); cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  transition: all .25s;
}
.btn-secondary:hover { background: var(--lila); color: white; transform: translateY(-2px); }

/* ── CARRITO DRAWER ── */
.cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 200; opacity: 0; pointer-events: none; transition: opacity .3s; }
.cart-overlay.open { opacity: 1; pointer-events: all; }
.cart-drawer {
  position: fixed; top: 0; right: 0;
  width: min(380px, 100vw);
  height: 100vh; height: 100dvh;   /* 100dvh = alto visible real en iOS (no tapa el footer) */
  background: white; z-index: 201;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,.12);
}
.cart-drawer.open { transform: translateX(0); }
.cart-header { padding: 18px 22px; border-bottom: 2px solid var(--mint); display: flex; align-items: center; justify-content: space-between; }
.cart-title { font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 1.1rem; color: #2d2d2d; display: flex; align-items: center; gap: 8px; }
.close-btn { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: #888; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.close-btn:hover { background: #f0f0f0; }
.cart-items { flex: 1; overflow-y: auto; padding: 14px 20px; }
.cart-empty { text-align: center; padding: 50px 20px; color: #8a8a8a; }
.cart-empty-emoji { font-size: 2.6rem; margin-bottom: 10px; }
.cart-empty p { font-weight: 700; font-size: .88rem; }
.cart-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #f5f5f5; }
.cart-item-emoji { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 800; font-size: .8rem; color: #2d2d2d; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-price { font-size: .76rem; color: var(--turquesa); font-weight: 800; }
.cart-qty { display: flex; align-items: center; gap: 6px; }
.qty-btn { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #e0e0e0; background: white; cursor: pointer; font-size: .85rem; font-weight: 800; color: #555; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.qty-btn:hover { border-color: var(--turquesa); color: var(--turquesa); }
.qty-num { font-weight: 800; font-size: .86rem; min-width: 16px; text-align: center; }
.cart-footer { padding: 18px 22px; padding-bottom: calc(18px + env(safe-area-inset-bottom)); border-top: 2px solid var(--mint); background: #FDFCF8; }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.cart-total-label { font-weight: 700; color: #555; font-size: .86rem; }
.cart-total-price { font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 1.3rem; color: #2d2d2d; }
.btn-whatsapp {
  width: 100%; background: #25D366; color: white; border: none; border-radius: 50px; padding: 14px;
  font-family: 'Quicksand', sans-serif; font-weight: 900; font-size: .92rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: all .2s; box-shadow: 0 4px 20px rgba(37,211,102,.3);
}
.btn-whatsapp:hover { background: #20b858; transform: translateY(-2px); }
.btn-whatsapp img { width: 20px; height: 20px; object-fit: contain; filter: brightness(0) invert(1); }

/* ── FLOAT BAR ── */
.float-bar { position: fixed; bottom: 22px; bottom: calc(22px + env(safe-area-inset-bottom)); right: 22px; z-index: 150; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.float-btn {
  display: flex; align-items: center; gap: 10px;
  background: white; border-radius: 50px; padding: 8px 16px 8px 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.13); border: none; cursor: pointer;
  text-decoration: none; transition: all .25s;
  font-family: 'Quicksand', sans-serif; font-weight: 800; font-size: .8rem; color: #333;
}
.float-btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 28px rgba(0,0,0,.18); }
.float-btn img { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }

/* ── FOOTER ── */
footer { background: #781000; color: #aaa; padding: 44px 24px 24px; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 36px; flex-wrap: wrap;
  margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid #444;
}
.footer-logo img { height: 100px; width: auto; margin-bottom: 8px; display: block; }
.footer-tagline { font-size: .8rem; line-height: 1.6; max-width: 210px; }
.footer-links-title { color: white; font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: #aaa; text-decoration: none; font-size: .8rem; transition: color .2s; }
.footer-links a:hover { color: var(--turquesa); }
.social-links { display: flex; gap: 10px; }
.social-link { width: 40px; height: 40px; display: block; transition: transform .2s; }
.social-link:hover { transform: scale(1.12); }
.social-link img { width: 40px; height: 40px; object-fit: contain; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-copy, .footer-credit { font-size: .73rem; }
.footer-credit a { color: var(--turquesa); text-decoration: none; font-weight: 800; }

/* ── UTILIDADES COMPARTIDAS ── */
.bg-I { background: linear-gradient(135deg,#f5f3ff,#ece9ff); }
.bg-B { background: linear-gradient(135deg,#f0faf5,#e4f7ee); }
.bg-A { background: linear-gradient(135deg,#fffdf0,#fff8dc); }
.bg-S { background: linear-gradient(135deg,#fff8f3,#fff0e6); }

.fade-up { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── CUENTA / SESIÓN EN LA NAVBAR ── */
.nav-account { display: flex; align-items: center; }
.account-link {
  font-weight: 800; font-size: .86rem; color: var(--turquesa-ink); text-decoration: none;
  padding: 8px 16px; border: 1.5px solid var(--mint); border-radius: 50px; transition: all .2s; white-space: nowrap;
}
.account-link:hover { background: var(--mint); }
.account-wrap { position: relative; }
.account-btn {
  display: flex; align-items: center; gap: 7px; background: none; border: 1.5px solid var(--mint);
  border-radius: 50px; padding: 6px 12px 6px 8px; cursor: pointer; font-family: inherit; font-weight: 800;
  font-size: .84rem; color: #444; transition: all .2s;
}
.account-btn:hover { background: var(--mint); }
.account-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--turquesa); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: .8rem; flex-shrink: 0; }
.account-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid #eee;
  border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.14); min-width: 220px; padding: 6px;
  display: none; flex-direction: column; z-index: 120;
}
.account-menu.open { display: flex; }
.account-menu a, .account-menu button {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 9px; text-decoration: none;
  color: #444; font-weight: 700; font-size: .85rem; background: none; border: none; cursor: pointer;
  text-align: left; font-family: inherit; width: 100%;
}
.account-menu a:hover, .account-menu button:hover { background: #f4f5f7; }
.account-menu .admin-item { color: var(--turquesa-ink); }
.account-menu .logout { color: #c0392b; }
.account-menu .menu-head { padding: 8px 12px 4px; font-size: .74rem; color: #999; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.account-menu hr { border: none; border-top: 1px solid #f0f0f0; margin: 5px 0; }
/* En el menú móvil */
#mobileAccount { display: flex; flex-direction: column; border-top: 1px solid var(--mint); }
#mobileAccount a, #mobileAccount button {
  padding: 14px 24px; font-weight: 700; color: #555; text-decoration: none; border-bottom: 1px solid #f0f0f0;
  font-size: .95rem; background: none; border-left: none; border-right: none; border-top: none; text-align: left;
  font-family: inherit; cursor: pointer; width: 100%;
}
#mobileAccount .admin-item { color: var(--turquesa-ink); font-weight: 800; }
#mobileAccount .logout { color: #c0392b; }

/* ── MODAL DE CHECKOUT (confirmar pedido) ── */
.co-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 250; display: none; align-items: center; justify-content: center; padding: 20px; }
.co-overlay.open { display: flex; }
.co-modal { background: #fff; border-radius: 20px; width: min(460px, 100%); max-height: 92vh; max-height: 92dvh; overflow-y: auto; box-shadow: 0 24px 64px rgba(0,0,0,.25); }
.co-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid #f0f0f0; position: sticky; top: 0; background: #fff; }
.co-head h3 { font-family: 'Nunito', sans-serif; font-size: 1.1rem; font-weight: 900; color: #2d2d2d; }
.co-close { background: none; border: none; font-size: 1.05rem; color: #999; cursor: pointer; width: 30px; height: 30px; border-radius: 50%; }
.co-close:hover { background: #f0f0f0; color: #555; }
.co-body { padding: 18px 22px; }
.co-body label { display: block; font-weight: 800; font-size: .74rem; color: #555; margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .4px; }
.co-body input, .co-body textarea { width: 100%; padding: 10px 13px; border: 1.5px solid #e8e8e8; border-radius: 11px; font-family: inherit; font-size: .9rem; color: #333; background: #FDFCF8; outline: none; transition: border-color .2s; }
.co-body input:focus, .co-body textarea:focus { border-color: var(--turquesa); background: #fff; }
.co-body textarea { resize: vertical; min-height: 56px; }
.co-summary { background: #faf9f6; border-radius: 12px; padding: 12px 14px; font-size: .84rem; color: #555; }
.co-summary .co-line { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.co-summary .co-total { font-weight: 900; color: var(--turquesa-ink); border-top: 1px solid #eee; margin-top: 6px; padding-top: 6px; }
.co-entrega { display: flex; gap: 10px; flex-wrap: wrap; }
.co-entrega label { display: flex; align-items: center; gap: 7px; margin: 0; text-transform: none; letter-spacing: 0; font-weight: 700; font-size: .86rem; color: #444; border: 1.5px solid #e8e8e8; border-radius: 12px; padding: 10px 14px; cursor: pointer; flex: 1; }
.co-entrega input { width: auto; }
.co-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.co-foot { padding: 16px 22px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid #f0f0f0; }
.co-msg { font-size: .82rem; font-weight: 700; padding: 9px 12px; border-radius: 9px; margin-top: 12px; display: none; }
.co-msg.show { display: block; }
.co-msg.error { background: #fff0f0; color: #c0392b; border: 1.5px solid #ffd0d0; }
.co-guest-note { color: #666; font-size: .88rem; line-height: 1.6; margin: 6px 0 16px; }
.co-guest-actions { display: flex; flex-direction: column; gap: 10px; }

/* ── RESPONSIVE COMPARTIDO ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-account { display: none; }
  .footer-top { flex-direction: column; gap: 22px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .float-btn .float-label { display: none; }
  .float-btn { padding: 8px; border-radius: 50%; width: 52px; height: 52px; justify-content: center; }
  .nav-logo { flex-shrink: 0; display: flex; height: 56px; align-items: center; overflow: visible; }
  .nav-logo img { height: 25px; top: 8px; }
}
