/* =====================================================
   SURPIN - PÁGINA DE INICIO (ELEGANTE Y RÍGIDA)
   ===================================================== */

/* 1. CONTENEDOR PRINCIPAL (1400px, fondo gris y margen inferior) */
body.page-id-2066 main.wp-block-group {
  max-width: 1400px !important;
  margin: 0 auto !important;
  padding: 0 24px 80px 24px !important; /* Padding lateral y margen inferior extra */
  box-sizing: border-box !important;
  width: 100% !important;
  background-color: #F5F7FA !important; /* Fondo gris de la web */
}

/* Forzar que el shortcode y los bloques internos respeten el ancho */
body.page-id-2066 .gm-home-wrap,
body.page-id-2066 .wp-block-post-content,
body.page-id-2066 .entry-content {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background-color: transparent !important;
}

/* =====================================================
   2. TÍTULOS DE SECCIÓN
   ===================================================== */
body.page-id-2066 .gm-section-title {
  font-family: 'Oswald', sans-serif !important;
  font-size: 36px !important;
  color: #0A1F44 !important;
  text-align: center !important;
  margin: 0 auto 12px !important;
  font-weight: 600 !important;
}

body.page-id-2066 .gm-section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: #E63946;
  margin: 16px auto 0;
  border-radius: 2px;
}

body.page-id-2066 .gm-section-subtitle {
  font-family: 'Nunito Sans', sans-serif !important; 
  font-size: 16px !important;
  color: #5C7291 !important;
  text-align: center !important;
  margin: 0 auto 45px !important;
}

/* =====================================================
   3. CARRUSEL
   ===================================================== */
body.page-id-2066 .gm-carousel-wrapper {
  position: relative;
  margin: 20px 0 30px 0;
  padding: 0 50px;
  overflow: hidden;
}

body.page-id-2066 .gm-carousel {
  display: flex !important;
  gap: 20px !important;
  overflow-x: auto !important;
  scroll-behavior: smooth !important;
  padding: 10px 0 25px 0 !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
  align-items: stretch !important; 
}

body.page-id-2066 .gm-carousel > p,
body.page-id-2066 .gm-carousel > br {
  display: none !important;
}

body.page-id-2066 .gm-carousel::-webkit-scrollbar {
  display: none;
}

/* Tarjeta del carrusel */
body.page-id-2066 .gm-card {
  display: flex !important;
  flex-direction: column !important;
  flex: 0 0 calc(25% - 15px) !important; 
  min-width: 0 !important; 
  height: 390px !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  border: 1px solid #E5EAF3 !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06) !important;
  text-decoration: none !important;
  overflow: hidden !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
  box-sizing: border-box !important;
}

body.page-id-2066 .gm-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 12px 25px rgba(10,31,68,0.12) !important;
  border-color: #E63946 !important;
}

body.page-id-2066 .gm-card-img {
  width: 100% !important;
  height: 290px !important;
  background: #F5F7FA !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
}

body.page-id-2066 .gm-card-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.4s ease !important;
}

body.page-id-2066 .gm-card:hover .gm-card-img img {
  transform: scale(1.05) !important;
}

body.page-id-2066 .gm-card-text {
  padding: 15px 16px !important;
  flex-grow: 1 !important;
}

body.page-id-2066 .gm-card-text h3 {
  font-family: 'Oswald', sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #0A1F44 !important;
  line-height: 1.3 !important;
  margin: 0 0 6px 0 !important;
}

body.page-id-2066 .gm-card-text p {
  font-family: 'Nunito Sans', sans-serif !important;
  font-size: 13px !important;
  color: #5C7291 !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}

body.page-id-2066 .gm-carousel-btn {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 44px !important;
  height: 44px !important;
  background: #FFF !important;
  border: 1px solid #E5EAF3 !important;
  font-size: 18px !important;
  color: #0A1F44 !important;
  cursor: pointer !important;
  z-index: 10 !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s !important;
}

body.page-id-2066 .gm-carousel-btn:hover {
  background: #0A1F44 !important;
  color: #FFF !important;
}

body.page-id-2066 .gm-carousel-prev { left: 0 !important; }
body.page-id-2066 .gm-carousel-next { right: 0 !important; }

/* =====================================================
   4. BENEFICIOS
   ===================================================== */
body.page-id-2066 .gm-benefits-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin: 0 0 70px 0;
  padding: 0;
}

body.page-id-2066 .gm-benefit-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  transition: transform 0.3s ease;
}

body.page-id-2066 .gm-benefit-card:hover {
  transform: translateY(-3px);
}

body.page-id-2066 .gm-benefit-icon {
  width: 64px;
  height: 64px;
  background: #E5E6EA;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  margin-bottom: 5px;
}

body.page-id-2066 .gm-benefit-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

body.page-id-2066 .gm-benefit-text h4 {
  font-family: 'Oswald', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #0A1F44;
  margin: 0 0 6px 0;
  line-height: 1.2;
}

body.page-id-2066 .gm-benefit-text p {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 13px;
  color: #5C7291;
  margin: 0;
  line-height: 1.5;
}

/* =====================================================
   5. PRODUCTOS DESTACADOS
   ===================================================== */
body.page-id-2066 .gm-products {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto 60px auto !important;
  padding: 0 !important;
}

body.page-id-2066 .gm-products ul.products {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  width: 100% !important;
  align-items: stretch !important;
}

body.page-id-2066 .gm-products ul.products li.product {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important; 
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  text-align: center !important;
  border: none !important;
  box-shadow: none !important;
  transition: all 0.3s ease !important;
  width: 100% !important;
  height: 100% !important; 
  box-sizing: border-box !important;
}

body.page-id-2066 .gm-products ul.products li.product:hover {
  transform: translateY(-5px) !important;
}

body.page-id-2066 .gm-products ul.products li.product img {
  width: 150px !important; 
  height: 150px !important; 
  object-fit: contain !important; 
  margin: 0 auto 15px auto !important; 
  display: block !important;
  border-radius: 12px !important;
  background: #ffffff !important; 
  padding: 15px !important; 
  box-shadow: 0 4px 15px rgba(10, 31, 68, 0.06) !important; 
  box-sizing: border-box !important;
}

body.page-id-2066 .gm-products ul.products li.product .woocommerce-loop-product__title {
  font-family: 'Oswald', sans-serif !important;
  font-size: 15px !important;
  padding: 0 !important;
  color: #0A1F44 !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  margin: 0 0 5px 0 !important;
  text-align: center !important;
  width: 150px !important; 
  height: 40px !important; 
  overflow: hidden !important; 
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important; 
  -webkit-box-orient: vertical !important;
  text-overflow: ellipsis !important;
}

body.page-id-2066 .gm-products ul.products li.product .price {
  color: #E63946 !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  padding: 0 0 12px !important;
  display: block !important;
  font-family: 'Oswald', sans-serif !important;
  margin: 0 !important;
  text-align: center !important;
  width: 150px !important; 
}

body.page-id-2066 .gm-products ul.products li.product .button {
  background: #0A1F44 !important; 
  color: #fff !important;
  border-radius: 6px !important;
  padding: 10px 0 !important; 
  font-family: 'Nunito Sans', sans-serif !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  font-size: 10px !important;
  border: none !important;
  margin: auto 0 0 0 !important; 
  display: block !important;
  transition: all 0.3s !important;
  text-decoration: none !important;
  width: 150px !important; 
  text-align: center !important;
}

body.page-id-2066 .gm-products ul.products li.product .button:hover {
  background: #E63946 !important; 
  transform: translateY(-2px) !important;
}

body.page-id-2066 .gm-products ul.products::before,
body.page-id-2066 .gm-products ul.products::after {
  display: none !important;
  content: none !important;
}

/* =====================================================
   6. RESPONSIVE (TABLET Y MÓVIL)
   ===================================================== */
@media (max-width: 1100px) {
  body.page-id-2066 .gm-card {
    flex: 0 0 calc(33.333% - 14px) !important; 
  }
  body.page-id-2066 .gm-benefits-row {
    grid-template-columns: repeat(2, 1fr);
  }
  body.page-id-2066 .gm-products ul.products {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 768px) {
  /* Carrusel en móvil */
  body.page-id-2066 .gm-carousel-wrapper {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
  }
  
  body.page-id-2066 .gm-card {
    flex: 0 0 100% !important;
    height: auto !important;
    min-height: auto !important; 
    width: 100% !important;
    border-radius: 16px !important;
    overflow: hidden !important;
  }
  
  body.page-id-2066 .gm-card-img {
    height: 250px !important; 
    width: 100% !important;
    border-radius: 16px 16px 0 0 !important; 
    overflow: hidden !important;
  }
  
  body.page-id-2066 .gm-card-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; 
  }
  
  body.page-id-2066 .gm-card-text {
    padding: 15px 20px 20px 20px !important; 
    text-align: center !important; 
  }

  body.page-id-2066 .gm-carousel-btn {
    display: none !important; 
  }

  /* Beneficios y productos en móvil */
  body.page-id-2066 .gm-benefits-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px 10px !important;
  }
  
  body.page-id-2066 .gm-products ul.products { 
    grid-template-columns: repeat(2, 1fr) !important; 
    gap: 16px !important;
  }
  
  body.page-id-2066 .gm-products ul.products li.product img,
  body.page-id-2066 .gm-products ul.products li.product .woocommerce-loop-product__title,
  body.page-id-2066 .gm-products ul.products li.product .price,
  body.page-id-2066 .gm-products ul.products li.product .button {
    width: 130px !important;
  }
  
  body.page-id-2066 .gm-products ul.products li.product img {
    height: 130px !important;
    padding: 10px !important;
  }
  
  body.page-id-2066 .gm-products ul.products li.product .woocommerce-loop-product__title { 
    font-size: 13px !important; 
    height: 36px !important;
  }
  
  body.page-id-2066 .gm-products ul.products li.product .button { 
    padding: 8px 0 !important; 
    font-size: 9px !important; 
  }

  body.page-id-2066 .gm-section-title {
    font-size: 26px !important;
  }
}
