/**
 * BMW Monza Account Customizer - Frontend CSS
 * Modern 2025 Design System - UNIFIED
 */

/* === FIX WPAUTOP - Hide empty p tags === */
.bmw-account-modern > p:empty,
.bmw-account-modern > p > br,
.bmw-account-modern p:empty,
.bmw-account-sidebar p:empty,
.bmw-account-main > p:empty,
.bmw-account-content-inner p:empty,
.bmw-nav-modern p:empty,
.bmw-nav-section p:empty,
.bmw-dashboard-modern p:empty,
.bmw-order-header > p,
.bmw-profile-info > p {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* === LAYOUT PRINCIPALE === */
.bmw-account-modern {
    display: grid !important;
    grid-template-columns: 320px 1fr !important;
    grid-template-rows: auto;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 80vh;
}

.bmw-account-modern > .bmw-account-sidebar {
    grid-column: 1;
    grid-row: 1;
}

.bmw-account-modern > main.bmw-account-main,
.bmw-account-modern > .bmw-account-main {
    grid-column: 2;
    grid-row: 1;
}

/* === SIDEBAR === */
.bmw-account-sidebar {
    position: sticky;
    top: 200px;
    height: fit-content;
}

.bmw-nav-modern {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.06);
    overflow: visible;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* === MOBILE NAV PILL (Hidden on Desktop) === */
.bmw-mobile-nav-pill {
    display: none;
    position: relative;
}

.bmw-nav-pill-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #0066b1;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.bmw-nav-pill-toggle:hover {
    background: #f9fafb;
}

.bmw-nav-pill-toggle.open {
    border-radius: 6px 6px 0 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08), inset 0 -1px 0 rgba(0,0,0,0.06);
}

.bmw-pill-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #eff6ff;
    border-radius: 6px;
    color: #0066b1;
}

.bmw-pill-icon svg {
    width: 18px;
    height: 18px;
}

.bmw-pill-label {
    flex: 1;
    text-align: left;
    font-size: 15px;
}

.bmw-pill-chevron {
    color: #6b7280;
    transition: transform 0.2s ease;
}

.bmw-pill-chevron svg {
    width: 16px;
    height: 16px;
}

.bmw-nav-pill-toggle.open .bmw-pill-chevron {
    transform: rotate(180deg);
}

.bmw-nav-pill-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    display: none;
    max-height: 70vh;
    overflow-y: auto;
}

.bmw-nav-pill-dropdown.show {
    display: block;
}

.bmw-pill-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    border-bottom: 1px solid #f3f4f6;
}

.bmw-pill-dropdown-item:last-child {
    border-bottom: none;
}

.bmw-pill-dropdown-item:hover {
    background: #f3f4f6;
    color: #0066b1;
}

.bmw-pill-dropdown-item.active {
    background: #eff6ff;
    color: #0066b1;
    font-weight: 600;
}

.bmw-pill-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #6b7280;
}

.bmw-pill-item-icon svg {
    width: 18px;
    height: 18px;
}

.bmw-pill-dropdown-item.active .bmw-pill-item-icon,
.bmw-pill-dropdown-item:hover .bmw-pill-item-icon {
    color: #0066b1;
}

.bmw-pill-dropdown-item.bmw-pill-logout {
    color: #dc2626;
    border-top: 1px solid #f3f4f6;
    margin-top: 4px;
    padding-top: 14px;
}

.bmw-pill-dropdown-item.bmw-pill-logout .bmw-pill-item-icon {
    color: #dc2626;
}

.bmw-pill-dropdown-item.bmw-pill-logout:hover {
    background: #fef2f2;
    color: #b91c1c;
}

/* Profile Card */
.bmw-profile-card {
    padding: 28px 24px;
    background: #0066b1;
    position: relative;
    overflow: hidden;
}

.bmw-profile-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 102, 177, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.bmw-profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.bmw-avatar-initials {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

.bmw-profile-info {
    position: relative;
    z-index: 1;
}

.bmw-profile-info > p {
    margin: 0;
    padding: 0;
}

.bmw-profile-name {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px 0;
    letter-spacing: -0.3px;
}

.bmw-profile-email {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin: 0;
    display: block;
}

.bmw-profile-badge {
    display: inline-flex;
    margin-top: 14px;
    position: relative;
    z-index: 1;
}

.bmw-profile-badge span {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Navigation Section */
.bmw-nav-section {
    padding: 20px 16px;
}

.bmw-nav-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #9ca3af;
    padding: 0 12px;
    margin-bottom: 12px;
}

.bmw-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bmw-nav-item {
    margin-bottom: 4px;
}

.bmw-nav-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.bmw-nav-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 6px;
    color: #6b7280;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.bmw-nav-icon svg {
    width: 18px;
    height: 18px;
}

.bmw-nav-text {
    flex: 1;
}

.bmw-nav-arrow {
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.2s ease;
    color: #9ca3af;
}

.bmw-nav-item a:hover {
    background: #f9fafb;
    color: #111827;
}

.bmw-nav-item a:hover .bmw-nav-icon {
    background: #e2e6fe;
    color: #0066b1;
}

.bmw-nav-item a:hover .bmw-nav-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Active State */
.bmw-nav-item.is-active a {
    background: #e2e6fe;
    color: #0066b1;
}

.bmw-nav-item.is-active .bmw-nav-icon {
    background: #0066B1;
    color: #fff;
}

.bmw-nav-item.is-active .bmw-nav-text {
    font-weight: 600;
}

.bmw-nav-item.is-active .bmw-nav-arrow {
    opacity: 1;
    transform: translateX(0);
    color: #0066B1;
}

/* === SUBMENU / NESTED MENU STYLES === */
.bmw-nav-group {
    margin-bottom: 4px;
}

.bmw-nav-group > .bmw-group-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.bmw-nav-group > .bmw-group-toggle:hover {
    background: #f9fafb;
    color: #111827;
}

.bmw-nav-group > .bmw-group-toggle:hover .bmw-nav-icon {
    background: #e2e6fe;
    color: #0066B1;
}

.bmw-nav-chevron {
    margin-left: auto;
    color: #9ca3af;
    transition: transform 0.3s ease;
}

.bmw-nav-group.bmw-expanded .bmw-nav-chevron {
    transform: rotate(180deg);
}

.bmw-nav-group.bmw-expanded > .bmw-group-toggle {
    background: #f3f4f6;
    color: #111827;
}

.bmw-nav-group.bmw-expanded > .bmw-group-toggle .bmw-nav-icon {
    background: #e5e7eb;
    color: #374151;
}

/* Submenu Container */
.bmw-submenu {
    list-style: none;
    margin: 4px 0 8px 0;
    padding: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
    display: none;
}

.bmw-nav-group.bmw-expanded .bmw-submenu {
    max-height: none;
    opacity: 1;
    display: block;
}

.bmw-nav-child {
    margin-bottom: 2px;
}

.bmw-nav-child a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px 12px 30px;
    border-radius: 6px;
    color: #6b7280;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.bmw-nav-child a::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #d1d5db;
    transition: all 0.2s ease;
}

.bmw-nav-child .bmw-nav-icon {
    width: 34px;
    height: 34px;
    background: #f9fafb;
    border-radius: 6px;
}

.bmw-nav-child .bmw-nav-icon svg {
    width: 16px;
    height: 16px;
}

.bmw-nav-child a:hover {
    background: #f9fafb;
    color: #111827;
}

.bmw-nav-child a:hover::before {
    background: #0066b1;
}

.bmw-nav-child a:hover .bmw-nav-icon {
    background: #e2e6fe;
    color: #0066b1;
}

.bmw-nav-child a:hover .bmw-nav-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Active Child State */
.bmw-nav-child.is-active a {
    background: #e2e6fe;
    color: #0066b1;
}

.bmw-nav-child.is-active a::before {
    background: #0066b1;
    width: 6px;
    height: 6px;
}

.bmw-nav-child.is-active .bmw-nav-icon {
    background: linear-gradient(135deg, #0066b1 0%, #0080d4 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 102, 177, 0.3);
}

.bmw-nav-child.is-active .bmw-nav-text {
    font-weight: 600;
}

.bmw-nav-child.is-active .bmw-nav-arrow {
    opacity: 1;
    transform: translateX(0);
    color: #0066b1;
}

/* Logout Footer */
.bmw-nav-footer {
    padding: 16px;
    border-top: 1px solid #f3f4f6;
}

.bmw-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: #f9fafb;
    border-radius: 6px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.bmw-logout-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* === MAIN CONTENT === */
.bmw-account-main {
    min-width: 0;
}

.bmw-account-content-inner {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.06);
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* Custom endpoint content wrapper */
.bmw-custom-endpoint-content {
    padding: 0;
}

.bmw-custom-endpoint-content p:first-child {
    margin-top: 0;
}

.bmw-custom-endpoint-content p:last-child {
    margin-bottom: 0;
}

/* Link items that open in new tab */
.woocommerce-MyAccount-navigation-link a[target="_blank"]::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

/* === DASHBOARD MODERN === */
.bmw-dashboard-modern {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Welcome Section */
.bmw-welcome-section {
    margin-bottom: 8px;
}

.bmw-welcome-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    letter-spacing: -0.5px;
}

/* Stats Grid */
.bmw-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.bmw-stat-card {
    background: #efefef;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.bmw-stat-card:hover {
    background: #fff;
    border-color: #e5e7eb;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.bmw-stat-icon-wrap {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.bmw-stat-orders .bmw-stat-icon-wrap {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.bmw-stat-completed .bmw-stat-icon-wrap {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
}

.bmw-stat-spent .bmw-stat-icon-wrap {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.bmw-stat-member .bmw-stat-icon-wrap {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #7c3aed;
}

.bmw-stat-data {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bmw-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.5px;
}

.bmw-stat-value .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
}

.bmw-stat-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* ====================================
   USER INFO, QUICK ACTIONS, RECENT ORDER
   ==================================== */

/* User Info Section - Tessera & Moto */
.bmw-user-info-section {
    margin-top: 8px;
}

.bmw-info-cards-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

.bmw-info-card {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bmw-info-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.bmw-info-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #efefef;
}

.bmw-info-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0066b1;
    border-radius: 6px;
    color: #fff;
}

.bmw-info-title {
    font-size: 15px;
    font-weight: 600;
    color: black;
    margin: 0;
}

.bmw-info-card-body {
    padding: 20px;
}

/* Tessera Card */
.bmw-info-tessera .bmw-info-value {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    letter-spacing: 2px;
    font-family: 'Monaco', 'Consolas', monospace;
}

/* Moto Card */
.bmw-moto-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.bmw-moto-row {
    display: flex;
    width: 48%;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f9fafb;
    border-radius: 6px;
}

.bmw-moto-label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

.bmw-moto-value {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.bmw-info-empty {
    color: #9ca3af !important;
    font-weight: 400 !important;
    font-style: italic;
}

/* Section Title */
.bmw-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    letter-spacing: -0.3px;
}

/* Recent Order */
.bmw-recent-order {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bmw-order-card {
    background: #f9fafb;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.bmw-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #fff;
    border-bottom: 1px solid #f3f4f6;
}

.bmw-order-header > p {
    margin: 0;
    display: flex;
    align-items: center;
}

.bmw-order-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bmw-order-number {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.bmw-order-date {
    font-size: 13px;
    color: #6b7280;
}

.bmw-order-status {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bmw-status-completed {
    background: #d1fae5;
    color: #059669;
}

.bmw-status-processing {
    background: #dbeafe;
    color: #2563eb;
}

.bmw-status-on-hold {
    background: #fef3c7;
    color: #d97706;
}

.bmw-status-pending {
    background: #ffedd5;
    color: #ea580c;
}

.bmw-status-cancelled,
.bmw-status-failed {
    background: #fee2e2;
    color: #dc2626;
}

.bmw-order-items {
    padding: 20px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.bmw-order-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bmw-item-thumb {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    background: #e5e7eb;
    flex-shrink: 0;
}

.bmw-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bmw-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.bmw-item-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bmw-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bmw-item-qty {
    font-size: 12px;
    color: #6b7280;
}

.bmw-more-items {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.bmw-order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #fff;
    border-top: 1px solid #f3f4f6;
}

.bmw-order-total {
    font-size: 15px;
    color: #374151;
}

.bmw-order-total strong {
    color: #111827;
    font-weight: 700;
}

.bmw-view-order-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #111827;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.bmw-view-order-btn:hover {
    background: #0066b1;
    color: #fff;
}

/* ====================================
   BMW ORDERS PAGE - Modern 2025
   ==================================== */

.bmw-orders-modern {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bmw-orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.bmw-orders-title-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bmw-orders-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0066b1;
    border-radius: 6px;
    color: #fff;
}

.bmw-orders-title-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bmw-orders-title-text p {
    margin:0;
}

.bmw-orders-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    letter-spacing: -0.5px;
}

.bmw-orders-count {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* Orders List */
.bmw-orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bmw-order-card-modern {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bmw-order-card-modern:hover {
    border-color: #d1d5db;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.bmw-order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
    gap: 16px;
}

.bmw-order-main-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.bmw-order-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: #e5e7eb;
    flex-shrink: 0;
}

.bmw-order-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bmw-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.bmw-order-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.bmw-order-number-label {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bmw-order-number-link {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bmw-order-number-link:hover {
    color: #0066b1;
}

.bmw-order-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.bmw-order-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
}

.bmw-order-date svg {
    flex-shrink: 0;
}

.bmw-order-items-count {
    font-size: 13px;
    color: #6b7280;
}

/* Order Card Body */
.bmw-order-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    gap: 20px;
    flex-wrap: wrap;
}

.bmw-order-products {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.bmw-product-tag {
    display: inline-flex;
    padding: 6px 12px;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

.bmw-product-more {
    display: inline-flex;
    padding: 6px 12px;
    background: #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.bmw-order-total-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.bmw-order-total-label {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.bmw-order-total-value {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

/* Order Card Footer */
.bmw-order-card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: #fff;
    border-top: 1px solid #f3f4f6;
}

.bmw-order-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #111827;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.bmw-order-view-btn:hover {
    background: #0066b1;
    color: #fff;
}

.bmw-order-action-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    background: #f3f4f6;
    color: #374151;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.bmw-order-action-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

.bmw-action-pay {
    background: linear-gradient(135deg, #0066b1 0%, #0080d4 100%);
    color: #fff;
}

.bmw-action-pay:hover {
    background: linear-gradient(135deg, #004d87 0%, #0066b1 100%);
    color: #fff;
}

/* Pagination */
.bmw-orders-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding-top: 16px;
}

.bmw-pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f3f4f6;
    color: #374151;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.bmw-pagination-btn:hover {
    background: #111827;
    color: #fff;
}

.bmw-pagination-info {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* Empty State */
.bmw-orders-empty {
    padding: 60px 20px;
}

.bmw-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.bmw-empty-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 50%;
    color: #9ca3af;
}

.bmw-empty-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.bmw-empty-text {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    max-width: 300px;
}

.bmw-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #0066b1 0%, #0080d4 100%);
    color: #fff;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.bmw-empty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 102, 177, 0.3);
    color: #fff;
}

/* ====================================
   BMW ADDRESSES PAGE - Modern 2025
   ==================================== */

.bmw-addresses-modern {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bmw-addresses-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bmw-addresses-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-radius: 6px;
    color: #fff;
}

.bmw-addresses-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bmw-addresses-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    letter-spacing: -0.5px;
}

.bmw-addresses-subtitle {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* Addresses Grid */
.bmw-addresses-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.bmw-address-card {
    background: #fff;
    border-radius: 6px;
    border: 2px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bmw-address-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.bmw-address-card.no-address {
    border-style: dashed;
}

.bmw-address-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
}

.bmw-address-type {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bmw-address-type-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-radius: 6px;
    color: #fff;
}

.bmw-address-type-label {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.bmw-address-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.bmw-address-edit-btn:hover {
    background: #0066b1;
    border-color: #0066b1;
    color: #fff;
}

.bmw-address-card-body {
    padding: 24px;
    min-height: 120px;
}

.bmw-address-content {
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
}

.bmw-address-content br {
    display: block;
    margin-bottom: 4px;
}

.bmw-address-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.bmw-address-empty-text {
    font-size: 14px;
    color: #9ca3af;
    font-style: italic;
}

/* ====================================
   BMW EDIT ACCOUNT FORM - Modern 2025
   ==================================== */

.bmw-edit-account-modern {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bmw-account-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.bmw-form-section {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.bmw-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
}

.bmw-section-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-radius: 6px;
    color: #fff;
    flex-shrink: 0;
}

.bmw-section-icon.bmw-icon-secure {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.bmw-section-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.bmw-section-subtitle {
    font-size: 13px;
    color: #6b7280;
}

.bmw-security-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #d1fae5;
    border-radius: 6px;
    color: #059669;
    font-size: 12px;
    font-weight: 600;
}

/* Form Grid */
.bmw-form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 24px;
}

.bmw-form-row {
    flex: 1 1 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bmw-form-row-half {
    flex: 1 1 calc(50% - 10px);
    min-width: 200px;
}

.bmw-form-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.bmw-form-label .required {
    color: #0066b1;
}

.bmw-label-icon {
    display: inline-flex;
    color: #9ca3af;
}

.bmw-form-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 15px;
    color: #111827;
    background: #fff;
    transition: all 0.2s ease;
}

.bmw-form-input:focus {
    outline: none;
    border-color: #0066b1;
    box-shadow: 0 0 0 4px rgba(0, 102, 177, 0.1);
}

.bmw-form-input::placeholder {
    color: #9ca3af;
}

.bmw-form-hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

/* Form Actions */
.bmw-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 8px;
}

.bmw-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #0066b1 0%, #0080d4 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bmw-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 102, 177, 0.3);
}

.bmw-cancel-btn {
    display: inline-flex;
    align-items: center;
    padding: 16px 24px;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bmw-cancel-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

/* ====================================
   BMW EDIT ADDRESS FORM - Modern 2025
   ==================================== */

.bmw-edit-address-modern {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bmw-address-form-header {
    margin-bottom: 8px;
}

.bmw-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bmw-back-link:hover {
    color: #0066b1;
}

.bmw-address-form .bmw-form-section {
    margin-bottom: 0;
}

.bmw-address-fields {
    padding: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Override WooCommerce form field styles */
.bmw-address-fields .form-row {
    flex: 1 1 100%;
    margin: 0;
    padding: 0;
}

.bmw-address-fields .form-row-first,
.bmw-address-fields .form-row-last {
    flex: 1 1 calc(50% - 10px);
    min-width: 200px;
}

.bmw-address-fields label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.bmw-address-fields .required {
    color: #0066b1;
}

.bmw-address-fields input[type="text"],
.bmw-address-fields input[type="email"],
.bmw-address-fields input[type="tel"],
.bmw-address-fields select,
.bmw-address-fields .select2-container .select2-selection--single {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 15px;
    color: #111827;
    background: #fff;
    transition: all 0.2s ease;
    height: auto;
}

.bmw-address-fields input:focus,
.bmw-address-fields select:focus {
    outline: none;
    border-color: #0066b1;
    box-shadow: 0 0 0 4px rgba(0, 102, 177, 0.1);
}

.bmw-address-fields .select2-container--default .select2-selection--single {
    height: auto;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
}

.bmw-address-fields .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.5;
    padding: 0;
    color: #111827;
}

.bmw-address-fields .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 12px;
}

/* ====================================
   BMW VIEW ORDER - Modern 2025
   ==================================== */

.bmw-view-order-modern {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bmw-view-order-header {
    margin-bottom: 8px;
}

/* Order Hero */
.bmw-order-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #efefef;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.bmw-order-hero-content {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.bmw-order-hero-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0066b1;
    border-radius: 6px;
    color: #fff;
}

.bmw-order-hero-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bmw-order-hero-label {
    font-size: 13px;
    font-weight: 600;
    color: black;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bmw-order-hero-number {
    font-size: 32px;
    font-weight: 600;
    color: black;
    margin: 0;
    letter-spacing: -1px;
}

.bmw-order-hero-meta {
    display: flex;
    gap: 16px;
}

.bmw-order-hero-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: black;
}

.bmw-order-hero .bmw-order-status {
    position: relative;
    z-index: 1;
}

/* Order Updates Timeline */
.bmw-order-updates {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.bmw-updates-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
}

.bmw-updates-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-radius: 6px;
    color: #fff;
}

.bmw-updates-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.bmw-updates-timeline {
    padding: 24px;
}

.bmw-update-item {
    display: flex;
    gap: 16px;
    padding-bottom: 20px;
    position: relative;
}

.bmw-update-item:last-child {
    padding-bottom: 0;
}

.bmw-update-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 20px;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.bmw-update-dot {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #0066b1 0%, #0080d4 100%);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
}

.bmw-update-content {
    flex: 1;
}

.bmw-update-date {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    margin-bottom: 6px;
}

.bmw-update-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
}

.bmw-update-text p {
    margin: 0;
}

/* ====================================
   BMW ORDER DETAILS - Modern 2025
   ==================================== */

.bmw-order-details-modern {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bmw-details-section {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.bmw-details-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
}

.bmw-details-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-radius: 6px;
    color: #fff;
}

.bmw-details-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

/* Products List */
.bmw-products-list {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bmw-product-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.bmw-product-row:hover {
    background: #f3f4f6;
}

.bmw-product-thumb {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    background: #e5e7eb;
    flex-shrink: 0;
}

.bmw-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bmw-product-thumb .bmw-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.bmw-product-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bmw-product-name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.bmw-product-name a {
    color: inherit;
    text-decoration: none;
}

.bmw-product-name a:hover {
    color: #0066b1;
}

.bmw-product-qty {
    font-size: 13px;
    color: #6b7280;
}

.bmw-product-info .wc-item-meta {
    margin: 4px 0 0 0;
    padding: 0;
    list-style: none;
}

.bmw-product-info .wc-item-meta li {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 2px;
}

.bmw-product-info .wc-item-meta li strong {
    font-weight: 600;
    color: #374151;
}

.bmw-product-total {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
}

.bmw-purchase-note {
    padding: 12px 16px;
    background: #fef3c7;
    border-radius: 6px;
    margin-top: -8px;
    margin-left: 86px;
}

.bmw-purchase-note p {
    font-size: 13px;
    color: #92400e;
    margin: 0;
}

/* Order Totals */
.bmw-order-totals {
    padding: 20px 24px;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bmw-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bmw-total-label {
    font-size: 14px;
    color: #6b7280;
}

.bmw-total-value {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.bmw-total-row.order_total {
    padding-top: 12px;
    border-top: 2px solid #e5e7eb;
    margin-top: 8px;
}

.bmw-total-row.order_total .bmw-total-label {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.bmw-total-row.order_total .bmw-total-value {
    font-size: 20px;
    font-weight: 800;
    color: #0066b1;
}

/* Customer Note */
.bmw-customer-note {
    padding: 16px 24px;
    background: #fef3c7;
    border-top: 1px solid #fde68a;
    display: flex;
    gap: 8px;
}

.bmw-note-label {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
}

.bmw-note-text {
    font-size: 14px;
    color: #92400e;
}

/* Order Actions */
.bmw-order-actions {
    padding: 20px 24px;
    background: #fff;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ====================================
   BMW CUSTOMER DETAILS - Modern 2025
   ==================================== */

.bmw-customer-details-modern {
    margin-top: 24px;
}

.bmw-customer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.bmw-customer-grid.has-shipping {
    grid-template-columns: repeat(2, 1fr);
}

.bmw-customer-card {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.bmw-customer-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
}

.bmw-customer-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-radius: 6px;
    color: #fff;
}

.bmw-customer-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.bmw-customer-card-body {
    padding: 20px;
}

.bmw-address-text {
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 16px;
}

.bmw-address-text br {
    display: block;
    margin-bottom: 2px;
}

.bmw-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
}

.bmw-contact-item:last-child {
    margin-bottom: 0;
}

.bmw-contact-icon {
    color: #9ca3af;
}

/* ====================================
   RESPONSIVE
   ==================================== */

@media (max-width: 1200px) {
    .bmw-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bmw-info-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    /* Layout Mobile - Colonna singola */
    .bmw-account-modern {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px;
        padding: 12px;
    }
    
    .bmw-account-modern > .bmw-account-sidebar {
        grid-column: auto;
        grid-row: auto;
        order: 1;
    }
    
    .bmw-account-modern > main.bmw-account-main,
    .bmw-account-modern > .bmw-account-main {
        grid-column: auto;
        grid-row: auto;
        order: 2;
    }
    
    .bmw-account-sidebar {
        position: static;
        width: 100%;
    }
    
    .bmw-nav-modern {
        border-radius: 6px;
        background: transparent;
        box-shadow: none;
        border: none;
        overflow: visible;
    }
    
    /* Mostra Pill Mobile, nascondi resto */
    .bmw-mobile-nav-pill {
        display: block;
        position: relative;
        z-index: 50;
    }
    
    .bmw-profile-card,
    .bmw-nav-section,
    .bmw-nav-footer {
        display: none !important;
    }
    
    /* Profile Card Mobile - Nascosto (ora nel pill) */
    .bmw-profile-card {
        padding: 16px 20px;
        display: none;
        align-items: center;
        gap: 16px;
    }
    
    .bmw-profile-avatar {
        width: 50px;
        height: 50px;
        margin-bottom: 0;
    }
    
    .bmw-avatar-initials {
        font-size: 18px;
    }
    
    .bmw-profile-info {
        flex: 1;
    }
    
    .bmw-profile-name {
        font-size: 16px;
        margin-bottom: 2px;
    }
    
    .bmw-profile-email {
        font-size: 12px;
    }
    
    .bmw-profile-badge {
        display: none;
    }
    
    /* Navigation Mobile - Icone orizzontali */
    .bmw-nav-section {
        padding: 12px;
    }
    
    .bmw-nav-label {
        display: none;
    }
    
    .bmw-nav-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    
    .bmw-nav-item {
        margin: 0;
        flex: 0 0 auto;
    }
    
    .bmw-nav-item a {
        padding: 10px 12px;
        border-radius: 6px;
        gap: 8px;
        flex-direction: column;
        align-items: center;
        font-size: 11px;
    }
    
    .bmw-nav-icon {
        width: 36px;
        height: 36px;
        border-radius: 6px;
    }
    
    .bmw-nav-text {
        display: block;
        font-size: 10px;
        text-align: center;
        white-space: nowrap;
    }
    
    .bmw-nav-arrow {
        display: none;
    }
    
    /* Submenu Mobile */
    .bmw-nav-group > .bmw-group-toggle {
        padding: 10px 12px;
        flex-direction: column;
        align-items: center;
        font-size: 11px;
        border-radius: 6px;
    }
    
    .bmw-nav-chevron {
        display: none;
    }
    
    .bmw-submenu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-radius: 6px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        z-index: 100;
        margin: 8px 0 0 0;
    }
    
    .bmw-nav-group {
        position: relative;
    }
    
    .bmw-nav-child a {
        padding: 12px 16px;
        flex-direction: row;
    }
    
    .bmw-nav-child a::before {
        display: none;
    }
    
    /* Logout Mobile */
    .bmw-nav-footer {
        padding: 12px;
        border-top: 1px solid #f3f4f6;
    }
    
    .bmw-logout-link {
        padding: 10px 16px;
        justify-content: center;
        border-radius: 6px;
    }
    
    .bmw-account-content-inner {
        padding: 20px 16px;
        border-radius: 6px;
    }
    
    .bmw-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .bmw-stat-card {
        padding: 20px;
        border-radius: 6px;
    }
    
    .bmw-order-header,
    .bmw-order-items,
    .bmw-order-footer {
        padding: 16px 20px;
    }
    
    .bmw-order-footer {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .bmw-view-order-btn {
        justify-content: center;
    }
    
    .bmw-addresses-grid {
        grid-template-columns: 1fr;
    }
    
    .bmw-order-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .bmw-order-card-body {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bmw-order-total-wrap {
        align-items: flex-start;
        width: 100%;
        padding-top: 16px;
        border-top: 1px solid #f3f4f6;
    }
    
    .bmw-order-card-footer {
        flex-wrap: wrap;
    }
    
    .bmw-form-row-half {
        flex: 1 1 100%;
    }
    
    .bmw-section-header {
        flex-wrap: wrap;
    }
    
    .bmw-security-badge {
        margin-left: auto;
    }
    
    .bmw-order-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 24px;
    }
    
    .bmw-order-hero-number {
        font-size: 26px;
    }
    
    .bmw-order-hero-icon {
        width: 52px;
        height: 52px;
    }
    
    .bmw-customer-grid.has-shipping {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .bmw-account-modern {
        padding: 12px;
    }
    
    .bmw-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .bmw-stat-card {
        flex-direction: row;
        align-items: center;
    }
    
    .bmw-stat-icon-wrap {
        width: 44px;
        height: 44px;
    }
    
    .bmw-stat-value {
        font-size: 18px;
    }
    
    .bmw-orders-title-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .bmw-orders-icon {
        width: 48px;
        height: 48px;
    }
    
    .bmw-orders-title {
        font-size: 20px;
    }
    
    .bmw-order-thumb {
        width: 50px;
        height: 50px;
    }
    
    .bmw-order-number-link {
        font-size: 16px;
    }
    
    .bmw-orders-pagination {
        flex-direction: column;
        gap: 12px;
    }
    
    .bmw-pagination-btn {
        width: 100%;
        justify-content: center;
    }
    
    .bmw-addresses-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .bmw-addresses-icon {
        width: 48px;
        height: 48px;
    }
    
    .bmw-addresses-title {
        font-size: 20px;
    }
    
    .bmw-address-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .bmw-address-edit-btn {
        width: 100%;
        justify-content: center;
    }
    
    .bmw-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bmw-section-icon {
        width: 44px;
        height: 44px;
    }
    
    .bmw-security-badge {
        margin-left: 0;
    }
    
    .bmw-form-actions {
        flex-direction: column;
    }
    
    .bmw-submit-btn,
    .bmw-cancel-btn {
        width: 100%;
        justify-content: center;
    }
    
    .bmw-address-fields .form-row-first,
    .bmw-address-fields .form-row-last {
        flex: 1 1 100%;
    }
    
    .bmw-order-hero {
        padding: 20px;
    }
    
    .bmw-order-hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .bmw-order-hero-number {
        font-size: 22px;
    }
    
    .bmw-product-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .bmw-product-thumb {
        width: 60px;
        height: 60px;
    }
    
    .bmw-product-total {
        align-self: flex-end;
    }
    
    .bmw-purchase-note {
        margin-left: 0;
    }
    
    .bmw-order-actions {
        flex-direction: column;
    }
    
    .bmw-order-actions .bmw-order-action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ====================================
   AVATAR SECTION
   ==================================== */

/* === AVATAR SECTION IN EDIT ACCOUNT === */
.bmw-avatar-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #e5e7eb;
}

.bmw-avatar-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 20px 0;
}

.bmw-avatar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bmw-avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #0066b1 0%, #0080d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bmw-avatar-preview img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}

.bmw-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bmw-avatar-placeholder .bmw-avatar-initials {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
}

.bmw-avatar-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bmw-avatar-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #111827;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bmw-avatar-upload-btn:hover {
    background: #0066b1;
    transform: translateY(-2px);
}

.bmw-avatar-upload-btn svg {
    flex-shrink: 0;
}

.bmw-avatar-remove-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bmw-avatar-remove-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

.bmw-avatar-loading {
    display: inline-flex;
    align-items: center;
    color: #0066b1;
}

.bmw-spinner {
    animation: bmw-spin 1s linear infinite;
}

@keyframes bmw-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.bmw-avatar-hint {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

/* === PROFILE AVATAR IN SIDEBAR WITH IMAGE === */
.bmw-profile-avatar img {
    width: 100%;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50%;
}

/* === AVATAR RESPONSIVE === */
@media (max-width: 480px) {
    .bmw-avatar-preview {
        width: 100px;
        height: 100px;
    }
    
    .bmw-avatar-placeholder .bmw-avatar-initials {
        font-size: 28px;
    }
    
    .bmw-avatar-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bmw-avatar-upload-btn,
    .bmw-avatar-remove-btn {
        width: 100%;
        justify-content: center;
    }
}
