/* =========================================
   BREXIA - DISEÑO GENERAL
========================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #ffffff;
  color: #252525;
  line-height: 1.5;
}

img {
  max-width: 100%;
}

/* =========================================
   CABECERA BREXIA
========================================= */

header {
  position: sticky;
  top: 0;
  z-index: 1000;

  width: 100%;
  min-height: 72px;

  display: flex;
  align-items: center;
  gap: 30px;

  padding: 9px 5%;

  background: #c92328;
  box-shadow: 0 3px 12px rgba(0,0,0,0.15);
}

/* LOGO */

.brand {
  flex: 0 0 auto;
  width: 145px;
  height: 54px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #ffffff;
  border-radius: 8px;
  padding: 5px 10px;
}

.brand img {
  display: block !important;

  width: 125px !important;
  height: 44px !important;

  max-width: 125px !important;
  max-height: 44px !important;

  object-fit: contain !important;
}

/* MENÚ */

nav {
  flex: 1;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

  gap: 24px;
}

nav a {
  color: #ffffff;
  text-decoration: none;

  font-size: 14px;
  font-weight: 700;

  white-space: nowrap;
}

nav a:hover {
  opacity: 0.75;
}

/* CARRITO SUPERIOR */

#cartButton {
  flex: 0 0 auto;

  padding: 10px 18px;

  border: 2px solid #ffffff;
  border-radius: 25px;

  background: #ffffff;
  color: #c92328;

  font-size: 14px;
  font-weight: 800;

  cursor: pointer;
}

#cartCount {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 22px;
  height: 22px;

  margin-left: 5px;
  padding: 0 5px;

  border-radius: 50%;

  background: #c92328;
  color: #ffffff;

  font-size: 12px;
}

/* =========================================
   PORTADA
========================================= */

.hero {
  width: 100%;
  max-width: 1280px;

  margin: 0 auto;
  padding: 55px 35px;

  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;

  gap: 55px;

  min-height: 450px;

  background: #ffffff;
}

.heroText h1 {
  margin: 8px 0 15px;

  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.05;
}

.heroText p {
  max-width: 600px;

  color: #555555;
  font-size: 18px;
}

.eyebrow {
  color: #c92328;

  font-size: 13px;
  font-weight: 800;

  letter-spacing: 2px;
}

/* IMAGEN PRINCIPAL */

.heroImage {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
}

.heroImage img {
  display: block !important;

  width: 100% !important;
  max-width: 430px !important;

  height: 330px !important;
  max-height: 330px !important;

  object-fit: contain !important;

  background: #ffffff;

  border-radius: 18px;

  box-shadow: 0 8px 28px rgba(0,0,0,0.09);
}

/* =========================================
   CARRUSEL
   Quedará listo cuando lo agreguemos al HTML
========================================= */

.carousel {
  position: relative;

  width: 100%;
  max-width: 1280px;

  height: 420px;

  margin: 20px auto 45px;

  overflow: hidden;

  border-radius: 18px;

  background: #f5f5f5;

  box-shadow: 0 7px 25px rgba(0,0,0,0.08);
}

.carousel-track {
  display: flex;

  width: 100%;
  height: 100%;

  transition: transform 0.5s ease;
}

.carousel-slide {
  flex: 0 0 100%;

  width: 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100% !important;
  height: 100% !important;

  object-fit: contain !important;

  background: #ffffff;
}

.carousel-prev,
.carousel-next {
  position: absolute;

  top: 50%;
  transform: translateY(-50%);

  width: 44px;
  height: 44px;

  border: none;
  border-radius: 50%;

  background: rgba(201,35,40,0.90);
  color: #ffffff;

  font-size: 25px;

  cursor: pointer;
}

.carousel-prev {
  left: 15px;
}

.carousel-next {
  right: 15px;
}

/* =========================================
   SECCIONES
========================================= */

.section {
  width: 100%;
  max-width: 1280px;

  margin: 0 auto;

  padding: 55px 35px;
}

.section h2 {
  margin: 5px 0 20px;

  font-size: 36px;
  line-height: 1.15;
}

.section > p {
  max-width: 850px;

  color: #555555;
  font-size: 17px;
}

/* =========================================
   BOTONES PRINCIPALES
========================================= */

.primary {
  display: inline-block;

  margin-top: 15px;

  padding: 12px 23px;

  border-radius: 8px;

  background: #c92328;
  color: #ffffff;

  text-decoration: none;
  font-weight: 700;
}

.primary:hover {
  opacity: 0.88;
}

/* =========================================
   CATEGORÍAS
========================================= */

.categories {
  width: 100%;

  display: flex;
  flex-wrap: wrap;

  gap: 10px;

  margin: 25px 0;
}

.categories button {
  padding: 10px 16px;

  border: 1px solid #dddddd;
  border-radius: 25px;

  background: #ffffff;
  color: #333333;

  font-size: 14px;
  font-weight: 700;

  cursor: pointer;
}

.categories button:hover,
.categories button:focus,
.categories button.active {
  background: #c92328;
  color: #ffffff;

  border-color: #c92328;
}

/* =========================================
   BUSCADOR
========================================= */

.searchBox {
  margin: 25px 0 35px;
}

.searchBox label {
  display: block;

  margin-bottom: 8px;

  font-weight: 700;
}

.searchBox input {
  width: 100%;
  max-width: 520px;

  padding: 13px 16px;

  border: 1px solid #cccccc;
  border-radius: 9px;

  background: #ffffff;

  font-size: 16px;
}

/* =========================================
   PRODUCTOS
========================================= */

.products {
  width: 100%;

  display: grid !important;

  grid-template-columns:
    repeat(4, minmax(0, 1fr)) !important;

  gap: 24px !important;

  align-items: stretch;
}

.product-card {
  width: 100%;
  min-width: 0;

  display: flex;
  flex-direction: column;

  padding: 17px;

  overflow: hidden;

  background: #ffffff;

  border: 1px solid #e5e5e5;
  border-radius: 15px;

  box-shadow: 0 5px 18px rgba(0,0,0,0.07);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);

  box-shadow: 0 9px 26px rgba(0,0,0,0.12);
}

/* FOTOGRAFÍA DEL PRODUCTO */

.product-card img {
  display: block !important;

  width: 100% !important;
  max-width: 100% !important;

  height: 260px !important;
  max-height: 260px !important;

  margin: 0 auto;

  padding: 5px;

  object-fit: contain !important;

  background: #ffffff;

  border-radius: 10px;
}

.product-card h3 {
  margin: 15px 0 7px;

  color: #222222;

  font-size: 19px;
  line-height: 1.25;
}

.product-card p {
  margin: 5px 0;

  color: #555555;

  font-size: 14px;
}

.product-card strong {
  color: #c92328;

  font-size: 18px;
}

/* AGREGAR AL CARRITO */

.product-card button {
  width: 100%;

  margin-top: auto;

  padding: 12px;

  border: none;
  border-radius: 8px;

  background: #c92328;
  color: #ffffff;

  font-size: 14px;
  font-weight: 800;

  cursor: pointer;
}

.product-card button:hover {
  opacity: 0.88;
}

/* =========================================
   CARRITO LATERAL
========================================= */

.cartDrawer {
  position: fixed;

  top: 0;
  right: -450px;

  z-index: 3000;

  width: min(420px, 94vw);
  height: 100vh;

  overflow-y: auto;

  padding: 25px;

  background: #ffffff;

  box-shadow: -8px 0 30px rgba(0,0,0,0.25);

  transition: right 0.3s ease;
}

.cartDrawer.open {
  right: 0;
}

.cartDrawer h2 {
  margin-top: 25px;

  color: #222222;
}

#closeCart {
  padding: 9px 14px;

  border: none;
  border-radius: 7px;

  background: #333333;
  color: #ffffff;

  font-weight: 700;

  cursor: pointer;
}

#cartItems {
  margin-top: 20px;
}

#cartItems button {
  padding: 7px 11px;

  border: none;
  border-radius: 6px;

  background: #c92328;
  color: #ffffff;

  cursor: pointer;
}

#cartTotal {
  margin-top: 20px;

  padding-top: 15px;

  border-top: 2px solid #eeeeee;

  font-size: 20px;
}

/* =========================================
   BOTÓN WHATSAPP FLOTANTE
   Queda preparado para el HTML
========================================= */

.whatsapp-float {
  position: fixed;

  right: 24px;
  bottom: 24px;

  z-index: 2500;

  width: 66px;
  height: 66px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #25D366;
  color: #ffffff;

  text-decoration: none;

  font-size: 35px;

  box-shadow: 0 6px 20px rgba(0,0,0,0.25);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.08);

  box-shadow: 0 8px 25px rgba(0,0,0,0.30);
}

/* =========================================
   OFERTAS
========================================= */

.offers {
  padding: 45px 35px;

  background: #fff5f5;

  border-radius: 18px;
}

.offer-badge {
  display: inline-block;

  padding: 6px 12px;

  border-radius: 20px;

  background: #c92328;
  color: #ffffff;

  font-size: 12px;
  font-weight: 800;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 1050px) {

  .products {
    grid-template-columns:
      repeat(3, minmax(0, 1fr)) !important;
  }

  nav {
    gap: 14px;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .heroText p {
    margin-left: auto;
    margin-right: auto;
  }
}

/* =========================================
   CELULAR
========================================= */

@media (max-width: 760px) {

  header {
    position: relative;

    flex-wrap: wrap;
    justify-content: center;

    gap: 10px;

    padding: 10px 15px;
  }

  .brand {
    width: 120px;
    height: 48px;
  }

  .brand img {
    width: 105px !important;
    height: 38px !important;
  }

  nav {
    order: 3;

    width: 100%;

    gap: 9px 14px;

    padding-top: 5px;
  }

  nav a {
    font-size: 12px;
  }

  .hero {
    padding: 40px 18px;
  }

  .heroText h1 {
    font-size: 38px;
  }

  .section {
    padding: 45px 18px;
  }

  .section h2 {
    font-size: 30px;
  }

  .products {
    grid-template-columns:
      repeat(2, minmax(0, 1fr)) !important;

    gap: 15px !important;
  }

  .carousel {
    height: 300px;

    margin-top: 10px;

    border-radius: 0;
  }

  .whatsapp-float {
    right: 16px;
    bottom: 16px;

    width: 60px;
    height: 60px;

    font-size: 31px;
  }
}

@media (max-width: 480px) {

  .products {
    grid-template-columns: 1fr !important;
  }

  .product-card img {
    height: 290px !important;
    max-height: 290px !important;
  }
}
