/*
Theme Name:   Astra Child - Shop Veicoli
Theme URI:    https://wpastra.com/
Description:  Tema child di Astra con funzionalità complete per shop veicoli agricoli e industriali
Author:       Puntoweb - John
Author URI:   https://www.puntoweb.net
Template:     astra
Version:      2.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  astra-child
*/

/* ===================================
   LIGHTBOX GALLERY
   =================================== */

.vehicle-lightbox {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vehicle-lightbox.active {
    display: block;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 60px 80px 100px;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    width: 60px;
    height: 60px;
    line-height: 55px;
    text-align: center;
    border-radius: 50%;
    border: 2px solid #fff;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 60px;
    font-weight: 300;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 60px;
    height: 60px;
    line-height: 55px;
    text-align: center;
    border-radius: 50%;
    border: 2px solid #fff;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-prev {
    left: 40px;
}

.lightbox-next {
    right: 40px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-caption {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 16px;
    text-align: center;
    max-width: 80%;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 30px;
    border-radius: 25px;
}

.lightbox-counter {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
}

/* Previeni scroll body quando lightbox è aperto */
body.lightbox-open {
    overflow: hidden;
}

/* ===================================
   ZOOM ICON
   =================================== */

.zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    width: 70px;
    height: 70px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
}

.woocommerce-product-gallery__image:hover .zoom-icon {
    display: flex;
}

/* ===================================
   FULLSCREEN BUTTON
   =================================== */

.gallery-fullscreen-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 2px solid #fff;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
    transition: all 0.3s ease;
}

.gallery-fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* ===================================
   LOADING STATES
   =================================== */

.loading-image {
    position: relative;
    background: #f0f0f0;
    min-height: 300px;
}

.loading-image::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===================================
   FILTRI MOBILE TOGGLE
   =================================== */

.filters-toggle-btn {
    display: none;
    width: 100%;
    padding: 15px 20px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background 0.3s ease;
}

.filters-toggle-btn:hover {
    background: #0052a3;
}

.filters-toggle-btn .icon {
    margin-right: 8px;
    font-size: 20px;
}

@media (max-width: 992px) {
    .filters-toggle-btn {
        display: block;
    }
    
    .shop-filters-top.filters-hidden-mobile {
        display: none;
    }
}

/* ===================================
   THUMBNAIL GALLERY
   =================================== */

.flex-control-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.flex-control-thumbs li {
    list-style: none;
    margin: 0;
    padding: 0;
    width: calc(20% - 8px);
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
}

.flex-control-thumbs li:hover,
.flex-control-thumbs li.active-thumb {
    opacity: 1;
    border-color: #0066cc;
    transform: scale(1.05);
}

.flex-control-thumbs li img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===================================
   SHARE BUTTON
   =================================== */

.share-image-btn {
    position: absolute;
    bottom: 120px;
    right: 40px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 2px solid #fff;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.share-image-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* ===================================
   RESPONSIVE LIGHTBOX
   =================================== */

@media (max-width: 768px) {
    .lightbox-content {
        padding: 80px 20px 120px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 50px;
        height: 50px;
        font-size: 40px;
        line-height: 45px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 40px;
        line-height: 45px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-caption {
        bottom: 40px;
        font-size: 14px;
        padding: 12px 20px;
        max-width: 90%;
    }
    
    .lightbox-counter {
        top: 15px;
        font-size: 14px;
        padding: 8px 15px;
    }
    
    .share-image-btn {
        bottom: 90px;
        right: 20px;
        padding: 10px 15px;
        font-size: 16px;
    }
    
    .flex-control-thumbs li {
        width: calc(25% - 8px);
    }
}

@media (max-width: 480px) {
    .flex-control-thumbs li {
        width: calc(33.333% - 7px);
    }
}

/* ===================================
   NO PRODUCTS FOUND
   =================================== */

.no-products-found {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin: 30px 0;
}

/* ===================================
   ACTIVE FILTERS COUNT
   =================================== */

.active-filters-count {
    background: #fff9e6;
    border: 1px solid #ffe066;
    border-radius: 4px;
    padding: 12px 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #333;
}

.active-filters-count strong {
    color: #0066cc;
    font-weight: 700;
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-30 {
    margin-top: 30px;
}

.mb-30 {
    margin-bottom: 30px;
}

/* ===================================
   CLEARFIX
   =================================== */

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    .vehicle-lightbox,
    .shop-filters-top,
    .vehicle-sidebar-filters,
    .filters-toggle-btn,
    .gallery-fullscreen-btn,
    .zoom-icon {
        display: none !important;
    }
}

/*FIXES*/
nav.woocommerce-breadcrumb{
	display:none!important;
}
.woocommerce-products-header__title.page-title {
    text-transform: uppercase;
    letter-spacing: 1em;
    text-align: center;
}

.filter-actions button[type="submit"]
 {
    background: #942b25;
}
.widget.widget_vehicle_filters_widget .widget-title
 {
    border-bottom: 3px solid #942b25;
}
.filter-section-title
 {
    border-bottom: 2px solid #942b25;
}
.filter-item.active a
 {
    background: #942b25;
}
.filter-item a:hover {
    background: #e9ecef;
    color: #942b25;
}
.filter-actions button[type="submit"]:hover {
    background: #f8f9fa;
}
.woocommerce ul.products li.product:hover {
    box-shadow: 0 8px 20px rgb(231 54 54 / 10%);
    transform: translateY(-5px);
    border-color: #942b25;
}

.woocommerce-js div.product form.cart {
    display: none !important;
}