/* ========== VARIABLES ========== */
:root {
  --fondoPrincipal: url('/img/fondoPrincipal.webp');
  --fondoSecundario: url('/img/fondoSecundario.webp');

  --colorTexto: #2c3e50;
  --colorTextoSecundario: #555;
  --colorBlanco: white;
  --colorFondo: #f4f8fc;
  --colorEnlace: #2646e2;

  --radio-bordes: 20px;
  --espaciado-estandar: 20px;
  --gradiente-oscuro: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
}

/* ========== RESETS ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Public Sans', sans-serif;
  font-size: 18px;
  color: var(--colorTexto);
  background-color: var(--colorFondo);
  line-height: 1.6;
}

/* ========== MAIN CONTAINER ========== */
main {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Opcional: ajustar los márgenes de las secciones dentro del main */
main .hero-section {
  margin-left: 10px;
  margin-right: 10px;
}

/* ========== HEADER ========== */
.header {
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100px;
  padding: 24px;
  position: absolute;
  width: calc(100% - 20px);
  margin: 10px;
  z-index: 1000;
}

.header__logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header__logo {
  height: 80px;
  display: block;
}

.menu-icon {
  height: 50px;
  cursor: pointer;
}

.header__nav {
  display: none;
}

.header__nav-list {
  display: flex;
  list-style: none;
  gap: 30px;
}

.header__nav-link {
  color: var(--colorBlanco);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 10px 20px;
  border-radius: 25px;
  transition: all 0.3s ease;
  position: relative;
}

.header__nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.header__nav-link--active {
  background-color: var(--colorEnlace);
  box-shadow: 0 2px 8px rgba(38, 70, 226, 0.3);
}

/* ========== HERO BANNER ========== */
.hero-banner {
  background: var(--gradiente-oscuro), var(--fondoPrincipal);
  color: white;
  padding: 24px;
  padding-top: 120px;
  border-radius: var(--radio-bordes);
  margin: 10px;
  background-size: cover;
  background-position: center;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-banner__title {
  font-size: 32px;
  margin-bottom: 20px;
}

  .hero-banner__subtitle {
  font-size: 32px;
  font-weight: 700;
  color: white;
  margin-top: -10px;
  margin-bottom: 20px;
  text-align: center;
}.hero-banner__description {
  font-size: 18px;
  max-width: 600px;
}

.hero-banner__button {
  display: block;
  margin: 30px 0 20px 0;
}

/* ========== SECCIONES ========== */
.hero-section {
  padding: 24px;
  border-radius: var(--radio-bordes);
  margin: 24px 10px;
}

.hero-information {
  background-color: var(--colorBlanco);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero-buttons {
  display: flex;
  flex-direction: row;
  gap: var(--espaciado-estandar);
  justify-content: center;
  align-items: center;
  padding-top: var(--espaciado-estandar);
}

.hero-buttons-xl {
  display: none;
  flex-direction: row;
  gap: 20px;
  color: var(--colorTexto);
}

.buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 0 auto;
}

/* ========== SERVICE CARDS (PRODUCT GRID) ========== */
.button-card {
  position: relative;
  display: block;
  text-decoration: none;
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background-color: #d4d4d4;
}

.button-card__image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.button-card__hover-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  z-index: 1;
}

.button-card p {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  color: white;
  font-weight: 700;
  font-size: 32px;
  text-align: center;
  padding: 20px 15px;
  margin: 0;
  z-index: 2;
  transition: opacity 0.3s ease;
}

.button-card__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  z-index: 3;
  transition: opacity 0.3s ease-in-out;
  background-color: rgba(0, 0, 0, 0.4);
}

.button-card__button {
  background-color: white;
  color: #2c3e50;
  font-weight: 600;
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.button-card__button:hover {
  background-color: #f0f0f0;
}

.button-card:hover .button-card__image,
.button-card:hover p {
  opacity: 0;
}

.button-card:hover .button-card__hover-image {
  opacity: 1;
}

.button-card:hover .button-card__overlay {
  opacity: 1;
}

/* ========== PRODUCTOS DESTACADOS ========== */
.featured-products {
  padding: 30px 0;
  background-color: white;
  text-align: center;
  margin: 24px 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border-radius: var(--radio-bordes);
}

.featured-products__title {
  font-size: 1.8rem;
  margin-bottom: 40px;
  padding: 0 var(--espaciado-estandar);
}

.featured-products__container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--espaciado-estandar);
  padding: 0 var(--espaciado-estandar) var(--espaciado-estandar);
}

.featured-products__item {
  background-color: white;
  border-radius: var(--radio-bordes);
  padding: var(--espaciado-estandar);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-products__item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.featured-products__image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radio-bordes);
  margin-bottom: 15px;
}

.featured-products__subtitle {
  font-size: 1.3rem;
  color: #34495e;
  margin-bottom: 10px;
}

.featured-products__description {
  font-size: 0.9rem;
  color: var(--colorTextoSecundario);
  line-height: 1.4;
}

/* ========== CTA FINAL ========== */
.custom-request {
  padding: 32px 24px;
  background: var(--gradiente-oscuro), var(--fondoSecundario);
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: var(--radio-bordes);
  margin: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  min-height: 390px;
  color: var(--colorBlanco);
}

.custom-request__title {
  font-size: 28px;
  font-weight: 600;
}

.custom-request__text {
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
}

.custom-request__button {
  margin: 0 auto;
}

/* Sección de la tienda */
.hero-store {
  background-color: white;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 24px 10px;
  color: var(--colorTexto);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-store:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.hero-store__title {
  font-size: 1.8rem;
  margin-bottom: 10px;
  text-align: center;
  color: var(--colorTexto);
}

.hero-store__button {
  display: block;
  margin: 20px auto 0;
}

.carousel-container {
  max-width: 350px;
  background-color: #f0f0f0;
  border-radius: 20px;
  padding: 20px;
  font-family: sans-serif;
}

.carousel-title {
  margin: 0 0 10px;
  font-size: 1.5rem;
  font-weight: bold;
  color: #777;
}

.carousel {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 15px;
}

.carousel-track {
  display: flex;
  transition: transform 0.3s ease-in-out;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-item {
  flex: 0 0 100%;
  text-align: center;
  background-color: white;
  border-radius: 15px;
  overflow: hidden;
}

.carousel-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  border-radius: 15px;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0);
  border: none;
  font-size: 1.5rem;
  width: 40px;
  height: 100%;
  z-index: 1;
  color: white;
  cursor: pointer;
}

.carousel-arrow.left {
  left: 10px;
}

.carousel-arrow.right {
  right: 10px;
}

.whatsapp-button {
  background-color: #2c3e50;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 999999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

@media (min-width: 768px) {
  .whatsapp-button {
    width: 70px;
    height: 70px;
    right: 20px;
    bottom: 20px;
  }
}

.whatsapp-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ========== MEDIA QUERIES ========== */
@media (min-width: 768px) {
  .hero-section {
    padding: 40px;
    margin: 32px 15px;
  }

  .hero-banner {
    margin: 15px;
    padding: 40px;
    padding-top: 140px;
    min-height: 350px;
    text-align: center;
  }

  .hero-banner__title {
    font-size: 42px;
  }

  .hero-banner__subtitle {
    font-size: 42px;
  }

  .hero-banner__description {
    font-size: 20px;
    margin: 0 auto;
  }

  .featured-products__container {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-banner__button {
    margin: 50px auto 0;
  }

  .hero-buttons {
    display: none;
  }

  .hero-buttons-xl {
    display: flex;
    margin: 0;
    padding: 0;
  }

    .hero-store {
    margin: 32px 15px;
    padding: 40px;
  }

  .hero-store__title {
    font-size: 2.2rem;
  }

  .carousel-container {
    max-width: 100%;
  }

  .carousel-item {
    flex: 0 0 60%;
    margin-right: 3%;
  }

  .carousel-item:last-child {
    margin-right: 0;
  }

  .carousel-item img {
    height: 320px;
  }

  main .hero-section {
    margin-left: 15px;
    margin-right: 15px;
  }
}

@media (min-width: 1024px) {
  .header {
    padding: 24px 40px;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(18px);
    margin: 20px 40px;
    border-radius: 18px;
    width: calc(100% - 80px);
  }

  .menu-icon {
    display: none;
  }

  .header__nav {
    display: block;
  }

  .hero-section {
    padding: 50px;
    margin: 40px;
  }

  .hero-banner {
    margin: 20px 40px;
    padding: 60px;
    padding-top: 160px;
    min-height: 400px;
  }

  .hero-banner__title {
    font-size: 48px;
  }

  .hero-banner__subtitle {
    font-size: 48px;
  }

  .hero-banner__description {
    font-size: 22px;
  }

  .featured-products__container {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-buttons-xl {
    margin: 0;
    padding: 0;
  }

  .hero-store {
    margin: 40px 40px;
    padding: 50px;
  }

  .hero-store__title {
    font-size: 2.2rem;
  }

  .carousel-item {
    flex: 0 0 45%;
    margin-right: 2.5%;
  }

  .carousel-item img {
    height: 350px;
  }

  .whatsapp-button {
    display: none;
  }

  main .hero-section {
    margin-left: 40px;
    margin-right: 40px;
  }
}

@media (min-width: 1200px) {
  .header {
    padding: 24px 60px;
    width: calc(100% - 105px);
    margin: 20px 52px;
  }

  .hero-section {
    padding: 60px;
    margin: 50px 75px;
    max-width: 1400px;
  }

  .hero-banner {
    margin: 20px 52px;
    padding: 50px;
    padding-top: 150px;
    min-height: 450px;
  }

  .hero-banner__title {
    font-size: 54px;
  }

  .hero-banner__subtitle {
    font-size: 54px;
  }

  .hero-banner__description {
    font-size: 24px;
    margin: 0 auto;
  }

  .hero-buttons-xl {
    margin: 0;
    padding: 0;
  }

  .hero-store {
    margin: 50px 75px;
    padding: 40px;
    max-width: 1400px;
  }

  .hero-store__title {
    font-size: 2.8rem;
  }

  .carousel-item {
    flex: 0 0 40%;
    margin-right: 2%;
  }

  .carousel-item img {
    height: 380px;
  }

  main .hero-section {
    margin-left: 75px;
    margin-right: 75px;
  }
}

@media (hover: hover) {
  .carousel-arrow:hover {
    transform: translateY(-50%) scale(1.1);
  }
}