/* =====================================================================
   SophEva — Brand WooCommerce styling (mobile-first)
   Covers: my-account / login / register (classic), cart & checkout (blocks),
   order-received / thank-you, forms, buttons, tables and notices.
   ===================================================================== */

:root {
    --sph-primary: #a3351e;
    --sph-primary-dark: #892816;
    --sph-ink: #4a3530;
    --sph-ink-soft: #58423d;
    --sph-muted: #9a8681;
    --sph-bg: #fdfbfb;
    --sph-card: #ffffff;
    --sph-cream: #faf6f4;
    --sph-border: #f0e0d9;
    --sph-border-strong: #ebd5d0;
    --sph-radius: 16px;
    --sph-radius-sm: 12px;
    --sph-shadow: 0 10px 30px rgba(163, 53, 30, 0.07);
    --sph-green: #25D366;
    --sph-font: 'Manrope', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ── Typography only — width/padding is handled by the theme's own
      .max-w-container-max-width wrapper in page.php. Adding our own
      max-width/padding here double-constrained the layout and made pages
      look misaligned, so it is intentionally omitted. ─────────────────── */
.woocommerce,
.woocommerce-page,
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
    font-family: var(--sph-font);
    color: var(--sph-ink-soft);
    box-sizing: border-box;
}

.woocommerce a {
    color: var(--sph-primary);
}

/* ── Buttons (classic + blocks) ────────────────────────────────────── */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce button.button.alt,
.woocommerce a.button.alt,
.wc-block-components-button:not(.is-link) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--sph-primary), var(--sph-primary-dark)) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 999px !important;
    padding: 13px 26px !important;
    font-weight: 700 !important;
    font-size: 14.5px !important;
    line-height: 1.2 !important;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(163, 53, 30, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    text-decoration: none;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce button.button.alt:hover,
.wc-block-components-button:not(.is-link):hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(163, 53, 30, 0.3);
    opacity: 0.98;
}

/* Secondary / ghost buttons */
.woocommerce a.button.wc-backward,
.woocommerce .button.wc-forward:not(.checkout-button),
.wc-block-components-button.is-link {
    background: #fff !important;
    color: var(--sph-primary) !important;
    border: 1.5px solid var(--sph-border-strong) !important;
    box-shadow: none;
}

/* ── Inputs / selects / textareas (classic + blocks) ───────────────── */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce .form-row select,
.woocommerce-account input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.woocommerce input.input-text,
.select2-container .select2-selection--single,
.wc-block-components-text-input input,
.wc-block-components-select .wc-block-components-select__container,
.wc-block-components-address-form input,
.wc-block-components-address-form .components-combobox-control input {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 14px !important;
    border: 1.5px solid var(--sph-border-strong) !important;
    border-radius: var(--sph-radius-sm) !important;
    background: #fff !important;
    color: var(--sph-ink) !important;
    font-size: 15px !important;
    font-family: var(--sph-font) !important;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce .form-row select:focus,
.woocommerce-account input:focus,
.wc-block-components-text-input.is-active input,
.wc-block-components-text-input input:focus {
    border-color: var(--sph-primary) !important;
    box-shadow: 0 0 0 3px rgba(163, 53, 30, 0.12) !important;
}

.woocommerce form .form-row label,
.wc-block-components-text-input label {
    color: var(--sph-ink-soft);
    font-weight: 600;
    font-size: 13.5px;
}

.wc-block-components-text-input.is-active label,
.wc-block-components-text-input input:focus+label {
    color: var(--sph-primary);
}

/* ── Notices (message / error / info) ──────────────────────────────── */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
.wc-block-components-notice-banner {
    border-radius: var(--sph-radius-sm);
    border: 1px solid var(--sph-border);
    background: var(--sph-cream);
    color: var(--sph-ink-soft);
    padding: 14px 16px;
    box-shadow: none;
}

.woocommerce-message {
    border-left: 4px solid #2e7d32;
}

.woocommerce-error {
    border-left: 4px solid #c0392b;
    background: #fdf3f1;
}

.woocommerce-info {
    border-left: 4px solid var(--sph-primary);
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
    color: var(--sph-primary);
}

/* =====================================================================
   MY ACCOUNT (classic)
   ===================================================================== */

/* ── Compact account heading (replaces the hero on account pages) ───── */
.sph-account-heading {
    font-family: var(--sph-font);
    font-weight: 800;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.4px;
    color: var(--sph-ink);
    text-align: center;
    margin: 10px 0 14px;
}

@media (max-width: 768px) {
    .sph-account-heading {
        margin: 6px 0 10px;
        font-size: 24px;
    }
}

/* ── Tabbed Login / Register (sph-auth) ────────────────────────────── */
.sph-auth {
    max-width: 460px;
    margin: 0 auto;
}

.sph-auth__tabs {
    display: flex;
    gap: 6px;
    padding: 6px;
    background: var(--sph-cream);
    border: 1px solid var(--sph-border);
    border-radius: 999px;
    margin-bottom: 20px;
}

.sph-auth__tab {
    flex: 1 1 50%;
    appearance: none;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 11px 12px;
    border-radius: 999px;
    font-family: var(--sph-font);
    font-weight: 700;
    font-size: 14.5px;
    color: var(--sph-ink);
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.sph-auth__tab:not([aria-selected="true"]):hover {
    background: #fff;
}

.sph-auth__tab[aria-selected="true"] {
    background: linear-gradient(135deg, var(--sph-primary), var(--sph-primary-dark));
    color: #fff;
    box-shadow: 0 6px 14px rgba(163, 53, 30, 0.22);
}

/* Panel visibility driven by the wrapper's data-active attribute */
.sph-auth__panel {
    display: none;
}

.sph-auth[data-active="login"] .sph-auth__panel[data-panel="login"],
.sph-auth[data-active="register"] .sph-auth__panel[data-panel="register"] {
    display: block;
}

/* If JS is disabled or registration is off, always show the login form */
.sph-auth:not([data-active]) .sph-auth__panel[data-panel="login"] {
    display: block;
}

.woocommerce form.login,
.woocommerce form.register,
.woocommerce form.checkout_coupon,
.woocommerce form.lost_reset_password {
    background: var(--sph-card);
    border: 1px solid var(--sph-border);
    border-radius: var(--sph-radius);
    padding: 24px;
    box-shadow: var(--sph-shadow);
    margin: 0;
}

.woocommerce-form-login__rememberme {
    color: var(--sph-muted);
    font-size: 13px;
}

.woocommerce-LostPassword a,
.lost_password a {
    color: var(--sph-primary);
    font-size: 13px;
}

/* Account dashboard: nav + content (scoped to our my-account.php wrapper so
   the logged-out login page — which also has .woocommerce — is untouched) */
.sph-account-layout .woocommerce-MyAccount-navigation,
.sph-account-layout .woocommerce-MyAccount-content {
    float: none;
    box-sizing: border-box;
}

.sph-account-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.woocommerce-MyAccount-navigation {
    flex: 0 0 240px;
    background: var(--sph-card);
    border: 1px solid var(--sph-border);
    border-radius: var(--sph-radius);
    padding: 12px;
    box-shadow: var(--sph-shadow);
}

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

.woocommerce-MyAccount-navigation ul li {
    margin: 0;
}

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 12px 14px;
    border-radius: var(--sph-radius-sm);
    color: var(--sph-ink-soft);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.woocommerce-MyAccount-navigation ul li a:hover {
    background: var(--sph-cream);
    color: var(--sph-primary);
}

.woocommerce-MyAccount-navigation ul li.is-active a {
    background: linear-gradient(135deg, var(--sph-primary), var(--sph-primary-dark));
    color: #fff;
    box-shadow: 0 5px 12px rgba(163, 53, 30, 0.2);
}

.woocommerce-MyAccount-content {
    flex: 1 1 auto;
    background: var(--sph-card);
    border: 1px solid var(--sph-border);
    border-radius: var(--sph-radius);
    padding: 24px;
    box-shadow: var(--sph-shadow);
    min-width: 0;
}

.woocommerce-MyAccount-content a {
    font-weight: 600;
}

/* Premium mobile account menu; the desktop sidebar remains the default. */
.sph-account-menu {
    display: none;
}

/* Keep the assistant launcher available without its promotional label
   obscuring account controls or footer links at any viewport. */
.woocommerce-account .hw-chat-badge {
    display: none;
}

/* Dashboard welcome and shortcuts */
.sph-dashboard__welcome {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sph-dashboard__avatar {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    color: var(--sph-primary);
    background: var(--sph-cream);
    border-radius: 50%;
}

.sph-dashboard__avatar svg {
    width: 23px;
    height: 23px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sph-dashboard__welcome-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.sph-dashboard__welcome-copy p {
    margin: 0 0 2px;
    color: var(--sph-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.sph-dashboard__welcome-copy h2 {
    margin: 0;
    color: var(--sph-ink);
    font-family: var(--sph-font);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.sph-dashboard__logout {
    flex: 0 0 auto;
    color: var(--sph-muted) !important;
    font-size: 13px;
    text-decoration: none;
}

.sph-dashboard__logout:hover {
    color: var(--sph-primary) !important;
}

.sph-dashboard__intro {
    max-width: 560px;
    margin: 22px 0 18px;
    color: var(--sph-ink-soft);
    font-size: 15px;
    line-height: 1.55;
}

.sph-dashboard__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.sph-dashboard__action {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 14px;
    color: var(--sph-ink-soft) !important;
    background: var(--sph-cream);
    border: 1px solid var(--sph-border);
    border-radius: var(--sph-radius-sm);
    text-decoration: none !important;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.sph-dashboard__action:hover {
    background: #fff;
    border-color: var(--sph-border-strong);
    transform: translateY(-1px);
}

.sph-dashboard__action-icon {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    color: var(--sph-primary);
    background: #fff;
    border-radius: 10px;
}

.sph-dashboard__action-icon svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sph-dashboard__action-copy {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
}

.sph-dashboard__action-copy strong {
    color: var(--sph-ink);
    font-size: 14px;
    line-height: 1.3;
}

.sph-dashboard__action-copy small {
    margin-top: 2px;
    color: var(--sph-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
}

.sph-dashboard__chevron {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    color: var(--sph-muted);
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Addresses */
.woocommerce .addresses {
    display: flex;
    gap: 16px;
}

.woocommerce .addresses .woocommerce-Address {
    flex: 1 1 0;
    min-width: 0;
}

.woocommerce .addresses .col-1,
.woocommerce .addresses .col-2 {
    flex: 1 1 300px;
}

.woocommerce-Address {
    background: var(--sph-cream);
    border: 1px solid var(--sph-border);
    border-radius: var(--sph-radius-sm);
    padding: 18px;
}

.woocommerce-edit-address .woocommerce-Address-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 14px;
}

.woocommerce-edit-address .woocommerce-Address-title h2,
.woocommerce-edit-address .woocommerce-Address-title h3 {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: var(--sph-ink);
    font-size: 16px;
    font-weight: 750;
    line-height: 1.3;
}

.woocommerce-edit-address .woocommerce-Address-title .edit {
    flex: 0 0 auto;
    padding: 6px 10px;
    color: var(--sph-primary-dark);
    background: var(--sph-card);
    border: 1px solid var(--sph-border);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.woocommerce-edit-address .woocommerce-Address address {
    margin: 0;
    color: var(--sph-ink-soft);
    font-size: 14px;
    font-style: normal;
    line-height: 1.6;
}

.woocommerce-edit-address .woocommerce-MyAccount-content>.sph-addresses-intro {
    margin: 0 0 16px;
    color: var(--sph-ink-soft);
    line-height: 1.55;
}

/* Shared account form rhythm. WooCommerce's desktop defaults leave Select2
   fields at their intrinsic width, so every control is normalised here. */
.woocommerce-edit-address .woocommerce-MyAccount-content form>h2,
.woocommerce-edit-account .woocommerce-MyAccount-content form>h2 {
    margin: 0 0 22px;
    color: var(--sph-ink);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.3;
}

.woocommerce-edit-address .woocommerce-address-fields .form-row,
.woocommerce-edit-account .woocommerce-MyAccount-content form .form-row {
    margin: 0 0 17px;
    padding: 0;
}

.woocommerce-edit-address .woocommerce-address-fields .form-row label,
.woocommerce-edit-account .woocommerce-MyAccount-content form .form-row label {
    display: block;
    margin: 0 0 7px;
    color: var(--sph-ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.woocommerce-edit-address .woocommerce-address-fields .input-text,
.woocommerce-edit-address .woocommerce-address-fields select:not(.select2-hidden-accessible),
.woocommerce-edit-address .woocommerce-address-fields .select2-container,
.woocommerce-edit-address .woocommerce-address-fields .select2-selection {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}

.woocommerce-edit-address .woocommerce-address-fields select.country_to_state--single {
    display: block;
    min-height: 50px;
    padding: 14px !important;
    color: var(--sph-ink-soft);
    background: var(--sph-card);
    border: 1px solid var(--sph-border-strong) !important;
    border-radius: 11px;
}

.woocommerce-edit-address .woocommerce-address-fields .select2-container {
    display: block !important;
}

.woocommerce-edit-address .select2-container .select2-selection--single {
    height: 50px;
    min-height: 50px;
    padding: 0 !important;
    background: var(--sph-card);
    border-color: var(--sph-border-strong);
    border-radius: 11px;
}

.woocommerce-edit-address .select2-container .select2-selection--single .select2-selection__rendered {
    padding: 14px 42px 14px 14px;
    color: var(--sph-ink-soft);
    line-height: 20px;
}

.woocommerce-edit-address .select2-container .select2-selection--single .select2-selection__arrow {
    right: 12px;
    height: 48px;
}

.woocommerce-edit-address .form-row-first,
.woocommerce-edit-account .form-row-first {
    width: calc(50% - 8px);
}

.woocommerce-edit-address .form-row-last,
.woocommerce-edit-account .form-row-last {
    width: calc(50% - 8px);
}

.woocommerce-edit-account .woocommerce-MyAccount-content fieldset {
    margin: 26px 0 0;
    padding: 22px 0 0;
    border: 0;
    border-top: 1px solid var(--sph-border);
}

.woocommerce-edit-account .woocommerce-MyAccount-content legend {
    padding: 0;
    color: var(--sph-ink);
    font-size: 16px;
    font-weight: 800;
}

/* ── Tables (orders, downloads) ────────────────────────────────────── */
.woocommerce table.shop_table {
    border: 1px solid var(--sph-border);
    border-radius: var(--sph-radius);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    background: var(--sph-card);
}

.woocommerce table.shop_table thead th {
    background: var(--sph-cream);
    color: var(--sph-ink-soft);
    font-weight: 700;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 14px 16px;
    border: none;
}

.woocommerce table.shop_table td {
    padding: 14px 16px;
    border-top: 1px solid var(--sph-border);
    color: var(--sph-ink-soft);
    font-size: 14px;
}

.woocommerce-orders-table__cell-order-status,
.woocommerce mark.order-status,
.woocommerce .order-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: #fbeae3;
    color: var(--sph-primary);
    font-weight: 700;
    font-size: 12px;
    text-transform: capitalize;
}

/* =====================================================================
   CART + CHECKOUT (blocks)
   ===================================================================== */
.wc-block-cart,
.wc-block-checkout {
    color: var(--sph-ink-soft);
}

.wc-block-cart-items,
.wc-block-components-order-summary {
    background: var(--sph-card);
    border: 1px solid var(--sph-border);
    border-radius: var(--sph-radius);
    padding: 6px 16px;
}

.wc-block-cart-item__wrap,
.wc-block-components-order-summary-item {
    border-color: var(--sph-border) !important;
}

.wc-block-cart-item__image img,
.wc-block-components-order-summary-item__image img {
    border-radius: var(--sph-radius-sm);
}

.wc-block-components-product-name {
    color: var(--sph-ink);
    font-weight: 700;
    text-decoration: none;
}

/* Totals card */
.wc-block-cart__totals-title,
.wc-block-components-totals-item__label {
    color: var(--sph-ink-soft);
}

.wc-block-cart__sidebar .wc-block-components-totals-wrapper,
.wc-block-checkout__sidebar {
    background: var(--sph-cream);
    border: 1px solid var(--sph-border);
    border-radius: var(--sph-radius);
    padding: 8px 18px;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    color: var(--sph-primary);
    font-weight: 800;
}

/* Quantity selector */
.wc-block-components-quantity-selector {
    border: 1.5px solid var(--sph-border-strong);
    border-radius: 999px;
    overflow: hidden;
}

.wc-block-components-quantity-selector__button {
    color: var(--sph-primary);
}

/* Proceed to checkout / Place order — make prominent */
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
    width: 100%;
    border-radius: 999px !important;
    padding: 15px 24px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
}

/* Checkout step headings */
.wc-block-components-checkout-step__title {
    color: var(--sph-ink);
    font-weight: 800;
}

.wc-block-components-checkout-step__heading-content {
    color: var(--sph-muted);
}

/* Coupon / discount */
.wc-block-components-totals-coupon__button,
.wc-block-components-panel__button {
    color: var(--sph-primary) !important;
}

/* =====================================================================
   ORDER RECEIVED / THANK YOU
   ===================================================================== */
.woocommerce-order,
.wc-block-order-confirmation-summary,
.wc-block-order-confirmation-status {
    background: var(--sph-card);
    border: 1px solid var(--sph-border);
    border-radius: var(--sph-radius);
    padding: 22px;
    box-shadow: var(--sph-shadow);
}

.woocommerce-thankyou-order-received,
.wc-block-order-confirmation-status__message {
    font-size: 20px;
    font-weight: 800;
    color: var(--sph-primary);
    text-align: center;
    margin-bottom: 16px;
}

.woocommerce ul.order_details.woocommerce-order-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 18px 0;
    border: none;
}

.woocommerce ul.order_details li {
    flex: 1 1 130px;
    background: var(--sph-cream);
    border: 1px solid var(--sph-border);
    border-radius: var(--sph-radius-sm);
    padding: 12px 14px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--sph-muted);
    border-right: 1px solid var(--sph-border) !important;
}

.woocommerce ul.order_details li strong {
    display: block;
    margin-top: 4px;
    font-size: 15px;
    text-transform: none;
    letter-spacing: 0;
    color: var(--sph-ink);
}

/* =====================================================================
   MOBILE (95% of traffic) — stack + full-width + touch targets
   ===================================================================== */
@media (max-width: 768px) {

    /* Stack account layout: nav becomes a full-width tile grid (all items
       visible at once — no hidden horizontal scroll). */
    .sph-account-layout {
        flex-direction: column;
        gap: 16px;
        margin-inline: -4px;
    }

    .sph-account-layout>.woocommerce-MyAccount-navigation {
        display: none;
    }

    .sph-account-menu {
        display: block;
        width: 100%;
        color: var(--sph-ink-soft);
    }

    .sph-account-menu summary {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 58px;
        padding: 8px 12px;
        background: var(--sph-card);
        border: 1px solid var(--sph-border-strong);
        border-radius: 15px;
        box-shadow: 0 7px 20px rgba(111, 55, 42, 0.07);
        cursor: pointer;
        list-style: none;
    }

    .sph-account-menu summary::-webkit-details-marker {
        display: none;
    }

    .sph-account-menu__icon {
        display: grid;
        place-items: center;
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        color: #fff;
        background: linear-gradient(135deg, var(--sph-primary), var(--sph-primary-dark));
        border-radius: 11px;
        box-shadow: 0 5px 12px rgba(163, 53, 30, 0.18);
    }

    .sph-account-menu__icon svg {
        width: 19px;
        height: 19px;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
    }

    .sph-account-menu__current {
        display: flex;
        flex: 1 1 auto;
        min-width: 0;
        flex-direction: column;
    }

    .sph-account-menu__current small {
        color: var(--sph-muted);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: .08em;
        line-height: 1.2;
        text-transform: uppercase;
    }

    .sph-account-menu__current strong {
        margin-top: 2px;
        color: var(--sph-ink);
        font-size: 15px;
        line-height: 1.25;
    }

    .sph-account-menu__chevron {
        flex: 0 0 20px;
        width: 20px;
        height: 20px;
        color: var(--sph-primary);
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
        transition: transform .18s ease;
    }

    .sph-account-menu[open] .sph-account-menu__chevron {
        transform: rotate(180deg);
    }

    .sph-account-menu>nav {
        position: relative;
        z-index: 3;
        margin-top: 7px;
        padding: 6px;
        background: var(--sph-card);
        border: 1px solid var(--sph-border);
        border-radius: 15px;
        box-shadow: 0 14px 32px rgba(90, 48, 38, .12);
    }

    .sph-account-menu ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .sph-account-menu li {
        margin: 0;
    }

    .sph-account-menu li+li {
        border-top: 1px solid var(--sph-border);
    }

    .sph-account-menu li a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 48px;
        padding: 10px 12px;
        color: var(--sph-ink-soft);
        font-size: 14px;
        font-weight: 650;
        text-decoration: none;
    }

    .sph-account-menu li.is-active a {
        color: var(--sph-primary-dark);
    }

    .sph-account-menu li a svg {
        width: 17px;
        height: 17px;
        color: var(--sph-muted);
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .sph-account-menu__active-mark {
        width: 8px;
        height: 8px;
        background: var(--sph-primary);
        border-radius: 50%;
        box-shadow: 0 0 0 4px rgba(163, 53, 30, .1);
    }

    .woocommerce-MyAccount-content {
        width: 100%;
        padding: 22px 20px;
        border-color: #eddcd5;
        border-radius: 18px;
        box-shadow: 0 10px 28px rgba(111, 55, 42, 0.06);
        font-size: 15px;
        line-height: 1.55;
    }

    .woocommerce-MyAccount-content>p:first-child {
        margin-top: 0;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--sph-border);
        color: var(--sph-ink);
    }

    .woocommerce-MyAccount-content>p:last-child {
        margin-bottom: 0;
    }

    .woocommerce-MyAccount-content a {
        text-decoration-thickness: 1px;
        text-underline-offset: 3px;
    }

    /* Endpoint pages already contain their own meaningful cards. Avoid
       wrapping those cards in a second empty-looking frame. */
    .woocommerce-orders .woocommerce-MyAccount-content,
    .woocommerce-view-order .woocommerce-MyAccount-content,
    .woocommerce-edit-address .woocommerce-MyAccount-content {
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .sph-dashboard__welcome {
        gap: 12px;
    }

    .sph-dashboard__avatar {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    .sph-dashboard__welcome-copy h2 {
        font-size: 20px;
    }

    .sph-dashboard__intro {
        margin: 18px 0 16px;
        font-size: 14px;
    }

    .sph-dashboard__actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .sph-dashboard__action {
        min-height: 64px;
        padding: 10px 12px;
    }

    .sph-dashboard__action-copy strong {
        font-size: 14px;
    }

    .sph-dashboard__action-copy small {
        font-size: 12px;
    }

    /* Auth tabs + address columns */
    .sph-auth {
        max-width: 100%;
    }

    .woocommerce .addresses {
        display: flex !important;
        flex-direction: column;
        gap: 12px;
    }

    .woocommerce-edit-address .woocommerce-MyAccount-content>p:first-child {
        margin: 0 0 14px;
        padding: 0;
        border: 0;
        color: var(--sph-ink-soft);
        font-size: 14px;
        line-height: 1.5;
    }

    .woocommerce-edit-address .woocommerce-Address {
        flex: 0 0 auto !important;
        width: 100%;
        padding: 18px;
        background: var(--sph-card);
        border-radius: 16px;
        box-shadow: 0 8px 22px rgba(111, 55, 42, .06);
    }

    .woocommerce-edit-address .woocommerce-Address-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin: 0 0 14px;
    }

    .woocommerce-edit-address .woocommerce-Address-title h2,
    .woocommerce-edit-address .woocommerce-Address-title h3 {
        flex: 1 1 auto;
        min-width: 0;
        margin: 0;
        color: var(--sph-ink);
        font-size: 15px;
        font-weight: 750;
        line-height: 1.3;
    }

    .woocommerce-edit-address .woocommerce-Address-title .edit {
        flex: 0 0 auto;
        padding: 6px 9px;
        color: var(--sph-primary-dark);
        background: var(--sph-cream);
        border: 1px solid var(--sph-border);
        border-radius: 8px;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.2;
        text-align: center;
        text-decoration: none;
        white-space: nowrap;
    }

    .woocommerce-edit-address .woocommerce-Address address {
        margin: 0;
        color: var(--sph-ink-soft);
        font-size: 14px;
        font-style: normal;
        line-height: 1.6;
    }

    .woocommerce-edit-address .woocommerce-MyAccount-content form {
        padding: 18px;
        background: var(--sph-card);
        border: 1px solid var(--sph-border);
        border-radius: 18px;
        box-shadow: 0 10px 28px rgba(111, 55, 42, .06);
    }

    .woocommerce-edit-address .woocommerce-MyAccount-content form>h2 {
        margin: 0 0 20px;
        color: var(--sph-ink);
        font-size: 19px;
        font-weight: 800;
        line-height: 1.3;
    }

    .woocommerce-edit-address .woocommerce-address-fields .form-row {
        margin: 0 0 16px;
        padding: 0;
    }

    .woocommerce-edit-address .woocommerce-address-fields .form-row label {
        display: block;
        margin: 0 0 7px;
        color: var(--sph-ink);
        font-size: 13px;
        font-weight: 700;
        line-height: 1.4;
    }

    .woocommerce-edit-address .woocommerce-address-fields .input-text,
    .woocommerce-edit-address .woocommerce-address-fields select:not(.select2-hidden-accessible),
    .woocommerce-edit-address .woocommerce-address-fields .select2-container,
    .woocommerce-edit-address .woocommerce-address-fields .select2-selection {
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box;
    }

    .woocommerce-edit-address .woocommerce-address-fields select.country_to_state--single {
        display: block;
        min-height: 50px;
        padding: 14px !important;
        color: var(--sph-ink-soft);
        background: var(--sph-cream);
        border: 1px solid var(--sph-border-strong) !important;
        border-radius: 11px;
    }

    .woocommerce-edit-address .select2-container .select2-selection--single {
        height: 50px;
        min-height: 50px;
        padding: 0 !important;
        background: var(--sph-card);
        border-color: var(--sph-border-strong);
        border-radius: 11px;
    }

    .woocommerce-edit-address .woocommerce-address-fields .select2-container {
        display: block !important;
    }

    .woocommerce-edit-address .select2-container .select2-selection--single .select2-selection__rendered {
        padding: 14px 42px 14px 14px;
        color: var(--sph-ink-soft);
        line-height: 20px;
    }

    .woocommerce-edit-address .select2-container .select2-selection--single .select2-selection__arrow {
        right: 12px;
        height: 48px;
    }

    .woocommerce-edit-address .woocommerce-address-fields+p,
    .woocommerce-edit-address .woocommerce-address-fields>p:last-child {
        margin: 4px 0 0;
    }

    .woocommerce form.login,
    .woocommerce form.register {
        padding: 18px;
    }

    .woocommerce-edit-account .form-row-first,
    .woocommerce-edit-account .form-row-last,
    .woocommerce-edit-address .form-row-first,
    .woocommerce-edit-address .form-row-last {
        float: none !important;
        width: 100% !important;
    }

    /* Keep the floating assistant available without letting its promotional
       badge cover account forms, totals, or address actions. */
    .woocommerce-account .hw-chat-badge {
        display: none;
    }

    /* Buttons full-width & tappable */
    .woocommerce a.button,
    .woocommerce button.button,
    .woocommerce input.button,
    .woocommerce #respond input#submit,
    .wc-block-components-button:not(.is-link) {
        width: 100%;
        padding: 15px 22px !important;
        font-size: 15px !important;
    }

    /* Bigger inputs (16px prevents iOS zoom) */
    .woocommerce form .form-row input.input-text,
    .woocommerce form .form-row textarea,
    .woocommerce .form-row select,
    .woocommerce-account input,
    .wc-block-components-text-input input {
        font-size: 16px !important;
        padding: 14px !important;
    }

    /* Turn order/cart tables into stacked cards */
    .woocommerce table.shop_table thead {
        display: none;
    }

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

    .woocommerce-orders table.shop_table,
    .woocommerce-view-order table.shop_table {
        margin: 0;
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
    }

    .woocommerce-view-order table.shop_table {
        background: var(--sph-card);
        border: 1px solid var(--sph-border);
        border-radius: 16px;
        overflow: hidden;
    }

    .woocommerce-view-order table.shop_table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        margin: 0;
        padding: 0;
        background: var(--sph-card);
        border: 0;
        border-radius: 0;
    }

    .woocommerce-view-order table.shop_table tr+tr {
        border-top: 1px solid var(--sph-border);
    }

    .woocommerce-view-order table.shop_table th,
    .woocommerce-view-order table.shop_table td {
        display: block;
        width: auto;
        padding: 14px;
        border: 0;
        text-align: left;
    }

    .woocommerce-view-order table.shop_table td:last-child {
        text-align: right;
    }

    .woocommerce-view-order table.shop_table td::before {
        content: none;
    }

    .woocommerce table.shop_table tr {
        border: 1px solid var(--sph-border);
        border-radius: var(--sph-radius-sm);
        margin-bottom: 12px;
        padding: 6px 4px;
        background: var(--sph-card);
    }

    .woocommerce table.shop_table td {
        border-top: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        text-align: right;
    }

    .woocommerce table.shop_table td::before {
        content: attr(data-title);
        font-weight: 700;
        color: var(--sph-ink-soft);
        text-align: left;
        text-transform: uppercase;
        font-size: 11px;
        letter-spacing: 0.4px;
    }

    /* Order overview boxes stack 2-up */
    .woocommerce ul.order_details li {
        flex: 1 1 45%;
    }
}

@media (max-width: 400px) {
    .woocommerce ul.order_details li {
        flex: 1 1 100%;
    }
}

/* Tablet keeps the familiar sidebar while using a denser single-column
   content rhythm so cards and tables never feel squeezed. */
@media (min-width: 769px) and (max-width: 1024px) {
    .sph-account-layout {
        gap: 16px;
    }

    .woocommerce-MyAccount-navigation {
        flex-basis: 190px;
        padding: 10px;
    }

    .woocommerce-MyAccount-navigation ul li a {
        padding: 11px 12px;
    }

    .woocommerce-MyAccount-content {
        padding: 20px;
    }

    .woocommerce table.shop_table thead th,
    .woocommerce table.shop_table td {
        padding: 12px 8px;
        font-size: 12px;
    }

    .woocommerce-orders-table__cell-order-date,
    .woocommerce-orders-table__cell-order-status {
        white-space: nowrap;
    }

    .woocommerce-orders-table__cell-order-actions .button {
        width: auto;
        padding: 10px 15px !important;
        font-size: 12px !important;
    }

}

@media (min-width: 769px) and (max-width: 900px) {
    .sph-dashboard__actions {
        grid-template-columns: 1fr;
    }

    .woocommerce .addresses {
        flex-direction: column;
    }

    .woocommerce .addresses .woocommerce-Address {
        width: 100%;
    }
}
