/*
 * Carrello, checkout, pagamento e successo (views/carrello/new/), profilo e registrazione (views/login-new/).
 * Righe del carrello: su desktop tabella, su mobile (< 768px) ogni riga diventa una scheda compatta.
 */

.btn.btn-orange {
    background-color: #FF8400 !important;
    border: none;
    font-size: 16px;
    text-indent: 0;
}

/* Il modale Products (header) deve stare sopra l'header fisso */
.modal-backdrop { z-index: 1040 !important; }
.modal, .modal-dialog, .modal-content { z-index: 1050 !important; }
.modal, .modal * { pointer-events: auto !important; }
.modal-open .header {
    z-index: 1030 !important;
}

/* ---------- Tabella ---------- */
.cart-table {
    width: 100% !important; /* style.css forza width: auto sulle tabelle */
    margin-bottom: 0;
    border-collapse: collapse;
}
/* il tema dà alle celle un bordo sinistro: lo azzero, le righe hanno solo il filo in basso */
.cart-table th,
.cart-table td {
    border: 0 !important;
    vertical-align: middle;
}
.cart-table thead {
    background-color: #0deaf1;
}
.cart-table th {
    padding: 8px 12px;
    color: #000;
    font-size: 16px;
    font-weight: 700;
    text-transform: none;
    white-space: nowrap;
}
.cart-table .cart-line td {
    padding: 16px 12px;
    font-size: 14px;
    border-bottom: 1px solid #333 !important;
}

.cart-line__remove {
    width: 56px;
    text-align: center;
}
.cart-line__remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: #fff;
    background-color: red;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color .15s ease;
}
.cart-line__remove-btn:hover {
    background-color: #d00000;
}
.cart-line__remove-btn:focus-visible {
    outline: 2px solid #0deaf1;
    outline-offset: 2px;
}

.cart-line__image {
    width: 104px;
}
.cart-line__image img {
    display: block;
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
}

.cart-line__name {
    display: inline-block;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}
.cart-line__options {
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.5;
}
.cart-line__options li {
    display: flex;
    flex-wrap: wrap;
    gap: 0 8px;
}
/* sovrapprezzo delle opzioni (accanto al nome e sotto il prezzo unitario): etichetta azzurra come nelle opzioni
   della scheda prodotto (product-options.css), verde se è uno sconto */
.cart-surcharge {
    display: inline-block;
    padding: 1px 8px;
    color: #000;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
    background: #0deaf1;
    border-radius: 999px;
}
.cart-surcharge.is-minus {
    background: #3ddc84;
}
.cart-line__badge {
    margin-top: 6px;
}

.cart-line__unit,
.cart-line__qty,
.cart-line__total {
    text-align: center;
}
.cart-line__price {
    margin: 0;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}
.cart-line__unit-options {
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}
.cart-line__unit-options li + li {
    margin-top: 4px;
}
.cart-line__qty .qtyField {
    margin: 0 auto;
}
/* checkout: la quantità è solo testo, in evidenza come i prezzi; l'etichetta "Qty" serve solo su mobile
   (su desktop c'è l'intestazione) */
.cart-line__qty-value {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}
.cart-line__qty-label {
    display: none;
}

/* ---------- Riquadro del checkout (spedizione, pagamento, totale) ---------- */
.checkout-summary__country {
    color: #0deaf1;
}
.checkout-summary__country:hover,
.checkout-summary__country:focus-visible {
    color: #fff;
    text-decoration: underline;
}
.checkout-summary table {
    width: 100% !important; /* style.css forza width: auto sulle tabelle */
    margin-bottom: 0;
}
.checkout-summary td {
    padding: 8px 0;
    vertical-align: middle;
}
/* radio da 22px (forms.css) più gli 8px di .input-with-right-space */
.checkout-summary__radio {
    width: 34px;
}
.checkout-summary__label {
    line-height: 1.2;
}
/* tutti i prezzi a filo del bordo destro, su una sola riga */
.checkout-summary__price {
    width: 1%;
    padding-left: 12px !important;
    text-align: right;
    white-space: nowrap;
}
/* il tema rende le label blocchi allineati a sinistra: i prezzi più corti finirebbero prima del bordo */
.checkout-summary__price label {
    text-align: right;
}

.cart-table tfoot td {
    padding: 16px 12px;
    text-align: right;
}
.cart-summary__total {
    margin: 0;
    color: #0deaf1;
    font-size: 20px;
    font-weight: 700;
}
.cart-summary__total small {
    font-size: inherit;
    font-weight: 600;
}

.cart-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px 30px;
    margin: 24px 0;
}
.cart-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    margin: 0 !important;
}
.cart-minimum-message {
    display: block;
    margin: 16px 0;
    color: red;
    font-size: 18px;
    text-align: center;
}

/* ---------- Carrello vuoto (carrello.twig) ---------- */
.cart-empty {
    max-width: 560px;
    margin: -16px auto 64px; /* il disegno ha margine interno: così resta a 16px dal titolo della pagina */
    text-align: center;
}
.cart-empty__art {
    display: block;
    width: 220px;
    height: 220px;
    margin: 0 auto 16px;
    overflow: visible;
}
.cart-empty__crank {
    transform-origin: 120px 120px;
    animation: cart-empty-spin 14s linear 1.2s infinite;
}
.cart-empty__teeth {
    fill: none;
    stroke: url(#cart-empty-anodized);
    stroke-width: 10;
    stroke-dasharray: 5 5;
    opacity: 0;
    animation: cart-empty-fade .5s ease .9s forwards;
}
.cart-empty__ring {
    fill: none;
    stroke: url(#cart-empty-anodized);
    stroke-width: 9;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: cart-empty-draw 1s ease-out .1s forwards;
}
.cart-empty__spoke {
    fill: none;
    stroke: url(#cart-empty-anodized);
    stroke-width: 7;
    stroke-linecap: round;
}
.cart-empty__bolt {
    fill: #1a1a1a;
    stroke: #444;
    stroke-width: 2;
}
.cart-empty__arm {
    stroke: url(#cart-empty-anodized);
    stroke-width: 22;
    stroke-linecap: round;
}
.cart-empty__axle,
.cart-empty__pedal-eye {
    fill: #000;
    stroke: #444;
    stroke-width: 3;
}
.cart-empty__title {
    margin: 0 0 8px;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
}
.cart-empty__text {
    margin: 0 auto 28px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    line-height: 1.5;
}
.btn.btn-orange.cart-empty__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 44px; /* come i bottoni di .cart-actions */
    box-shadow: 0 8px 24px rgba(255, 132, 0, 0.35);
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn.btn-orange.cart-empty__cta:hover,
.btn.btn-orange.cart-empty__cta:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 132, 0, 0.5);
}
.cart-empty__cta i {
    transition: transform .15s ease;
}
.cart-empty__cta:hover i {
    transform: translateX(4px);
}
.cart-empty__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
    margin-top: 24px;
}
.cart-empty__links a {
    color: #0deaf1;
    font-size: 15px;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.cart-empty__links a:hover {
    color: #fff;
}
/* a fine disegno il tratteggio si toglie, altrimenti resta visibile la giunta fra inizio e fine del trattino */
@keyframes cart-empty-draw {
    99% { stroke-dashoffset: 0; stroke-dasharray: 100; }
    to { stroke-dashoffset: 0; stroke-dasharray: none; }
}
@keyframes cart-empty-fade { to { opacity: 1; } }
@keyframes cart-empty-spin { to { transform: rotate(360deg); } }
@media (max-width: 767px) {
    .cart-empty__art {
        width: 170px;
        height: 170px;
    }
    .cart-empty__title {
        font-size: 24px;
    }
    .btn.btn-orange.cart-empty__cta {
        width: 100%;
        height: 50px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .cart-empty__crank,
    .cart-empty__teeth,
    .cart-empty__ring {
        animation: none;
        opacity: 1;
        stroke-dasharray: none;
    }
}

/* ---------- Checkout, step 2: indirizzi e note ---------- */
/* titoli dei riquadri nello stesso arancione del bordo */
.order-form .create-ac-content h2 {
    margin-bottom: 16px !important;
    color: #FF8400;
}
/* label come nel form contatti; campi compatti per non allungare la pagina */
.order-form .form-group {
    margin-bottom: 14px;
}
.order-form .form-group label {
    display: block;
    margin-bottom: 6px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}
.order-form .required-f {
    margin-left: 2px;
    color: red;
}
.order-form__hint {
    margin-left: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 400;
}
/* 16px evita lo zoom automatico di iOS al focus */
.order-form .form-group input:not([type="checkbox"]):not([type="radio"]),
.order-form .form-group select,
.order-form textarea {
    display: block;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 6px 12px;
    color: #111;
    font-size: 16px;
    line-height: 1.4;
    background-color: #fff;
    border: 1px solid #fff;
    border-radius: 6px;
}
/* i select del tema hanno bordo arancione, testo bianco e una freccia bianca: li allineo agli altri campi */
.order-form .form-group select {
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='2'/%3E%3C/svg%3E") !important;
    background-position: right 12px center !important;
    background-repeat: no-repeat !important;
}
.order-form textarea {
    height: auto;
    min-height: 88px;
    resize: vertical;
}
.order-form .form-group input:focus,
.order-form .form-group select:focus,
.order-form textarea:focus {
    outline: none;
    border-color: #0deaf1;
    box-shadow: 0 0 0 3px rgba(13, 234, 241, 0.35);
}
.order-form__country {
    cursor: pointer;
}
.order-form .create-ac-content h2 label {
    margin: 0;
    font: inherit;
    color: inherit;
}

.order-form__submit {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px 32px;
    margin: 24px 0 48px;
}
/* accettazione delle condizioni: riquadro ben visibile (rosso finché non è spuntata, poi azzurro); tutta la scritta
   spunta la casella */
.order-form__terms {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 12px 18px;
    color: #fff;
    font-size: 17px !important; /* il CSS remoto del tema forza 14px sulle label */
    font-weight: 600;
    border: 2px solid #e00000;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
    user-select: none;
}
.order-form__terms:hover {
    background: rgba(224, 0, 0, 0.1);
}
.order-form__terms:has(input:checked) {
    border-color: #0deaf1;
    background: rgba(13, 234, 241, 0.08);
}
.order-form__terms input {
    flex: none;
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: #0deaf1;
    cursor: pointer;
}
.order-form__terms a {
    color: #0deaf1;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Finestra "Terms and conditions" (checkout step 2) ---------- */
.terms-dialog {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    color: #fff;
    background: #000;
    border: 0;
}
.terms-dialog[open] {
    display: flex;
    flex-direction: column;
}
.terms-dialog::backdrop {
    background: rgba(0, 0, 0, 0.8);
}
.terms-dialog__head,
.terms-dialog__foot {
    display: flex;
    flex: none;
    align-items: center;
    gap: 12px;
    padding: 14px max(16px, calc((100vw - 900px) / 2));
    background: #111;
}
.terms-dialog__head {
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.terms-dialog__title {
    margin: 0;
    color: #ff0000;
    font-size: 24px;
    font-weight: 700;
}
.terms-dialog__close {
    flex: none;
    width: 40px;
    height: 40px;
    padding: 0;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    background: #e00000;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.terms-dialog__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 28px max(16px, calc((100vw - 900px) / 2));
}
.terms-dialog__loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
}
.terms-dialog__loading a {
    color: #0deaf1;
}
.terms-dialog__spinner {
    flex: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #0deaf1;
    border-radius: 50%;
    animation: terms-spin .8s linear infinite;
}
@keyframes terms-spin {
    to { transform: rotate(360deg); }
}
.terms-dialog__foot {
    justify-content: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.terms-dialog__foot .btn {
    height: 44px;
    margin: 0;
    padding: 0 24px;
}
.order-form__submit .btn {
    height: 44px;
    margin: 0;
}

/* ---------- Registrazione (create-account) ---------- */
.register-form__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 16px;
    margin-bottom: 16px;
}
.order-form .register-form__copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.register-form__copy input {
    width: 18px;
    height: 18px;
    margin: 0;
}
.order-form [hidden] {
    display: none !important;
}

/* ---------- Riepilogo ordine (pagamento e successo) ---------- */
.order-section-title {
    margin: 40px 0 16px;
    color: #0deaf1;
    font-size: 22px;
    font-weight: 700;
    text-transform: none;
}

/* indirizzi e note: stesso riquadro arancione del checkout, tre colonne separate da un filo */
.order-review {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 24px;
    padding: 20px 0;
    border: 2px solid #FF8400;
}
.order-review__col {
    padding: 0 20px;
}
.order-review__col + .order-review__col {
    border-left: 1px solid #333;
}
.order-review__title {
    margin: 0 0 10px;
    color: #FF8400;
    font-size: 18px;
    font-weight: 700;
    text-transform: none;
}
.order-review__text {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
/* note: colonna in evidenza (riquadro azzurro); vuote, l'invito a tornare indietro per aggiungerle */
.order-review__col--notes {
    margin: -8px 12px -8px 0;
    padding-top: 8px;
    padding-bottom: 8px;
    background: rgba(13, 234, 241, 0.08);
    border: 2px solid #0deaf1 !important;
    border-radius: 8px;
}
.order-review__col--notes .order-review__title {
    color: #0deaf1;
}
.order-review__col--notes .order-review__text {
    color: #fff;
}
.order-review__col--notes.is-empty .order-review__text {
    font-style: italic;
}

/* totali: etichetta e importo sulla stessa riga, importi a filo del bordo destro */
/* totali (_order_totals.twig e Parts Total nel checkout): righe del piede della tabella, etichetta a destra sulle
   prime quattro colonne e importo nella colonna Total, centrato come i totali delle righe */
.cart-table .order-totals__row th,
.cart-table .order-totals__row td {
    padding: 6px 12px;
    border: 0 !important;
}
.cart-table .order-totals__row th {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    font-weight: 400;
    text-align: right;
    text-transform: none;
}
.cart-table .order-totals__row td {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}
.cart-table tfoot .order-totals__row:first-child th,
.cart-table tfoot .order-totals__row:first-child td {
    padding-top: 16px;
}
.order-totals__note {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}
.cart-table .order-totals__row--grand th,
.cart-table .order-totals__row--grand td {
    padding-top: 12px;
    color: #0deaf1;
    font-size: 20px;
    font-weight: 700;
}
/* filo sopra il totale finale, sotto spedizione e pagamento (nel checkout Parts Total è da solo: niente filo) */
.cart-table .order-totals__row--grand:not(:first-child) th,
.cart-table .order-totals__row--grand:not(:first-child) td {
    border-top: 1px solid #333 !important;
}

.order-note {
    max-width: 460px;
    margin: 20px auto 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.order-actions,
.order-success__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
}
.order-actions {
    margin: 28px 0 48px;
}
.order-actions .btn,
.order-success__actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 46px;
    margin: 0;
    padding: 0 24px;
}
/* step 1: totale in evidenza, azzurro come "Parts Total" */
.checkout-summary__grand {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px 12px;
    margin: 0;
    padding: 14px 0 12px;
    color: #0deaf1;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.checkout-summary__grand .money {
    font-size: 26px;
    font-weight: 700;
}
/* step 1: Continue e Back to cart, uno sotto l'altro a tutta larghezza */
.checkout-summary__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}
.checkout-summary__actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 46px;
    margin: 0;
}
/* step 2: Back e Order summary affiancati sotto i termini */
.order-form__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
}
.order-form__buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 24px;
}
/* azione secondaria: bordata, non in competizione con quella principale */
.btn.order-actions__back {
    color: #fff !important;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
}
.btn.order-actions__back:hover {
    border-color: #fff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

/* ---------- Pagina di successo ---------- */
.order-success {
    max-width: 760px;
    margin: 40px auto 0;
    padding: 40px 32px 32px;
    text-align: center;
    background: radial-gradient(120% 80% at 50% 0%, rgba(13, 234, 241, 0.12) 0%, rgba(13, 234, 241, 0) 60%), linear-gradient(180deg, #151515 0%, #0b0b0b 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.order-success__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin-bottom: 16px;
    color: #0deaf1;
    border: 2px solid #0deaf1;
    border-radius: 50%;
    box-shadow: 0 0 0 8px rgba(13, 234, 241, 0.1), 0 0 40px rgba(13, 234, 241, 0.35);
    animation: order-success-pop .5s ease-out both;
}
.order-success__icon path {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: order-success-check .45s .35s ease-out forwards;
}
.order-success__eyebrow {
    display: block;
    color: #0deaf1;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.order-success__title {
    margin: 8px 0 12px;
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: none;
}
.order-success__lead {
    max-width: 560px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.75);
    font-size: 16px;
    line-height: 1.55;
}
.order-success__lead b {
    color: #fff;
}

.order-success__facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 28px 0 0;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    overflow: hidden;
}
.order-success__facts > div {
    padding: 14px 16px;
}
.order-success__facts > div + div {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.order-success__facts dt {
    margin: 0 0 4px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.order-success__facts dd {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}
.order-success__facts dd a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.order-success__facts dd a:hover {
    color: #0deaf1;
}
.order-success__total {
    color: #0deaf1 !important;
}

.order-success__next {
    margin: 20px 0 0;
    padding: 14px 18px;
    text-align: left;
    background: rgba(255, 132, 0, 0.08);
    border: 1px solid rgba(255, 132, 0, 0.45);
    border-radius: 12px;
}
.order-success__next-label {
    display: block;
    margin-bottom: 4px;
    color: #FF8400;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.order-success__next p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    line-height: 1.5;
}
.order-success__actions {
    margin-top: 28px;
}

@keyframes order-success-pop {
    from { opacity: 0; transform: scale(.6); }
    to { opacity: 1; transform: none; }
}
@keyframes order-success-check {
    to { stroke-dashoffset: 0; }
}

/* lista ordini del cliente */
.orders-table {
    width: 100% !important; /* style.css forza width: auto sulle tabelle */
    margin-bottom: 48px;
    border-collapse: collapse;
}
.orders-table th,
.orders-table td {
    border: 0 !important; /* il tema dà alle celle bordi laterali */
}
.orders-table th {
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: transparent !important;
    border-bottom: 1px solid #333 !important;
}
.orders-table td {
    padding: 12px;
    color: #fff;
    font-size: 14px;
    border-bottom: 1px solid #222 !important;
}
/* l'ordine appena fatto */
.orders-table tr.is-current {
    background: rgba(13, 234, 241, 0.06);
}
.orders-table__action {
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .order-review {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }
    .order-review__col {
        padding: 16px 0;
    }
    .order-review__col + .order-review__col {
        border-left: 0;
        border-top: 1px solid #333;
    }
    .order-review__col--notes {
        margin: 0 0 16px;
        padding: 14px 16px;
    }
    /* riepilogo: "Confirm" sopra "Back"; successo: "Continue shopping" resta per primo */
    .order-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .order-success__actions {
        flex-direction: column;
        align-items: stretch;
    }
    .order-actions .btn,
    .order-success__actions .btn {
        width: 100%;
        height: 50px;
    }

    .order-success {
        margin-top: 16px;
        padding: 28px 18px 22px;
    }
    .order-success__title {
        font-size: 26px;
    }
    .order-success__facts {
        grid-template-columns: 1fr 1fr;
    }
    .order-success__facts > div:nth-child(3) {
        border-left: 0;
    }
    .order-success__facts > div:nth-child(n + 3) {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* lista ordini: una scheda per ordine (come le righe del carrello), con le etichette accanto ai valori */
    .orders-table thead {
        display: none;
    }
    .orders-table,
    .orders-table tbody,
    .orders-table tr {
        display: block;
    }
    .orders-table tr {
        margin: 0 0 14px;
        padding: 10px 14px;
        background: #050505;
        border: 2px solid #333;
        border-radius: 12px;
    }
    /* l'ordine appena fatto: bordo azzurro al posto del fondo colorato */
    .orders-table tr.is-current {
        background: #050505;
        border-color: #0deaf1;
    }
    .orders-table td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        padding: 6px 0;
        border-bottom: 0 !important;
    }
    .orders-table td + td {
        border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
    }
    .orders-table td[data-label]::before {
        content: attr(data-label);
        color: rgba(255, 255, 255, 0.55);
    }
}

@media (prefers-reduced-motion: reduce) {
    .order-success__icon,
    .order-success__icon path {
        animation: none;
        stroke-dashoffset: 0;
    }
}

/* ---------- Profilo ---------- */
.profile-account {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 40px;
    margin: 0 auto 28px;
    padding: 14px 24px;
    max-width: 720px;
    background: linear-gradient(180deg, #151515 0%, #0b0b0b 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
}
.profile-account__item {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.profile-account__label {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.profile-account__value {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}
.profile-account__password summary {
    display: flex;
    align-items: baseline;
    gap: 10px;
    list-style: none;
    cursor: pointer;
}
.profile-account__password summary::-webkit-details-marker {
    display: none;
}
.profile-account__toggle {
    color: #0deaf1;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.profile-account__password[open] .profile-account__mask {
    display: none;
}
.profile-account__password[open] .profile-account__toggle::after {
    content: " (hide)";
}
.profile-account__password[open] > .profile-account__value {
    margin-left: 6px;
}
.profile-account__password[open] summary {
    display: inline-flex;
}

.profile__submit {
    margin-top: 6px;
    text-align: center;
}
.profile__submit .btn {
    height: 44px;
    padding: 0 32px;
}
.profile__empty {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
}

.profile-addresses {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.profile-address {
    position: relative;
    padding: 14px 44px 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
}
.profile-address__text {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.profile-address__remove {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.profile-address__remove:hover,
.profile-address__remove:focus-visible {
    color: #fff;
    background: red;
    outline: none;
}

.orders-table__action a,
.orders-table__cancel {
    margin-left: 14px;
    font-size: 14px;
}
.orders-table__action a {
    color: #0deaf1;
}
.orders-table__cancel {
    padding: 0;
    color: #ff4d4d;
    background: none;
    border: 0;
    cursor: pointer;
}
.orders-table__cancel:hover {
    text-decoration: underline;
}
/* le conferme stanno dentro celle con white-space: nowrap: il loro testo deve poter andare a capo */
.orders-table .confirm-dialog,
.profile-address .confirm-dialog {
    white-space: normal;
}

@media (max-width: 767px) {
    .profile-account {
        flex-direction: column;
        align-items: flex-start;
    }
    .profile-addresses {
        grid-template-columns: 1fr;
    }
    .orders-table__action {
        justify-content: flex-end !important;
        gap: 14px;
    }
    .orders-table__action a,
    .orders-table__cancel {
        margin-left: 0;
    }
}

/* ---------- You may like (schede di products.css) ---------- */
.cart-related {
    margin-top: 48px;
}
/* titoletto e switch delle viste sulla stessa riga rossa, allineati in basso; lo switch qualche pixel sopra la linea
   (come i prodotti collegati nei Tech Tips) */
.cart-related__head {
    align-items: flex-end;
}
.cart-related__head h2 {
    margin: 0;
    color: #ff0000;
    font-size: 20px;
    font-weight: 600;
    line-height: 24px;
}
.cart-related__head .products-view {
    margin-bottom: 6px;
}

/* ---------- Mobile: righe come schede ---------- */
@media (max-width: 767px) {
    .cart-table thead {
        display: none;
    }
    .cart-table,
    .cart-table tbody,
    .cart-table tfoot,
    .cart-table tr {
        display: block;
    }
    /* foto e nome in alto (la × nell'angolo in alto a destra), sotto le opzioni a tutta larghezza, poi quantità e
       totale. La cella info "si scioglie" (display: contents) così nome e opzioni vanno ognuno nella sua area */
    .cart-table .cart-line {
        position: relative;
        display: grid;
        grid-template-columns: 80px 1fr auto;
        grid-template-areas:
            "image   name    name"
            "options options options"
            "qty     qty     total";
        align-items: center;
        gap: 14px;
        margin: 0 0 14px;
        padding: 14px;
        background: #050505;
        border: 2px solid #333;
        border-radius: 12px;
    }
    .cart-table .cart-line td {
        display: block;
        width: auto;
        padding: 0;
        border: 0 !important;
    }
    .cart-line__image { grid-area: image; align-self: start; }
    .cart-table .cart-line .cart-line__info { display: contents; }
    .cart-line__name { grid-area: name; align-self: center; padding-right: 44px; }
    .cart-line__badge { grid-column: 1 / -1; }
    .cart-line__remove { position: absolute; top: 14px; right: 14px; }
    .cart-line__qty { grid-area: qty; text-align: left; }
    .cart-line__total { grid-area: total; text-align: right; }
    .cart-line__unit { display: none !important; }

    .cart-line__remove-btn {
        width: 32px;
        height: 32px;
    }
    .cart-line__qty .qtyField {
        margin: 0;
    }
    /* checkout: quantità in una pillola "QTY 2", leggibile accanto al totale */
    .cart-line__qty-value {
        display: inline-flex;
        align-items: baseline;
        gap: 6px;
        padding: 4px 12px;
        font-size: 16px;
        line-height: 1.4;
        background: #1a1a1a;
        border: 1px solid #444;
        border-radius: 999px;
    }
    .cart-line__qty-label {
        display: inline;
        color: rgba(255, 255, 255, 0.7);
        font-size: 12px;
        letter-spacing: .06em;
        text-transform: uppercase;
    }
    /* checkout: niente × da scansare */
    .checkout-table .cart-line__name {
        padding-right: 0;
    }
    /* opzioni: nome a sinistra e sovrapprezzo allineato a destra, ogni voce chiusa da un filo sotto; la prima ha
       anche il filo sopra, così l'elenco è separato da foto e nome e da quantità e totale. Allineate ai bordi interni
       della scheda */
    .cart-line__options {
        grid-area: options;
        margin: 0;
        padding: 0;
    }
    .cart-line__options li {
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 0;
        line-height: 1.35;
        border-bottom: 1px solid #333;
    }
    .cart-line__options li:first-child {
        border-top: 1px solid #333;
    }
    .cart-line__options li > span:first-child {
        min-width: 0;
    }
    .cart-line__options .cart-surcharge {
        flex: none;
    }
    .cart-line__price {
        font-size: 16px;
    }

    .cart-table tfoot tr {
        padding: 16px 0 0;
    }
    .cart-table tfoot td {
        display: block;
        padding: 0;
    }
    /* totali: etichetta a sinistra, importo a destra */
    .cart-table tfoot .order-totals__row {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 16px;
        padding: 6px 0 0;
    }
    .cart-table .order-totals__row th,
    .cart-table .order-totals__row td {
        display: block;
        padding: 0 !important;
    }
    .cart-table .order-totals__row th {
        text-align: left;
    }
    .cart-table .order-totals__row td {
        text-align: right;
    }
    .cart-table tfoot .order-totals__row--grand {
        margin-top: 6px;
        padding-top: 12px;
    }
    /* Parts Total nel checkout (da solo, senza filo): vicino alle schede a cui appartiene */
    .cart-table tfoot .order-totals__row--grand:first-child {
        margin-top: 0;
        padding-top: 4px;
    }
    /* su mobile il filo sta sulla riga intera, non sulle due celle */
    .cart-table tfoot .order-totals__row--grand:not(:first-child) {
        border-top: 1px solid #333;
    }
    .cart-table .order-totals__row--grand:not(:first-child) th,
    .cart-table .order-totals__row--grand:not(:first-child) td {
        border-top: 0 !important;
    }

    /* checkout: il riquadro spedizione/pagamento staccato da Parts Total, che altrimenti sembra suo */
    .checkout-summary {
        margin-top: 32px;
    }

    .cart-actions {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 12px;
    }
    .cart-actions .btn {
        width: 100%;
        height: 50px;
    }

    .cart-related {
        margin-top: 36px;
    }
}

/* ---------- Conferma di rimozione (popover nativo, top layer) ---------- */
.confirm-dialog {
    width: min(380px, calc(100vw - 32px));
    padding: 16px;
    margin: auto;
    color: #fff;
    text-align: center;
    background: linear-gradient(180deg, #1b1b1b 0%, #0b0b0b 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
    opacity: 0;
    transform: translateY(8px) scale(.98);
    transition: opacity .18s ease, transform .18s ease, overlay .18s allow-discrete, display .18s allow-discrete;
}
.confirm-dialog:popover-open {
    opacity: 1;
    transform: none;
}
@starting-style {
    .confirm-dialog:popover-open {
        opacity: 0;
        transform: translateY(8px) scale(.98);
    }
}
.confirm-dialog::backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
}
.confirm-dialog__media {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
    margin-bottom: 14px;
    overflow: hidden;
    background: #fff;
    border-radius: 12px;
}
.confirm-dialog__media:empty {
    display: none;
}
.confirm-dialog__media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.confirm-dialog__eyebrow {
    display: block;
    color: red;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.confirm-dialog__title {
    margin: 6px 0;
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: none;
}
.confirm-dialog__text {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
}
.confirm-dialog__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.confirm-dialog__btn {
    height: 46px;
    padding: 0 14px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}
.confirm-dialog__btn--ghost {
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
}
.confirm-dialog__btn--ghost:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
}
.confirm-dialog__btn--danger {
    color: #fff;
    background: red;
    border: 1px solid red;
}
.confirm-dialog__btn--danger:hover {
    background: #d00000;
    border-color: #d00000;
}
.confirm-dialog__btn:focus-visible {
    outline: 2px solid #0deaf1;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .confirm-dialog,
    .cart-line__remove-btn {
        transition: none;
    }
}

/* ---------- Passaggi del checkout (carrello/new/_steps.twig), con la grafica della breadcrumb ---------- */
.checkout-steps {
    margin-top: 14px;
}
.checkout-steps__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 6px;
    color: #000;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 50%;
}
.checkout-steps .is-current .checkout-steps__num {
    color: #fff;
    background: #FF8400;
}
/* i passaggi successivi non si raggiungono dai passi: spenti e non cliccabili */
.checkout-steps .is-next {
    color: rgba(255, 255, 255, 0.35);
}
.checkout-steps .is-next .checkout-steps__num {
    background: rgba(255, 255, 255, 0.3);
}
.checkout-steps .is-current a,
.checkout-steps .is-next a {
    pointer-events: none;
    cursor: default;
}
/* su mobile i tre passaggi su una riga: degli altri resta il numero, il corrente ha anche il nome */
@media (max-width: 767px) {
    .checkout-steps li:not(.is-current) .checkout-steps__label {
        display: none;
    }
    .checkout-steps li:not(.is-current) .checkout-steps__num {
        margin-right: 0;
    }
}

/* spiegazioni dei bottoni del checkout (js/checkout-tips.js): la scheda .search-preview--info dell'header,
   solo testo, che non intercetta il mouse */
.search-preview.checkout-tip {
    width: 300px;
    pointer-events: none !important;
}
.checkout-tip .search-preview__body {
    padding: 2px 4px;
}
.checkout-tip .search-preview__name {
    font-size: 16px;
}

/* ---------- Login (views/login-new/index.twig): due schede alte uguali, pulsanti e link in fondo ---------- */
/* larghezza contenuta: due schede da circa 440px bastano per i campi e i testi */
.container.login-page {
    max-width: 920px;
    margin-top: 32px;
    margin-bottom: 64px;
}
.login-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
/* titoletto e testo distanti come l'H1 di pagina e il suo sottotitolo (5px) */
.order-form .create-ac-content.login-card h2 {
    margin-bottom: 5px !important;
}
/* testi delle schede: bianchi e grandi come il sottotitolo sotto l'H1 (variabili di typography.css: 18px, 14px su mobile) */
.login-card__text {
    margin: 0 0 20px;
    color: #fff;
    font-size: var(--subtitle-size);
    line-height: var(--subtitle-line-height);
}
.login-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    margin-top: 6px;
}
.login-card__actions .btn {
    height: 44px;
    padding: 0 32px;
}
/* "Sign In" con sotto "Forgot your password?" */
.login-card__actions--stack {
    flex-direction: column;
    align-items: flex-start;
}
/* link alla stessa dimensione dei testi della scheda */
.login-card__link {
    color: #0deaf1;
    font-size: var(--subtitle-size);
}
.login-card__link:hover,
.login-card__link:focus-visible {
    color: #fff;
}
.login-card__link i {
    margin-left: 4px;
    transition: transform .15s ease;
}
.login-card__link:hover i {
    transform: translateX(3px);
}
/* richiesta account trade: in fondo alla scheda, separata da un filetto */
.login-card__trade {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
/* domanda con lo stile dei titoletti ("New customer?"): dal link la stessa distanza di titoletto e testo (5px) */
.order-form .create-ac-content.login-card h2.login-card__trade-title {
    margin-bottom: 5px !important;
}
.login-card__trade .login-card__link {
    display: inline-block;
}
.login-card__actions:has(+ .login-card__trade) {
    margin-bottom: 28px;
}

@media (max-width: 767px) {
    .login-page {
        margin-top: 16px;
    }
    .login-card__actions .btn {
        width: 100%;
    }
}

/* ---------- Paginazione (partials/new/_pagination.twig): ordini del profilo ---------- */
.pagination-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: -24px 0 48px; /* la tabella ordini ha già 48px sotto */
}
.pagination-nav__page,
.pagination-nav__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
}
.pagination-nav__page:hover,
.pagination-nav__arrow:hover,
.pagination-nav__page:focus-visible,
.pagination-nav__arrow:focus-visible {
    color: #0deaf1;
    border-color: #0deaf1;
}
.pagination-nav__page.is-current {
    color: #000;
    background: #0deaf1;
    border-color: #0deaf1;
}
.pagination-nav__gap {
    padding: 0 4px;
    color: rgba(255, 255, 255, 0.5);
}
