body.woocommerce-account {
    --petaccount-bg: #faf8f4;
    --petaccount-card: #fff;
    --petaccount-text: #171717;
    --petaccount-muted: #837d73;
    --petaccount-border: #e7e0d5;
    --petaccount-soft: #f5f0e7;
    --petaccount-accent: #bf9959;
    --petaccount-radius: 14px;
    background: var(--petaccount-bg);
}

body.woocommerce-account .entry-title,
body.woocommerce-account .page-title {
    display: none !important;
}

body.woocommerce-account .woocommerce {
    box-sizing: border-box;
    width: min(1400px, calc(100% - 40px));
    max-width: 1400px;
    margin: 0 auto;
    color: var(--petaccount-text);
}

.petaccount-heading {
    margin: 12px 0 30px;
}

.petaccount-heading h1 {
    margin: 0;
    color: var(--petaccount-text);
    font-size: clamp(38px, 4vw, 58px);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: .98;
}

.petaccount-heading p {
    margin: 12px 0 0;
    color: #aaa398;
    font-size: 17px;
    font-weight: 650;
}

/* Zalogowane konto: nawigacja + treść */
body.woocommerce-account.logged-in .woocommerce {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 24px 28px;
    align-items: start;
}

body.woocommerce-account.logged-in .woocommerce > .petaccount-heading,
body.woocommerce-account.logged-in .woocommerce > .woocommerce-notices-wrapper,
body.woocommerce-account.logged-in .woocommerce > .woocommerce-message,
body.woocommerce-account.logged-in .woocommerce > .woocommerce-error,
body.woocommerce-account.logged-in .woocommerce > .woocommerce-info {
    grid-column: 1 / -1;
}

body.woocommerce-account .woocommerce-MyAccount-navigation {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 12px;
    border: 1px solid var(--petaccount-border);
    border-radius: var(--petaccount-radius);
    background: var(--petaccount-card);
    box-sizing: border-box;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

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

body.woocommerce-account .woocommerce-MyAccount-navigation li + li {
    margin-top: 3px !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 38px 0 14px;
    border-radius: 9px;
    color: #5f5a53 !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none !important;
    transition: background-color .15s ease, color .15s ease;
}

body.woocommerce-account .woocommerce-MyAccount-navigation a::after {
    content: "→";
    position: absolute;
    top: 50%;
    right: 14px;
    color: #a59e93;
    font-size: 17px;
    font-weight: 500;
    transform: translateY(-50%);
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
body.woocommerce-account .woocommerce-MyAccount-navigation a:hover {
    background: var(--petaccount-soft);
    color: var(--petaccount-text) !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
    font-weight: 800;
}

body.woocommerce-account .woocommerce-MyAccount-content {
    float: none !important;
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0;
    margin: 0 !important;
    padding: 30px;
    border: 1px solid var(--petaccount-border);
    border-radius: var(--petaccount-radius);
    background: var(--petaccount-card);
}

body.woocommerce-account .woocommerce-MyAccount-content > :first-child {
    margin-top: 0 !important;
}

body.woocommerce-account .woocommerce-MyAccount-content > :last-child {
    margin-bottom: 0 !important;
}

body.woocommerce-account .woocommerce-MyAccount-content h2,
body.woocommerce-account .woocommerce-MyAccount-content h3,
body.woocommerce-account .woocommerce-MyAccount-content legend {
    color: var(--petaccount-text);
    font-weight: 800;
    letter-spacing: -0.02em;
}

body.woocommerce-account .woocommerce-MyAccount-content h2 {
    margin: 0 0 22px;
    font-size: 28px;
}

body.woocommerce-account .woocommerce-MyAccount-content h3,
body.woocommerce-account .woocommerce-MyAccount-content legend {
    margin: 0 0 18px;
    font-size: 20px;
}

body.woocommerce-account .woocommerce-MyAccount-content p {
    color: #5f5a53;
    line-height: 1.65;
}

body.woocommerce-account .woocommerce-MyAccount-content p a:not(.button) {
    color: var(--petaccount-text) !important;
    font-weight: 700;
    text-decoration-color: #c9b183;
    text-underline-offset: 3px;
}

/* Dashboard */
body.woocommerce-account .woocommerce-MyAccount-content > p:first-of-type {
    margin-top: 0;
    font-size: 16px;
}

/* Formularze */
body.woocommerce-account .form-row {
    margin: 0 0 16px !important;
    padding: 0 !important;
}

body.woocommerce-account .form-row label {
    display: block;
    margin: 0 0 7px;
    color: #5f5a53;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

body.woocommerce-account .required {
    color: var(--petaccount-accent) !important;
    text-decoration: none !important;
}

body.woocommerce-account .input-text,
body.woocommerce-account input[type="text"],
body.woocommerce-account input[type="email"],
body.woocommerce-account input[type="tel"],
body.woocommerce-account input[type="password"],
body.woocommerce-account textarea,
body.woocommerce-account select,
body.woocommerce-account .select2-container .select2-selection--single {
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 48px;
    margin: 0 !important;
    padding: 11px 13px !important;
    border: 1px solid var(--petaccount-border) !important;
    border-radius: 9px !important;
    outline: 0 !important;
    background: #fff !important;
    color: var(--petaccount-text) !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    box-shadow: none !important;
}

body.woocommerce-account textarea {
    min-height: 110px;
    resize: vertical;
}

body.woocommerce-account .input-text:focus,
body.woocommerce-account input:focus,
body.woocommerce-account textarea:focus,
body.woocommerce-account select:focus,
body.woocommerce-account .select2-container--focus .select2-selection--single,
body.woocommerce-account .select2-container--open .select2-selection--single {
    border-color: var(--petaccount-accent) !important;
    box-shadow: 0 0 0 3px rgba(191, 153, 89, .12) !important;
}

body.woocommerce-account fieldset {
    margin: 26px 0 0 !important;
    padding: 22px 0 0 !important;
    border: 0 !important;
    border-top: 1px solid var(--petaccount-border) !important;
}

body.woocommerce-account fieldset legend {
    float: none;
    width: auto;
    padding: 0 12px 0 0;
    background: var(--petaccount-card);
}

body.woocommerce-account .show-password-input {
    top: 50% !important;
    right: 13px !important;
    transform: translateY(-50%);
}

/* Przyciski */
body.woocommerce-account .button,
body.woocommerce-account button.button,
body.woocommerce-account input.button {
    box-sizing: border-box !important;
    min-height: 46px;
    padding: 0 18px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: var(--petaccount-text) !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 46px !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transition: transform .15s ease, filter .15s ease;
}

body.woocommerce-account .button:hover,
body.woocommerce-account button.button:hover,
body.woocommerce-account input.button:hover {
    filter: brightness(.94);
    transform: translateY(-1px);
}

body.woocommerce-account .woocommerce-MyAccount-content form > p:last-child .button,
body.woocommerce-account .woocommerce-EditAccountForm > p:last-child .button {
    background: var(--petaccount-accent) !important;
    color: #111 !important;
}

/* Zamówienia */
body.woocommerce-account table.shop_table,
body.woocommerce-account .woocommerce-orders-table {
    width: 100% !important;
    margin: 0 !important;
    border: 1px solid var(--petaccount-border) !important;
    border-radius: 11px !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden;
    background: #fff;
}

body.woocommerce-account table.shop_table th,
body.woocommerce-account table.shop_table td {
    padding: 15px 16px !important;
    border: 0 !important;
    border-bottom: 1px solid #eee9e0 !important;
    background: transparent !important;
    text-align: left;
    vertical-align: middle;
}

body.woocommerce-account table.shop_table th {
    color: var(--petaccount-muted);
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .035em;
}

body.woocommerce-account table.shop_table td {
    color: var(--petaccount-text);
    font-size: 14px;
    font-weight: 600;
}

body.woocommerce-account table.shop_table tr:last-child td {
    border-bottom: 0 !important;
}

body.woocommerce-account table.shop_table td a:not(.button) {
    color: var(--petaccount-text) !important;
    font-weight: 800;
}

body.woocommerce-account table.shop_table .button {
    min-height: 38px;
    padding: 0 13px !important;
    font-size: 12px !important;
    line-height: 38px !important;
}

/* Adresy */
body.woocommerce-account .woocommerce-Addresses {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 20px 0 0 !important;
}

body.woocommerce-account .woocommerce-Address {
    float: none !important;
    box-sizing: border-box;
    width: 100% !important;
    margin: 0 !important;
    padding: 22px;
    border: 1px solid var(--petaccount-border);
    border-radius: 11px;
    background: #fff;
}

body.woocommerce-account .woocommerce-Address-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 16px;
}

body.woocommerce-account .woocommerce-Address-title h2,
body.woocommerce-account .woocommerce-Address-title h3 {
    float: none !important;
    margin: 0 !important;
    font-size: 18px !important;
}

body.woocommerce-account .woocommerce-Address-title .edit {
    float: none !important;
    color: var(--petaccount-text) !important;
    font-size: 13px;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: #c9b183;
    text-underline-offset: 3px;
}

body.woocommerce-account address {
    color: #5f5a53;
    font-style: normal;
    line-height: 1.65;
}

/* Szczegóły pojedynczego zamówienia */
body.woocommerce-account .woocommerce-order-details,
body.woocommerce-account .woocommerce-customer-details {
    margin-top: 28px;
}

body.woocommerce-account .woocommerce-customer-details address {
    padding: 20px !important;
    border: 1px solid var(--petaccount-border) !important;
    border-radius: 11px !important;
    background: #fff;
}

/* Komunikaty */
body.woocommerce-account .woocommerce-message,
body.woocommerce-account .woocommerce-info,
body.woocommerce-account .woocommerce-error {
    box-sizing: border-box;
    margin: 0 0 18px !important;
    padding: 15px 18px !important;
    border: 1px solid var(--petaccount-border) !important;
    border-top-width: 1px !important;
    border-radius: 10px;
    background: #fff !important;
    color: #5f5a53 !important;
    font-size: 14px;
    line-height: 1.45;
}

body.woocommerce-account .woocommerce-message::before,
body.woocommerce-account .woocommerce-info::before,
body.woocommerce-account .woocommerce-error::before {
    display: none !important;
}

/* Logowanie i rejestracja */
body.woocommerce-account:not(.logged-in) .woocommerce > .petaccount-heading {
    margin-bottom: 28px;
}

body.woocommerce-account #customer_login {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

body.woocommerce-account #customer_login .u-column1,
body.woocommerce-account #customer_login .u-column2 {
    float: none !important;
    box-sizing: border-box;
    width: 100% !important;
    margin: 0 !important;
    padding: 28px;
    border: 1px solid var(--petaccount-border);
    border-radius: var(--petaccount-radius);
    background: var(--petaccount-card);
}

body.woocommerce-account #customer_login h2 {
    margin: 0 0 22px;
    color: var(--petaccount-text);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.025em;
}

body.woocommerce-account form.woocommerce-form-login,
body.woocommerce-account form.woocommerce-form-register,
body.woocommerce-account form.woocommerce-ResetPassword,
body.woocommerce-account form.lost_reset_password {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

body.woocommerce-account:not(.logged-in) form.woocommerce-ResetPassword,
body.woocommerce-account:not(.logged-in) form.lost_reset_password {
    box-sizing: border-box;
    max-width: 680px;
    padding: 28px !important;
    border: 1px solid var(--petaccount-border) !important;
    border-radius: var(--petaccount-radius) !important;
    background: var(--petaccount-card);
}

body.woocommerce-account .woocommerce-LostPassword {
    margin: 14px 0 0;
}

body.woocommerce-account .woocommerce-LostPassword a {
    color: var(--petaccount-muted) !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

body.woocommerce-account label.woocommerce-form-login__rememberme {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 12px 0 0;
    color: #5f5a53;
    font-size: 13px;
    font-weight: 650;
}

body.woocommerce-account input[type="checkbox"] {
    accent-color: var(--petaccount-text);
}

@media (max-width: 900px) {
    body.woocommerce-account .woocommerce {
        width: min(100% - 28px, 760px);
    }

    .petaccount-heading {
        margin-bottom: 24px;
    }

    body.woocommerce-account.logged-in .woocommerce {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    body.woocommerce-account .woocommerce-MyAccount-navigation {
        overflow-x: auto;
        padding: 8px;
        scrollbar-width: thin;
    }

    body.woocommerce-account .woocommerce-MyAccount-navigation ul {
        display: flex;
        width: max-content;
        min-width: 100%;
        gap: 5px;
    }

    body.woocommerce-account .woocommerce-MyAccount-navigation li + li {
        margin-top: 0 !important;
    }

    body.woocommerce-account .woocommerce-MyAccount-navigation a {
        min-height: 42px;
        padding: 0 14px;
        white-space: nowrap;
    }

    body.woocommerce-account .woocommerce-MyAccount-navigation a::after {
        display: none;
    }

    body.woocommerce-account #customer_login {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .petaccount-heading h1 {
        font-size: 42px;
    }

    .petaccount-heading p {
        font-size: 15px;
    }

    body.woocommerce-account .woocommerce-MyAccount-content,
    body.woocommerce-account #customer_login .u-column1,
    body.woocommerce-account #customer_login .u-column2,
    body.woocommerce-account:not(.logged-in) form.woocommerce-ResetPassword,
    body.woocommerce-account:not(.logged-in) form.lost_reset_password {
        padding: 20px !important;
    }

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

    body.woocommerce-account table.shop_table_responsive thead {
        display: none;
    }

    body.woocommerce-account table.shop_table_responsive,
    body.woocommerce-account table.shop_table_responsive tbody,
    body.woocommerce-account table.shop_table_responsive tr,
    body.woocommerce-account table.shop_table_responsive td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    body.woocommerce-account table.shop_table_responsive tr {
        padding: 12px 0;
        border-bottom: 1px solid var(--petaccount-border);
    }

    body.woocommerce-account table.shop_table_responsive tr:last-child {
        border-bottom: 0;
    }

    body.woocommerce-account table.shop_table_responsive td {
        display: grid;
        grid-template-columns: minmax(90px, 38%) minmax(0, 1fr);
        gap: 12px;
        align-items: center;
        padding: 8px 14px !important;
        border-bottom: 0 !important;
        text-align: right !important;
    }

    body.woocommerce-account table.shop_table_responsive td::before {
        float: none !important;
        width: auto !important;
        color: var(--petaccount-muted);
        font-size: 12px;
        font-weight: 750;
        text-align: left;
    }

    body.woocommerce-account table.shop_table_responsive td.woocommerce-orders-table__cell-order-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 6px;
    }
}


/* v1.0.15 — korekta ekranu logowania / rejestracji.
   Resetujemy style .col2-set motywu, aby nagłówek i obie karty miały tę samą oś. */
body.woocommerce-account:not(.logged-in) .woocommerce {
    display: block !important;
}

body.woocommerce-account:not(.logged-in) .woocommerce > .petaccount-heading {
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    margin: 18px 0 34px !important;
    padding: 0 !important;
    clear: both !important;
}

body.woocommerce-account:not(.logged-in) .petaccount-heading p {
    margin-top: 13px !important;
    color: #746e65 !important;
    font-weight: 650 !important;
    line-height: 1.45 !important;
    opacity: 1 !important;
}

body.woocommerce-account:not(.logged-in) #customer_login,
body.woocommerce-account:not(.logged-in) #customer_login.col2-set,
body.woocommerce-account:not(.logged-in) .u-columns#customer_login {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    float: none !important;
    clear: both !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

body.woocommerce-account:not(.logged-in) #customer_login::before,
body.woocommerce-account:not(.logged-in) #customer_login::after {
    display: none !important;
    content: none !important;
}

body.woocommerce-account:not(.logged-in) #customer_login .u-column1,
body.woocommerce-account:not(.logged-in) #customer_login .u-column2,
body.woocommerce-account:not(.logged-in) #customer_login .col-1,
body.woocommerce-account:not(.logged-in) #customer_login .col-2 {
    position: static !important;
    left: auto !important;
    right: auto !important;
    float: none !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 30px !important;
    transform: none !important;
}

body.woocommerce-account:not(.logged-in) #customer_login h2 {
    margin: 0 0 26px !important;
    color: #171717 !important;
    line-height: 1.15 !important;
}

body.woocommerce-account:not(.logged-in) #customer_login p,
body.woocommerce-account:not(.logged-in) #customer_login label,
body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-privacy-policy-text {
    color: #4f4a43 !important;
    opacity: 1 !important;
}

body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-privacy-policy-text p {
    color: #4f4a43 !important;
    line-height: 1.65 !important;
}

body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-privacy-policy-text a,
body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-LostPassword a {
    color: #5d574f !important;
    opacity: 1 !important;
}

body.woocommerce-account:not(.logged-in) #customer_login label.woocommerce-form-login__rememberme {
    color: #4f4a43 !important;
}

/* Nie pozwalamy przyciskowi podglądu hasła odziedziczyć ciężkiego stylu z motywu. */
body.woocommerce-account:not(.logged-in) #customer_login .password-input {
    position: relative !important;
    display: block !important;
    width: 100% !important;
}

body.woocommerce-account:not(.logged-in) #customer_login .show-password-input {
    top: 50% !important;
    right: 14px !important;
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #777168 !important;
    opacity: .7 !important;
    transform: translateY(-50%) !important;
}

@media (max-width: 900px) {
    body.woocommerce-account:not(.logged-in) #customer_login,
    body.woocommerce-account:not(.logged-in) #customer_login.col2-set,
    body.woocommerce-account:not(.logged-in) .u-columns#customer_login {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
}

@media (max-width: 640px) {
    body.woocommerce-account:not(.logged-in) .woocommerce > .petaccount-heading {
        margin: 10px 0 24px !important;
    }

    body.woocommerce-account:not(.logged-in) #customer_login .u-column1,
    body.woocommerce-account:not(.logged-in) #customer_login .u-column2,
    body.woocommerce-account:not(.logged-in) #customer_login .col-1,
    body.woocommerce-account:not(.logged-in) #customer_login .col-2 {
        padding: 22px !important;
    }
}
