/* ===============================
   🌐 BASE
================================ */
* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f7f7f7;
}

.hidden {
  display: none;
}

/* ===============================
   🔝 HEADER
================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;

  /* 🎨 NUEVO COLOR ML */
  background: #fff159;   /* amarillo ML */

  height: 64px;
  padding: 0 28px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  border-bottom: 1px solid #e6d200;  /* borde amarillito */
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Marca */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  height: 40px;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--color-primary);
}


/* Botón carrito */

/* ===============================
   🛍️ PRODUCTOS
================================ */

.product {
  /* Estructura */
  display: flex;
  flex-direction: column;

  /* Visual */
  background: linear-gradient(180deg, #ffffff, #fafafa);
  border: 1px solid #e5e5e5;
  border-radius: 12px;

  /* Espaciado */
  padding: 16px;

  /* Efectos */
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.product-img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 8px;
  background: #f3f3f3;
  background: linear-gradient(135deg, #eeeeee, #f6f6f6);
}


/* Formularios */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.form-group label {
  font-size: 14px;
  margin-bottom: 4px;
}

.form-group input,
.form-group textarea {
  padding: 8px;
  font-size: 14px;
}

textarea {
  resize: none;
}

/* Info */
.info {
  margin-top: 10px;
  font-size: 13px;
  background: #fff3cd;
  padding: 10px;
  border-radius: 6px;
}

input[type="radio"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===============================
   📲 WHATSAPP
================================ */

/* Botón WhatsApp dentro del carrito / checkout */
.btn-whatsapp {
  display: block;
  text-align: center;

  background: linear-gradient(180deg, #25D366, #1ebe5d);
  color: #fff;

  padding: 12px;
  border-radius: 8px;

  font-weight: bold;
  text-decoration: none;

  transition: all .15s ease;
}

.btn-whatsapp:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
}



/* ===============================
   🔔 TOAST
================================ */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 2000;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}

/* ===============================
   📐 LAYOUT GENERAL (SEGURO)
================================ */




/* ===============================
   🎨 AJUSTE FINAL DE ESTILO (SAFE)
   NO TOCAR ESTRUCTURA
================================ */

/* Paleta */
:root {
  --color-primary: #111111;
  --color-accent: #2f80ed;
  --color-success: #27ae60;
  --color-bg: #f7f7f7;
  --color-border: #e5e5e5;
  --color-text-muted: #777;
}


.resumen {
  background: #fafafa;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.resumen-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.resumen h3 {
  color: var(--color-primary);
}

.resumen-total {
  font-size: 18px;
  text-align: right;
  color: var(--color-accent);
}



/* ===============================
   🔔 TOAST
================================ */
.toast {
  background: #111;
}


/* ===============================
   🎨 FONDO GENERAL
================================ */
body {
  background: #f7f7f7
}


/* ===============================
   🧱 SECCIÓN PRODUCTOS
================================ */
.container h2 {
  background: #ffffff;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}


/* ===============================
   🔘 CATEGORÍAS
================================ */


.product:hover {
  transform: translateY(-6px);
}

.colores {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid #999;
}

.color-dot.activo {
  border: 2px solid #000;
}

/* ===============================
   🚚 BADGE MAYORISTA
================================ */
.mayorista-badge {
  background: #c02fed;
  color: black;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* ===============================
   🎨 COLOR DOTS MEJORADOS
================================ */
.color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #e0e0e0;
  cursor: pointer;
  transition: all .15s ease;
}

.color-dot:hover {
  transform: scale(1.15);
  border-color: #2f80ed;
}

.color-dot.activo {
  border: 2px solid #000;
  transform: scale(1.15);
}


@media (max-width: 768px) {

  .header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .categories {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

  .cart {
    width: 100%;
  }
}

.footer {
  margin-top: 40px;
  padding: 20px;
  background: #111;
  color: white;
  text-align: center;
}

.footer a {
  color: #fff;
  text-decoration: none;
  margin: 0 6px;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-links {
  margin-bottom: 10px;
}

.footer-info {
  font-size: 13px;
  opacity: .9;
}

.features-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  background: #f5f5f5;
  padding: 20px;
  margin-top: 40px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.feature .icon {
  font-size: 22px;
}

.footer-legales {
  background: #111;
  color: white;
  text-align: center;
  padding: 20px;
}

.footer-legales a {
  color: #fff;
  text-decoration: none;
  margin: 0 5px;
  font-size: 13px;
}

.footer-legales a:hover {
  text-decoration: underline;
}

.copy {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.8;
}

.whatsapp-float {
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 64px;
  height: 64px;
  z-index: 999;

  display: flex;
  align-items: center;
  justify-content: center;

  background: white;          /* ← fondo blanco para tu logo */
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(0,0,0,.3);

  transition: all .2s ease;
}

.whatsapp-float img {
  width: 100%;
  border-radius: 50%;
}

.whatsapp-float:hover {
  transform: scale(1.08);
}

.product button {
  margin-top: 12px;
  width: 100%;
  padding: 10px;

  /* 🎨 Estilo Mercado Libre */
  background: #ffe600;        /* amarillo ML */
  color: #000;                /* texto negro */

  border: 1px solid #d9c500;
  border-radius: 8px;

  font-weight: 700;
  letter-spacing: 0.3px;

  cursor: pointer;
  transition: all .15s ease;
}
.product button:hover {
  background: #ffe600;      /* amarillo ML */
  color: #000;
  transform: translateY(-2px);
}

.cart {
  position: fixed;
  top: 0;
  right: 0 !important;
  left: auto !important;

  width: 420px;
  height: 100vh;

  display: flex;
  flex-direction: column;

  background: #ffffff;
  z-index: 2000;

  border-left: 1px solid #e5e5e5;
  box-shadow: -10px 0 40px rgba(0,0,0,0.1);
}
/* ===============================
   🔘 BOTONES PRINCIPALES
================================ */

.btn-primary {
  width: 100%;
  padding: 12px;

  background: linear-gradient(180deg, #111, #000);
  color: #fff;

  border: none;
  border-radius: 6px;

  font-weight: 600;
  cursor: pointer;

  margin-bottom: 6px;
}

.btn-primary:hover {
  background: var(--color-accent);
}

/* ===============================
   BOTÓN SECUNDARIO
================================ */

.btn-secondary {
  width: 100%;
  padding: 10px;

  background: #ededed;

  border: none;
  border-radius: 6px;

  cursor: pointer;
}

.btn-secondary:hover {
  background: #ddd;
}

/* ===============================
   🧭 CATEGORÍAS (AMARILLO / NEGRO)
================================ */

.categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1;
  max-width: 900px;
}

/* Botón base */
.categories button {
  background: #c02fed;              /* 💛 amarillo ML */
  border: 1px solid #e0e0e0;

  font-size: 13px;
  font-weight: 600;

  color: #000;

  cursor: pointer;

  padding: 7px 12px;
  border-radius: 999px;

  transition: all .15s ease;
}

/* Hover */
.categories button:hover {
  background: #000;                 /* 🖤 negro */
  color: #ffe600;                   /* texto amarillo */
  border-color: #000;
}

/* Activo */
.categories button.activo {
  background: #000;
  color: #ffe600;
}

.product h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  margin: 10px 0 6px;
  min-height: 38px;        /* mantiene altura pareja entre cards */
}

.product p {
  font-size: 14px;
  color: var(--color-text-muted);
}

.product .price,
.product strong {
  font-size: 17px;
  font-weight: 700;
  color: #2f80ed;          /* después lo vamos a pasar a variable */
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  padding: 24px;
  margin-top: 20px;
}

/* =========================================
   🛒 CARRITO — VERSIÓN DEFINITIVA
========================================= */

.cart {
  position: fixed;
  top: 0;
  right: 0 !important;
  left: auto !important;

  width: 420px;
  height: 100vh;

  display: flex;
  flex-direction: column;

  background: #ffffff;
  z-index: 2000;

  border-left: 2px solid #000;           /* estilo amarillo/negro */
  box-shadow: -10px 0 40px rgba(0,0,0,0.15);
}

/* Header del carrito */
.cart h2 {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #ffcc00;
  font-size: 20px;
  color: #000;
}

/* Contenido scrolleable */
.cart-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
}

/* Lista de productos */
.cart-items {
  margin-top: 10px;
}

/* Item individual */
.cart-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;

  padding: 10px;
  margin-bottom: 6px;

  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
}

/* Nombre */
.cart-name {
  flex: 1;
}

/* Controles + - */
.cart-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-controls button {
  width: 28px;
  height: 28px;

  border-radius: 6px;
  border: 1px solid #ddd;

  background: white;
  font-weight: bold;
  cursor: pointer;
}

.cart-controls button:hover {
  background: #ffcc00;
  color: #000;
  border-color: #000;
}

.cart-controls button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Footer fijo */
.cart-footer {
  border-top: 2px solid #ffcc00;
  padding: 12px;
  background: #fff;
}

/* Total */
.cart-total {
  font-size: 20px;
  font-weight: 800;
  color: #000;
  text-align: right;
}

/* Botón de abrir carrito */
.cart-btn {
  display: flex;
  align-items: center;
  gap: 6px;

  padding: 8px 14px;
  border-radius: 999px;

  font-weight: 700;
  font-size: 14px;

  background: #c02fed;
  color: #ffcc00;

  transition: all .15s ease;
}

.cart-btn:hover {
  background: #ffcc00;
  color: #000;
  transform: translateY(-1px);
}

/* Contador */
#cartCount {
  background: #ffcc00;
  color: #000;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 700;
}



/* 👇 ESTO ES CLAVE PARA QUE INICIE CERRADO */
.cart {
  display: none;
}

/* Cuando NO tiene hidden → se ve */
.cart:not(.hidden) {
  display: flex;
}

/* Tu clase original */
.cart.hidden {
  display: none;
}

/* ===============================
   📐 LAYOUT GENERAL
================================ */

main {
  padding: 24px;
}

.layout {
  max-width: 1200px;
  margin: 0 auto;

  /* estilos que estaban separados */
  padding: 32px 24px;
  background: #f7f7f7;
  min-height: calc(100vh - 70px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: #f7f7f7;
}

/* Títulos principales */
.layout h2,
.container h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 24px;
}

/* ===============================
   📱 MOBILE
================================ */

@media (max-width: 768px) {
  .cart {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .container h2 {
    margin: 0 12px;
  }

  .products {
    padding: 12px;
  }

  .cart {
    width: 100%;
  }
}

.card-click {
  cursor: pointer;
}

.ver-mas {
  color: #3483fa;
  font-size: 13px;
  margin-top: 6px;
}

.portada {
  width: 100%;
  max-width: 1200px;
  margin: 10px auto;

  /* 👉 TAMAÑO IDEAL DE BANNER */
  height: 300px;

  overflow: hidden;
  border-radius: 10px;
}

.portada-img {
  width: 100%;
  height: 100%;

  /* 🔥 ESTO ES LA CLAVE */
  object-fit: cover;
  object-position: center;
}
.container {
  margin-top: 15px;
}

#nombreColor {
  background: #f5f5f5;
  padding: 6px 10px;
  border-radius: 6px;
  display: inline-block;
}

.color-dot {
  transition: transform .1s;
}

.color-dot:hover {
  transform: scale(1.1);
}


/* =========================================
   📱 FIX DEFINITIVO MOBILE
========================================= */

/* ===============================
   📱 HEADER - CATEGORÍAS MOBILE
================================ */
@media (max-width: 768px) {

  .header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 8px;
    gap: 6px;
  }

  .brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .categories {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;

    overflow-x: auto;
    overflow-y: hidden;

    gap: 6px;
    padding: 6px 4px;

    white-space: nowrap;
    -webkit-overflow-scrolling: touch;

    touch-action: pan-x;
  }

  .categories::-webkit-scrollbar {
    display: none;
  }

  .categories button {
    flex: 0 0 auto;
    font-size: 11px;
    padding: 5px 8px;
    border-radius: 999px;
    line-height: 1;
    white-space: nowrap;
  }
}
/* ===============================
   🛒 CARRITO - BOTÓN FIJO MOBILE
================================ */
@media (max-width: 768px) {

  .cart {
    width: 100%;
  }

  .cart-footer {
    position: sticky;
    bottom: 0;

    background: #fff;
    padding-bottom: env(safe-area-inset-bottom);

    z-index: 50;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
  }

  .btn-primary,
  .btn-secondary {
    font-size: 15px;
    padding: 12px;
  }
}
