/* Contenidor principal - 2 columnes */
.tbk-preu-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

/* ========================================
   BLOC ESQUERRE: Preu + Estalvi
======================================== */
.tbk-preu-bloc-principal {
    background: #FAFAFA;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* Wrapper dels 2 preus */
.tbk-preus-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

/* Preu TBK Market (gran, verd) */
.tbk-preu-actual {
    display: flex;
    flex-direction: column;
}

.tbk-preu-valor {
    font-size: 38px;
    font-weight: 700;
    color: #000;
    line-height: 1;
    margin-bottom: 5px;
}

.tbk-preu-label {
    font-size: 16px;
    color: #71717A;
    font-weight: 400;
}

/* PVP Nova (petit, tatxat) */
.tbk-preu-original {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.tbk-pvp-label {
    font-size: 12px;
    color: #71717A;
    margin-bottom: 3px;
    margin-top: 12px;
}

.tbk-pvp-valor {
    font-size: 20px;
    font-weight: 600;
    color: #71717A;
    text-decoration: line-through;
}

/* Bloc d'estalvi (verd) */
.tbk-estalvi {
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
}

/* ========================================
   BLOC DRET: Finançament
======================================== */
.tbk-preu-bloc-financiament {
    background: #FAFAFA;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: left;
    align-items: left;
    text-align: left;
}

.tbk-financiament-preu {
    font-size: 38px;
    font-weight: 700;
    color: #000;
    line-height: 1;
    margin-bottom: 10px;
}

.tbk-financiament-mes {
    font-size: 20px;
    font-weight: 400;
    color: #71717A;
}

.tbk-financiament-info {
    font-size: 16px;
    color: #71717A;
    line-height: 1.5;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {

    /* En mòbil, els blocs es posen en vertical */
    .tbk-preu-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .tbk-preu-valor {
        font-size: 36px;
    }

    .tbk-pvp-valor {
        font-size: 18px;
    }

    .tbk-financiament-preu {
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .tbk-preu-valor {
        font-size: 32px;
    }

    .tbk-estalvi {
        font-size: 14px;
        padding: 10px 15px;
    }

    .tbk-financiament-preu {
        font-size: 26px;
    }
}


/***********************************/

/* Informació general - 2 columnes fixes */
.tbk-info-general {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.tbk-info-item {
    text-align: left;
    padding: 10px 5px;
    background: #FFF;
    border-radius: 8px;
    border: 1px solid #e6e8ea;
}

.tbk-info-item .icon {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #71717A;
    margin-bottom: 8px;
    margin-left: 10px;
}

.tbk-info-item .icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.tbk-info-item .label {
    display: block;
    font-size: 11px;
    color: #71717A;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    font-weight: 600;
}

.tbk-info-item .value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin-left: 15px;
}

.tbk-talla-equiv {
    display: block;
    font-size: 14px;
    color: #71717A;
    margin-left: 15px;
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 480px) {

    /* En mòbils molt petits, 1 columna */
    .tbk-info-general {
        grid-template-columns: 1fr;
    }

    .tbk-info-item .icon {
        font-size: 13px;
    }

    .tbk-info-item .icon img {
        width: 22px;
        height: 22px;
    }

    .tbk-info-item .value {
        font-size: 16px;
    }
}

/********************************************/


/* Contenidor principal */
.tbk-estat-conservacio {
    margin: 25px 0;
}

/* Títol */
.tbk-estat-titol {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin: 0 0 15px 0;
}

/* Descripció de text */
.tbk-estat-descripcio {
    font-size: 14px;
    color: #000;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

/* Grid de 2 columnes per les caixes */
.tbk-estat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* Cada caixa */
.tbk-estat-box {
    background: #FAFAFA;
    border: 1px solid #FAFAFA;
    border-radius: 8px;
    padding: 20px;
    text-align: left;
}

/* Label de la caixa */
.tbk-estat-box-label {
    font-size: 12px;
    font-weight: 600;
    color: #71717A;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

/* Valor (10/10) */
.tbk-estat-box-valor {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

/* Responsive */
@media (max-width: 480px) {
    .tbk-estat-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .tbk-estat-conservacio {
        padding: 20px;
    }

    .tbk-estat-titol {
        font-size: 18px;
    }

    .tbk-estat-descripcio {
        font-size: 14px;
    }

    .tbk-estat-nota {
        font-size: 16px;
    }
}

.tbk-spec-section {
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .tbk-preus {
        flex-direction: column;
    }

    .tbk-info-general {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Miniatures més petites - 6 per fila */
.woocommerce div.product div.images .flex-control-thumbs li {
    width: calc(16.66% - 10px) !important;
    margin: 0 5px 10px 5px !important;
    float: left;
}

.woocommerce div.product div.images .flex-control-thumbs li img {
    width: 100% !important;
    height: auto !important;
    cursor: pointer;

}

.woocommerce div.product div.images .flex-control-thumbs li img:hover,
.woocommerce div.product div.images .flex-control-thumbs li img.flex-active,
.woocommerce div.product div.images .flex-control-thumbs li img {
    opacity: 1 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .woocommerce div.product div.images .flex-control-thumbs li {
        width: calc(25% - 10px) !important;
        /* 4 per fila en mòbil */
    }
}

@media (max-width: 480px) {
    .woocommerce div.product div.images .flex-control-thumbs li {
        width: calc(33.333% - 10px) !important;
        /* 3 per fila en mòbil petit */
    }
}

/* Contenidor d'etiquetes */
.tbk-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    align-items: center;
}

/* Estil base de les etiquetes */
.tbk-badge {
    display: inline-block;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.5px;
    border-radius: 10px;
    background: #f1f2f3;
    color: #515962;
    transition: all 0.2s ease;
    font-family: "N27", Sans-serif;
}


/* Responsive */
@media (max-width: 768px) {
    .tbk-badge {
        font-size: 11px;
        padding: 5px 12px;
    }
}

/* Badge estat: Reservada */
.tbk-badge--reservada {
    background: #000000;
    color: #ffffff;
}

/* Badge estat: Km 0 / Reestrena */
.tbk-badge--km0,
.tbk-badge--reestrena {
    background: var(--e-global-color-1918b59);
    color: #000000;
}

/* Contenidor principal */
.tbk-caracteristiques-tecniques {
    margin: 25px 0;
}

/* Cada secció */
.tbk-spec-section {
    margin-bottom: 30px;
}

/* Títol de secció */
.tbk-spec-titol {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin: 0 0 12px 0;
    border-bottom: 1px solid #CCCCCC;
    line-height: 35px;
}

/* Taula */
.tbk-spec-table {
    width: 100%;
    border-collapse: collapse;

}

.tbk-spec-table,
.tbk-spec-table tr,
.tbk-spec-table td {
    background: transparent !important;
    border: none !important;
}

/* Cel·la de label (esquerra) */
.tbk-spec-label {
    padding: 12px 0px;
    font-size: 14px;
    font-weight: 600;
    color: #71717A;
    width: 25%;
    vertical-align: top;
}

/* Cel·la de valor (dreta) */
.tbk-spec-value {
    padding: 12px 15px;
    font-size: 14px;
    color: #000;
    width: 75%;
}

/* Responsive */
@media (max-width: 768px) {
    .tbk-spec-label {
        width: 40%;
        font-size: 13px;
    }

    .tbk-spec-value {
        width: 60%;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .tbk-spec-table tr {
        display: flex;
        flex-direction: column;
    }

    .tbk-spec-label,
    .tbk-spec-value {
        width: 100%;
        padding: 8px 15px;
    }

    .tbk-spec-label {
        padding-bottom: 4px;
    }

    .tbk-spec-value {
        padding-top: 0;
    }
}

.flex-control-nav.flex-control-thumbs li img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
}

.woocommerce div.product .woocommerce-product-gallery--columns-4 .flex-control-thumbs li:nth-child(4n+1) {
    clear: none !important;
}

/* Comptador d'imatges sobre la imatge principal */
.tbk-image-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    padding: 4px 10px;
    border-radius: 14px;
    z-index: 10;
    pointer-events: none;
    line-height: 1.4;
    letter-spacing: 0.5px;
}

.btns-reservada {
    display: none;
}

/* Fixa l'alçada del contenidor de la imatge principal */
.woocommerce-product-gallery__wrapper {
    height: 415px;
    /* Ajusta aquest valor al que vulguis */
}

.woocommerce-product-gallery__image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.woocommerce-product-gallery__image a {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.woocommerce-product-gallery__image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    /* "contain" per veure la imatge sencera centrada */
    object-position: center;
}