/* ============================================
   ORBFIT — MY ACCOUNT / LOGIN / REGISTER
   Targets the classic WooCommerce My Account
   shortcode markup (.woocommerce-* classes)
   Load AFTER your main theme stylesheet.
============================================ */

:root {
    --primary: #346739;
    --primary-dark: #244a28;
    --primary-light: #eaf3ea;
    --dark: #000200;
    --white: #FFFFFF;
    --light: #f7f7f7;
    --gray: #666666;
    --border: #e5e5e5;
    --danger: #c0392b;
    --danger-bg: #fdeceb;
    --radius-sm: 4px;
    --radius-md: 10px;
    --shadow-card: 0 2px 14px rgba(0, 2, 0, 0.06);
    --shadow-hover: 0 10px 28px rgba(0, 2, 0, 0.12);
    --ease: 0.22s ease;
}

/**
 * My Account
 * Astra Child Theme
 *
 * Loaded only on is_account_page() — see inc/shop/product-enhancements.php.
 * Depends on --ps-green/--ps-black/--ps-white/--ps-gray-100/--ps-gray-300
 * declared in quick-view.css.
 */

.woocommerce-account {
    --ps-font: 'DIN Condensed', 'Arial Narrow', Arial, sans-serif;
}

/* ===================================================
   LOGGED-IN DASHBOARD LAYOUT
=================================================== */

.woocommerce-account.logged-in {
    background: var(--ps-gray-100);
}

.woocommerce-account.logged-in .woocommerce {
    font-family: var(--ps-font);
    color: var(--ps-black);
    max-width: 1200px;
    margin: 0 auto;
    padding: 3vw 2.6vw 6vw;
    display: flex;
    align-items: flex-start;
    gap: 2.4vw;
}

/* ===== Sidebar nav ===== */
.ps-account-nav {
    width: 250px;
    flex-shrink: 0;
    background: var(--ps-white);
    border: 1px solid var(--ps-gray-300);
    box-shadow: 0 1px 3px rgba(0, 2, 0, 0.06);
}

.ps-account-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ps-account-nav li {
    border-bottom: 1px solid var(--ps-gray-100);
}

.ps-account-nav li:last-child {
    border-bottom: none;
}

.ps-account-nav li a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.8vw;
    padding: 1vw 1.2vw;
    font-size: 0.88vw;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ps-black);
    opacity: .6;
    text-decoration: none;
    transition: opacity .15s ease, color .15s ease, background .15s ease;
}

.ps-nav-icon {
    width: 1.15vw;
    height: 1.15vw;
    min-width: 16px;
    min-height: 16px;
    flex-shrink: 0;
}

.ps-nav-chevron {
    width: 0.8vw;
    height: 0.8vw;
    min-width: 12px;
    min-height: 12px;
    margin-left: auto;
    opacity: 0;
    transition: opacity .15s ease;
}

.ps-account-nav li a:hover,
.ps-account-nav li.is-active a {
    opacity: 1;
    color: var(--ps-green);
    background: var(--ps-gray-100);
}

.ps-account-nav li.is-active a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--ps-green);
}

.ps-account-nav li a:hover .ps-nav-chevron,
.ps-account-nav li.is-active a .ps-nav-chevron {
    opacity: 1;
}

/* ===== Content column ===== */
.woocommerce-account.logged-in .woocommerce-MyAccount-content {
    flex: 1;
    min-width: 0;
    background: var(--ps-white);
    border: 1px solid var(--ps-gray-300);
    box-shadow: 0 1px 3px rgba(0, 2, 0, 0.06);
    padding: 2.2vw 2.4vw;
}

.woocommerce-account .woocommerce-MyAccount-content a {
    color: var(--ps-green);
}

/* ===== Dashboard ===== */
.ps-dashboard-welcome h2 {
    font-size: 1.7vw;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.8vw;
}

.ps-dashboard-welcome h2 span {
    color: var(--ps-green);
}

.ps-dashboard-welcome p {
    font-size: 0.95vw;
    line-height: 1.7;
    opacity: .75;
    margin-bottom: 2vw;
}

.ps-dashboard-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2vw;
}

.ps-dashboard-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8vw;
    padding: 1.8vw 1vw;
    border: 1px solid var(--ps-gray-100);
    text-decoration: none;
    color: var(--ps-black);
    transition: border-color .15s ease, background .15s ease;
}

.ps-dashboard-tile:hover {
    border-color: var(--ps-green);
    background: var(--ps-gray-100);
}

.ps-dashboard-tile svg {
    width: 1.8vw;
    height: 1.8vw;
    min-width: 26px;
    min-height: 26px;
    color: var(--ps-green);
}

.ps-dashboard-tile span {
    font-size: 0.82vw;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ===== Order cards ===== */
.ps-orders-list {
    display: flex;
    flex-direction: column;
    gap: 1.2vw;
}

.ps-order-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.6vw;
    padding: 1.4vw;
    border: 1px solid var(--ps-gray-100);
}

.ps-order-thumbs {
    display: flex;
    align-items: center;
    position: relative;
}

.ps-order-thumbs img {
    width: 3.2vw;
    height: 3.8vw;
    min-width: 44px;
    min-height: 52px;
    object-fit: cover;
    border: 2px solid var(--ps-white);
    margin-left: -0.8vw;
}

.ps-order-thumbs img:first-child {
    margin-left: 0;
}

.ps-order-thumbs-more {
    margin-left: 0.5vw;
    font-size: 0.8vw;
    font-weight: 700;
    opacity: .6;
}

.ps-order-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0 2.4vw;
}

.ps-order-info-row {
    display: flex;
    flex-direction: column;
    gap: 0.2vw;
}

.ps-order-label {
    font-size: 0.72vw;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: .5;
}

.ps-order-value {
    font-size: 0.9vw;
    font-weight: 700;
}

.ps-order-status {
    font-size: 0.85vw;
    font-weight: 700;
}

.ps-status-completed { color: var(--ps-green); }
.ps-status-processing { color: #b8860b; }
.ps-status-on-hold { color: #b8860b; }
.ps-status-cancelled,
.ps-status-failed,
.ps-status-refunded { color: #b02a2a; }

.ps-order-actions {
    display: flex;
    gap: 0.6vw;
    flex-wrap: wrap;
    justify-self: end;
}

.ps-order-action {
    display: inline-block;
    padding: 0.6vw 1.2vw;
    border: 1px solid var(--ps-black);
    font-size: 0.78vw;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ps-black);
    text-decoration: none;
    white-space: nowrap;
}

.ps-order-action:hover {
    background: var(--ps-black);
    color: var(--ps-white);
}

.ps-order-action-cancel {
    border-color: #b02a2a;
    color: #b02a2a;
}

.ps-order-action-cancel:hover {
    background: #b02a2a;
    color: var(--ps-white);
}

.ps-orders-pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 1.6vw;
}

.ps-page-link {
    font-size: 0.85vw;
    font-weight: 700;
    color: var(--ps-green);
    text-decoration: none;
}

.ps-orders-empty {
    padding: 3vw 0;
    text-align: center;
}

.ps-orders-empty p {
    font-size: 1vw;
    opacity: .7;
    margin-bottom: 1.2vw;
}

.ps-continue-shopping-btn {
    display: inline-block;
    background: var(--ps-green);
    color: var(--ps-white) !important;
    border: 1px solid var(--ps-green);
    padding: 0.9vw 2vw;
    font-size: 0.9vw;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
}

/* ===== Generic account content (orders table fallback, addresses, forms) ===== */
.woocommerce-account.logged-in table.shop_table th {
    text-align: left;
    padding: 0.9vw 1vw;
    font-size: 0.78vw;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--ps-gray-100);
}

.woocommerce-account.logged-in table.shop_table td {
    padding: 0.9vw 1vw;
    font-size: 0.9vw;
    border-bottom: 1px solid var(--ps-gray-100);
}

.woocommerce-account.logged-in form .form-row {
    margin-bottom: 1.1vw;
}

.woocommerce-account.logged-in form label {
    display: block;
    font-size: 0.82vw;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5vw;
    opacity: .75;
}

.woocommerce-account.logged-in form input[type="text"],
.woocommerce-account.logged-in form input[type="email"],
.woocommerce-account.logged-in form input[type="password"],
.woocommerce-account.logged-in form input[type="tel"],
.woocommerce-account.logged-in form select {
    width: 100%;
    padding: 0.85vw 1vw;
    border: 1px solid var(--ps-gray-300);
    font-family: var(--ps-font);
    font-size: 0.95vw;
}

.woocommerce-account.logged-in form input:focus,
.woocommerce-account.logged-in form select:focus {
    outline: none;
    border-color: var(--ps-green);
}

.woocommerce-account.logged-in button[type="submit"],
.woocommerce-account.logged-in .button {
    display: inline-block;
    background: var(--ps-green) !important;
    color: var(--ps-white) !important;
    border: 1px solid var(--ps-green) !important;
    padding: 0.9vw 2vw;
    font-family: var(--ps-font);
    font-size: 0.9vw;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
}

.woocommerce-account.logged-in button[type="submit"]:hover,
.woocommerce-account.logged-in .button:hover {
    background: var(--ps-black) !important;
    border-color: var(--ps-black) !important;
}

.woocommerce-account .woocommerce-Addresses {
    display: flex;
    gap: 2vw;
    flex-wrap: wrap;
}

.woocommerce-account .woocommerce-Address {
    flex: 1;
    min-width: 280px;
}

.woocommerce-account .woocommerce-Address-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1vw;
}

.woocommerce-account .woocommerce-Address-title h3 {
    font-size: 1.1vw;
    font-weight: 700;
    text-transform: uppercase;
}

.woocommerce-account address {
    font-style: normal;
    font-size: 0.92vw;
    line-height: 1.7;
    opacity: .8;
}

.woocommerce-account.logged-in .woocommerce-error,
.woocommerce-account.logged-in .woocommerce-message,
.woocommerce-account.logged-in .woocommerce-info {
    list-style: none;
    padding: 1vw 1.4vw;
    margin-bottom: 1.6vw;
    border: 1px solid var(--ps-gray-300);
    border-left: 3px solid var(--ps-black);
    font-size: 0.9vw;
    background: var(--ps-white);
}

.woocommerce-account.logged-in .woocommerce-message { border-left-color: var(--ps-green); }
.woocommerce-account.logged-in .woocommerce-error { border-left-color: #b02a2a; }

/* ===================================================
   LOGIN / REGISTER — split screen
=================================================== */

.woocommerce-account:not(.logged-in) .woocommerce {
    max-width: none;
    margin: 0;
    padding: 0;
}

.ps-auth-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 78vh;
    font-family: var(--ps-font);
}

.ps-auth-panels {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vw;
}

.ps-auth-panel {
    width: 100%;
    max-width: 400px;
}

.ps-auth-panel.ps-hidden {
    display: none;
}

.ps-auth-logo {
    font-size: 1.3vw;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--ps-green);
    margin-bottom: 2vw;
}

.ps-auth-eyebrow {
    font-size: 0.85vw;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: .55;
    margin-bottom: 0.4vw;
}

.ps-auth-panel h1 {
    font-size: 2.2vw;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ps-black);
    margin-bottom: 1.8vw;
}

.g_id_signin {
    margin-bottom: 1vw;
}

.ps-google-status {
    font-size: 0.8vw;
    color: var(--ps-green);
    min-height: 1em;
}

.ps-auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.6vw 0;
    color: var(--ps-black);
    opacity: .4;
    font-size: 0.8vw;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ps-auth-divider::before,
.ps-auth-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--ps-gray-300);
}

.ps-auth-divider span {
    padding: 0 1vw;
}

.ps-auth-panel .form-row {
    margin-bottom: 1.2vw;
}

.ps-auth-panel label {
    display: block;
    font-size: 0.8vw;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5vw;
    opacity: .7;
}

.ps-auth-panel .required {
    color: var(--ps-green);
    text-decoration: none;
}

.ps-auth-panel input[type="text"],
.ps-auth-panel input[type="email"],
.ps-auth-panel input[type="password"] {
    width: 100%;
    padding: 0.9vw 1vw;
    border: 1px solid var(--ps-gray-300);
    font-family: var(--ps-font);
    font-size: 0.95vw;
}

.ps-auth-panel input:focus {
    outline: none;
    border-color: var(--ps-green);
}

.ps-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82vw;
}

.ps-auth-row label {
    display: flex;
    align-items: center;
    gap: 0.5vw;
    text-transform: none;
    font-weight: 400;
    opacity: .8;
    margin: 0;
}

.ps-forgot-link {
    color: var(--ps-black);
    opacity: .55;
    text-decoration: underline;
}

.ps-auth-note {
    font-size: 0.85vw;
    opacity: .65;
    margin-bottom: 1.2vw;
}

.ps-auth-submit {
    display: block;
    width: 100%;
    background: var(--ps-green) !important;
    color: var(--ps-white) !important;
    border: 1px solid var(--ps-green) !important;
    padding: 1vw;
    margin-top: 0.6vw;
    font-family: var(--ps-font);
    font-size: 0.92vw;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background .18s ease;
}

.ps-auth-submit:hover {
    background: var(--ps-black) !important;
    border-color: var(--ps-black) !important;
}

.ps-auth-switch {
    text-align: center;
    margin-top: 1.8vw;
    font-size: 0.88vw;
    opacity: .75;
}

.ps-auth-switch a {
    color: var(--ps-green);
    font-weight: 700;
    text-decoration: none;
}

/* ===== Illustration side ===== */
.ps-auth-illustration {
    background: var(--ps-green);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3vw;
}

.ps-auth-illustration svg {
    width: 100%;
    max-width: 380px;
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 1024px) {
    .woocommerce-account.logged-in .woocommerce {
        flex-direction: column;
    }

    .ps-account-nav {
        width: 100%;
    }

    .ps-account-nav ul {
        display: flex;
        flex-wrap: wrap;
    }

    .ps-account-nav li {
        border-bottom: none;
        border-right: 1px solid var(--ps-gray-100);
    }

    .ps-dashboard-tiles {
        grid-template-columns: repeat(2, 1fr);
    }

    .ps-auth-page {
        grid-template-columns: 1fr;
    }

    .ps-auth-illustration {
        display: none;
    }
}

@media (max-width: 768px) {
    .woocommerce-account.logged-in .woocommerce {
        padding: 6vw 4vw 10vw;
    }

    .woocommerce-account.logged-in .woocommerce-MyAccount-content {
        padding: 6vw 5vw;
    }

    .ps-dashboard-welcome h2 { font-size: 5.4vw; }
    .ps-dashboard-welcome p,
    .ps-account-nav li a,
    .woocommerce-account.logged-in form label,
    .woocommerce-account.logged-in form input,
    .woocommerce-account.logged-in button[type="submit"],
    .woocommerce-account.logged-in table.shop_table td {
        font-size: 3.4vw;
    }

    .ps-order-card {
        grid-template-columns: 1fr;
        gap: 3vw;
    }

    .ps-order-actions {
        justify-self: start;
    }

    .ps-auth-panels {
        padding: 8vw 6vw;
    }

    .ps-auth-panel h1 { font-size: 7vw; }
    .ps-auth-logo { font-size: 4.5vw; }
}