/* ==========================================================================
   CART - Cart items, quantity controls, cart actions
   ========================================================================== */

/* Cart Item */
.cart-item {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
}
.cart-item-container {
    padding: 1.3rem 1.6rem;
    border-bottom: 1px solid #2b2b2b;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.cart-item-image {
    width: 5rem;
    height: 5rem;
    object-fit: contain;
    border-radius: 0.5rem;
    margin-right: 1.5rem;
    margin: auto 1.5rem auto 0;
}

.cart-item-info {
    flex: 1;
    margin-right: 1.5rem;
}

.cart-item-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.cart-item-details {
    font-size: 0.875rem;
    color: #999999aa;

}

.info-icon {
    margin-left: 0.5rem;
    color: #cc0000;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease;
    transform: translateY(-1px);
}

    .info-icon:hover {
        color: #ff3333;
        transform: translateY(-4px);
    }
.info-icon img{
    height:1em;
}

/* Cart Item Right Section */
.cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    min-height: 5rem;
}

.cart-item-price-container {
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom:0.2rem;
}
    .cart-item-price-container > div{
        display:flex;
        gap:0.5rem;
    }
    .without-vat, .vat {
        font-weight: 200;
        color: #CCC;
        font-size: 0.85rem;
    }
.without-vat{
    letter-spacing:0.09rem;
}
.without-vat .cart-item-original-price{
    letter-spacing:0.005rem;
}
.vat {
    margin-right: 0.2rem;
    text-wrap:nowrap;
}

.cart-item-original-price {
    font-weight: 400;
    font-size: 0.8rem;
    color: gray;
    text-decoration: line-through;
    text-wrap:nowrap;
    margin-right: 0.2rem;
    text-align: start;
    margin-bottom: auto;
}

/* Cart Item Actions */
.cart-item-actions {
    display: flex;
    align-items: center;
    margin-top:0.5rem;
    gap: 0.8rem;
}

/* Quantity Input */
.cart-item-quantity {
    padding: 0.25rem 0.8rem;
    border: 1px solid #808080;
    height: 2.3rem;
    width: 4rem;
    text-align: center;
    border-radius: 0.5rem;
    background: #1a1a1a;
}

/* Chrome / Edge / Safari */
.cart-item-quantity::-webkit-inner-spin-button,
.cart-item-quantity::-webkit-outer-spin-button {
    opacity: 1;
    margin: 0;
    position: relative;
    right: 0;
    color: #aaa;
    filter: invert(60%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(90%);
}

/* Firefox */
.cart-item-quantity[type="number"] {
    -moz-appearance: textfield;
}

.cart-item-quantity[type="number"]::-moz-number-spin-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #aaa;
}

.cart-item-quantity[type="number"]::-moz-number-spin-up,
.cart-item-quantity[type="number"]::-moz-number-spin-down {
    color: #aaa;
}

.cart-item-quantity:focus {
    outline: none;
    border-color: #e74c3c;
}

/* Cart Item Button */
.cart-item-button {
    background: #1a1a1a;
    border: solid 1px #808080;
    border-radius: 0.5rem;
    color: #e74c3c;
    font-size: 1rem;
    height: 2.3rem;
    aspect-ratio: 1;
    cursor: pointer;
    transition: color 0.2s ease;
}

.cart-item-button:hover {
    color: #c0392b;
}

/* Cart Item Extra Fields */
.cart-item-extra {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
    min-width: 200px;
}

.extra-field {
    display: flex;
    flex-direction: row;
    width: 100%;
}

.extra-field label {
    font-size: 0.85rem;
    margin: auto 1rem auto 0;
    color: #ccc;
}

.extra-field input {
    background: none;
    border: none;
    border-bottom: 1px solid #555;
    color: #eee;
    padding: 0.35rem 0;
    width: 150px;
    transition: border-color 0.2s ease;
}

.extra-field input:focus {
    outline: none;
    border-bottom-color: #e74c3c;
}

.extra-field input::placeholder {
    color: #666;
}
/* VEHICLE LIST UNDER CART ITEM */
.vehicle-details {
    display: flex;
    flex-direction: row;
    flex: 0 1 auto;
    font-size:0.8rem;
    margin-left:0.5em;
}
    .vehicle-details input {
        font-size: 0.8rem;
        flex: 0 1 auto;
        margin: 0 1em;
    }
.vehicle-list {
    list-style: none;
    margin: 0.8rem 0 0 2.4rem; /* slight indent */
    padding: 0;
    position: relative;
}

/* Draw connecting vertical line only between items */
.vehicle-list-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.6em 0 0.6em 1.5em;
}

    .vehicle-list-item::before {
        content: "";
        position: absolute;
        left: -6px;
        width: 10px;
        height: 10px;
        background-color: #555;
        border-radius: 50%;
        border: 2px solid #1a1a1a; /* contrast ring */
        top: 43%;
        z-index: 1;
    }

    /* vertical line that connects bullets */
    .vehicle-list-item::after {
        content: "";
        position: absolute;
        left: -2px;
        top: calc(43% + 12px); /* start just below the bullet */
        bottom: -1.4em; /* stops before next bullet */
        width: 2px;
        background-color: #3a3a3a;
    }

    /* remove line for the last bullet */
    .vehicle-list-item:last-child::after {
        display: none;
    }
.vehicle-icon img{
    height:1.5rem;
    aspect-ratio:1;
}


/* Mobile Responsive */
@media (max-width: 768px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }

    .cart-item-image {
        width: 100%;
        height: 8rem;

        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .cart-item-info {
        width: 100%;
        margin-right: 0rem;
    }

    .cart-item-right {
        width: 100%;
        flex-direction: row;
        flex-wrap:wrap;
        height: auto;
        justify-content: end;
        align-items: center;
    }
    

    .cart-item-price-container {
        order: 1;
        margin-right:0.5rem;
    }

    .cart-item-actions {
        order: 2;
        margin-left: auto;
        margin-right: 0.5rem;
    }

    .cart-item-extra {
        width: 100%;
        min-width: 0;
        align-items: stretch;
        gap: 0.75rem;
    }

    .extra-field {
        flex-direction: column;
        gap: 0.25rem;
    }

    .extra-field label {
        margin: 0;
        font-size: 0.8rem;
    }

    .extra-field input {
        width: 100%;
    }
    .vehicle-details {
        display: flex;
        flex-wrap: wrap;
        flex: 1 1 0;
        min-width: 0;
    }

        .vehicle-details input {
            min-width: 2rem;
            flex: 1 1 0;
        }
}

@media (max-width: 480px) {
    .cart-item-quantity {
        width: 3.5rem;
        font-size: 0.9rem;
    }

    .cart-item-button {
        font-size: 0.9rem;
        height: 2rem;
    }
}