/* =============================================================================
 * Glitch VR Arena — Stili carrello (icona header, pagina cart, checkout)
 * ===========================================================================*/

/* ---- Pulsante carrello in header ----
 * Allineato esattamente al pulsante "Prenota" (.booking-btn): stessa altezza,
 * stesso padding verticale, stesso bordo arrotondato. Versione "pill" rotonda
 * con la sola icona del carrello. */
.header .btn-getstarted.cart-btn,
.header .btn-getstarted.cart-btn:focus {
    position: relative;
    background: var(--brand-color-yellow, #ffd23f);
    color: #1a1a1a;
    /* Stesso padding del booking-btn (10px 20px) ma in versione icona-only */
    padding: 10px 14px;
    margin: 0 8px 0 15px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.header .btn-getstarted.cart-btn:hover {
    background: color-mix(in srgb, var(--brand-color-yellow, #ffd23f), black 10%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    color: #1a1a1a;
}

.header .btn-getstarted.cart-btn i {
    font-size: 18px;
    line-height: 1;
}

.cart-btn .cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--brand-color-red, #e53935);
    color: #fff;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

/* ---- Toast aggiunta carrello ---- */
.cart-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    background: #1a1a1a;
    color: #fff;
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.cart-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.cart-toast i {
    color: var(--brand-color-yellow, #ffd23f);
    margin-right: 0.4rem;
}

/* ---- Pagina /cart ---- */
.cart-page-section {
    min-height: 60vh;
}

.cart-line {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: #fff;
    margin-bottom: 1rem;
}

.cart-line__image {
    width: 96px;
    height: 96px;
    flex: 0 0 96px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(77, 150, 255, 0.15), rgba(77, 150, 255, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-line__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-line__image i {
    font-size: 2rem;
    color: var(--brand-color-blue, #4d96ff);
    opacity: 0.6;
}

.cart-line__info {
    flex: 1;
    min-width: 0;
}

.cart-line__title {
    font-weight: 600;
    color: var(--brand-color-darkblue, #1a3a6c);
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.cart-line__desc {
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.6);
    margin: 0;
}

.cart-line__price {
    text-align: right;
    min-width: 110px;
    font-weight: 600;
    color: var(--brand-color-darkblue, #1a3a6c);
}

.cart-line__price .cart-line__price--orig {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.4);
    text-decoration: line-through;
}

/* ---- Spinner quantità (− [n] +) ---- */
.cart-line__qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.cart-line__qty input {
    width: 44px;
    text-align: center;
    border: none;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.4rem 0;
    font-weight: 600;
    -moz-appearance: textfield;
    appearance: textfield;
    background: transparent;
}

.cart-line__qty input::-webkit-outer-spin-button,
.cart-line__qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-line__qty input:focus {
    outline: none;
    background: rgba(77, 150, 255, 0.08);
}

.cart-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--brand-color-darkblue, #1a3a6c);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cart-qty-btn:hover,
.cart-qty-btn:active {
    background: rgba(77, 150, 255, 0.12);
}

.cart-line__remove {
    background: transparent;
    border: none;
    color: #b22;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.4rem;
}

.cart-line__remove:hover {
    color: #d33;
}

.cart-summary {
    padding: 1.25rem;
    border-radius: 12px;
    background: #f7f9fc;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.cart-summary .row-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.cart-summary .row-line.total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brand-color-darkblue, #1a3a6c);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 0.6rem;
    margin-top: 0.6rem;
}

.cart-summary__disclaimer {
    font-size: 0.78rem;
    color: rgba(0, 0, 0, 0.55);
    text-align: center;
    line-height: 1.4;
}

.cart-summary__disclaimer a {
    color: var(--brand-color-blue, #4d96ff);
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(0, 0, 0, 0.55);
}

.cart-empty i {
    font-size: 4rem;
    color: var(--brand-color-blue, #4d96ff);
    opacity: 0.35;
}

/* ============================================================
 * Mobile: layout più compatto
 * ============================================================ */
@media (max-width: 575.98px) {
    .cart-page-section {
        padding-top: 1.25rem;
        padding-bottom: 1.25rem;
    }

    .cart-line {
        display: grid;
        grid-template-columns: 64px 1fr auto;
        grid-template-areas:
            "img info remove"
            "img qty  price";
        gap: 0.5rem 0.65rem;
        padding: 0.65rem;
        margin-bottom: 0.65rem;
        border-radius: 10px;
    }

    .cart-line__image {
        grid-area: img;
        width: 64px;
        height: 64px;
        flex: 0 0 64px;
        border-radius: 6px;
        align-self: start;
    }
    .cart-line__image i {
        font-size: 1.4rem;
    }

    .cart-line__info {
        grid-area: info;
        align-self: start;
    }
    .cart-line__title {
        font-size: 0.92rem;
        margin-bottom: 0.1rem;
        line-height: 1.25;
    }
    .cart-line__desc {
        font-size: 0.75rem;
    }

    .cart-line__qty {
        grid-area: qty;
        justify-self: start;
        border-radius: 6px;
    }
    .cart-line__qty input {
        width: 36px;
        padding: 0.25rem 0;
        font-size: 0.85rem;
    }
    .cart-qty-btn {
        width: 30px;
        height: 30px;
        font-size: 1.05rem;
    }

    .cart-line__price {
        grid-area: price;
        justify-self: end;
        align-self: end;
        min-width: 0;
        font-size: 0.95rem;
        text-align: right;
    }
    .cart-line__price .cart-line__price--orig {
        font-size: 0.7rem;
    }

    .cart-line__remove {
        grid-area: remove;
        justify-self: end;
        align-self: start;
        padding: 0.15rem 0.25rem;
        font-size: 0.95rem;
    }

    .cart-summary {
        padding: 0.85rem;
        border-radius: 10px;
        font-size: 0.92rem;
    }
    .cart-summary .row-line.total {
        font-size: 1.05rem;
    }

    .cart-empty {
        padding: 2rem 0.75rem;
    }
    .cart-empty i {
        font-size: 3rem;
    }

    /* Pulsante carrello in header più compatto, allineato a booking-btn mobile */
    .header .btn-getstarted.cart-btn {
        padding: 10px 12px;
        margin: 0 4px 0 8px;
    }
    .header .btn-getstarted.cart-btn i {
        font-size: 16px;
    }
    .cart-btn .cart-badge {
        min-width: 16px;
        height: 16px;
        line-height: 16px;
        font-size: 0.62rem;
        top: -4px;
        right: -4px;
        padding: 0 4px;
    }
}

