/* ==========================================================================
   VINOCOMPAS PLUGIN STYLES (VERSION 2.6 - OPTIMIZED & CLEANED)
   ========================================================================== */

.vinocompas-wrapper {
    width: 100%;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

.vinocompas-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

/* --------------------------------------------------------------------------
   KOLUMNY GŁÓWNE (DESKTOP)
   -------------------------------------------------------------------------- */
.vinocompas-col-left {
    flex: 0 0 55%;
    max-width: 55%;
    text-align: center;
}

.vinocompas-col-right {
    flex: 0 0 45%;
    max-width: 45%;
}

#cf7 {
    display: flex;
    flex-direction: column;
}

/* --------------------------------------------------------------------------
   PRAWY PANEL: NAGŁÓWEK, GALERIA, OPIS, PASEK POSTĘPU
   -------------------------------------------------------------------------- */
#text {
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 15px;
}

.attributes-gallery {
    position: relative;
    width: 100%;
    height: 280px; 
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.attributes-gallery img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.attributes-gallery img[src*="animate.gif"] {
    top: 55%; 
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform: translate(-50%, -50%) scale(1.1);
}

#text3 {
    min-height: 80px;
    margin-top: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 16px;
    line-height: 1.4;
}

.progress {
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    height: 30px;
    width: 100%;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    margin-bottom: 15px;
}

.progress-bar {
    height: 100%;
    color: #fff;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    font-size: 16px;
    transition: width 0.4s ease, background-color 0.4s ease;
}

.bg-danger {
    background-color: #d9534f !important;
}

.bg-success {
    background-color: #5cb85c !important;
}

/* --------------------------------------------------------------------------
   PRZYCISKI AKCJI
   -------------------------------------------------------------------------- */
.vinocompas-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.vc-btn {
    padding: 15px 30px;
    font-size: 18px;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s, background-color 0.3s;
}

.vc-btn:disabled, 
.vc-btn.disabled-btn {
    opacity: 0.4;
    cursor: not-allowed !important;
    pointer-events: none;
}

.vc-btn-search {
    background-color: #CE9471;
    border: 1px solid #996F54;
}

.vc-btn-download {
    background-color: rgb(146, 208, 80);
    border: 1px solid rgb(82, 166, 64);
}

.clickable-sector, 
.clickable-sector-simple {
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   LISTA WYNIKÓW WINA - DESKTOP (UKŁAD 3-KOLUMNOWY Z KOMPASEM)
   -------------------------------------------------------------------------- */
.vinocompas-results {
    width: 100%;
    box-sizing: border-box;
}

.list-group {
    list-style: none;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

.list-group-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 20px 30px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    height: 330px !important;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 20px !important;
    width: 100% !important;
    box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
}

/* 1. Kolumna lewa: Butelka (z efektem hover) */
.vc-item-col-left {
    width: 25% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

.vc-item-col-left a {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
}

.vc-item-col-left img.image,
.vc-item-col-left img.image-hover {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-height: 270px !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

.vc-item-col-left img.image {
    opacity: 1 !important;
    transition: opacity 0.3s ease-in-out !important;
}

.vc-item-col-left img.image-hover {
    opacity: 0 !important;
    transition: opacity 0.3s ease-in-out !important;
    pointer-events: none !important;
}

.vc-item-col-left:hover img.image {
    opacity: 0 !important;
}

.vc-item-col-left:hover img.image-hover {
    opacity: 1 !important;
}

/* 2. Kolumna środkowa: Dane wina, Trafność i Przycisk Zakupu */
.vc-item-col-center {
    width: 48% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.vc-desc-title a {
    font-size: 24px !important;
    color: #222 !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    margin-bottom: 12px !important;
    display: inline-block;
}

.vc-desc-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 17px;
    color: #333;
    margin-bottom: 18px;
}

.vc-desc-action-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 35px;
}

.vc-action-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.vc-action-label {
    font-size: 20px;
    color: #111;
    margin-bottom: 5px;
}

.vc-accuracy-value {
    font-size: 32px;
    font-weight: 500;
    color: #ff0000;
    line-height: 1;
}

.vc-cart-btn-desktop {
    width: 42px;
    height: 42px;
    background-color: #8cc63f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.vc-cart-btn-desktop:hover {
    transform: scale(1.05);
}

.vc-cart-btn-desktop svg,
.vc-mobile-cart-btn svg {
    display: block;
}

/* 3. Kolumna prawa: Miniaturka Vinocompasu */
.vc-item-col-right {
    width: 27% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

.vc-item-col-right a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.vc-item-col-right img {
    max-height: 230px !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
}

/* --------------------------------------------------------------------------
   RESPONSYWNOŚĆ MOBILNA
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .vinocompas-col-left, 
    .vinocompas-col-right {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Dopasowanie kompasu i galerii do wysokości ekranu telefonu */
    #compas_mobile {
        max-height: 48vh !important;
        margin: 0 auto !important;
    }

    .attributes-gallery {
        height: 160px !important;
    }

    .attributes-gallery img[src*="animate.gif"] {
        transform: translate(-50%, -50%) scale(1.05);
    }

    #text {
        font-size: 20px !important;
        margin-bottom: 8px !important;
    }

    #text3 {
        min-height: 55px;
        font-size: 14px;
        margin-top: 10px;
        margin-bottom: 12px;
    }

    .vinocompas-actions {
        flex-direction: column;
        align-items: center;
    }

    .vc-btn {
        width: 100%;
    }

    /* Kontener wyników i lista na mobile */
    .vinocompas-results,
    ul#lista {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .list-group-item {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 125px !important;
        padding: 12px !important;
        margin: 0 0 15px 0 !important;
        border-radius: 8px !important;
        box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.12) !important;
        background: #fff !important;
        border: 1px solid #e0e0e0 !important;
        box-sizing: border-box !important;
    }

    .vc-mobile-card-wrapper {
        display: flex !important;
        width: 100% !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px;
    }

    /* Czarna ramka wokół etykiety po lewej stronie */
    .vc-mobile-img-box {
        width: 110px !important;
        height: 110px !important;
        flex-shrink: 0 !important;
        border: 1.5px solid #222 !important;
        overflow: hidden !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #fff !important;
    }

    .vc-mobile-img-box a {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
    }

    .vc-mobile-img-box img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }

    /* Prawy panel z informacjami o winie */
    .vc-mobile-info-box {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        height: 110px !important;
        padding: 2px 0 !important;
    }

    .vc-mobile-header {
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px;
    }

    .vc-mobile-title a {
        font-size: 17px !important;
        font-weight: 600 !important;
        color: #222 !important;
        text-decoration: none !important;
        line-height: 1.2 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .vc-mobile-price {
        font-size: 15px !important;
        color: #333 !important;
    }

    /* Dolny wiersz karty mobilnej: Trafność + Zmniejszony Koszyk */
    .vc-mobile-footer {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        padding-right: 2px !important;
    }

    /* Blok "Trafność XX %" – zabezpieczenie przed łamaniem linii */
    .vc-mobile-accuracy {
        font-size: 19px !important;
        color: #111 !important;
        font-weight: 400 !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: baseline !important;
        flex-shrink: 1 !important;
    }

    .vc-mobile-percent {
        color: #ff0000 !important;
        font-weight: 500 !important;
        margin-left: 5px !important;
        white-space: nowrap !important;
    }

    /* Zmniejszony przycisk koszyka */
    .vc-mobile-cart-btn {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
        background-color: #8cc63f !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-decoration: none !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
        transition: transform 0.2s !important;
        flex-shrink: 0 !important;
    }

    .vc-mobile-cart-btn:active {
        transform: scale(0.92) !important;
    }

    .vc-mobile-cart-btn svg {
        width: 18px !important;
        height: 18px !important;
        display: block !important;
    }
}