/*
 Theme Name:   Fermentio Child Theme
 Theme URI:    https://fermentio.ancorathemes.com/
 Description:  Fermentio Child Theme
 Author:       AncoraThemes
 Author URI:   https://ancorathemes.com/
 Template:     fermentio
 Version:      1.0.0
 Tags: bar, vineyard, wine restaurant, wine bar, wine shop, wine tour, winemaking, winery, craft beer, beer house, brewery, liquor, pub, liquor store, restaurant
 Text Domain:  fermentio
*/


/* =Theme customization starts here
------------------------------------------------------------ */

/* Mini carrito: caja más ancha para que los botones
   "Ver carrito" y "Finalizar compra" entren completos */
@media (min-width: 768px) {
  body .sc_layouts_cart:not(.modern) .sc_layouts_cart_widget {
    width: 380px;
  }
}

/* Selector de idioma (TranslatePress) en el header: compacto y sin caja */
.celedonio-lang {
  margin: 0 18px 0 0 !important;
}
.celedonio-lang .trp-shortcode-switcher {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: #fefefe;
}
.celedonio-lang .trp-shortcode-switcher.trp-shortcode-overlay {
  background: #1b1a1f !important;
  padding: 4px 0 !important;
}
.celedonio-lang .trp-current-language-item__wrapper {
  padding: 0 !important;
  gap: 4px;
}
.celedonio-lang .trp-language-item {
  padding: 4px 6px !important;
  color: #fefefe !important;
}
.celedonio-lang .trp-language-item-name {
  font-size: 13px;
  letter-spacing: 1px;
  color: #fefefe;
}
.celedonio-lang .trp-shortcode-arrow {
  width: 10px;
  height: 10px;
}

/* Header móvil: logo, idioma e íconos en una sola línea */
@media (max-width: 767px) {
  .elementor-element-131863c { width: 44% !important; }
  .elementor-element-8703447 { width: 56% !important; }
  .elementor-element-e34849d img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
  }
  .elementor-element-8703447 > .elementor-widget-wrap {
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: flex-end;
  }
  .celedonio-lang { margin-right: 4px !important; }
  .celedonio-lang .trp-shortcode-arrow { display: none; }
  .celedonio-lang .trp-language-item { padding: 4px !important; }
}

/* Home móvil: imagen principal a pantalla completa con degradado a negro abajo */
@media (max-width: 767px) {
  .elementor-element-4462c14d {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    position: relative;
    overflow: hidden;
    /* el fondo se dibuja en ::before para recortar la franja negra superior de la imagen */
    background-image: none !important;
  }
  .elementor-element-4462c14d::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -12%;
    bottom: 0;
    background: url(/wp-content/uploads/2025/10/bgceledoniomobile.jpeg) center bottom / cover no-repeat;
    pointer-events: none;
    z-index: 0;
  }
  .elementor-element-4462c14d > .elementor-container {
    min-height: 100vh;
    min-height: 100svh;
    position: relative;
    z-index: 2;
  }
  .elementor-element-4462c14d::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 45%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .6) 55%, #000 100%);
    pointer-events: none;
    z-index: 1;
  }
}

/* Producto móvil: galería de fotos como carrusel deslizable
   (se ve la foto principal y asoma la siguiente; el título queda enseguida abajo) */
@media (max-width: 767px) {
  .single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px;
    height: auto !important;
    margin: 0 !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper::-webkit-scrollbar {
    display: none;
  }
  .single-product .woocommerce-product-gallery .woocommerce-product-gallery__image {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    flex: 0 0 85% !important;
    width: 85% !important;
    max-width: 85% !important;
    margin: 0 !important;
    padding: 0 !important;
    scroll-snap-align: start;
    /* anula el reacomodo en grilla que hace el JS del tema (transform/transition) */
    transform: none !important;
    transition: none !important;
    float: none !important;
  }
  .single-product .woocommerce-product-gallery .woocommerce-product-gallery__image img {
    width: 100%;
    height: auto;
  }
}

/* Producto: sin selector de cantidad, solo el botón "Comprar ahora"
   (en el carrito y el checkout la cantidad se sigue pudiendo cambiar) */
.single-product .summary form.cart .quantity {
  display: none !important;
}
.single-product .summary form.cart .single_add_to_cart_button {
  margin-left: 0 !important;
}

/* Barra inferior fija del producto (título + Comprar ahora):
   sin selector de cantidad, y oculta en móvil */
.single_product_bottom_bar_sticky .quantity {
  display: none !important;
}
@media (max-width: 767px) {
  .single_product_bottom_bar_sticky {
    display: none !important;
  }
}
