:root {
  --rojo: #f20d20;
  --rojo-oscuro: #c90819;
  --negro: #171717;
  --blanco: #ffffff;
  --gris: #f6f6f6;
  --texto-gris: #707070;
  --borde: #e8e8e8;
  --radio: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--negro);
  background: var(--blanco);
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
}

.barra-superior {
  background: var(--negro);
  color: white;
  padding: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
}

/* ENCABEZADO */

header {
  min-height: 78px;
  padding: 12px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--borde);
  box-shadow: 0 3px 15px #00000005;
}

.logo,
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: bold;
  white-space: nowrap;
}

.logo img {
  width: 53px;
  height: 53px;
  object-fit: contain;
}

.logo b,
.footer-logo b {
  color: var(--rojo);
}

nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

nav a {
  font-size: 14px;
  font-weight: bold;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--rojo);
}

.carrito-btn {
  background: var(--negro);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 12px 17px;
  font-weight: bold;
  white-space: nowrap;
}

.carrito-btn span {
  display: inline-grid;
  place-items: center;
  margin-left: 5px;
  background: var(--rojo);
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.menu-btn {
  display: none;
  background: white;
  border: 1px solid var(--borde);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 20px;
}

/* BOTONES */

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--rojo);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 14px 23px;
  font-weight: bold;
  transition: background 0.2s, transform 0.2s;
}

.boton:hover {
  background: var(--rojo-oscuro);
  transform: translateY(-2px);
}

.boton-blanco {
  background: white;
  color: var(--rojo);
}

.boton-blanco:hover {
  background: #ffe8eb;
  color: var(--rojo-oscuro);
}

/* PORTADA */

.hero {
  margin: 32px auto;
  width: 90%;
  min-height: 390px;
  padding: 45px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 30px;
  border-radius: 28px;
  background: linear-gradient(120deg, #fff0f2, #ffffff, #ffe1e5);
  overflow: hidden;
}

.hero-texto {
  max-width: 580px;
}

.etiqueta {
  display: inline-block;
  padding: 8px 13px;
  border-radius: 30px;
  background: white;
  color: var(--rojo);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
}

.hero h1 {
  font-size: clamp(38px, 5vw, 65px);
  line-height: 1.05;
  letter-spacing: -2px;
  margin: 22px 0;
}

.hero h1 span {
  color: var(--rojo);
}

.hero p {
  color: var(--texto-gris);
  margin-bottom: 25px;
  max-width: 470px;
}

.hero-imagen {
  display: grid;
  place-items: center;
  position: relative;
}

.hero-imagen::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  background: #ffd5da;
  border-radius: 50%;
}

.hero-imagen img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 350px;
  max-height: 340px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* BENEFICIOS */

.beneficios {
  width: 90%;
  margin: 35px auto 65px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.beneficios article {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 20px;
  border: 1px solid var(--borde);
  border-radius: 15px;
  font-size: 20px;
}

.beneficios b {
  font-size: 14px;
}

.beneficios small {
  color: var(--texto-gris);
  font-size: 12px;
}

/* SECCIONES */

.seccion,
.catalogo {
  padding: 45px 5%;
}

.encabezado {
  text-align: center;
  margin-bottom: 30px;
}

.encabezado h2 {
  font-size: clamp(27px, 4vw, 38px);
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.encabezado p {
  color: var(--texto-gris);
}

/* CATEGORÍAS */

.categorias {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
}

.categoria {
  min-width: 0;
  padding: 22px 8px;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  background: white;
  font-size: 37px;
  transition: 0.2s;
}

.categoria span {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: bold;
}

.categoria:hover,
.categoria.activa {
  border-color: var(--rojo);
  background: #fff0f2;
  transform: translateY(-3px);
}

/* CATÁLOGO */

.catalogo {
  background: #fafafa;
}

.herramientas {
  display: grid;
  grid-template-columns: 1fr 210px 220px;
  gap: 12px;
  margin-bottom: 20px;
}

.herramientas input,
.herramientas select {
  width: 100%;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--borde);
  border-radius: 30px;
  background: white;
  outline: none;
}

.herramientas input:focus,
.herramientas select:focus {
  border-color: var(--rojo);
  box-shadow: 0 0 0 3px #f20d2010;
}

.resultados {
  color: var(--texto-gris);
  font-size: 13px;
  margin-bottom: 15px;
}

.productos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.producto {
  min-width: 0;
  background: white;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.producto:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px #0000000c;
}

.producto-imagen {
  height: 220px;
  position: relative;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #fff0f2, #f4f4f4);
}

.producto-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.producto-emoji {
  font-size: 85px;
  filter: drop-shadow(0 10px 8px #00000010);
}

.etiqueta-producto {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border-radius: 30px;
  color: white;
  background: var(--rojo);
  font-size: 11px;
  font-weight: bold;
}

.producto-info {
  padding: 16px;
}

.producto-categoria {
  color: var(--texto-gris);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.producto-info h3 {
  font-size: 16px;
  margin: 7px 0;
}

.producto-precio {
  color: var(--rojo);
  font-size: 20px;
  font-weight: bold;
}

.agregar {
  display: block;
  width: 100%;
  margin-top: 13px;
  padding: 11px;
  border: none;
  border-radius: 10px;
  background: var(--negro);
  color: white;
  font-weight: bold;
}

.agregar:hover {
  background: var(--rojo);
}

.vacio {
  grid-column: 1 / -1;
  text-align: center;
  padding: 35px;
  background: white;
  border-radius: 15px;
}

/* PROMOCIÓN */

.promocion {
  margin: 60px 5%;
  padding: 45px;
  border-radius: 24px;
  background: var(--rojo);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
}

.promocion h2 {
  font-size: clamp(25px, 4vw, 38px);
  margin-bottom: 10px;
}

.promocion p {
  color: #ffe4e7;
}

/* CÓMO COMPRAR */

.pasos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pasos article {
  border: 1px solid var(--borde);
  padding: 25px;
  border-radius: var(--radio);
}

.pasos article > span {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 12px;
  background: #fff0f2;
  color: var(--rojo);
  font-weight: bold;
}

.pasos h3 {
  margin: 16px 0 8px;
}

.pasos p {
  color: var(--texto-gris);
  font-size: 14px;
}

/* CONTACTO Y PIE DE PÁGINA */

.contacto {
  text-align: center;
  padding: 50px 20px;
  background: #fff0f2;
}

.contacto h2 {
  font-size: 30px;
  margin-bottom: 10px;
}

.contacto p {
  margin-bottom: 20px;
  color: var(--texto-gris);
}

footer {
  background: var(--negro);
  color: white;
  text-align: center;
  padding: 35px 20px;
}

.footer-logo {
  justify-content: center;
}

.footer-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: white;
  border-radius: 10px;
}

footer > p {
  color: #bbb;
  margin: 12px 0;
  font-size: 14px;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px 0;
  font-size: 13px;
}

.footer-links a:hover {
  color: #ff6571;
}

footer small {
  color: #aaa;
}

/* CARRITO LATERAL */

.fondo {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #0008;
  opacity: 0;
  visibility: hidden;
  transition: 0.25s;
}

.fondo.visible {
  opacity: 1;
  visibility: visible;
}

.panel-carrito {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  width: min(430px, 100%);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: white;
  transform: translateX(105%);
  transition: transform 0.3s;
}

.panel-carrito.abierto {
  transform: translateX(0);
}

.carrito-cabecera,
.modal-cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 20px;
  border-bottom: 1px solid var(--borde);
}

.carrito-cabecera button,
.modal-cabecera button {
  border: none;
  background: #f3f3f3;
  border-radius: 50%;
  width: 36px;
  height: 36px;
}

.items-carrito {
  flex: 1;
  overflow-y: auto;
  padding: 15px 20px;
}

.carrito-item {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--borde);
}

.carrito-emoji {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  background: #fff0f2;
  border-radius: 10px;
  font-size: 27px;
}

.carrito-item h4 {
  font-size: 13px;
}

.carrito-item small {
  color: var(--texto-gris);
}

.cantidad {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
}

.cantidad button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--borde);
  background: white;
  border-radius: 50%;
}

.quitar {
  border: none;
  background: none;
  color: var(--rojo);
  font-size: 12px;
}

.carrito-total {
  padding: 20px;
  border-top: 1px solid var(--borde);
}

.carrito-total p {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.carrito-total small {
  display: block;
  color: var(--texto-gris);
  margin-bottom: 15px;
}

.carrito-total .boton {
  width: 100%;
}

/* FORMULARIO DE PEDIDO */

.modal {
  position: fixed;
  z-index: 60;
  inset: 0;
  padding: 15px;
  display: none;
  place-items: center;
  background: #0008;
}

.modal.visible {
  display: grid;
}

.modal-contenido {
  background: white;
  width: min(500px, 100%);
  max-height: 92dvh;
  overflow-y: auto;
  border-radius: 20px;
}

#formPedido {
  padding: 20px;
}

#formPedido label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: bold;
}

#formPedido input,
#formPedido select,
#formPedido textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid var(--borde);
  border-radius: 10px;
  background: white;
  outline: none;
}

#formPedido input:focus,
#formPedido select:focus,
#formPedido textarea:focus {
  border-color: var(--rojo);
}

#formPedido textarea {
  min-height: 75px;
  resize: vertical;
}

#formPedido .boton {
  width: 100%;
}

.aviso {
  color: var(--texto-gris);
  font-size: 12px;
  margin-bottom: 15px;
}

/* MENSAJES */

.notificacion {
  position: fixed;
  z-index: 100;
  bottom: 20px;
  left: 50%;
  width: max-content;
  max-width: 90%;
  padding: 13px 20px;
  border-radius: 30px;
  background: var(--negro);
  color: white;
  text-align: center;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: 0.25s;
}

.notificacion.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ADAPTACIÓN PARA TABLET */

@media (max-width: 900px) {
  header {
    gap: 12px;
    padding: 12px 3%;
  }

  nav {
    gap: 12px;
  }

  nav a {
    font-size: 12px;
  }

  .logo {
    font-size: 19px;
  }

  .logo img {
    width: 43px;
    height: 43px;
  }

  .hero {
    padding: 30px;
  }

  .beneficios {
    grid-template-columns: repeat(2, 1fr);
  }

  .categorias {
    grid-template-columns: repeat(3, 1fr);
  }

  .herramientas {
    grid-template-columns: 1fr 1fr;
  }

  .herramientas input {
    grid-column: 1 / -1;
  }

  .productos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ADAPTACIÓN PARA CELULAR */

@media (max-width: 620px) {
  .barra-superior {
    font-size: 10px;
    letter-spacing: 0;
  }

  header {
    min-height: 65px;
    flex-wrap: wrap;
    padding: 8px 12px;
  }

  .logo {
    gap: 6px;
    font-size: 17px;
  }

  .logo img {
    width: 38px;
    height: 38px;
  }

  .menu-btn {
    display: block;
    margin-left: auto;
  }

  nav {
    display: none;
    order: 5;
    flex-basis: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
  }

  nav.abierto {
    display: flex;
  }

  nav a {
    padding: 12px 5px;
    border-top: 1px solid var(--borde);
    font-size: 14px;
  }

  .carrito-btn {
    padding: 9px 11px;
    font-size: 12px;
  }

  .hero {
    width: calc(100% - 24px);
    margin: 18px auto;
    padding: 25px 20px 15px;
    grid-template-columns: 1fr;
    gap: 10px;
    border-radius: 20px;
  }

  .hero h1 {
    font-size: 43px;
    margin: 17px 0;
  }

  .hero p {
    font-size: 14px;
  }

  .hero-imagen img {
    max-width: 210px;
    max-height: 205px;
  }

  .hero-imagen::before {
    width: 180px;
    height: 180px;
  }

  .beneficios {
    width: calc(100% - 24px);
    gap: 8px;
    margin: 25px auto 35px;
  }

  .beneficios article {
    padding: 13px;
    font-size: 17px;
  }

  .beneficios b {
    font-size: 12px;
  }

  .beneficios small {
    font-size: 11px;
  }

  .seccion,
  .catalogo {
    padding: 35px 12px;
  }

  .encabezado h2 {
    font-size: 28px;
  }

  .categorias {
    gap: 8px;
  }

  .categoria {
    padding: 15px 4px;
    font-size: 29px;
    border-radius: 13px;
  }

  .categoria span {
    font-size: 11px;
  }

  .herramientas {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .herramientas input {
    grid-column: auto;
  }

  .productos {
    gap: 10px;
  }

  .producto-imagen {
    height: 155px;
  }

  .producto-emoji {
    font-size: 60px;
  }

  .producto-info {
    padding: 11px;
  }

  .producto-info h3 {
    font-size: 13px;
  }

  .producto-precio {
    font-size: 17px;
  }

  .agregar {
    padding: 10px 5px;
    font-size: 12px;
  }

  .promocion {
    margin: 30px 12px;
    padding: 25px 20px;
    flex-direction: column;
    align-items: flex-start;
  }

  .pasos {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .contacto {
    padding: 35px 18px;
  }

  .contacto h2 {
    font-size: 25px;
  }

  .footer-links {
    gap: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
