/* ================================================================
   MBS COMUNICACIONES — Estilos Globales
   Paleta: Navy #0B1E3D | Orange #FF6F00 | Electric #42A5F5
   Fuente: Rajdhani (headings) + DM Sans (body)
================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── Variables ───────────────────────────────────────────────── */
:root {
  --navy:        #0B1E3D;
  --navy-dark:   #061428;
  --navy-mid:    #132947;
  --orange:      #FF6F00;
  --orange-lite: #FF8F00;
  --electric:    #42A5F5;
  --electric-lite:#E8F4FE;
  --green:       #2E7D32;
  --green-lite:  #EAF3DE;
  --red:         #C62828;
  --red-lite:    #FCEBEB;
  --amber:       #FFB300;
  --amber-lite:  #FFF3E0;
  --white:       #FFFFFF;
  --gray-50:     #F5F7FA;
  --gray-100:    #E0E7EF;
  --gray-300:    #B0BEC5;
  --gray-400:    #90A4AE;
  --gray-600:    #546E7A;
  --gray-900:    #263238;
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:   0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.14);
  --transition:  .2s ease;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Tipografía ──────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy);
}
.static-hero h1 {
  color: #fff;
}


/* ── Contenedor ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Botones ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: .95rem;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--orange);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--orange-lite);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255,111,0,.35);
}
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}
.btn-ghost {
  background: transparent;
  color: var(--electric);
  padding: 8px 0;
}
.btn-ghost:hover { text-decoration: underline; }
.btn-sm { padding: 8px 16px; font-size: .875rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb {
  padding: 14px 0;
  font-size: .85rem;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-100);
}
.breadcrumb a { color: var(--gray-600); transition: var(--transition); }
.breadcrumb a:hover { color: var(--navy); }
.breadcrumb span { margin: 0 6px; }

/* ── WhatsApp flotante ───────────────────────────────────────── */
.whatsapp-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px; height: 52px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  cursor: pointer;
  z-index: 500;
  transition: transform var(--transition);
  text-decoration: none;
}
.whatsapp-fab:hover { transform: scale(1.1); }

/* ── Badges / chips ──────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.badge-orange  { background: var(--orange);      color: var(--white); }
.badge-navy    { background: var(--navy);         color: var(--white); }
.badge-electric{ background: var(--electric-lite);color: var(--electric); }
.badge-red     { background: var(--red-lite);     color: var(--red); }
.badge-amber   { background: var(--amber-lite);   color: #7B4F00; }

/* ── Tarjeta de producto ─────────────────────────────────────── */
/* Base compartida por home.css (home) y páginas sin home.css (producto.html,
   "Productos relacionados") — sin esto, las tarjetas no quedan en grid y
   .product-card__img (aspect-ratio:1) crece tanto como el ancho de la página. */
.products-grid {
  display: grid;
  gap: 24px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.product-card__img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.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-card__img-placeholder {
  color: var(--gray-400);
  font-size: .85rem;
  text-align: center;
}
.product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}
.product-card__fav {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
  cursor: pointer;
}
.product-card__fav:hover { background: var(--white); box-shadow: var(--shadow-md); }
.product-card__fav.active { color: var(--red); }
.product-card__body { padding: 16px; }
.product-card__cat {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--electric);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.product-card__name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
  line-height: 1.3;
}
.product-card__sku { font-size: .78rem; color: var(--gray-400); margin-bottom: 10px; }
.product-card__price {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 12px;
}
.product-card__price del {
  font-size: 1rem;
  color: var(--gray-400);
  font-weight: 400;
  margin-left: 6px;
}

/* ── Notificaciones toast ────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 116px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--navy);
  color: var(--white);
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s ease;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.success { border-left: 4px solid var(--green); }
.toast.error   { border-left: 4px solid var(--red); }
.toast.info    { border-left: 4px solid var(--electric); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Utilidades ──────────────────────────────────────────────── */
.text-muted   { color: var(--gray-600); }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }
.flex  { display: flex; }

/* ── Skeleton loader ─────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--gray-50) 25%, var(--gray-100) 50%, var(--gray-50) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

/* ── Botón convertidor de moneda ─────────────────────────────── */
.currency-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: var(--white);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
}
.currency-toggle:hover {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.3);
}
.currency-toggle[data-mode="USD"] {
  background: rgba(255,111,0,.2);
  border-color: rgba(255,111,0,.4);
  color: #FFB74D;
}

/* ── Leyenda "+ IVA" junto al precio ──────────────────────────
   Los precios se almacenan y muestran SIN IVA; el 16% se suma
   en el checkout (ver fn de creación de pedido). Esta leyenda
   evita que el cliente se lleve la sorpresa al pagar y cumple
   con el requisito de precio exhibido claro. */
.price-iva-note {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--tx-m, #64748B);
  letter-spacing: .02em;
  vertical-align: middle;
  white-space: nowrap;
}



/* -- Autocompletado del navegador ---------------------------------
   Chrome y Edge pintan los campos autocompletados con un fondo azul
   propio que ignora el diseno del sitio. No se puede impedir que
   autocompleten (autocomplete="off" es solo una sugerencia y los
   navegadores la ignoran a proposito), pero si conservar el aspecto. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
input:-internal-autofill-selected,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 100px var(--white, #fff) inset !important;
  box-shadow: 0 0 0 100px var(--white, #fff) inset !important;
  -webkit-text-fill-color: var(--gray-900, #1e293b) !important;
  background-color: var(--white, #fff) !important;
  background-image: none !important;
  color: var(--gray-900, #1e293b) !important;
  caret-color: var(--gray-900, #1e293b);
  transition: background-color 600000s 0s, color 600000s 0s;
}
