/* ════════════════════════════════════════════════════════
   Serigest — My Account  v4.0.0
   Portale account (non WooCommerce di default)
   ════════════════════════════════════════════════════════ */

/* ── Hide WP page title + underline on logged-in account ── */

body.woocommerce-account.logged-in .wp-block-post-title,
body.woocommerce-account.logged-in h1.wp-block-post-title,
body.woocommerce-account.logged-in .entry-header:has(.wp-block-post-title),
body.sg-account-app .wp-block-post-title,
body.sg-account-app h1.wp-block-post-title {
    display: none !important;
}

body.sg-account-app .wp-block-post-title::after {
    display: none !important;
}

body.woocommerce-account {
    --sgh-height: 64px;
}

body.woocommerce-account .sgh-header {
    border-bottom: 1px solid #ebebeb;
}

body.woocommerce-account .sgh-logo img {
    height: 28px;
}

body.sg-account-app main,
body.sg-account-app .wp-block-post-content,
body.sg-account-app article {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Soft canvas behind the account app */
body.sg-account-app main,
body.sg-account-app .wp-block-post-content,
body.sg-account-app article {
    background: #f4f5f7 !important;
}

body.sg-account-app .wp-block-post-content > .wp-block-group,
body.sg-account-app .wp-block-post-content > .wp-block-group.alignfull {
    background: transparent !important;
    box-shadow: none !important;
}

body.sg-account-app .wp-block-post-title + .wp-block-separator,
body.sg-account-app .entry-content > .wp-block-separator:first-of-type {
    display: none !important;
}

body.sg-account-app .sg-account {
    padding: 36px 0 56px;
}

body.sg-account-app .sg-account__inner {
    max-width: 1120px;
    margin: 0 auto;
}

body.sg-account-app .sg-account__layout {
    display: grid !important;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

body.sg-account-app .woocommerce-MyAccount-navigation,
body.sg-account-app .woocommerce-MyAccount-content {
    float: none !important;
    width: auto !important;
}

body.sg-account-app .sg-account__content {
    background: #fff;
    border: 1px solid #e8eaee;
    border-radius: 20px;
    padding: 28px 28px 32px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    min-width: 0;
}

body.sg-account-app .sg-account__pagehead {
    margin: 0 0 24px;
    padding: 0 0 20px;
    border-bottom: 1px solid #eef0f3;
}

body.sg-account-app .sg-account__title {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    font-family: var(--sg-font, 'Manrope', sans-serif) !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    letter-spacing: -0.04em !important;
    line-height: 1.15 !important;
    color: #0f172a !important;
}

body.sg-account-app .sg-account__title::after {
    display: none !important;
}

body.sg-account-app .sg-account__subtitle {
    margin: 8px 0 0 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #64748b !important;
    font-weight: 400 !important;
}

/* Sidebar as a single app card */
body.sg-account-app .woocommerce-MyAccount-navigation {
    position: sticky;
    top: 20px;
    margin-bottom: 0 !important;
    background: #fff !important;
    border: 1px solid #e8eaee !important;
    border-radius: 20px !important;
    padding: 18px 12px 12px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

body.sg-account-app .sg-account-nav__profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 10px 16px;
    margin-bottom: 8px;
    border-bottom: 1px solid #eef0f3;
}

body.sg-account-app .sg-account-nav__avatar {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #111;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

body.sg-account-app .sg-account-nav__who {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body.sg-account-app .sg-account-nav__name {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.sg-account-app .sg-account-nav__email {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.sg-account-app .woocommerce-MyAccount-navigation ul {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

body.sg-account-app .woocommerce-MyAccount-navigation ul li a {
    font-weight: 600 !important;
    color: #475569 !important;
}

body.sg-account-app .woocommerce-MyAccount-navigation ul li.is-active a,
body.sg-account-app .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--active a {
    background: #f4f5f7 !important;
    color: #0f172a !important;
    box-shadow: none !important;
    font-weight: 800 !important;
}

/* Dashboard */
body.sg-account-app .sg-dash-hero {
    margin: 0 0 24px;
}

body.sg-account-app .sg-dash-hero__kicker {
    margin: 0 0 8px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    color: #94a3b8 !important;
}

body.sg-account-app .sg-dash-hero__title {
    margin: 0 0 8px !important;
    padding: 0 !important;
    border: none !important;
    font-family: var(--sg-font, 'Manrope', sans-serif) !important;
    font-size: clamp(26px, 3.2vw, 34px) !important;
    font-weight: 800 !important;
    letter-spacing: -0.045em !important;
    line-height: 1.1 !important;
    color: #0f172a !important;
}

body.sg-account-app .sg-dash-hero__title::after {
    display: none !important;
}

body.sg-account-app .sg-dash-hero__lead {
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    color: #64748b !important;
    font-weight: 400 !important;
}

body.sg-account-app .sg-dash-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 28px;
}

body.sg-account-app .sg-dash-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 16px 14px;
    background: #f8f9fb;
    border: 1px solid #eef0f3;
    border-radius: 14px;
    text-decoration: none !important;
    color: inherit;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

body.sg-account-app .sg-dash-tile:hover {
    background: #fff;
    border-color: #dbe0e6;
    transform: translateY(-1px);
}

body.sg-account-app .sg-dash-tile__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #111;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.sg-account-app .sg-dash-tile__icon svg {
    width: 18px;
    height: 18px;
}

body.sg-account-app .sg-dash-tile__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body.sg-account-app .sg-dash-tile__title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

body.sg-account-app .sg-dash-tile__desc {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.35;
}

body.sg-account-app .sg-dash-tile__go {
    margin-left: auto;
    color: #94a3b8;
    font-size: 16px;
    font-weight: 600;
}

body.sg-account-app .sg-account-empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 28px 24px;
    background: #f8f9fb;
    border: 1px dashed #d9dee6;
    border-radius: 16px;
}

body.sg-account-app .sg-account-empty__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e8eaee;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    margin-bottom: 4px;
}

body.sg-account-app .sg-account-empty__icon svg {
    width: 20px;
    height: 20px;
}

body.sg-account-app .sg-account-empty__title {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

body.sg-account-app .sg-account-empty__text {
    margin: 0 0 8px !important;
    max-width: 420px;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #64748b !important;
}

body.sg-account-app .sg-account-empty__cta {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 16px;
    background: #111;
    color: #fff !important;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none !important;
}

body.sg-account-app .sg-account-empty__cta:hover {
    opacity: 0.88;
}

body.sg-account-app .sg-dashboard__welcome,
body.sg-account-app .sg-dashboard__empty {
    display: none !important;
}

@media (max-width: 900px) {
    body.sg-account-app .sg-account {
        padding: 24px 0 40px;
    }

    body.sg-account-app .sg-account__layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    body.sg-account-app .woocommerce-MyAccount-navigation {
        position: static;
        padding: 14px 12px 10px !important;
    }

    body.sg-account-app .sg-account-nav__profile {
        padding-bottom: 12px;
    }

    body.sg-account-app .woocommerce-MyAccount-navigation ul {
        flex-direction: row !important;
        overflow-x: auto;
        gap: 6px !important;
        padding-bottom: 4px !important;
        -webkit-overflow-scrolling: touch;
    }

    body.sg-account-app .woocommerce-MyAccount-navigation ul li {
        flex: 0 0 auto;
    }

    body.sg-account-app .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout {
        margin-top: 0 !important;
        padding-top: 0 !important;
        border-top: none !important;
    }

    body.sg-account-app .woocommerce-MyAccount-navigation ul li a {
        white-space: nowrap !important;
        padding: 10px 12px !important;
    }

    body.sg-account-app .sg-account__content {
        padding: 20px 16px 24px;
        border-radius: 16px;
    }

    body.sg-account-app .sg-dash-tiles {
        grid-template-columns: 1fr;
    }
}

/* ── Login / registrazione: titolo come archivio prodotti ─ */

/* ── Login / registrazione: titolo come archivio prodotti ─ */

.woocommerce-account .sg-login-hero {
    text-align: left;
    padding: 8px 0 20px;
}

.woocommerce-account .sg-login-hero .woocommerce-products-header {
    margin-bottom: 0 !important;
}

.woocommerce-account .sg-login-hero .sg-login-hero__sub {
    margin-top: 10px;
}

/* ── Riduci spazio sopra il contenuto my account ────────── */

.woocommerce-account .wp-block-group.alignfull.has-global-padding,
.woocommerce-account .wp-block-group.alignfull {
    padding-top: 0 !important;
}

/* ── Sidebar navigazione (stile card moderno, coerente con SFG) ─ */

.woocommerce-account .woocommerce-MyAccount-navigation {
    margin-bottom: 24px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    margin: 0 0 24px !important;
    padding: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    overflow: visible !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    float: none !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px 10px !important;
    padding: 12px 14px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: #475569 !important;
    text-decoration: none !important;
    border-radius: 12px !important;
    border: none !important;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    background: #f8fafc !important;
    color: #0f172a !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--active a {
    background: linear-gradient(135deg, #f1f5f9 0%, #f8fafc 100%) !important;
    color: #0f172a !important;
    font-weight: 800 !important;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06) !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout {
    margin-top: 6px !important;
    padding-top: 6px !important;
    border-top: 1px solid #e2e8f0 !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout a {
    color: #dc2626 !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout a:hover {
    background: #fef2f2 !important;
    color: #b91c1c !important;
}

/* Badge conteggio (es. File di Stampa — plugin SFG) */
.woocommerce-account .woocommerce-MyAccount-navigation .sfg-menu-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 1.35rem !important;
    height: 1.35rem !important;
    padding: 0 6px !important;
    margin-left: auto !important;
    border-radius: 999px !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    background: #dc2626 !important;
    color: #fff !important;
    border: none !important;
    vertical-align: middle !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active .sfg-menu-badge,
.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--active .sfg-menu-badge {
    background: #b91c1c !important;
}

/* Icone SVG (pseudo-elemento) */
.woocommerce-account .woocommerce-MyAccount-navigation ul li a::before {
    content: "" !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    width: 20px !important;
    height: 20px !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    background-position: center !important;
    opacity: 0.55 !important;
    transition: opacity 0.18s ease !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a::before,
.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--active a::before,
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover::before {
    opacity: 1 !important;
}

/* Casa — Dashboard */
.woocommerce-account .woocommerce-MyAccount-navigation-link--dashboard a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E") !important;
}

/* Ordini */
.woocommerce-account .woocommerce-MyAccount-navigation-link--orders a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E") !important;
}

/* File di Stampa */
.woocommerce-account .woocommerce-MyAccount-navigation-link--file-grafici a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E") !important;
}

/* Recensioni */
.woocommerce-account .woocommerce-MyAccount-navigation-link--le-mie-recensioni a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E") !important;
}

/* Indirizzi */
.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-address a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") !important;
}

/* Dettagli account */
.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-account a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") !important;
}

/* Logout — icona rossa su hover/active coerente */
.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpolyline points='16 17 21 12 16 7'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3C/svg%3E") !important;
    opacity: 0.85 !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a:hover::before {
    opacity: 1 !important;
}

/* ── Testo riepilogo ordine (es. "L'ordine #7033 è stato...") ── */

.woocommerce-account .woocommerce-MyAccount-content > p,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-order-overview + p {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #555 !important;
    line-height: 1.6 !important;
    margin-bottom: 20px !important;
}

.woocommerce-account .woocommerce-MyAccount-content mark {
    background: none !important;
    font-weight: 700 !important;
    color: #111 !important;
}

/* ── Badge stato ordine ─────────────────────────────────── */

.woocommerce-account mark.order-status,
.woocommerce-account .woocommerce-order-status {
    display: inline-block !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 3px 10px !important;
    border-radius: 20px !important;
    background: #f5f6f8 !important;
    color: #111 !important;
    text-transform: capitalize !important;
}

.woocommerce-account mark.order-status.status-processing,
.woocommerce-account mark.order-status.status-on-hold {
    background: #fef9c3 !important;
    color: #854d0e !important;
}

.woocommerce-account mark.order-status.status-completed {
    background: #dcfce7 !important;
    color: #166534 !important;
}

.woocommerce-account mark.order-status.status-cancelled,
.woocommerce-account mark.order-status.status-refunded,
.woocommerce-account mark.order-status.status-failed {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

/* ── Titoli di sezione ──────────────────────────────────── */

.woocommerce-account .woocommerce-MyAccount-content h2 {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #111 !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    border: none !important;
}

.woocommerce-account .woocommerce-MyAccount-content h3 {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #111 !important;
    margin: 20px 0 10px !important;
}

/* ── Lista ordini — sg-order-card (identico a sfg-order-card) ── */

.sg-orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Dashboard: un solo card, stesso stile lista ordini */
.sg-orders-list--dashboard {
    gap: 0;
}
.sg-last-order .sg-order-card {
    margin: 0;
}

.sg-order-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    overflow: hidden;
    transition: box-shadow .18s, transform .14s;
}
.sg-order-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.09);
    transform: translateY(-2px);
}

/* Top row */
.sg-order-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px 12px;
    flex-wrap: wrap;
}

.sg-order-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sg-order-card__num {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    text-decoration: none;
    letter-spacing: -.01em;
}
.sg-order-card__num:hover { color: #111; text-decoration: none; }

.sg-order-card__date {
    font-size: 12px;
    color: #9ca3af;
}

.sg-order-card__status {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 100px;
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}
.sg-order-card__status--processing,
.sg-order-card__status--on-hold {
    background: #fef9ee; color: #b45309; border-color: #fde68a;
}
.sg-order-card__status--completed {
    background: #f0fdf4; color: #15803d; border-color: #bbf7d0;
}
.sg-order-card__status--cancelled,
.sg-order-card__status--failed,
.sg-order-card__status--refunded {
    background: #fef2f2; color: #dc2626; border-color: #fecaca;
}

.sg-order-card__total {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    flex-shrink: 0;
}

/* Product strip */
.sg-order-card__products {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 20px 14px;
    flex-wrap: wrap;
}

.sg-order-card__product {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sg-order-card__product + .sg-order-card__product {
    padding-left: 12px;
    border-left: 1px solid #f3f4f6;
}

.sg-order-card__product-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #f3f4f6;
    flex-shrink: 0;
    background: #f9fafb;
}

.sg-order-card__product-placeholder {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f3f4f6;
    flex-shrink: 0;
}

.sg-order-card__product-name {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sg-order-card__more {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    padding-left: 12px;
    border-left: 1px solid #f3f4f6;
}

/* Footer */
.sg-order-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px 14px;
    border-top: 1px solid #f9fafb;
}

.sg-order-card__count {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
}

.sg-order-card__btn {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 8px;
    background: #111;
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: opacity .15s;
}
.sg-order-card__btn:hover {
    opacity: .8;
    color: #fff;
    text-decoration: none;
}

@media (max-width: 640px) {
    .sg-order-card__top    { padding: 14px 16px 10px; }
    .sg-order-card__meta   { gap: 6px; }
    .sg-order-card__total  { width: 100%; }
    .sg-order-card__products { padding: 4px 16px 10px; }
    .sg-order-card__product-name { max-width: 110px; }
    .sg-order-card__footer { padding: 8px 16px 12px; }
}

/* ── Lista ordini — card style (legacy table, mantenuto per compatibilità) ── */

/* Converti tabella in blocchi */
.woocommerce-account .woocommerce-orders-table,
.woocommerce-account .woocommerce-orders-table tbody,
.woocommerce-account .woocommerce-orders-table tbody tr {
    display: block !important;
    width: 100% !important;
}

.woocommerce-account .woocommerce-orders-table thead {
    display: none !important;
}

/* Card per ogni ordine — stesso stile sfg-order-card */
.woocommerce-account .woocommerce-orders-table tbody tr {
    display: flex !important;
    align-items: center !important;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    margin-bottom: 12px !important;
    padding: 16px 20px !important;
    box-sizing: border-box !important;
    gap: 0 !important;
    overflow: hidden !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.05) !important;
    transition: box-shadow .18s, transform .14s !important;
}

.woocommerce-account .woocommerce-orders-table tbody tr:hover {
    background: #fff !important;
    box-shadow: 0 6px 20px rgba(0,0,0,.09) !important;
    transform: translateY(-2px) !important;
}

/* Azzera bordi WooCommerce */
.woocommerce-account .woocommerce-orders-table td,
.woocommerce-account .woocommerce-orders-table td * {
    border: none !important;
}

/* Togli ::before responsive di WooCommerce */
.woocommerce-account .woocommerce-orders-table td::before,
.woocommerce-account .woocommerce-orders-table td::after {
    content: none !important;
    display: none !important;
    border: none !important;
}

.woocommerce-account .woocommerce-orders-table td {
    display: block !important;
    padding: 0 20px 0 0 !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    font-size: 13px !important;
    color: #111 !important;
}

/* Numero ordine */
.woocommerce-account .woocommerce-orders-table__cell-order-number {
    min-width: 90px !important;
}

.woocommerce-account .woocommerce-orders-table__cell-order-number a {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #111 !important;
    text-decoration: none !important;
    letter-spacing: -.01em !important;
}

.woocommerce-account .woocommerce-orders-table__cell-order-number a:hover {
    text-decoration: none !important;
    color: #111 !important;
}

/* Data */
.woocommerce-account .woocommerce-orders-table__cell-order-date {
    color: #9ca3af !important;
    font-size: 12px !important;
    min-width: 130px !important;
}

/* Stato */
.woocommerce-account .woocommerce-orders-table__cell-order-status {
    min-width: 110px !important;
}

/* Badge stato */
.woocommerce-account .woocommerce-orders-table__cell-order-status mark.order-status,
.woocommerce-account .woocommerce-orders-table td mark.order-status {
    display: inline-block !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 2px 9px !important;
    border-radius: 100px !important;
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    border: 1px solid #e5e7eb !important;
    text-transform: capitalize !important;
}

.woocommerce-account .woocommerce-orders-table td mark.order-status.status-on-hold,
.woocommerce-account .woocommerce-orders-table td mark.order-status.status-processing {
    background: #fef9ee !important;
    color: #b45309 !important;
    border-color: #fde68a !important;
}

.woocommerce-account .woocommerce-orders-table td mark.order-status.status-completed {
    background: #f0fdf4 !important;
    color: #15803d !important;
    border-color: #bbf7d0 !important;
}

.woocommerce-account .woocommerce-orders-table td mark.order-status.status-cancelled,
.woocommerce-account .woocommerce-orders-table td mark.order-status.status-failed,
.woocommerce-account .woocommerce-orders-table td mark.order-status.status-refunded {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border-color: #fecaca !important;
}

/* Totale */
.woocommerce-account .woocommerce-orders-table__cell-order-total {
    flex: 1 !important;
    white-space: normal !important;
    font-size: 13px !important;
    color: #374151 !important;
}

/* Azioni — freccia leggera come sfg-order-card */
.woocommerce-account .woocommerce-orders-table__cell-order-actions {
    margin-left: auto !important;
    padding: 0 !important;
    white-space: nowrap !important;
    align-self: center !important;
}

.woocommerce-account .woocommerce-orders-table__cell-order-actions .button,
.woocommerce-account .woocommerce-orders-table__cell-order-actions a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 8px 18px !important;
    border-radius: 8px !important;
    background: #111 !important;
    color: #fff !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    line-height: 1 !important;
    transition: opacity .15s !important;
}

.woocommerce-account .woocommerce-orders-table__cell-order-actions .button:hover,
.woocommerce-account .woocommerce-orders-table__cell-order-actions a:hover {
    opacity: .8 !important;
    color: #fff !important;
}

@media (max-width: 640px) {
    .woocommerce-account .woocommerce-orders-table tbody tr {
        flex-wrap: wrap !important;
        gap: 10px !important;
        padding: 14px 16px !important;
    }
    .woocommerce-account .woocommerce-orders-table td {
        white-space: normal !important;
    }
    .woocommerce-account .woocommerce-orders-table__cell-order-actions {
        width: 100% !important;
        margin-left: 0 !important;
    }
}

/* ── Dettaglio ordine toggle (thankyou page) ────────────── */

.sg-order-toggle {
    margin: 20px 0 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: #fff !important;
}

.sg-order-toggle__btn {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 13px 18px !important;
    background: #fff !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
    color: #6b7280 !important;
    text-align: left !important;
    gap: 8px !important;
    transition: background .12s !important;
}
.sg-order-toggle__btn:hover {
    background: #f9fafb !important;
}
.sg-order-toggle__btn[aria-expanded="true"] {
    border-bottom: 1px solid #f3f4f6 !important;
}

.sg-order-toggle__icon {
    flex-shrink: 0 !important;
    transition: transform .2s !important;
    color: #9ca3af !important;
}
.sg-order-toggle__btn[aria-expanded="true"] .sg-order-toggle__icon {
    transform: rotate(180deg) !important;
}

.sg-order-toggle__body {
    padding: 0 !important;
}
.sg-order-toggle__body[hidden] {
    display: none !important;
}

/* Strip WooCommerce's default UL styling inside the toggle */
.sg-order-toggle__body .woocommerce-order-overview {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
}

.sg-order-toggle__body .woocommerce-order-overview li {
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: .05em !important;
    text-transform: uppercase !important;
    color: #9ca3af !important;
    padding: 14px 18px !important;
    border-right: 1px solid #f3f4f6 !important;
    border-bottom: none !important;
    flex: 1 1 auto !important;
    white-space: nowrap !important;
}
.sg-order-toggle__body .woocommerce-order-overview li:last-child {
    border-right: none !important;
}
.sg-order-toggle__body .woocommerce-order-overview li strong {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: #111 !important;
    margin-top: 4px !important;
}

@media (max-width: 600px) {
    .sg-order-toggle__body .woocommerce-order-overview li {
        flex: 1 1 50% !important;
        border-bottom: 1px solid #f3f4f6 !important;
    }
}

/* ── Progress bar stato ordine ──────────────────────────── */

.sg-order-progress {
    margin-bottom: 16px !important;
}

.sg-order-progress__label {
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: .07em !important;
    text-transform: uppercase !important;
    color: #888 !important;
    margin-bottom: 8px !important;
}

.sg-order-progress__track {
    width: 100% !important;
    height: 6px !important;
    border-radius: 99px !important;
    overflow: hidden !important;
    /* background impostato via JS in base allo stato */
}

.sg-order-progress__fill {
    height: 100% !important;
    border-radius: 99px !important;
    transition: width .9s cubic-bezier(.4,0,.2,1) !important;
    width: 0; /* senza !important — il valore viene impostato via JS inline */
}

.sg-order-progress__status {
    font-size: 12px !important;
    font-weight: 700 !important;
    margin-top: 6px !important;
}

/* ── View-order: header e summary bar ──────────────────── */

/* Testo "L'ordine #X è stato creato il... ed è attualmente STATUS" */
.sg-view-order .woocommerce-MyAccount-content > p:first-of-type {
    display: none !important;
}

/* Summary bar iniettato via JS */
.sg-order-summary-bar {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)) !important;
    background: #f5f6f8 !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    margin-bottom: 28px !important;
}

.sg-order-summary-bar__item {
    padding: 14px 18px !important;
    border-right: 1px solid #e8e8e8 !important;
    box-sizing: border-box !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
    color: #888 !important;
}

.sg-order-summary-bar__item:last-child {
    border-right: none !important;
}

.sg-order-summary-bar__value {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: #111 !important;
    margin-top: 5px !important;
    line-height: 1.4 !important;
}

.sg-order-summary-bar__value.is-status {
    display: inline-block !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 3px 10px !important;
    border-radius: 20px !important;
    background: #f5f6f8 !important;
    color: #111 !important;
    margin-top: 6px !important;
}

.sg-order-summary-bar__value.status-processing,
.sg-order-summary-bar__value.status-on-hold { background: #fef9c3 !important; color: #854d0e !important; }
.sg-order-summary-bar__value.status-completed { background: #dcfce7 !important; color: #166534 !important; }
.sg-order-summary-bar__value.status-cancelled,
.sg-order-summary-bar__value.status-failed { background: #fee2e2 !important; color: #991b1b !important; }

/* Titolo dettaglio ordine */
.sg-view-order .woocommerce-order-details__title {
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    color: #888 !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    border: none !important;
}

/* Nascondi action buttons (scarica PDF, paga) */
.sg-view-order .woocommerce-order-details .order-actions,
.sg-view-order .order-actions--heading,
.sg-view-order .order-actions-button,
.sg-view-order .woocommerce-button.pay,
.sg-view-order a.pay,
.sg-view-order a[href*="pdf"],
.sg-view-order a[href*="invoice"],
.sg-view-order a[class*="pdf"],
.sg-view-order a[class*="invoice"] {
    display: none !important;
}

/* ── View-order: indirizzi ──────────────────────────────── */

/* Reset: customer-details è un blocco semplice */
.sg-view-order .woocommerce-customer-details {
    display: block !important;
    margin-top: 24px !important;
}

/* Il col2-set diventa flex row (billing | shipping) */
.sg-view-order .woocommerce-customer-details .woocommerce-columns,
.sg-view-order .woocommerce-customer-details .col2-set,
.sg-view-order .woocommerce-customer-details .addresses {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    margin-bottom: 24px !important;
    float: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Annulla il clearfix ::before / ::after che diventerebbero flex-item */
.sg-view-order .woocommerce-customer-details .woocommerce-columns::before,
.sg-view-order .woocommerce-customer-details .woocommerce-columns::after,
.sg-view-order .woocommerce-customer-details .col2-set::before,
.sg-view-order .woocommerce-customer-details .col2-set::after,
.sg-view-order .woocommerce-customer-details .addresses::before,
.sg-view-order .woocommerce-customer-details .addresses::after {
    display: none !important;
    content: none !important;
}

/* Ogni colonna occupa esattamente metà larghezza */
.sg-view-order .woocommerce-customer-details .woocommerce-column,
.sg-view-order .woocommerce-customer-details .col-1,
.sg-view-order .woocommerce-customer-details .col-2 {
    flex: 1 1 calc(50% - 8px) !important;
    min-width: 0 !important;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Titolo colonna (INDIRIZZO DI FATTURAZIONE / SPEDIZIONE) */
.sg-view-order .woocommerce-column__title,
.sg-view-order .woocommerce-column--billing-address h2,
.sg-view-order .woocommerce-column--shipping-address h2 {
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    color: #888 !important;
    margin: 0 0 10px !important;
    border: none !important;
    padding: 0 !important;
}

/* Indirizzo: sfondo grigio card — uguale per billing e shipping */
.sg-view-order .woocommerce-customer-details address,
.sg-view-order .woocommerce-column--billing-address address,
.sg-view-order .woocommerce-column--shipping-address address {
    background: #f5f6f8 !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 16px 18px !important;
    font-size: 13px !important;
    color: #111 !important;
    font-style: normal !important;
    line-height: 1.8 !important;
    margin: 0 !important;
    display: block !important;
}

/* Informazioni aggiuntive — SOTTO gli indirizzi, larghezza piena */
.sg-view-order .woocommerce-additional-fields,
.woocommerce-account .woocommerce-additional-fields {
    clear: both !important;
    margin-top: 0 !important;
    margin-bottom: 24px !important;
    display: block !important;
    width: 100% !important;
}

.sg-view-order .woocommerce-customer-details--email,
.sg-view-order .woocommerce-customer-details--phone {
    font-size: 12px !important;
    color: #555 !important;
    margin-top: 4px !important;
}

@media (max-width: 600px) {
    .sg-view-order .woocommerce-customer-details .woocommerce-columns,
    .sg-view-order .woocommerce-customer-details .col2-set {
        flex-direction: column !important;
    }
    .sg-view-order .woocommerce-customer-details .woocommerce-column,
    .sg-view-order .woocommerce-customer-details .col-1,
    .sg-view-order .woocommerce-customer-details .col-2 {
        flex: 1 1 100% !important;
    }
    .sg-order-summary-bar {
        grid-template-columns: 1fr 1fr !important;
    }
    .sg-order-summary-bar__item {
        border-bottom: 1px solid #e8e8e8 !important;
    }
}

/* ── Tabella ordine (view-order) — nascosta se sgc-card presenti ── */

.sg-view-order .woocommerce-table--order-details thead,
.sg-view-order .woocommerce-table--order-details tbody {
    display: none !important;
}

.sg-view-order .woocommerce-table--order-details tfoot {
    display: table-footer-group !important;
}

.sg-view-order .woocommerce-table--order-details {
    width: 100% !important;
    border-collapse: collapse !important;
}

/* ── sgc-card nel view-order ────────────────────────────── */

.sgc-vo-cards {
    margin-bottom: 6px !important;
}

.sgc-vo-cards .sgc-card {
    display: grid !important;
    grid-template-columns: 92px 1fr !important;
    background: #fff !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 10px !important;
    margin-bottom: 10px !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

.sgc-vo-cards .sgc-card:hover { box-shadow: none !important; }

.sgc-vo-cards .sgc-card__img {
    display: flex !important;
    grid-column: 1 !important;
    grid-row: 1 / -1 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 10px !important;
    background: #fff !important;
    border-right: 1px solid #e8e8e8 !important;
    border-bottom: none !important;
}

.sgc-vo-cards .sgc-card__img img {
    width: 68px;
    height: 68px;
    object-fit: cover;
    object-position: center top;
    border-radius: 8px;
    display: block;
}

.sgc-vo-cards .sgc-card__img a {
    display: block;
    line-height: 0;
}

.sgc-vo-cards .sgc-remove-all-btn,
.sgc-vo-cards .sgc-remove-btn { display: none !important; }

.sgc-vo-cards .sgc-card__header,
.sgc-vo-cards .sgc-card__rows,
.sgc-vo-cards .sgc-card__footer {
    grid-column: 2 !important;
}

.sgc-vo-cards .sgc-card__header {
    padding: 12px 16px !important;
    background: #f5f6f8 !important;
    border-bottom: 1px solid #e8e8e8 !important;
}

.sgc-vo-cards .sgc-card__name {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
    color: #111 !important;
    text-decoration: none !important;
}

.sgc-vo-cards .sgc-card__rows { padding: 0 16px !important; }

.sgc-vo-cards .sgc-card__row {
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    align-items: flex-start !important;
    gap: 12px !important;
    font-size: 13px !important;
}

.sgc-vo-cards .sgc-card__row:last-child { border-bottom: none !important; }

.sgc-vo-cards .sgc-card__row-info {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 6px 10px !important;
    font-size: 13px !important;
    color: #444 !important;
}

.sgc-vo-cards .sgc-card__row-attrs {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
    gap: 4px !important;
    flex: 1 !important;
    min-width: 0 !important;
}

.sgc-vo-cards .sgc-card__row-info strong {
    font-weight: 500 !important;
    color: #888 !important;
}

.sgc-vo-cards .sgc-color-dot--inline {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
}

.sgc-vo-cards .sgc-qty-pill {
    flex-shrink: 0 !important;
    margin-left: auto !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    background: #f5f6f8 !important;
    color: #111 !important;
    border-radius: 20px !important;
    padding: 2px 8px !important;
    white-space: nowrap !important;
}

.sgc-vo-cards .sgc-card__row--perso {
    padding: 0 !important;
    border-bottom: none !important;
    flex-shrink: 0 !important;
    max-width: 52% !important;
}

.sgc-vo-cards .sgc-personalizzazioni-block {
    background: #f5f6f8 !important;
    border-radius: 6px !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
}

.sgc-vo-cards .sgc-perso-header strong {
    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: .07em !important;
    text-transform: uppercase !important;
    color: #888 !important;
    display: block !important;
    margin-bottom: 4px !important;
}

.sgc-vo-cards .sgc-perso-line { font-size: 12px !important; color: #111 !important; display: block !important; }
.sgc-vo-cards .sgc-perso-line strong { font-weight: 600 !important; color: #555 !important; }

.sgc-vo-cards .sgc-card__footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 16px !important;
    background: #f5f6f8 !important;
    border-top: 1px solid #e8e8e8 !important;
    font-size: 12px !important;
    color: #888 !important;
}

.sgc-vo-cards .sgc-card__footer strong {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #111 !important;
}

.sgc-vo-cards .sgc-card__footer-price {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #111 !important;
}

@media (max-width: 600px) {
    .sgc-vo-cards .sgc-card {
        grid-template-columns: 72px 1fr !important;
    }
    .sgc-vo-cards .sgc-card__img {
        padding: 10px 8px !important;
    }
    .sgc-vo-cards .sgc-card__img img {
        width: 52px;
        height: 52px;
    }
}

/* ── Informazioni aggiuntive (Tipo cliente ecc.) ─────────── */

.woocommerce-account .woocommerce-additional-fields,
.sg-view-order .woocommerce-additional-fields {
    margin-top: 0 !important;
}

.woocommerce-account .woocommerce-additional-fields h2,
.sg-view-order .woocommerce-additional-fields h2 {
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    color: #888 !important;
    margin-bottom: 10px !important;
    border: none !important;
    padding: 0 !important;
}

.woocommerce-account .woocommerce-additional-fields table,
.sg-view-order .woocommerce-additional-fields table {
    width: 100% !important;
    border-collapse: collapse !important;
    background: #f5f6f8 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    font-size: 13px !important;
}

.woocommerce-account .woocommerce-additional-fields th,
.woocommerce-account .woocommerce-additional-fields td,
.sg-view-order .woocommerce-additional-fields th,
.sg-view-order .woocommerce-additional-fields td {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #111 !important;
    padding: 10px 14px !important;
    border: none !important;
    border-bottom: 1px solid #ececec !important;
    line-height: 1.4 !important;
    vertical-align: middle !important;
}

.woocommerce-account .woocommerce-additional-fields tr:last-child th,
.woocommerce-account .woocommerce-additional-fields tr:last-child td,
.sg-view-order .woocommerce-additional-fields tr:last-child th,
.sg-view-order .woocommerce-additional-fields tr:last-child td {
    border-bottom: none !important;
}

.woocommerce-account .woocommerce-additional-fields th,
.sg-view-order .woocommerce-additional-fields th {
    font-weight: 600 !important;
    color: #555 !important;
    width: 40% !important;
}

/* ── WC Blocks: additional fields (Tipo cliente ecc.) ───── */

.woocommerce .wc-block-order-confirmation-additional-fields-wrapper,
.woocommerce .wc-block-order-confirmation-additional-fields-wrapper * {
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
}

.woocommerce .wc-block-order-confirmation-additional-fields-wrapper
.wc-block-components-additional-fields-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #f5f6f8 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}

.woocommerce .wc-block-order-confirmation-additional-fields-wrapper
.wc-block-components-additional-fields-list li {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 9px 14px !important;
    border-bottom: 1px solid #ececec !important;
    font-size: 13px !important;
}

.woocommerce .wc-block-order-confirmation-additional-fields-wrapper
.wc-block-components-additional-fields-list li:last-child {
    border-bottom: none !important;
}

.woocommerce .wc-block-order-confirmation-additional-fields-wrapper
.wc-block-components-additional-fields-list dt,
.woocommerce .wc-block-order-confirmation-additional-fields-wrapper
.wc-block-components-additional-fields-list strong,
.woocommerce .wc-block-order-confirmation-additional-fields-wrapper
.wc-block-components-additional-fields-list label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #555 !important;
    min-width: 120px !important;
}

.woocommerce .wc-block-order-confirmation-additional-fields-wrapper
.wc-block-components-additional-fields-list dd,
.woocommerce .wc-block-order-confirmation-additional-fields-wrapper
.wc-block-components-additional-fields-list span {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #111 !important;
}

/* ── Tabella generica WooCommerce ───────────────────────── */

.woocommerce table.shop_table {
    border: 0 !important;
}

.woocommerce table.shop_table tbody th {
    border-top: 0 !important;
}

/* ── Totali tfoot ───────────────────────────────────────── */

.woocommerce-account .woocommerce-table--order-details tfoot tr td,
.woocommerce-account .woocommerce-table--order-details tfoot tr th {
    padding: 10px 0 !important;
    font-size: 13px !important;
    color: #888 !important;
    border-bottom: 1px solid #e8e8e8 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}

.woocommerce-account .woocommerce-table--order-details tfoot th {
    text-align: left !important;
    font-weight: 500 !important;
}

.woocommerce-account .woocommerce-table--order-details tfoot td {
    text-align: right !important;
}

.woocommerce-account .woocommerce-table--order-details tfoot .order-total td,
.woocommerce-account .woocommerce-table--order-details tfoot .order-total th {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #111 !important;
    padding-top: 16px !important;
    border-bottom: none !important;
}

/* ── Toggle sezioni ─────────────────────────────────────── */

.sg-toggle-section {
    margin-bottom: 16px !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}

.sg-toggle-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 13px 16px !important;
    background: #f5f6f8 !important;
    cursor: pointer !important;
    user-select: none !important;
    border-bottom: 1px solid transparent !important;
    transition: background .15s !important;
}

.sg-toggle-header:hover { background: #ececec !important; }

.sg-toggle-section.sg-open .sg-toggle-header {
    border-bottom-color: #e8e8e8 !important;
}

.sg-toggle-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
    color: #111 !important;
}

.sg-toggle-arrow svg {
    display: block !important;
    transition: transform .2s !important;
    color: #888 !important;
}

.sg-toggle-section.sg-open .sg-toggle-arrow svg {
    transform: rotate(180deg) !important;
}

.sg-toggle-body {
    padding: 14px 16px !important;
    /* display gestito via JS */
}

.sg-toggle-body .sgc-vo-cards { margin: 0 !important; }
.sg-toggle-body .sgc-vo-cards .sgc-card { border-radius: 8px !important; }

/* ── File grafici — link al tab SFG ────────────────────── */

.sg-sfg-order-link {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
    padding: 16px 20px !important;
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    transition: background .15s, border-color .15s !important;
}

.sg-sfg-order-link:hover {
    background: #dcfce7 !important;
    border-color: #86efac !important;
    text-decoration: none !important;
}

.sg-sfg-order-link__icon {
    font-size: 20px !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}

.sg-sfg-order-link__text {
    flex: 1 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #15803d !important;
}

.sg-sfg-order-link__arrow {
    font-size: 16px !important;
    color: #15803d !important;
    flex-shrink: 0 !important;
}

/* ── Indirizzo ──────────────────────────────────────────── */

.woocommerce-account .woocommerce-column--billing-address h2,
.woocommerce-account .woocommerce-column--shipping-address h2 {
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    color: #888 !important;
    margin-bottom: 10px !important;
    border: none !important;
}

.woocommerce-account .woocommerce-customer-details address {
    background: #f5f6f8 !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 16px 18px !important;
    font-size: 13px !important;
    color: #111 !important;
    font-style: normal !important;
    line-height: 1.8 !important;
}

/* ── Pagina Indirizzi (my-account/edit-address) ─────────── */

/* ── Pagina Indirizzi ───────────────────────────────────── */

/* Wrapper grid: billing e shipping side by side */
.woocommerce-account .woocommerce-MyAccount-content .u-columns.woocommerce-Addresses,
.woocommerce-account .woocommerce-MyAccount-content .u-columns.addresses,
.woocommerce-account .woocommerce-MyAccount-content .col2-set.addresses,
.woocommerce-account .woocommerce-MyAccount-content .u-columns,
.woocommerce-account .woocommerce-MyAccount-content .col2-set,
.woocommerce-account .woocommerce-MyAccount-content .addresses {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    float: none !important;
    clear: both !important;
}

/* Clearfix override */
.woocommerce-account .woocommerce-MyAccount-content .u-columns::before,
.woocommerce-account .woocommerce-MyAccount-content .u-columns::after,
.woocommerce-account .woocommerce-MyAccount-content .col2-set::before,
.woocommerce-account .woocommerce-MyAccount-content .col2-set::after,
.woocommerce-account .woocommerce-MyAccount-content .addresses::before,
.woocommerce-account .woocommerce-MyAccount-content .addresses::after {
    display: none !important;
}

/* Each address card */
.woocommerce-account .woocommerce-MyAccount-content .u-column1,
.woocommerce-account .woocommerce-MyAccount-content .u-column2,
.woocommerce-account .woocommerce-MyAccount-content .col-1,
.woocommerce-account .woocommerce-MyAccount-content .col-2,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 20px !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
}

/* Section title */
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 14px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #e5e7eb !important;
    gap: 10px !important;
}

/* Address text */
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address address {
    font-size: 14px !important;
    line-height: 1.7 !important;
    color: #374151 !important;
    font-style: normal !important;
}

@media (max-width: 640px) {
    .woocommerce-account .woocommerce-MyAccount-content .u-columns.woocommerce-Addresses,
    .woocommerce-account .woocommerce-MyAccount-content .u-columns.addresses,
    .woocommerce-account .woocommerce-MyAccount-content .col2-set.addresses,
    .woocommerce-account .woocommerce-MyAccount-content .u-columns,
    .woocommerce-account .woocommerce-MyAccount-content .col2-set,
    .woocommerce-account .woocommerce-MyAccount-content .addresses {
        grid-template-columns: 1fr !important;
    }
}

/* Testo intro */
.woocommerce-account .woocommerce-MyAccount-content > p {
    font-size: 13px !important;
    color: #888 !important;
    margin-bottom: 20px !important;
}

/* Titoli colonne "Indirizzo di fatturazione / spedizione" */
.woocommerce-account .woocommerce-Address-title h2,
.woocommerce-account .woocommerce-Address h2 {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .07em !important;
    text-transform: uppercase !important;
    color: #9ca3af !important;
    margin: 0 !important;
    border: none !important;
}

/* Link "Modifica indirizzo" */
.woocommerce-account .woocommerce-Address-title .edit,
.woocommerce-account .woocommerce-Address a {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #111 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
    text-decoration-color: #ccc !important;
}

.woocommerce-account .woocommerce-Address a:hover {
    text-decoration-color: #111 !important;
}

/* Testo indirizzo in corsivo → normale */
.woocommerce-account .woocommerce-Address address {
    font-size: 13px !important;
    font-style: normal !important;
    color: #111 !important;
    line-height: 1.8 !important;
    background: #f5f6f8 !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 14px 16px !important;
    margin-top: 10px !important;
}

/* ── Form dettagli account ──────────────────────────────── */

/* Label */
.woocommerce-account .woocommerce-MyAccount-content label,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-form-row label {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #555 !important;
    display: block !important;
    margin-bottom: 6px !important;
    letter-spacing: .01em !important;
}

/* Rimuovi asterisco rosso visivamente invasivo */
.woocommerce-account .woocommerce-MyAccount-content label .required {
    color: #888 !important;
    font-size: 11px !important;
}

/* Testo descrittivo sotto i campi */
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-form-row em,
.woocommerce-account .woocommerce-MyAccount-content fieldset em,
.woocommerce-account .woocommerce-MyAccount-content p em {
    font-size: 11px !important;
    color: #aaa !important;
    font-style: normal !important;
    display: block !important;
    margin-top: 4px !important;
}

/* Input e select */
.woocommerce-account .woocommerce-MyAccount-content input[type="text"],
.woocommerce-account .woocommerce-MyAccount-content input[type="email"],
.woocommerce-account .woocommerce-MyAccount-content input[type="password"],
.woocommerce-account .woocommerce-MyAccount-content input[type="tel"],
.woocommerce-account .woocommerce-MyAccount-content select {
    font-size: 13px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    background: #fff !important;
    color: #111 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color .15s !important;
}

.woocommerce-account .woocommerce-MyAccount-content input:focus,
.woocommerce-account .woocommerce-MyAccount-content select:focus {
    border-color: #111 !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Fieldset "Modifica password" — togli il vecchio bordo */
.woocommerce-account .woocommerce-MyAccount-content fieldset {
    border: none !important;
    border-top: 1px solid #e8e8e8 !important;
    padding: 20px 0 0 !important;
    margin: 20px 0 0 !important;
}

.woocommerce-account .woocommerce-MyAccount-content fieldset legend {
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: .05em !important;
    text-transform: uppercase !important;
    color: #888 !important;
    padding: 0 8px 0 0 !important;
    background: none !important;
}

/* Bottone salva */
.woocommerce-account .woocommerce-MyAccount-content .button,
.woocommerce-account .woocommerce-MyAccount-content button[type="submit"],
.woocommerce-account .woocommerce-MyAccount-content input[type="submit"] {
    font-size: 13px !important;
    font-weight: 700 !important;
    background: #111 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 11px 24px !important;
    cursor: pointer !important;
    transition: opacity .15s !important;
    width: auto !important;
}

.woocommerce-account .woocommerce-MyAccount-content .button:hover,
.woocommerce-account .woocommerce-MyAccount-content button[type="submit"]:hover {
    opacity: .85 !important;
    background: #111 !important;
    color: #fff !important;
}

/* ── Dashboard custom ───────────────────────────────────── */

.sg-dashboard__welcome {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #111 !important;
    margin: 0 0 20px !important;
}

.sg-last-order__label {
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    color: #888 !important;
    margin-bottom: 10px !important;
}

.sg-dashboard__empty {
    font-size: 13px !important;
    color: #888 !important;
}

/* ══ WC Notice banner (password temporanea, info, ecc.) ══ */

body.sg-account-app .wc-block-components-notice-banner,
body.sg-account-app .wc-block-components-notice-banner.is-info,
body.sg-account-app .wc-block-components-notice-banner.is-success,
body.sg-account-app .wc-block-components-notice-banner.is-error,
body.sg-account-app .woocommerce-notices-wrapper .woocommerce-message,
body.sg-account-app .woocommerce-notices-wrapper .woocommerce-info,
body.sg-account-app .woocommerce-notices-wrapper .woocommerce-error,
body.sg-account-app .woocommerce-MyAccount-content .woocommerce-message,
body.sg-account-app .woocommerce-MyAccount-content .woocommerce-info,
body.sg-account-app .woocommerce-MyAccount-content .woocommerce-error,
body.sg-account-app .woocommerce-MyAccount-content .woocommerce-info,
.wc-block-components-notice-banner,
.wc-block-components-notice-banner.is-info,
.wc-block-components-notice-banner.is-success,
.wc-block-components-notice-banner.is-error,
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    background: #f8f9fb !important;
    border: 1px solid #e8eaee !important;
    border-left: 1px solid #e8eaee !important;
    border-radius: 14px !important;
    padding: 16px 20px !important;
    margin: 0 0 16px !important;
    font-family: var(--sg-font, 'Manrope', sans-serif) !important;
    font-size: 14px !important;
    color: #334155 !important;
    line-height: 1.5 !important;
    box-shadow: none !important;
    list-style: none !important;
}

body.sg-account-app .woocommerce-MyAccount-content .woocommerce-info .button,
body.sg-account-app .woocommerce-MyAccount-content .woocommerce-message .button,
body.sg-account-app .wc-block-components-notice-banner .button {
    background: #111 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.wc-block-components-notice-banner svg,
.wc-block-components-notice-banner .wc-block-components-notice-banner__icon {
    color: #6b7280 !important;
    fill: #6b7280 !important;
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
    margin-top: 2px !important;
}

.wc-block-components-notice-banner p,
.wc-block-components-notice-banner__content {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    color: #374151 !important;
    background: none !important;
    border: none !important;
}

/* Filo nei colori del logo in cima alle card (come il pannello "Aggiunto al carrello").
   Sfondo e non pseudo-elemento: segue gli angoli arrotondati senza tagliare il contenuto. */
body.sg-account-app .woocommerce-MyAccount-navigation,
body.sg-account-app .sg-account__content {
    background:
        linear-gradient( 90deg, #ff3ea5, #ffd23f, #3ed1f0, #8be04e ) top / 100% 5px no-repeat border-box,
        #fff !important;
    border-top-color: transparent !important;
}
