/* ============================================
   EFECTO TARJETAS REDONDEADAS - TODA LA WEB
   ============================================ */

/* Tarjetas de producto estilo app */
.product-miniature {
  background: white !important;
  border-radius: 16px !important;
  padding: 12px !important;
  margin-bottom: 16px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: none !important;
}

.product-miniature:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
}

/* Imágenes redondeadas */
.product-thumbnail img {
  border-radius: 12px !important;
  transition: transform 0.3s ease !important;
}

.product-thumbnail img:hover {
  transform: scale(1.02) !important;
}

/* Botones redondeados (excluyendo qty-up y qty-down) */
.btn:not(.qty-up):not(.qty-down), 
.add-to-cart, 
.btn-primary, 
.btn-secondary,
.btn-tertiary,
.btn-link {
  border-radius: 30px !important;
  padding: 8px 20px !important;
  transition: all 0.3s ease !important;
}

.btn:not(.qty-up):not(.qty-down):hover, 
.add-to-cart:hover, 
.btn-primary:hover, 
.btn-secondary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* Restaurar botones de cantidad a su estilo original */
.qty-up, .qty-down {
  border-radius: 0 !important;
  padding: 0 !important;
  transform: none !important;
  box-shadow: none !important;
}

/* ============================================
   FORZAR VISIBILIDAD DE IMÁGENES EN TODAS LAS PANTALLAS
   ============================================ */

.thumbnail-container img,
.product-miniature img,
.product-thumbnail img,
.js-product-miniature img,
.product-cover img,
.product-image-container img,
.images-container img {
  max-height: none !important;
  min-height: auto !important;
  width: 100% !important;
  height: auto !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  object-fit: contain !important;
}

/* ============================================
   FORZAR VISIBILIDAD DE IMÁGENES EN MÓVIL
   ============================================ */

@media (max-width: 500px) {
  .thumbnail-container img,
  .product-miniature img,
  .product-thumbnail img,
  .js-product-miniature img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: auto !important;
    max-height: none !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .thumbnail-container {
    min-height: auto !important;
  }
  
  .product-cover img,
  .product-image-container img,
  .images-container .product-cover img,
  #main .product-cover img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
  }
  
  .banner img,
  #carousel img,
  .carousel-item img,
  .block-banner img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .product-cover,
  .product-image-container,
  .images-container {
    min-height: auto !important;
    overflow: visible !important;
  }
}

/* ============================================
   REDISEÑO HOME MÓVIL - SIN CARRUSEL
   ============================================ */

@media (max-width: 500px) {
  #carousel,
  .carousel,
  .banner,
  .block-banner,
  .carousel-inner,
  .carousel-item,
  .carousel-control,
  .carousel-indicators {
    display: none !important;
  }
  
  .header-top {
    margin-bottom: 0 !important;
    padding-bottom: 5px !important;
  }
  
  #wrapper {
    padding-top: 10px !important;
  }
  
  .featured-products .products-section-title,
  .products-section-title {
    font-size: 1.2rem !important;
    text-align: left !important;
    padding: 10px 0 !important;
    margin: 0 0 10px 0 !important;
    border-bottom: 2px solid #105693 !important;
    display: inline-block !important;
  }
  
  .featured-products .products {
    display: grid !important;
    gap: 12px !important;
    padding: 0 !important;
  }
  
  .featured-products .product-miniature {
    margin-bottom: 0 !important;
    padding: 8px !important;
  }
  
  .featured-products:first-of-type,
  .products:first-of-type {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

/* ============================================
   MENÚ LATERAL MÓVIL
   ============================================ */

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.menu-sidebar {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background: white;
  z-index: 9999;
  transition: left 0.3s ease;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  overflow-y: auto;
}

.menu-sidebar.open {
  left: 0;
}

.menu-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  border-bottom: 1px solid #eee;
  background: #f8f9fa;
}

.menu-sidebar-close {
  font-size: 28px;
  cursor: pointer;
  color: #105693;
}

.menu-sidebar-logo img {
  width: 50px;
  height: auto;
}

.menu-sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-sidebar-nav li {
  border-bottom: 1px solid #eee;
}

.menu-sidebar-nav li a {
  display: block;
  padding: 15px 20px;
  color: #105693;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.menu-sidebar-nav li a:hover {
  background: #f0f0f0;
  color: #e65500;
}

/* ============================================
   AJUSTES DEL MENÚ LATERAL MÓVIL
   ============================================ */

@media (max-width: 500px) {
  .menu-sidebar {
    background: #ffffff !important;
  }

  .menu-sidebar-header {
    background: #ffffff !important;
  }

  .menu-sidebar-logo img {
    width: 80px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
  }

  .menu-sidebar-close {
    display: none !important;
  }

  .menu-sidebar-nav li a {
    padding: 25px 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #105693 !important;
  }

  .menu-sidebar-nav li {
    border-bottom: 1px solid #e0e0e0 !important;
  }

  .menu-sidebar-header {
    justify-content: center !important;
    position: relative !important;
    padding: 20px 15px !important;
  }
}

/* ============================================
   COPYRIGHT EN PIE DEL MENÚ LATERAL
   ============================================ */

.menu-sidebar-footer {
  padding: 2vh 20px;
  margin-top: 30vh;
  border-top: 1px solid #e0e0e0;
  text-align: center;
}

.menu-copyright {
  font-size: 11px;
  color: #999;
  margin: 0;
  line-height: 1.4;
}

@media (max-width: 500px) {
  .menu-sidebar-footer {
    padding: 15px;
    margin-top: 30vh;
  }
  
  .menu-copyright {
    font-size: 10px;
  }
}

/* ============================================
   ELEMENTOS DENTRO DEL MENÚ LATERAL
   ============================================ */

@media (max-width: 500px) {
  .menu-search-wrapper {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .menu-search-wrapper .search-widget {
    width: 100%;
  }
  
  .menu-search-wrapper form {
    position: relative;
    width: 100%;
  }
  
  .menu-search-wrapper input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border-radius: 25px;
    border: 1px solid #ddd;
    font-size: 14px;
    background: #f9f9f9;
  }
  
  .menu-search-wrapper button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #105693;
  }
  
  .menu-categories-wrapper {
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    margin: 5px 0;
    max-height: 300px;
    overflow-y: auto;
  }
  
  .menu-categories-wrapper ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .menu-categories-wrapper li {
    border-bottom: 1px solid #eee;
  }
  
  .menu-categories-wrapper li a {
    display: block;
    padding: 12px 20px;
    color: #105693;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
  }
  
  .menu-categories-wrapper li a:hover {
    background: #f0f0f0;
    color: #e65500;
  }
  
  .menu-categories-wrapper ul ul {
    padding-left: 20px;
  }
}

/* ============================================
   OCULTAR ELEMENTOS EN HOME Y BÚSQUEDA
   ============================================ */

@media (max-width: 500px) {
  body#index #search_widget,
  body#search #search_widget,
  body#index .language-selector-wrapper,
  body#index .language-selector,
  body#index #_desktop_language_selector,
  body#index #contact-link,
  body#index .contact-link,
  body#index #_desktop_contact_link,
  body#index .user-info,
  body#index #_desktop_user_info {
    display: none !important;
  }
}

/* Ocultar menú móvil original de PrestaShop */
#mobile_top_menu_wrapper {
  display: none !important;
}

/* ============================================
   ELIMINAR TODOS LOS BORDES AZULES
   ============================================ */

*:focus,
*:focus-visible,
*:active {
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

select:focus,
button:focus,
input:focus,
a:focus,
.btn:focus,
.form-control:focus,
.product-variants select:focus,
.product-quantity input:focus,
.product-quantity button:focus,
.product-miniature:focus,
.thumbnail-container:focus,
img:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: #ddd !important;
}

/* ============================================
   ELIMINAR CUADRO AZUL EN MINIATURAS DE PRODUCTO
   ============================================ */

/* Eliminar bordes y sombras en todas las imágenes de producto */
.thumb-container,
.thumb-container img,
.thumb.selected,
.thumb.js-thumb-selected,
.js-qv-mask,
.product-images li,
.product-images img,
.product-cover img {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  border-color: transparent !important;
}

/* Específico para la imagen seleccionada */
.thumb.selected,
.thumb.js-thumb-selected {
  border: 2px solid transparent !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Para el contenedor de máscara */
.js-qv-mask {
  border: none !important;
  outline: none !important;
}

/* ============================================
   FORZAR VISUALIZACIÓN CORRECTA DE MINIATURAS
   ============================================ */

.js-qv-mask,
.mask,
.product-images {
  display: block !important;
  clear: both !important;
  width: 100% !important;
  overflow: visible !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.product-images li {
  display: inline-block !important;
  list-style: none !important;
  margin: 0 5px 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.thumb {
  width: auto !important;
  height: auto !important;
  max-width: 100px !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  transform: none !important;
}

.thumb.selected {
  border: 2px solid #105693 !important;
  opacity: 1 !important;
}

/* Eliminar cualquier sombra o filtro */
.thumb,
.thumb img {
  filter: none !important;
  -webkit-filter: none !important;
  backdrop-filter: none !important;
}

/* ============================================
   BANNER PANTALLA COMPLETA - MÓVIL (VERSIÓN SIMPLE)
   ============================================ */

@media (hover: none) and (pointer: coarse) and (max-width: 500px) {
    .fullscreen-banner {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.85);
        z-index: 99999;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .banner-content {
        position: relative;
        width: 90%;
        max-width: 350px;
        background: white;
        border-radius: 20px;
        overflow: hidden;
    }

    .banner-image {
        width: 100%;
        height: auto;
        display: block;
    }

    .banner-text {
        padding: 20px;
        text-align: center;
    }

    .banner-text h2 {
        color: #105693;
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .banner-text p {
        color: #666;
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .banner-btn {
        display: inline-block;
        background: #105693;
        color: white;
        padding: 12px 25px;
        border-radius: 30px;
        text-decoration: none;
        font-weight: bold;
    }

    .close-banner {
        position: absolute;
        top: 10px;
        right: 15px;
        background: rgba(0,0,0,0.5);
        color: white;
        border: none;
        font-size: 24px;
        cursor: pointer;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    @media (hover: none) and (pointer: coarse) and (max-width: 500px) {
    #carousel,
    .carousel,
    .banner,
    .block-banner {
      display: none !important;
    }
}

/* Forzar color blanco en el botón del banner */
.fullscreen-banner .banner-btn,
.fullscreen-banner .banner-btn:link,
.fullscreen-banner .banner-btn:visited,
.fullscreen-banner .banner-btn:hover,
.fullscreen-banner .banner-btn:active {
    color: #ffffff !important;
}

/* ============================================
   FORZAR 2 COLUMNAS EN MÓVIL PARA MÓDULOS DE PRODUCTOS
   ============================================ */

@media (max-width: 500px) {
    /* Aplicamos el grid a los contenedores de productos destacados y novedades */
    .featured-products .products,
    .product-accessories .products,
    .tab-content .products {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;  /* Dos columnas de igual ancho */
        gap: 16px !important;                       /* Espacio entre tarjetas */
        justify-content: space-between !important;
    }

    /* Ajustamos el ancho de las tarjetas de producto para que no se desborden */
    .featured-products .product-miniature,
    .product-accessories .product-miniature,
    .tab-content .product-miniature {
        max-width: 100% !important;
        min-width: 0 !important;    /* Importante para que el grid funcione correctamente */
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* ============================================
   DISEÑO MÓVIL TIPO APP - UNIFICADO
   ============================================ */

@media (max-width: 500px) {
    /* === CONTENEDOR PRINCIPAL MÓVIL === */
    .mobile {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        position: relative !important;
        padding: 5px 50px !important;
        min-height: 30px !important;
    }

    /* === MENÚ HAMBURGUESA (IZQUIERDA) === */
    #custom-menu-icon {
        position: absolute !important;
        left: 5px !important;  /* Mover más a la izquierda */
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 10 !important;
    }

    #custom-menu-icon .material-icons {
        font-size: 32px !important;  /* Tamaño del icono hamburguesa */
    }

    /* === LOGO CENTRADO === */
    #_mobile_logo {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        text-align: center !important;
        width: auto !important;
    }

    #_mobile_logo img {
        max-width: 100px !important;  /* Logo más grande */
        width: auto !important;
        height: auto !important;
        display: block !important;
    }

    /* === CARRITO A LA DERECHA === */
    #_mobile_cart {
        order: 3 !important;
        z-index: 10 !important;
    }

    #_mobile_cart .blockcart {
        transform: scale(0.7) !important;  /* Carrito más pequeño */
    }

    #_mobile_cart .material-icons {
        font-size: 30px !important;
    }

    /* === OCULTAR ICONO DE USUARIO EN MÓVIL === */
    #_mobile_user_info {
        display: none !important;
    }

    /* === AUMENTAR ALTURA DEL HEADER === */
    .header-top {
        position: relative;
        padding: 1px 0 !important;
        min-height: 90px !important;
    }
}

/* ============================================
   BOTONES DE LOGIN/LOGOUT EN MENÚ LATERAL
   ============================================ */

@media (max-width: 500px) {
    .login-link,
    .logout-link {
        border-top: 1px solid #e0e0e0 !important;
        margin-top: 10px !important;
    }

    .login-link a {
        color: #105693 !important;
    }

    .login-link a:hover {
        background: #105693 !important;
        color: white !important;
    }

    .logout-link a {
        color: #e65500 !important;
    }

    .logout-link a:hover {
        background: #e65500 !important;
        color: white !important;
    }

    .login-link i,
    .logout-link i {
        margin-right: 10px !important;
        font-size: 18px !important;
        vertical-align: middle !important;
    }
    
        #_mobile_logo img {
        max-width: 500px !important;  /* Ajusta este valor para más grande */
        width: auto !important;
        height: auto !important;
        display: block !important;
    }
    
    /* ============================================
   FORZAR TAMAÑO DEL LOGO EN MÓVIL
   ============================================ */

@media (max-width: 500px) {
    /* Contenedor del logo */
    #_mobile_logo {
        text-align: center !important;
        width: 50% !important;
    }

    /* El h1 que envuelve el logo */
    #_mobile_logo h1 {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* La imagen del logo */
    #_mobile_logo img,
    #_mobile_logo .logo,
    #_mobile_logo .img-fluid {
        max-width: 70px !important;  /* Ajusta este valor */
        width: 50px !important;
        height: auto !important;
        display: inline-block !important;
    }
}

}