/* ================================================================
   STRUTTURA DEL CAROSELLO
================================================================ */
.dtec-pvc-carousel {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    --dtec-gap: 20px;
}

.dtec-pvc-carousel * {
    box-sizing: border-box;
}

.dtec-pvc-viewport {
    overflow: hidden;
    width: 100%;
    touch-action: pan-y;
}

.dtec-pvc-viewport:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 3px;
}

.dtec-pvc-track {
    display: flex;
    min-width: 0;
    transition-property: transform;
    transition-timing-function: ease;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.dtec-pvc-slide {
    box-sizing: border-box;
    flex: 0 0 25%;
    padding: 0 calc(var(--dtec-gap) / 2);
}

/* ================================================================
   CARD PRODOTTO
================================================================ */
.dtec-pvc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    height: 100%;
    padding: 14px;
    border: 1px solid #e7e7e7;
    border-radius: 14px;
    background: #fff;
}

.dtec-pvc-image {
    display: block;
    overflow: hidden;
    margin-bottom: 4px;
    border-radius: 10px;
    background: #fff;
    aspect-ratio: 1 / 1;
}

.dtec-pvc-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dtec-pvc-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.dtec-pvc-title {
    margin: 0;
    color: #064a92;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.18;
}

.dtec-pvc-title a {
    color: inherit;
    text-decoration: none;
}

.dtec-pvc-title a:hover {
    color: #064a92;
    text-decoration: none;
}

.dtec-pvc-variant-label {
    margin: 0;
    color: #8a8a8a;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
}

/* ================================================================
   PREZZI E BADGE SCONTO
================================================================ */
.dtec-pvc-price {
    margin: 6px 0;
    color: #e30613;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.dtec-pvc-price .amount,
.dtec-pvc-price ins,
.dtec-pvc-price ins .amount {
    color: #e30613 !important;
    font-weight: 800;
    text-decoration: none;
}

.dtec-pvc-price del {
    margin-right: 6px;
    color: #777 !important;
    font-size: 0.78em;
    font-weight: 600;
    text-decoration: line-through;
}

.dtec-pvc-price del .amount {
    color: #777 !important;
}

.dtec-pvc-sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 7px;
    border-radius: 25px;
    background: #eb690c;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

/* ================================================================
   QUANTITA E PULSANTE ACQUISTO
================================================================ */
.dtec-pvc-cart-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin: auto 0 0 !important;
    padding: 0 !important;
}

.dtec-pvc-qty {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 150px !important;
    gap: 8px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.dtec-pvc-qty button.dtec-pvc-minus,
.dtec-pvc-qty button.dtec-pvc-plus {
    all: unset !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #0073aa !important;
    box-shadow: none !important;
    color: #fff !important;
    cursor: pointer !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
}

.dtec-pvc-qty button.dtec-pvc-minus::before,
.dtec-pvc-qty button.dtec-pvc-minus::after,
.dtec-pvc-qty button.dtec-pvc-plus::before,
.dtec-pvc-qty button.dtec-pvc-plus::after {
    display: none !important;
    content: none !important;
}

.dtec-pvc-qty input.dtec-pvc-qty-input {
    display: block !important;
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    font: inherit !important;
    text-align: center !important;
    appearance: textfield !important;
    -moz-appearance: textfield !important;
}

.dtec-pvc-qty input.dtec-pvc-qty-input::-webkit-outer-spin-button,
.dtec-pvc-qty input.dtec-pvc-qty-input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.dtec-pvc-add-to-cart {
    width: 100% !important;
    padding: 10px 20px !important;
    cursor: pointer;
    text-align: center !important;
}

.dtec-pvc-add-to-cart.loading {
    opacity: 0.7;
    pointer-events: none;
}

.dtec-pvc-add-to-cart[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.dtec-pvc-card .added_to_cart {
    display: none !important;
}

/* ================================================================
   FRECCE DEL CAROSELLO
================================================================ */
.dtec-pvc-arrow {
    all: unset !important;
    position: absolute !important;
    top: 42% !important;
    z-index: 5 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: translateY(-50%) !important;
    border: 1px solid #ddd !important;
    border-radius: 50% !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
    color: #222 !important;
    cursor: pointer !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 30px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
}

.dtec-pvc-arrow span {
    display: block !important;
    transform: translateY(-1px);
    line-height: 1 !important;
}

.dtec-pvc-arrow[disabled],
.dtec-pvc-arrow[aria-hidden="true"] {
    visibility: hidden !important;
    pointer-events: none !important;
}

.dtec-pvc-arrow::before,
.dtec-pvc-arrow::after {
    display: none !important;
    content: none !important;
}

.dtec-pvc-prev {
    left: -14px !important;
}

.dtec-pvc-next {
    right: -14px !important;
}

.dtec-pvc-empty {
    padding: 14px;
    border: 1px dashed #ccc;
    background: #fafafa;
}

/* ================================================================
   TABLET
================================================================ */
@media (max-width: 1024px) {
    .dtec-pvc-slide {
        flex-basis: 50%;
    }

    .dtec-pvc-prev {
        left: 0 !important;
    }

    .dtec-pvc-next {
        right: 0 !important;
    }
}

/* ================================================================
   MOBILE
================================================================ */
@media (max-width: 767px) {
    .dtec-pvc-slide {
        flex-basis: 100%;
        padding: 0 6px;
    }

    .dtec-pvc-card {
        padding: 12px;
    }

    .dtec-pvc-arrow {
        width: 24px !important;
        min-width: 24px !important;
        height: 24px !important;
        min-height: 24px !important;
        font-size: 16px !important;
    }

    .dtec-pvc-title {
        font-size: 16px;
    }

    .dtec-pvc-variant-label {
        font-size: 13px;
    }

    /* Riduce entrambi i prezzi; il barrato resta a 0.78em. */
    .dtec-pvc-price {
        font-size: 20px;
    }
}

/* ================================================================
   DESKTOP: CARD ORIZZONTALE
================================================================ */
@media (min-width: 1025px) {
    .dtec-pvc-slide {
        display: flex;
        padding-bottom: 2px;
    }

    .dtec-pvc-card {
        display: grid;
        grid-template-columns: minmax(180px, 42%) minmax(0, 1fr);
        align-items: start;
        width: 100%;
        height: auto;
        padding: 12px;
        column-gap: 5px;
    }

    .dtec-pvc-image {
        grid-column: 1;
        align-self: start;
        width: 100%;
        min-height: 0;
        margin: 0;
        aspect-ratio: 1 / 1;
    }

    .dtec-pvc-content {
        display: grid;
        grid-column: 2;
        grid-template-rows: 62px 22px 34px 1fr;
        align-self: stretch;
        gap: 4px;
        min-width: 0;
    }

    .dtec-pvc-title {
        display: -webkit-box;
        overflow: hidden;
        max-height: 62px;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }

    .dtec-pvc-variant-label {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .dtec-pvc-price {
        display: flex;
        flex-wrap: nowrap;
        align-items: baseline;
        gap: 4px 7px;
        overflow: hidden;
        margin: 0;
        white-space: nowrap;
    }

    .dtec-pvc-price del {
        margin-right: 0;
    }

    .dtec-pvc-cart-form {
        align-self: end;
        width: 100%;
        margin: 4px 0 0 !important;
    }

    .dtec-pvc-sale-badge {
        right: auto;
        left: 10px;
    }
}
