/*
Theme Name: DealerSport
Theme URI: https://dealersport.ru
Author: Kkalganov
Author URI: https://kkalganov.com
Description: Кастомная тема для интернет-магазина футбольной формы. Минимальный обёрточный шаблон — весь функционал реализован в плагине DealerSport (header, footer, single-product, archive, checkout и др.).
Version: 1.0.33
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dealersport
Tags: e-commerce, woocommerce, sports
*/

/*
 * Theme-only CSS variables (namespaced with --dst- to avoid collisions with plugin
 * modules that own their own design tokens — e.g. ds-sidebar defines --ds-bg: #fafafa
 * which our theme must NOT override).
 */
:root {
    --dst-primary: #466e9c;
    --dst-primary-dark: #365a82;
    --dst-text: #333;
    --dst-text-muted: #666;
    --dst-border: #e0e0e0;
    --dst-bg: #f1f5f9;
    --dst-page-padding: 15px;
    --dst-radius-sm: 6px;
    --dst-radius-md: 10px;
    --dst-radius-lg: 16px;
    --dst-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --dst-shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
}

* { box-sizing: border-box; }

/* Force always-visible vertical scrollbar (Chrome overlay-scrollbar setting can hide it). */
html { overflow-y: scroll; }

body {
    margin: 0;
    background: #f1f5f9;
    color: var(--dst-text);
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.43;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; }
input, textarea, select, button { font-family: inherit; }

.container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 var(--dst-page-padding);
}

.template-content { min-height: 60vh; }
.template-page { padding: 24px 0; }
.template-404 { padding: 60px 0; text-align: center; }
.template-404 h1 { font-size: 96px; margin: 0; color: var(--dst-primary); }
.template-404 h2 { font-size: 24px; margin: 16px 0 24px; }
.template-search { padding: 24px 0; }

/* Breadcrumb (.page-heading wrapper) — matches reference XStore layout exactly.
   The wrapper is full-width, .container 1170px inside, breadcrumb nav 15px vertical padding. */
.page-heading { padding: 0; margin: 0; background: transparent; border: none; }
.page-heading .container { max-width: 1170px; margin: 0 auto; padding: 0 var(--dst-page-padding); }
.page-heading .row { display: block; margin: 0; padding: 0; }
.page-heading .row::before, .page-heading .row::after { display: none; }
.page-heading .col-md-12 { padding: 0; width: 100%; }

.woocommerce-breadcrumb {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
    color: #4b5563;
    padding: 15px 0;
    margin: 0;
    line-height: 1.43;
}
.woocommerce-breadcrumb a { color: inherit; text-decoration: none; transition: color 0.2s; }
.woocommerce-breadcrumb a:hover { color: var(--dst-primary); }
.woocommerce-breadcrumb .delimeter { color: #9ca3af; margin: 0 4px; font-size: inherit; }

.ds-btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--dst-primary), var(--dst-primary-dark));
    color: #fff;
    text-decoration: none;
    border-radius: var(--dst-radius-md);
    font-weight: 700;
    text-transform: uppercase;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ds-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.ds-btn-primary:focus-visible { outline: 2px solid var(--dst-primary); outline-offset: 2px; }

.screen-reader-text { clip: rect(1px,1px,1px,1px); clip-path: inset(50%); position: absolute; height: 1px; width: 1px; overflow: hidden; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
    .ds-btn-primary { transition: none; }
}

/* ====== My-Account (logged-out: login + registration forms) — DealerSport style ====== */
body.woocommerce-account.logged-out .container.template-shop { background: transparent; }
body.woocommerce-account.logged-out .page-heading { padding: 20px 0 0; }
body.woocommerce-account.logged-out .page-heading h1.page-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--dst-text);
    margin: 12px 0 24px;
}

.woocommerce-account .woocommerce { max-width: 1170px; margin: 0 auto 60px; padding: 0; }
/* The dashboard enqueues catalog.css, whose Bootstrap `.row { margin: 0 -12px }` is
   compensated only on .col-md-3/.col-md-9. The account page uses .col-md-12 (no
   compensation), so the content goes full-bleed (esp. on mobile). Cancel the negative
   row margin on account pages — restores the normal container gutter. */
body.woocommerce-account .row { margin-left: 0; margin-right: 0; }
@media (max-width: 767px) {
    .woocommerce-account .woocommerce { margin-bottom: 40px; }
}
.woocommerce-account .u-columns {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0;
    align-items: stretch;
}
.woocommerce-account .u-columns::before,
.woocommerce-account .u-columns::after { display: none !important; }
body.woocommerce-account .u-columns .u-column1,
body.woocommerce-account .u-columns .u-column2,
body.woocommerce-account .u-columns .col-1,
body.woocommerce-account .u-columns .col-2 {
    width: 100%;
    max-width: none;
    float: none;
    padding: 0;
    margin: 0;
    flex: 1 1 0;
    min-width: 0;
}

@media (min-width: 768px) {
    .woocommerce-account .u-columns {
        flex-direction: row;
        gap: 24px;
        align-items: flex-start;
    }
}

body.woocommerce-account form.woocommerce-form-login,
body.woocommerce-account form.woocommerce-form-register,
body.woocommerce-account form.lost_reset_password {
    background: #fff;
    border: 1px solid var(--dst-border);
    border-radius: var(--dst-radius-lg);
    padding: 28px 24px;
    margin: 0;
    box-shadow: var(--dst-shadow);
}
.woocommerce-account h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--dst-text);
}
.woocommerce-account .woocommerce-form-login + p,
.woocommerce-account .woocommerce-form-register > p:first-of-type {
    color: var(--dst-text-muted);
    font-size: 14px;
    margin: 0 0 18px;
}

.woocommerce-account .woocommerce-form-row { margin-bottom: 14px; }
.woocommerce-account .woocommerce-form-row label {
    display: block;
    font-size: 13px;
    color: var(--dst-text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}
body.woocommerce-account .woocommerce form .form-row .input-text,
body.woocommerce-account .woocommerce form .form-row input[type="text"],
body.woocommerce-account .woocommerce form .form-row input[type="email"],
body.woocommerce-account .woocommerce form .form-row input[type="password"],
body.woocommerce-account .woocommerce form.lost_reset_password input[type="text"],
body.woocommerce-account .woocommerce form.lost_reset_password input[type="email"] {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.5;
    background: #fafafa;
    color: var(--dst-text);
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
    height: auto;
    transition: border-color 0.2s ease, background 0.2s ease;
}
body.woocommerce-account .woocommerce form .form-row .input-text:focus,
body.woocommerce-account .woocommerce form .form-row input:focus,
body.woocommerce-account .woocommerce form.lost_reset_password input:focus {
    border-color: var(--dst-primary);
    background: #fff;
    outline: none;
    box-shadow: none;
}
body.woocommerce-account .show-password-input {
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dst-text-muted);
}

.woocommerce-account .woocommerce-form-login__rememberme {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 16px;
    font-size: 14px;
    color: var(--dst-text-muted);
}

body.woocommerce-account button.woocommerce-form-login__submit,
body.woocommerce-account button.woocommerce-form-register__submit,
body.woocommerce-account form.lost_reset_password button.woocommerce-Button,
body.woocommerce-account form.lost_reset_password button[type="submit"] {
    width: 100%;
    padding: 22px 28px;
    background: linear-gradient(135deg, var(--dst-primary), var(--dst-primary-dark));
    color: #fff;
    border: 0;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
body.woocommerce-account button.woocommerce-form-login__submit:hover,
body.woocommerce-account button.woocommerce-form-register__submit:hover,
body.woocommerce-account form.lost_reset_password button.woocommerce-Button:hover,
body.woocommerce-account form.lost_reset_password button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(70,110,156,0.25);
    background: linear-gradient(135deg, var(--dst-primary), var(--dst-primary-dark));
    color: #fff;
}
body.woocommerce-account button.woocommerce-form-login__submit:focus-visible,
body.woocommerce-account button.woocommerce-form-register__submit:focus-visible,
body.woocommerce-account form.lost_reset_password button:focus-visible {
    outline: 2px solid var(--dst-primary);
    outline-offset: 2px;
}
body.woocommerce-account button.woocommerce-form-login__submit:disabled,
body.woocommerce-account button.woocommerce-form-register__submit:disabled,
body.woocommerce-account form.lost_reset_password button:disabled {
    background: #9e9e9e;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.woocommerce-account .woocommerce-LostPassword {
    text-align: center;
    margin: 14px 0 0;
}
.woocommerce-account .woocommerce-LostPassword a {
    color: var(--dst-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.15s ease;
}
.woocommerce-account .woocommerce-LostPassword a:hover {
    border-bottom-color: var(--dst-primary);
}

@media (prefers-reduced-motion: reduce) {
    .woocommerce-account .woocommerce-form-login__submit,
    .woocommerce-account .woocommerce-form-register__submit { transition: none; }
}

/* ==================================================================
   My-Account (logged-IN): dashboard / orders / addresses / Анкета.
   Left navigation mirrors the catalog sidebar ([dealersport_sidebar]):
   .ds-sidebar card + .ds-header + .ds-categories rows. Markup wrapper
   .dst-account-sidebar is emitted in functions.php around the WC <nav>.
   ================================================================== */

/* ---- Two-column layout: sidebar (left) + content (right) ---- */
body.woocommerce-account .woocommerce:has(> .dst-account-sidebar) {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
}
@media (min-width: 768px) {
    body.woocommerce-account .woocommerce:has(> .dst-account-sidebar) {
        flex-direction: row;
        gap: 24px;
        align-items: flex-start;
    }
}
/* WC notices (e.g. "address saved") span full width above the columns */
body.woocommerce-account .woocommerce > .woocommerce-notices-wrapper {
    flex: 0 0 100%;
    width: 100%;
    order: -1;
    margin: 0;
}
/* Neutralize WC clearfix ::before/::after — in the flex row they become phantom
   items and the row gap adds 24px dead space at both ends of the columns. */
body.woocommerce-account .woocommerce:has(> .dst-account-sidebar)::before,
body.woocommerce-account .woocommerce:has(> .dst-account-sidebar)::after { content: none; }
/* Override WooCommerce-layout.css .woocommerce-MyAccount-content{width:68%;float:right}
   (specificity 0,2,0) so the content fills the flex row instead of staying at 68%. */
body.woocommerce-account .woocommerce-MyAccount-content { width: auto; float: none; }

/* ---- Left navigation: catalog-sidebar look ---- */
.dst-account-sidebar {
    background: #fafafa;
    border: 1px solid #e8eef4;
    border-radius: var(--dst-radius-lg);
    overflow: hidden;
    box-shadow: var(--dst-shadow);
}
@media (min-width: 768px) {
    body.woocommerce-account .woocommerce > .dst-account-sidebar {
        flex: 0 0 264px;
        position: sticky;
        top: 20px;
    }
}
.dst-account-sidebar__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 16px;
    background: #fff;
    border-bottom: 1px solid #e8eef4;
}
.dst-account-sidebar__icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--dst-primary-dark) 0%, var(--dst-primary) 40%, #5478a0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(70,110,156,0.3);
}
.dst-account-sidebar__titles { display: flex; flex-direction: column; min-width: 0; }
.dst-account-sidebar__title { font-size: 18px; font-weight: 700; color: var(--dst-text); line-height: 1.2; }
.dst-account-sidebar__subtitle {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* WC <ul> becomes the white inner "categories" card */
/* Override WooCommerce default .woocommerce-MyAccount-navigation { width:30%; float:left } */
.dst-account-sidebar .woocommerce-MyAccount-navigation { display: block; width: 100%; float: none; margin: 0; }
.dst-account-sidebar .woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 14px;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.dst-account-sidebar .woocommerce-MyAccount-navigation li { margin: 0; }
.dst-account-sidebar .woocommerce-MyAccount-navigation-link a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
    color: var(--dst-text);
    text-decoration: none;
    border-radius: 8px;
    border-bottom: 1px solid #e8eef4;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    transition: background 0.15s ease, color 0.15s ease;
}
.dst-account-sidebar .woocommerce-MyAccount-navigation-link:last-child a { border-bottom: none; }
.dst-account-sidebar .woocommerce-MyAccount-navigation-link a:hover { background: #f0f4f8; color: var(--dst-primary); }
.dst-account-sidebar .woocommerce-MyAccount-navigation-link.is-active a { background: #e8f4fd; color: var(--dst-primary); font-weight: 600; }
.dst-account-sidebar .woocommerce-MyAccount-navigation-link a:focus-visible { outline: 2px solid var(--dst-primary); outline-offset: -2px; }

/* Per-endpoint leading icons (currentColor mask → animate with link color) */
.dst-account-sidebar .woocommerce-MyAccount-navigation-link a::before {
    content: "";
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask: center / 18px 18px no-repeat;
    mask: center / 18px 18px no-repeat;
}
.dst-account-sidebar .woocommerce-MyAccount-navigation-link--dashboard a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpath d='M9 22V12h6v10'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpath d='M9 22V12h6v10'/%3E%3C/svg%3E");
}
.dst-account-sidebar .woocommerce-MyAccount-navigation-link--orders a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E");
}
.dst-account-sidebar .woocommerce-MyAccount-navigation-link--edit-address a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}
.dst-account-sidebar .woocommerce-MyAccount-navigation-link--edit-account a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}
.dst-account-sidebar .woocommerce-MyAccount-navigation-link--customer-logout a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E");
}

/* ---- Content card ---- */
.woocommerce-MyAccount-content {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    float: none;
    background: #fff;
    border: 1px solid var(--dst-border);
    border-radius: var(--dst-radius-lg);
    box-shadow: var(--dst-shadow);
    padding: 28px;
}
@media (max-width: 767px) { .woocommerce-MyAccount-content { padding: 20px 18px; } }
.woocommerce-MyAccount-content > :first-child { margin-top: 0; }
.woocommerce-MyAccount-content > :last-child { margin-bottom: 0; }
.woocommerce-MyAccount-content p { color: var(--dst-text); font-size: 15px; line-height: 1.6; margin: 0 0 14px; }
.woocommerce-MyAccount-content h2 { font-size: 20px; font-weight: 700; color: var(--dst-text); margin: 0 0 14px; }
.woocommerce-MyAccount-content h3 { font-size: 17px; font-weight: 700; color: var(--dst-text); margin: 18px 0 12px; }
.woocommerce-MyAccount-content a:not(.button):not(.woocommerce-button):not(.edit) {
    color: var(--dst-primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}
.woocommerce-MyAccount-content a:not(.button):not(.woocommerce-button):not(.edit):hover { border-bottom-color: var(--dst-primary); }

/* Account-details (Анкета) + edit-address forms — flush inside the content card */
.woocommerce-MyAccount-content form { margin: 0; }
.woocommerce-MyAccount-content fieldset {
    border: 1px solid var(--dst-border);
    border-radius: var(--dst-radius-md);
    padding: 18px 20px;
    margin: 8px 0 18px;
}
.woocommerce-MyAccount-content legend { font-weight: 700; font-size: 15px; color: var(--dst-text); padding: 0 8px; }
.woocommerce-MyAccount-content em { color: var(--dst-text-muted); font-size: 13px; font-style: normal; }
.woocommerce-MyAccount-content .form-row select,
.woocommerce-MyAccount-content .form-row input[type="tel"] {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 16px;
    background: #fafafa;
    color: var(--dst-text);
    height: auto;
}
.woocommerce-MyAccount-content .select2-container--default .select2-selection--single {
    height: auto;
    min-height: 54px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    background: #fafafa;
    display: flex;
    align-items: center;
    padding: 6px 10px;
}
.woocommerce-MyAccount-content .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--dst-text); line-height: 1.5; padding: 0 6px; }
.woocommerce-MyAccount-content .select2-container--default .select2-selection--single .select2-selection__arrow { height: 100%; }

/* ---- Buttons: unified size + radius-md, non-jumpy hover (no translateY) ---- */
.woocommerce-MyAccount-content .button,
.woocommerce-MyAccount-content a.button,
.woocommerce-MyAccount-content a.woocommerce-button,
.woocommerce-MyAccount-content button[type="submit"],
.woocommerce-MyAccount-content .woocommerce-pagination a {
    display: inline-block;
    width: auto;
    margin: 0;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--dst-primary), var(--dst-primary-dark));
    color: #fff;
    border: 0;
    border-radius: var(--dst-radius-md);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.2s ease, filter 0.2s ease;
}
.woocommerce-MyAccount-content .button:hover,
.woocommerce-MyAccount-content a.button:hover,
.woocommerce-MyAccount-content a.woocommerce-button:hover,
.woocommerce-MyAccount-content button[type="submit"]:hover,
.woocommerce-MyAccount-content .woocommerce-pagination a:hover {
    /* re-assert the gradient so WC default `a.button:hover{background:#dad8da}` can't
       wash it out; lift via shadow only (no brightness → no pale/pink artefact). */
    background: linear-gradient(135deg, var(--dst-primary), var(--dst-primary-dark));
    box-shadow: 0 6px 16px rgba(70,110,156,0.35);
    color: #fff;
}

/* ---- Orders table ---- */
.woocommerce-orders-table { width: 100%; border-collapse: collapse; margin: 0; font-size: 14px; }
.woocommerce-orders-table th,
.woocommerce-orders-table td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--dst-border); vertical-align: middle; }
.woocommerce-orders-table thead th {
    background: #f1f5f9;
    color: var(--dst-text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.woocommerce-orders-table thead th:first-child { border-top-left-radius: var(--dst-radius-md); }
.woocommerce-orders-table thead th:last-child { border-top-right-radius: var(--dst-radius-md); }
.woocommerce-orders-table tbody tr:last-child td,
.woocommerce-orders-table tbody tr:last-child th { border-bottom: none; }
.woocommerce-orders-table tbody tr { transition: background 0.15s ease; }
.woocommerce-orders-table tbody tr:hover { background: #f8fafc; }
.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions { text-align: right; }
.woocommerce-orders-table .woocommerce-button + .woocommerce-button { margin-left: 6px; }

@media (max-width: 767px) {
    .woocommerce-orders-table thead { display: none; }
    .woocommerce-orders-table,
    .woocommerce-orders-table tbody,
    .woocommerce-orders-table tr,
    .woocommerce-orders-table th,
    .woocommerce-orders-table td { display: block; width: 100%; }
    .woocommerce-orders-table tr {
        border: 1px solid var(--dst-border);
        border-radius: var(--dst-radius-md);
        padding: 6px 14px;
        margin-bottom: 12px;
    }
    .woocommerce-orders-table tr:last-child { margin-bottom: 0; }
    .woocommerce-orders-table td,
    .woocommerce-orders-table th {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        text-align: right;
        border-bottom: 1px solid var(--dst-border);
        padding: 10px 0;
    }
    .woocommerce-orders-table tr td:last-child,
    .woocommerce-orders-table tr th:last-child { border-bottom: none; }
    .woocommerce-orders-table td::before,
    .woocommerce-orders-table th::before {
        content: attr(data-title);
        font-weight: 600;
        color: var(--dst-text-muted);
        text-align: left;
        text-transform: uppercase;
        font-size: 12px;
        letter-spacing: 0.3px;
    }
    .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions { justify-content: flex-end; }
    .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions::before { display: none; }
    /* WC .shop_table_responsive tbody th{display:none} (0,2,3) hides the order-number
       cell on mobile (it is a <th scope=row>) — restore it. */
    .woocommerce-account .woocommerce-orders-table.shop_table_responsive tbody th { display: flex; }
}

/* ---- Order view (view-order): details table + item-meta chips + customer details ---- */
.woocommerce-order-details__title,
.woocommerce-customer-details h2,
.woocommerce-customer-details .woocommerce-column__title { font-size: 20px; font-weight: 700; color: var(--dst-text); margin: 24px 0 16px; }
.woocommerce-order-details__title { margin-top: 0; }
/* Break the table layout — each item becomes a STANDALONE card with spacing. */
.woocommerce-table--order-details,
.woocommerce-table--order-details tbody,
.woocommerce-table--order-details tfoot,
.woocommerce-table--order-details tr,
.woocommerce-table--order-details th,
.woocommerce-table--order-details td { display: block; }
.woocommerce-table--order-details { width: 100%; margin: 0; font-size: 14px; }
.woocommerce-table--order-details thead { display: none; }
/* Kill WC's default shop_table frame + per-cell border-top. WC selectors reach (0,2,3),
   so prefix with .woocommerce-MyAccount-content for a winning (0,3,x). */
.woocommerce-MyAccount-content .woocommerce-table--order-details.shop_table,
.woocommerce-MyAccount-content .woocommerce-table--order-details.shop_table tbody th,
.woocommerce-MyAccount-content .woocommerce-table--order-details.shop_table tbody td { border: 0; }
.woocommerce-table--order-details .product-name a { color: var(--dst-primary); text-decoration: none; font-weight: 600; }
.woocommerce-table--order-details .product-name a:hover { text-decoration: underline; }

/* Item CARD: photo + name + chips (left) + breakdown (right); gap to the next item */
.woocommerce-table--order-details tbody tr.order_item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px 24px;
    background: #fff;
    border: 1px solid var(--dst-border);
    border-radius: var(--dst-radius-lg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 18px 20px;
    margin-bottom: 14px;
}
.woocommerce-table--order-details tbody tr.order_item > td { padding: 0; border: none; }
.woocommerce-table--order-details tbody tr.order_item > td.product-name { flex: 1 1 300px; min-width: 0; }
.woocommerce-table--order-details tbody tr.order_item > td.product-total { flex: 0 0 auto; }

/* Totals (tfoot) — clean compact rows below the item cards */
.woocommerce-table--order-details tfoot { margin-top: 8px; padding: 6px 20px; background: #fafafa; border: 1px solid var(--dst-border); border-radius: var(--dst-radius-lg); }
.woocommerce-table--order-details tfoot tr {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--dst-border);
}
.woocommerce-table--order-details tfoot tr:last-child { border-bottom: none; }
/* WC's `.woocommerce table.shop_table tfoot th` is (0,2,3) and re-adds padding + a
   stray border-top on each narrow cell — beat it with the extra content class (0,3,x). */
.woocommerce-MyAccount-content .woocommerce-table--order-details.shop_table tfoot th,
.woocommerce-MyAccount-content .woocommerce-table--order-details.shop_table tfoot td { padding: 0; border: 0; }
.woocommerce-table--order-details tfoot th { font-weight: 600; color: var(--dst-text); }
.woocommerce-table--order-details tfoot td { text-align: right; white-space: nowrap; color: var(--dst-text); }
.woocommerce-table--order-details tfoot tr:last-child th,
.woocommerce-table--order-details tfoot tr:last-child td { font-size: 16px; font-weight: 700; }
/* Order item card — thumbnail + name + attribute/addon chips (mirrors the order email) */
.woocommerce-table--order-details td.product-name { vertical-align: top; }
.dst-oi { display: flex; gap: 14px; align-items: flex-start; }
.dst-oi__img { flex-shrink: 0; width: 64px; height: 64px; }
.dst-oi__img-el { width: 64px; height: 64px; border-radius: var(--dst-radius-md); object-fit: cover; display: block; border: 1px solid #f0f0f0; }
.dst-oi__info { min-width: 0; flex: 1; }
.dst-oi__name { font-size: 14px; font-weight: 600; line-height: 1.4; }
.dst-oi__name a { color: var(--dst-text); text-decoration: none; }
.dst-oi__name a:hover { color: var(--dst-primary); }
.dst-oi__qty { color: var(--dst-text-muted); font-weight: 500; }
.dst-oi__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dst-oi__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--dst-radius-sm);
    line-height: 1.5;
    white-space: nowrap;
}
.dst-oi__chip--attr { background: #eef1f5; color: var(--dst-text); }
.dst-oi__chip--addon { background: #e8f4fd; color: var(--dst-text); }
.dst-oi__chip--addon b { font-weight: 700; white-space: nowrap; color: #16a34a; }
.dst-oi__chip--addon .woocommerce-Price-amount { color: #16a34a; }

/* Per-item cost breakdown (cart-style: Товар / Дополнения / Стоимость) */
.dst-oi-sum { display: flex; flex-direction: column; gap: 5px; min-width: 190px; }
.dst-oi-sum__row,
.dst-oi-sum__total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.dst-oi-sum__row { font-size: 13px; }
.dst-oi-sum__row .dst-oi-sum__label { color: var(--dst-text-muted); }
.dst-oi-sum__row .dst-oi-sum__val { color: var(--dst-text); font-weight: 500; white-space: nowrap; }
.dst-oi-sum__total { padding-top: 8px; margin-top: 3px; border-top: 1px dashed var(--dst-border); }
.dst-oi-sum__total .dst-oi-sum__label { color: var(--dst-text-muted); font-size: 13px; }
.dst-oi-sum__total .dst-oi-sum__val { color: var(--dst-text); font-size: 18px; font-weight: 700; white-space: nowrap; }
@media (max-width: 600px) {
    /* Item card: stack photo+chips above the per-item breakdown. flex:0 0 auto so the
       cells size to content (flex-basis would otherwise become HEIGHT in a column). */
    .woocommerce-table--order-details tbody tr.order_item {
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 12px;
        padding: 14px;
    }
    .woocommerce-table--order-details tbody tr.order_item > td.product-name,
    .woocommerce-table--order-details tbody tr.order_item > td.product-total { flex: 0 0 auto; width: 100%; }
    .dst-oi-sum { min-width: 0; }
    .dst-oi { gap: 12px; }
    .dst-oi__img, .dst-oi__img-el { width: 56px; height: 56px; }
    .dst-oi__chips { gap: 5px; }
    .dst-oi__chip { font-size: 10px; padding: 3px 8px; gap: 4px; }
}
/* Customer (order) address box — match the addresses-tab card */
.woocommerce-customer-details address {
    font-style: normal;
    background: #fafafa;
    border: 1px solid var(--dst-border);
    border-radius: var(--dst-radius-md);
    padding: 18px 20px;
    color: var(--dst-text);
    line-height: 1.7;
    font-size: 14px;
    max-width: 480px;
}

/* ---- Addresses: checkout collects ONE address → single constrained card.
   Layout: heading → address → "Изменить" button at the BOTTOM (display:contents
   lifts the header's h2/edit into the card's flex column so `order` can reposition). */
.woocommerce-account .woocommerce-Addresses { display: block; max-width: 480px; margin: 0; }
/* High specificity: .woocommerce-Address also carries .col-1/.col-2, and the shared
   `.u-columns .col-1 { padding: 0 }` rule (0,3,0) would otherwise strip the padding. */
body.woocommerce-account .woocommerce-Addresses .woocommerce-Address {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    background: #fafafa;
    border: 1px solid var(--dst-border);
    border-radius: var(--dst-radius-md);
    padding: 22px 24px;
    margin: 0;
}
.woocommerce-Address-title { display: contents; }
.woocommerce-Address-title h2 { order: 0; font-size: 17px; margin: 0; }
.woocommerce-Address address { order: 1; font-style: normal; color: var(--dst-text); line-height: 1.7; font-size: 14px; margin: 0; }
.woocommerce-Address-title a.edit {
    order: 2;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dst-primary);
    text-decoration: none;
    white-space: nowrap;
    padding: 10px 18px;
    border: 1px solid var(--dst-primary);
    border-radius: var(--dst-radius-md);
    transition: background 0.15s ease, color 0.15s ease;
}
.woocommerce-Address-title a.edit:hover { background: var(--dst-primary); color: #fff; }

/* ---- Notices (empty states, confirmations) — full plate, no left-border ---- */
.woocommerce-MyAccount-content .woocommerce-info,
.woocommerce-MyAccount-content .woocommerce-message,
.woocommerce-MyAccount-content .woocommerce-error {
    list-style: none;
    margin: 0 0 18px;
    padding: 14px 18px;
    border: 1px solid var(--dst-border);
    border-radius: var(--dst-radius-md);
    background: var(--dst-bg);
    color: var(--dst-text);
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}
.woocommerce-MyAccount-content .woocommerce-message { border-color: #cce8cf; background: #f1faf2; }
.woocommerce-MyAccount-content .woocommerce-error { border-color: #f3c9c6; background: #fdf3f2; }
/* WC notice icon (::before) — its sprite/font is dequeued → hide the broken glyph */
.woocommerce-MyAccount-content .woocommerce-info::before,
.woocommerce-MyAccount-content .woocommerce-message::before,
.woocommerce-MyAccount-content .woocommerce-error::before { display: none; }
.woocommerce-MyAccount-content .woocommerce-info .button,
.woocommerce-MyAccount-content .woocommerce-message .button { margin-left: auto; }

/* ---- Pagination ---- */
.woocommerce-MyAccount-content .woocommerce-pagination { display: flex; gap: 10px; margin-top: 18px; }
.woocommerce-MyAccount-content .woocommerce-pagination ul { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }

/* ---- Dashboard: "Рекомендуем посмотреть" — reuses ds-catalog cards (ul.products) ---- */
.dst-account-reco { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--dst-border); }
.dst-account-reco__title { font-size: 18px; font-weight: 700; margin: 0 0 16px; color: var(--dst-text); }
.dst-account-reco .products { margin: 0; }
/* WC default .woocommerce ul.products li.product{width:%;float:left} (0,3,2) squishes the
   catalog grid items inside the account .woocommerce wrapper — restore catalog behaviour. */
body.woocommerce-account .dst-account-reco ul.products li.product {
    width: auto;
    max-width: none;
    min-width: 0;
    float: none;
    margin: 0;
}
/* WC clearfix ::before/::after on the products grid becomes a phantom grid item in
   the first cell. The clearfix rule wins the cascade, so !important is warranted here
   (overriding a stubborn third-party default — per CLAUDE.md §5.3). */
body.woocommerce-account .dst-account-reco ul.products::before,
body.woocommerce-account .dst-account-reco ul.products::after { content: none !important; display: none !important; }
/* Hide WC default sale flash (.onsale "Распродажа" oval) — catalog cards already
   carry their own "-X%" badge; the olive WC badge only appears because the reco
   block sits inside the account .woocommerce wrapper (catalog page has no wrapper). */
body.woocommerce-account .dst-account-reco ul.products .onsale { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    .dst-account-sidebar .woocommerce-MyAccount-navigation-link a,
    .woocommerce-MyAccount-content .button,
    .woocommerce-MyAccount-content button[type="submit"],
    .woocommerce-MyAccount-content .woocommerce-pagination a,
    .woocommerce-orders-table tbody tr,
    .woocommerce-Address-title a.edit { transition: none; }
}
