/*
Theme Name: Autobid Child
Theme URI: https://autobid.modeltheme.com/
Template: autobid
Author: Gerardo Carrasco
Author URI: http://modeltheme.com/
Description: Car Auctions Marketplace WooCommerce Theme
Version: 1.4.0
Text Domain: autobid
Tags: custom-header, custom-menu, featured-images, post-formats, sticky-post
*/
/* Theme customization starts here
------------------------------------------------------- */

/* Header amplio - Full width */
.top-header,
.header-v9 {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 0;
}

.top-header {
  padding: 0.5em 1em;
}

.header-v9 {
  padding: 0;
}

.top-header .container-fluid,
#autobid-main-head .container-fluid {
  max-width: 100%;
  padding-left: 1em;
  padding-right: 1em;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* Mejorar espaciado y alineación del header */
.header-v9 #autobid-main-head {
  padding: 0;
}

.header-v9 .navbar-default {
  margin-bottom: 0;
  border-radius: 0;
  border: none;
  background-color: transparent;
}

/* Contenedor principal del navbar */
#autobid-main-head .container-fluid {
  padding-left: 5px !important;
  padding-right: 5px !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Row dentro del navbar - distribuir elementos */
#autobid-main-head .row {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
}

/* Asegurar que logo, menú y carrito estén alineados */
.header-v9 .navbar-header {
  padding: 10px 5px;
  flex: 0 0 200px; /* logo 200px fijo */
  min-width: 200px;
}

.header-v9 .navigation-navbar {
  padding: 0 5px;
  display: flex;
  align-items: center;
  flex: 1 1 auto; /* ocupa el espacio restante */
  min-width: 0;
}

.header-v9 .menu-inquiry {
  padding: 10px 5px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 200px; /* carrito + botón 200px fijo */
  min-width: 200px;
}

/* Carrito más visible */
.header-v9 .shop_cart {
  font-size: 24px;
  position: relative;
}

.header-v9 .cart_count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #c92a2a;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* Botón de inquietud */
.header-v9 .button.btn {
  margin-left: 15px;
  padding: 10px 20px;
  white-space: nowrap;
}

/* Eliminar paddings de contenedores Bootstrap dentro del header */
.header-v9 [class*="col-"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

#navbar.navbar-collapse {
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100%;
}

/* Top header spacing y distribucion completa */
.top-header {
  padding: 2px 1em;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  margin-top: 0;
}

.top-header .container-fluid {
  padding-left: 0;
  padding-right: 0;
}

/* Forzar cualquier .container dentro de top-header a ocupar todo el ancho */
.top-header .container,
.top-header .container-fluid {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 1em !important;
  padding-right: 1em !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.top-header .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  flex-wrap: wrap;
}

/* Sección izquierda: Teléfono, Mail, Horarios */
.top-header .col-md-8 {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 5px; /* separación entre leyendas */
  flex-wrap: wrap;
  flex: 0 0 95%; /* toma 35% del ancho */
  min-width: 0; /* permite el shrink correcto */
}

.top-header .col-md-8.contact-header {
  gap: 3px;
}

/* Sección derecha: Búsqueda + Idioma + Cuentas */
.top-header .col-md-4 {
  display: none !important;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5em;
  flex: 1 1 15%; /* toma 65% del ancho */
}

/* Método de contacto individual */
.top-header .header-top-contact-method {
  display: flex;
  align-items: center;
  gap: 5px; /* separación entre icono y texto y entre elementos */
  font-size: 0.9em;
  white-space: normal; /* permitir salto a 2 líneas */
  line-height: calc(1em + 3px); /* asegura 3px entre líneas si hay wrap */
  row-gap: 3px; /* separación entre filas cuando los elementos se envuelven */
  word-break: break-word;
}

.top-header .header-top-contact-method a {
  text-decoration: none;
  color: inherit;
}

.top-header .header-top-contact-method span {
  margin-right: 3px;
}

.top-header .header-top-contact-method i {
  min-width: 16px;
  text-align: center;
}

/* Account links - Cuentas */
.top-header .header-top-contact-method ul {
  display: flex;
  gap: 0.8em;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.top-header .header-top-contact-method ul li a {
  display: inline-block;
  font-size: 0.85em;
}

/* Búsqueda en top header */
.top-header .autobid-header-searchform-v9 {
  display: none!important;
  align-items: center;
  min-width: 250px;
}

.top-header .autobid-header-searchform-v9 form {
  display: flex;
  width: 100%;
  gap: 0.5em;
}

.top-header .autobid-header-searchform-v9 input {
  padding: 0.4em 0.8em;
  font-size: 0.85em;
}

.top-header .autobid-header-searchform-v9 button {
  padding: 0.4em 0.8em;
  font-size: 0.85em;
}

/* Lenguaje dropdown */
.top-header .currency-language {
  display: flex !important;
  gap: 1em;
}
/* Shop minicard */
.header-v9 .shop_cart {
    display: none;
}
/* Ocultar botones y widgets Woocommerce*/
.add_to_cart_button,
.product_type_simple,
.woocommerce.widget_shopping_cart,
.woocommerce-page .widget_shopping_cart,
.site-header-cart,
.woocommerce-account,
.woocommerce-checkout {
    display: none !important;
}
#wpadminbar * {
    font-size: 12px;
}
/* Responsive ajustes */
@media (max-width: 768px) {
  .header-v9 .menu-inquiry {
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .header-v9 .button.btn {
    margin-left: 0;
    width: 100%;
  }
  
  .header-v9 .navigation-navbar {
    padding: 0;
  }
}
.woocommerce .woocommerce-info, .woocommerce .woocommerce-message {
    display: none!important;
}

h1.woocommerce-products-header__title.page-title {
    padding-left: 20px !important; /* O el valor que prefieras */
}

.single-project div.product .woocommerce-tabs .panel {
    display: block !important; 
}

/* Galeria de productos woocommerce personalizada */
.custom-product-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px; /* Espacio entre imágenes */
  margin-top: 20px; /* Espacio por encima de la galería */
  clear: both; /* Asegura que esté debajo del contenido anterior */
  /* El ancho completo se maneja ahora por JS para evitar desbordamientos en layouts con sidebar */
  width: 100%;
  padding: 20px 15px; /* Padding para que las fotos no toquen los bordes de la pantalla */
  box-sizing: border-box;
  justify-content: center; /* Centrar todo el bloque de imágenes */
}

.custom-product-gallery .custom-gallery-item {
  /* 6 columnas en escritorio */
  width: calc(16.666% - 12.5px); /* Cálculo exacto: (100% - 5 huecos de 15px) / 6 */
  height: 120px; /* Altura fija para uniformidad */
  box-sizing: border-box;
  border: 1px solid #ddd;
  padding: 5px;
  background-color: #fff;
  transition: transform 0.2s;
  overflow: hidden; /* Oculta el exceso de la imagen */
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-product-gallery .custom-gallery-item:hover {
  transform: scale(1.05);
}

.custom-product-gallery .custom-gallery-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover; /* Hace que la imagen cubra el contenedor sin deformarse */
}

/* --- Media Queries para Responsividad --- */

/* 4 columnas en tablets */
@media (max-width: 992px) {
  .custom-product-gallery .custom-gallery-item {
    width: calc(25% - 12px);
  }
}

/* 3 columnas en móviles grandes */
@media (max-width: 768px) {
  .custom-product-gallery .custom-gallery-item {
    width: calc(33.333% - 10px);
  }
}

/* 2 columnas en móviles pequeños */
@media (max-width: 480px) {
  .custom-product-gallery .custom-gallery-item {
    width: calc(50% - 8px);
  }
}

/* --- Ajustes para la galería emergente (Fancybox) --- */

/* Mover las flechas de navegación más cerca de la imagen */
.fancybox-button--arrow_left {
  left: 80px; /* Aumenta el espacio desde el borde izquierdo */
}

.fancybox-button--arrow_right {
  right: 80px; /* Aumenta el espacio desde el borde derecho */
}

/* Estilos para asegurar que el botón de cerrar (X) sea visible y prominente */
.fancybox-toolbar .fancybox-button--close {
  width: 38px;
  height: 38px;
  background-color: #111;
  color: #fff;
  border-radius: 50%;
  border: 2px solid #fff;
  cursor: pointer;
  top: 15px; /* Distancia desde la parte superior */
  right: 15px; /* Distancia desde la derecha */
  transition: transform 0.2s, background-color 0.2s;
}

/* --- Ajustes para que los selects con nice-select ocupen todo el ancho del contenedor --- */
.nice-select {
  width: 100% !important;
  display: block !important;
  box-sizing: border-box;
}
.nice-select .current {
  width: 100% !important;
  box-sizing: border-box;
}
.nice-select .list {
  width: 100% !important;
  box-sizing: border-box;
}
/* Asegurar que el select nativo también ocupe el ancho por si no está transformado */
select#woof_tax_select_pa_modelo-year,
select#woof_tax_select_product_brand {
  width: 100% !important;
  box-sizing: border-box;
}

/* Ocultar iconos de carrito/mi cuenta dentro del menú móvil */
@media (max-width: 768px) {
  .menu-inquiry .shop_cart,
  .menu-inquiry .header_mini_cart,
  .menu-inquiry .site-header-cart,
  .only-mobile .header-top-contact-method ul,
  .only-mobile .currency-language,
  .only-mobile .header-top-icon {
    display: none !important;
  }
  .navbar .mobile_only_icon_group {
        display: none !important;
    }
}

.fancybox-toolbar .fancybox-button--close:hover {
  background-color: #c92a2a; /* Color rojo al pasar el mouse */
  transform: scale(1.1);
}

/* Opcional: Un recuadro sutil a la imagen en la vista lightbox */
.fancybox-slide--image .fancybox-content {
  border: 3px solid white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.6);
  transform: scale(0.9); /* Reduce el tamaño de la imagen al 90% */
}

/* --- Estilo para el contenido personalizado de la barra lateral del producto --- */
.custom-sidebar-frame {
  border: 1px solid #e0e0e0;
  padding: 25px;
  background-color: #f9f9f9;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.custom-sidebar-frame h4 {
  margin-top: 0;
  color: #333;
  font-size: 1.2em;
  border-bottom: 2px solid #c92a2a;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.custom-sidebar-frame .button {
  display: inline-block;
  margin-top: 15px;
  background-color: #c92a2a;
  color: #fff;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 3px;
  transition: background-color 0.3s;
}

.custom-sidebar-frame .button:hover {
  background-color: #333;
}

/* Ocultar el contenido de la barra lateral de Dokan para evitar el "parpadeo" */
.sidebar-product-wrapper {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
/* Ocultar el contenido de la barra lateral de producto { */
.col-md-4 .sidebar-product {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    Display: none !important;
}
/* --- AJUSTES PARA EL MENÚ PRINCIPAL (HEADER V9) --- */

/* 1. Ocultar el carrito de compras que no se utiliza */
.header-v9 .shop_cart {
    display: none !important;
}

/* 2. Ajustar la distribución de espacio de los 3 bloques principales */
.header-v9 .navbar-header { /* Logo */
    flex: 0 1 auto; /* No crecer, encoger si es necesario, base automática */
    min-width: 150px; /* Reducimos el mínimo por si acaso */
}

.header-v9 .navigation-navbar { /* Menú de navegación */
    flex: 1 1 auto; /* Crecer y encoger según sea necesario, ocupando el espacio sobrante */
}

.header-v9 .menu-inquiry { /* Botón de la derecha */
    flex: 0 1 auto; /* No crecer, encoger si es necesario, base automática */
    min-width: initial; /* Eliminamos el mínimo */
    justify-content: flex-end; /* Aseguramos que el contenido se alinee a la derecha */
}

/* 3. Alinear los items del menú a la derecha, dentro de su contenedor */
.header-v9 #navbar > ul.nav.navbar-nav.navbar-right {
    float: right !important; /* Forzamos el flotado a la derecha */
}

/* 4. Aumentar el espaciado en los extremos del header para mover el logo y el botón */
#autobid-main-head .container-fluid {
  padding-left: 15px !important;  /* Espacio reducido en la izquierda */
  padding-right: 30px !important; /* Empuja el botón más a la derecha */
}

/* --- AJUSTES FINOS PARA EL MENÚ PRINCIPAL --- */

/* Reducir el espaciado horizontal entre los elementos del menú */
.header-v9 #navbar .nav.navbar-nav > li > a {
    padding-left: 10px !important;  /* Espaciado ajustado */
    padding-right: 10px !important; /* Espaciado ajustado */
    font-size: 14px !important;    /* Aumentamos la fuente */
}

/* --- LAYOUT DE TIENDA: SIDEBAR Y PRODUCTOS LADO A LADO --- */

/* Asegurar que el contenedor de la tienda tenga flexbox */
.high-padding .blog-posts .row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
}

/* Sidebar de la tienda - Col-md-3 */
.high-padding .blog-posts .col-md-3.autobid-shop-sidebar {
    display: inline-block !important;
    width: 25% !important;
    flex: 0 0 25% !important;
    max-width: 25% !important;
    margin-bottom: 0 !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    float: none !important;
    vertical-align: top !important;
}

/* Contenido principal de la tienda - Col-md-9 */
.high-padding .blog-posts .col-md-9.main-content {
    display: inline-block !important;
    width: 75% !important;
    flex: 0 0 72% !important;
    max-width: 75% !important;
    margin-bottom: 0 !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    float: none !important;
    vertical-align: top !important;
}

/* Para cuando no hay sidebar, full width */
.high-padding .blog-posts .col-md-12.main-content {
    display: block !important;
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* En pantallas más pequeñas, cambiar a layout vertical */
@media (max-width: 992px) {
    .high-padding .blog-posts .col-md-3.autobid-shop-sidebar {
        width: 30% !important;
        flex: 0 0 30% !important;
        max-width: 30% !important;
    }
    
    .high-padding .blog-posts .col-md-9.main-content {
        width: 70% !important;
        flex: 0 0 70% !important;
        max-width: 70% !important;
    }
}

@media (max-width: 768px) {
    .high-padding .blog-posts .col-md-3.autobid-shop-sidebar {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 20px !important;
    }
    
    .high-padding .blog-posts .col-md-9.main-content {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* --- ESTILOS PARA LAS BARRAS DESLIZANTES (SLIDERS) DE BÚSQUEDA --- */
.slider-container {
    padding: 20px 10px 10px 10px;
    position: relative;
}

.slider-values {
    margin-top: 10px;
    font-weight: bold;
    text-align: center;
    color: #333;
}

/* Estilo base del slider de jQuery UI */
.ui-slider {
    position: relative;
    text-align: left;
    background: #e9ecef;
    border-radius: 20px;
    border: 1px solid #ced4da;
}

/* El rango seleccionado (la barra entre los dos manejadores) */
.ui-slider .ui-slider-range {
    position: absolute;
    z-index: 1;
    font-size: .7em;
    display: block;
    border: 0;
    background: #c92a2a; /* Color principal del tema */
    border-radius: 20px;
}

/* Los manejadores (los puntos que se arrastran) */
.ui-slider .ui-slider-handle {
    position: absolute;
    z-index: 2;
    width: 1.2em;
    height: 1.2em;
    cursor: default;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #c92a2a; /* Color principal del tema */
    cursor: pointer;
    top: -0.4em; /* Centrar verticalmente */
    transition: box-shadow 0.3s;
}

.ui-slider .ui-slider-handle:focus,
.ui-slider .ui-slider-handle:hover {
    box-shadow: 0 0 8px rgba(201, 42, 42, 0.5);
}
.irs--flat.irs-with-grid {
    width: 90%;
}

/* --- Ajustes para Filtros en Móvil (Precio y Kilometraje) --- */
@media (max-width: 768px) {
    /* Forzar que los contenedores de filtros ocupen todo el ancho y se apilen */
    .woof_container {
        width: 100% !important;
        min-width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Sliders (Ion Range Slider) al 100% real */
    .irs--flat.irs-with-grid {
        width: 100% !important;
    }
}

/* Asegurar que el contenedor de precios sea visible siempre */
.woof_price_filter_txt_slider, 
.woof_section_by_price,
.woof_price_filter {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* --- ESTILOS PARA FILTROS DE BÚSQUEDA (WOOF) --- */

/* 1. Ocultar el <select> original para evitar duplicados */
.woof_container select {
    display: none !important;
}

/* Ocultar nice-select si el tema lo genera, para usar solo Select2 */
.woof_container .nice-select {
    display: none !important;
}

/* 2. Estilar el contenedor de Select2 que reemplaza al select original */
.woof_container .select2-container--default .select2-selection--single {
    height: 50px !important; /* Más alto */
    border: 2px solid #006cfa !important; /* Borde AZUL #006cfa */
    border-radius: 4px !important;
    background-color: #fff !important;
}

/* 3. Estilar el texto dentro del selector */
.woof_container .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #006cfa !important; /* Texto AZUL #006cfa */
    font-size: 14px !important; /* Texto 14px */
    font-weight: 600 !important;
    line-height: 46px !important; /* Centrado vertical (50px altura - 2*2px borde) */
    padding-left: 15px !important;
}

/* 4. Estilar la flecha del selector */
.woof_container .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px !important; /* Alinear con el interior */
    right: 5px !important;
}
.woof_container .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #006cfa transparent transparent transparent !important; /* Flecha AZUL #006cfa */
    border-width: 7px 7px 0 7px !important; /* Flecha más grande */
    margin-left: -7px !important;
    margin-top: -4px !important;
}

/* 5. Estilos para cuando el dropdown está abierto */
.woof_container .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #006cfa transparent !important;
    border-width: 0 7px 7px 7px !important;
}

/* 6. Estilos para el desplegable (dropdown) */
.select2-dropdown {
    border: 2px solid #006cfa !important;
    border-radius: 4px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- Layout específico para Kilometraje y Precio (Escritorio) --- */
@media (min-width: 769px) {
    .woof_container_pa_kilometraje,
    .woof_container_pa_mileage,
    .woof_price_filter {
        display: inline-block !important;
        width: calc(50% - 25px) !important; /* 50px de separación (25px de cada lado) */
        vertical-align: top;
        margin-bottom: 20px !important;
        box-sizing: border-box !important;
    }
    .woof_container_pa_kilometraje,
    .woof_container_pa_mileage {
        float: left !important;
        clear: none !important;
    }
    .woof_price_filter {
        float: right !important;
        clear: none !important;
    }
}