/* ── My Account Layout ── */
.pt-myaccount-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: 2rem 0;
}

.pt-myaccount-nav {
    width: 30%;
    flex-shrink: 0;
    background: white;
    border-radius: 1.5rem;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.05);
    overflow: hidden;
    position: sticky;
    top: 6rem;
}

.pt-myaccount-content {
    flex: 1;
    min-width: 0;
    background: white;
    border-radius: 1.5rem;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.05);
    padding: 2.5rem;
}

/* ── Nav items ── */
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0 !important;
    padding: 0;
}

.woocommerce-MyAccount-navigation {
    width: 100% !important;
}

.woocommerce-MyAccount-navigation-link {
    padding: 0 0 !important;
}

.woocommerce-MyAccount-navigation ul li a {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.65rem 1.25rem;
    color: #044165 !important;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none !important;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.woocommerce-MyAccount-navigation ul li {
    position: relative;
    overflow: visible; /* let the ::before escape */
}

.woocommerce-MyAccount-navigation ul li a:hover {
    background-color: #f9fafb !important;
    color: #00A1FF !important;
}

.woocommerce-MyAccount-navigation ul li a:hover::before,
.woocommerce-MyAccount-navigation ul li.is-active a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #00A1FF;
}

.woocommerce-MyAccount-navigation ul li.is-active a {
    background-color: #f0f9ff !important;
    color: #00A1FF !important;
    font-weight: 700;
}

.woocommerce-MyAccount-navigation ul li:not(:last-child) {
    border-bottom: 1px solid #f3f4f6;
}

/* ── Content headings ── */
.woocommerce-MyAccount-content h2,
.woocommerce-MyAccount-content h3 {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #044165 !important;
    margin-bottom: 1.5rem !important;
    padding-bottom: 1rem !important;
    border-bottom: 2px solid #f3f4f6 !important;
}

/* ── Dashboard welcome box ── */
.woocommerce-MyAccount-content .woocommerce-message,
.woocommerce-MyAccount-content .woocommerce-info {
    border-radius: 1rem !important;
    border-top: none !important;
    border-left: 4px solid #00A1FF !important;
    background: #f0f9ff !important;
    padding: 1.25rem 1.5rem !important;
    color: #044165 !important;
    font-size: 0.9rem !important;
    margin-bottom: 1.5rem !important;
}

.woocommerce-MyAccount-content .woocommerce-message::before,
.woocommerce-MyAccount-content .woocommerce-info::before {
    display: none !important;
}

/* ── Orders table ── */
.woocommerce-orders-table {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce-orders-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #044165;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.woocommerce-orders-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
    color: #374151;
    vertical-align: middle;
}

.woocommerce-orders-table tr:last-child td {
    border-bottom: none;
}

.woocommerce-orders-table tr:hover td {
    background-color: #f9fafb;
}

.woocommerce-orders-table .button {
    background-color: transparent !important;
    border: 2px solid #00A1FF !important;
    color: #00A1FF !important;
    padding: 0.375rem 1rem !important;
    font-size: 0.8rem !important;
}

.woocommerce-orders-table .button:hover {
    background-color: #00A1FF !important;
    color: white !important;
}

/* ── Order status badges ── */
mark.order-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: none;
}

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

mark.order-status.status-processing {
    background-color: #dbeafe !important;
    color: #1e40af !important;
}

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

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

/* ── Address sections ── */
.woocommerce-Address {
    background: #f9fafb;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #f3f4f6;
}

.woocommerce-Address-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem !important;
    padding-bottom: 0.75rem !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.woocommerce-Address-title h3 {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    font-size: 1rem !important;
}

.woocommerce-Address-title .edit {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: #00A1FF !important;
    text-decoration: none !important;
}

.woocommerce-Address-title .edit:hover {
    color: #0087d6 !important;
}

address {
    font-style: normal;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.7;
}

/* ── Account details form ── */
.woocommerce-EditAccountForm fieldset {
    border: 1px solid #f3f4f6 !important;
    border-radius: 1rem !important;
    padding: 1.5rem !important;
    margin: 1.5rem 0 !important;
}

.woocommerce-EditAccountForm fieldset legend {
    font-weight: 700 !important;
    color: #044165 !important;
    font-size: 0.85rem !important;
    padding: 0 0.5rem !important;
}

/* ── Login form (my-account logged out) ── */
.woocommerce-form-login,
.woocommerce-form-register {
    background: white;
    border-radius: 1.5rem;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.05);
    padding: 2.5rem !important;
}

.woocommerce-form-login h2,
.woocommerce-form-register h2 {
    border-bottom: none !important;
    margin-bottom: 1.5rem !important;
    padding-bottom: 0 !important;
}

.woocommerce-form-login .woocommerce-form__label,
.woocommerce-form-register .woocommerce-form__label {
    font-weight: 600 !important;
    color: #044165 !important;
    font-size: 0.85rem !important;
    margin-bottom: 0.4rem !important;
    display: block !important;
}

.woocommerce-form-login .woocommerce-button,
.woocommerce-form-register .woocommerce-button {
    background-color: #00A1FF !important;
    color: white !important;
    border: none !important;
    border-radius: 9999px !important;
    padding: 0.75rem 2rem !important;
    font-weight: 700 !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
}

.woocommerce-form-login .woocommerce-button:hover,
.woocommerce-form-register .woocommerce-button:hover {
    background-color: #0087d6 !important;
}

.woocommerce-form-login .woocommerce-form__label-for-checkbox {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    font-size: 0.85rem !important;
    margin-bottom: 1rem !important;
}

.woocommerce-LostPassword {
    margin-top: 1rem;
    text-align: center;
}

.woocommerce-LostPassword a {
    font-size: 0.85rem !important;
    color: #00A1FF !important;
}

/* logged out: login + register side by side */
.woocommerce-account:not(.logged-in) .woocommerce {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.woocommerce-account:not(.logged-in) .woocommerce .woocommerce-form-login,
.woocommerce-account:not(.logged-in) .woocommerce .woocommerce-form-register {
    flex: 1;
    min-width: 280px;
    max-width: 100%;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .pt-myaccount-wrapper {
        flex-direction: column;
    }

    .pt-myaccount-nav {
        width: 100%;
        position: static;
    }

    .woocommerce-MyAccount-navigation ul {
        display: flex;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .woocommerce-MyAccount-navigation ul::-webkit-scrollbar {
        display: none;
    }

    .woocommerce-MyAccount-navigation ul li {
        border-bottom: none !important;
        flex-shrink: 0;
    }

    .woocommerce-MyAccount-navigation ul li a {
        padding: 0.75rem 1rem;
        white-space: nowrap;
    }

    .woocommerce-MyAccount-navigation ul li a:hover::before,
    .woocommerce-MyAccount-navigation ul li.is-active a::before {
        display: none;
    }

    .woocommerce-MyAccount-navigation ul li.is-active a {
        background: linear-gradient(to bottom, #ffffff 95%, #00A1FF 5%) !important;
        font-weight: 700;
    }

    .woocommerce-MyAccount-navigation ul li a:hover {
        background: linear-gradient(to bottom, #f9fafb 95%, #00A1FF 5%) !important;
    }

    .pt-myaccount-content {
        padding: 1.5rem;
        width: 100%;
    }

    .woocommerce-Addresses {
        grid-template-columns: 1fr;
    }

    .woocommerce-account:not(.logged-in) .woocommerce {
        flex-direction: column;
    }
}