/* css/style.css — общие стили магазина. Путь: css/style.css */

/* ============================================================
   1. ПЕРЕМЕННЫЕ
   ============================================================ */

:root{
    --bg:#f7f5f2;
    --card:#fffdf8;
    --ink:#1f2a30;
    --muted:#5c6b73;
    --accent:#4a7c6f;
    --accent-dark:#3d6a5e;
    --accent-soft:#e6efec;
    --warm:#e8a87c;
    --danger:#d73a49;
    --radius:18px;
    --radius-sm:12px;
    --shadow:0 8px 30px rgba(31,42,48,.08);
    --shadow-sm:0 2px 12px rgba(31,42,48,.05);
    --btn-height:48px;
}

/* ============================================================
   2. БАЗА
   ============================================================ */

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
    background:var(--bg);
    color:var(--ink);
    line-height:1.6;
}
main{
    min-height:60vh;
    padding:30px 0;
    box-sizing:border-box;
}
a{color:var(--accent);text-decoration:none;transition:.2s}
a:hover{color:var(--accent-dark)}

h1,h2,h3{line-height:1.25;font-weight:700}
h1{font-size:clamp(26px,4vw,38px);margin-bottom:16px}
h2{font-size:clamp(22px,3vw,30px);margin-bottom:14px}
h3{font-size:18px;margin-bottom:10px}

img{max-width:100%;height:auto;display:block}

/* ============================================================
   3. КОНТЕЙНЕР
   ============================================================ */

.container{
    max-width:1200px;
    margin:0 auto;
    padding-left:20px;
    padding-right:20px;
    box-sizing:border-box;
    width:100%;
}

/* ============================================================
   4. КНОПКИ
   ============================================================ */

.btn,
.btn-primary,
.btn-cart,
.btn-header,
.btn-small,
.btn-outline,
.btn-secondary,
.btn-selection{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:var(--btn-height);
    padding:0 28px;
    border-radius:50px;
    border:none;
    font-family:inherit;
    font-size:15px;
    font-weight:600;
    line-height:1;
    cursor:pointer;
    transition:background .2s, transform .15s, color .2s;
    text-decoration:none;
    white-space:nowrap;
    box-sizing:border-box;
    background:var(--accent);
    color:#fff;
    vertical-align:middle;
    -webkit-appearance:none;
    appearance:none;
}
.btn:hover,
.btn-primary:hover,
.btn-cart:hover,
.btn-header:hover,
.btn-small:hover,
.btn-outline:hover,
.btn-secondary:hover,
.btn-selection:hover{
    background:var(--accent-dark);
    color:#fff;
    transform:translateY(-2px);
}
.btn:disabled,
.btn-primary:disabled,
.btn-cart:disabled,
.btn-selection:disabled{
    background:#c9d3cd;
    color:#fff;
    cursor:not-allowed;
    transform:none;
}

.btn-header{height:42px;padding:0 20px;font-size:14px}
.btn-small{height:38px;padding:0 18px;font-size:13.5px}
.btn-mobile{display:flex;width:100%;height:52px;font-size:16px}

.btn-outline{
    background:transparent;
    color:var(--accent);
    border:2px solid var(--accent);
    padding:0 26px;
}
.btn-outline:hover{
    background:var(--accent-soft);
    color:var(--accent-dark);
    border-color:var(--accent);
}

.btn-secondary{
    background:var(--accent-soft);
    color:var(--accent);
}
.btn-secondary:hover{
    background:var(--accent);
    color:#fff;
}

.btn-selection{
    background:transparent;
    color:var(--accent);
    border:2px solid var(--accent);
    padding:0 24px;
}
.btn-selection:hover{
    background:var(--accent-soft);
}
.btn-selection.active{
    background:var(--accent);
    color:#fff;
    border-color:var(--accent);
}

/* ============================================================
   5. ШАПКА
   ============================================================ */

.site-header{
    position:sticky;
    top:0;
    background:rgba(247,245,242,.94);
    -webkit-backdrop-filter:blur(10px);
    backdrop-filter:blur(10px);
    z-index:100;
    border-bottom:1px solid #eae6e1;
    box-shadow:0 1px 8px rgba(31,42,48,.04);
}

.nav{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding-top:12px;
    padding-bottom:12px;
    gap:20px;
    min-height:72px;
    width:100%;
}

.logo{
    display:flex;
    flex-direction:column;
    text-decoration:none;
    color:var(--ink);
    flex-shrink:0;
    line-height:1.15;
    gap:2px;
}
.logo__main{
    font-weight:800;
    font-size:24px;
    letter-spacing:-.3px;
    text-transform:uppercase;
    white-space:nowrap;
}
.logo__accent{color:var(--accent)}
.logo__sub{
    display:block;
    font-size:10.5px;
    font-weight:600;
    color:var(--muted);
    text-transform:uppercase;
    letter-spacing:.9px;
    line-height:1.25;
}

.nav-links{
    display:flex;
    gap:20px;
    list-style:none;
    margin:0 auto;
    align-items:center;
    flex:1 1 auto;
    justify-content:center;
}
.nav-links a{
    color:var(--muted);
    text-decoration:none;
    font-size:14px;
    transition:.2s;
    white-space:nowrap;
}
.nav-links a:hover{color:var(--accent)}

.header-actions{display:flex;align-items:center;gap:14px}
.cart-link{
    position:relative;
    font-size:22px;
    color:var(--ink);
    text-decoration:none;
    line-height:1;
    padding:4px;
}
.cart-link:hover{color:var(--accent)}
.cart-count{
    position:absolute;
    top:-4px;
    right:-8px;
    background:var(--warm);
    color:#fff;
    font-size:11px;
    font-weight:700;
    padding:1px 6px;
    border-radius:10px;
    min-width:18px;
    text-align:center;
    line-height:16px;
}

.burger{
    display:none;
    width:44px;
    height:44px;
    background:transparent;
    border:none;
    cursor:pointer;
    padding:10px;
    flex-shrink:0;
    position:relative;
    z-index:1001;
}
.burger span{
    display:block;
    width:24px;
    height:2px;
    background:var(--ink);
    border-radius:2px;
    margin:5px auto;
    transition:transform .3s ease,opacity .3s ease;
}
.burger.active span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.burger.active span:nth-child(2){opacity:0}
.burger.active span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

.mobile-menu{
    position:fixed;
    top:0;
    right:0;
    width:100%;
    max-width:340px;
    height:100vh;
    background:var(--card);
    box-shadow:-10px 0 40px rgba(31,42,48,.12);
    padding:80px 32px 40px;
    z-index:1000;
    transform:translateX(105%);
    transition:transform .3s ease;
    overflow-y:auto;
    visibility:hidden;
}
.mobile-menu.open{transform:translateX(0);visibility:visible}
.mobile-menu__list{list-style:none;padding:0;margin:0 0 32px}
.mobile-menu__list li{margin-bottom:4px}
.mobile-menu__list a{
    display:block;
    padding:14px 0;
    font-size:17px;
    font-weight:600;
    color:var(--ink);
    text-decoration:none;
    border-bottom:1px solid #f0ece8;
    transition:color .2s;
}
.mobile-menu__list a:hover{color:var(--accent)}
.mobile-overlay{
    position:fixed;
    inset:0;
    background:rgba(31,42,48,.4);
    z-index:999;
    opacity:0;
    visibility:hidden;
    transition:opacity .3s ease,visibility .3s ease;
}
.mobile-overlay.open{opacity:1;visibility:visible}
body.menu-open{overflow:hidden}

/* ============================================================
   6. ФУТЕР
   ============================================================ */

.site-footer{
    background:#1f2a30;
    color:#9fb0b7;
    padding:50px 0 30px;
    font-size:14px;
    margin-top:0;
}
.footer-grid{
    display:grid;
    grid-template-columns:2fr 1fr 1fr;
    gap:36px;
    margin-bottom:36px;
}
.site-footer h4{color:#fff;font-size:15px;margin-bottom:14px}
.site-footer a{color:#9fb0b7;text-decoration:none;display:block;margin-bottom:8px;transition:.2s}
.site-footer a:hover{color:#fff}
.logo--footer{color:#fff !important;margin-bottom:12px;display:inline-block}
.logo--footer .logo__main{color:#fff}
.logo--footer .logo__accent{color:#7ba899}
.logo--footer .logo__sub{color:#6f8189}
.copyright{
    border-top:1px solid #2f3d44;
    padding-top:22px;
    font-size:13px;
    color:#6f8189;
    text-align:center;
}
.footer-back-link{
    display:inline-block;
    color:#9fb0b7;
    text-decoration:none;
    font-size:14px;
    border-bottom:1px dashed #9fb0b7;
    padding-bottom:2px;
    transition:color .2s, border-color .2s;
}
.footer-back-link:hover{
    color:#fff;
    border-bottom-color:#fff;
}

/* ============================================================
   7. СООБЩЕНИЯ
   ============================================================ */

.success{
    background:#e6ffed;
    color:#22863a;
    padding:12px 18px;
    border-radius:var(--radius-sm);
    border-left:4px solid #22863a;
    margin:15px 0;
}
.error{
    background:#ffeef0;
    color:var(--danger);
    padding:12px 18px;
    border-radius:var(--radius-sm);
    border-left:4px solid var(--danger);
    margin:15px 0;
}
.empty{
    color:var(--muted);
    padding:30px 0;
    text-align:center;
    font-size:15px;
}

/* ============================================================
   8. HERO (главная)
   ============================================================ */

.hero{
    position:relative;
    background:#2b3a33 url('/images/hero-bg.jpg') no-repeat 70% center / cover;
    border-radius:20px;
    padding:56px 40px;
    margin:24px 0;
    overflow:hidden;
    color:#fff;
    min-height:360px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    text-align:left;
}
.hero::before{
    content:'';
    position:absolute;
    inset:0;
    background:linear-gradient(90deg,
        rgba(28, 38, 33, 0.85) 0%,
        rgba(28, 38, 33, 0.65) 40%,
        rgba(28, 38, 33, 0.15) 100%);
    z-index:0;
}
.hero > *{position:relative;z-index:1}
.hero h1{
    font-size:36px;
    line-height:1.2;
    color:#fff;
    margin-bottom:12px;
    max-width:640px;
}
.hero h1 em{font-style:normal;color:#7ba899}
.hero p{
    font-size:17px;
    color:rgba(255,255,255,.85);
    margin-bottom:24px;
    max-width:520px;
}
.hero-cta{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}
.hero .btn-primary{
    background:#4a9c78;
    color:#fff;
    padding:14px 28px;
    border-radius:50px;
    font-weight:600;
    text-decoration:none;
    transition:.15s;
}
.hero .btn-primary:hover{background:#3a7d5e}
.hero .btn-outline{
    background:transparent;
    color:#fff;
    border:1px solid rgba(255,255,255,0.5);
    padding:14px 28px;
    border-radius:50px;
    font-weight:600;
    text-decoration:none;
    transition:.15s;
}
.hero .btn-outline:hover{
    background:rgba(255,255,255,0.1);
    border-color:#fff;
}

/* ============================================================
   9. СЕТКА КНИГ
   ============================================================ */

.books-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
    gap:24px;
    margin:24px 0;
    align-items:stretch;
}

.book-card{
    position:relative;
    display:flex;
    flex-direction:column;
    background:var(--card);
    border-radius:var(--radius-sm);
    padding:16px;
    text-align:center;
    color:var(--ink);
    box-shadow:var(--shadow-sm);
    transition:transform .25s, box-shadow .25s;
    height:100%;
    box-sizing:border-box;
    text-decoration:none;
}
.book-card:hover{
    transform:translateY(-4px);
    box-shadow:var(--shadow);
    color:var(--ink);
}
.book-card img{
    max-width:100%;
    height:240px;
    object-fit:cover;
    margin-bottom:12px;
    border-radius:8px;
    display:block;
}
.book-card__cover{position:relative}
.book-card__cover img{
    aspect-ratio:3 / 4;
    object-fit:cover;
    box-shadow:0 6px 16px rgba(0,0,0,0.08);
    transition:transform .25s;
}
.book-card:hover .book-card__cover img{transform:scale(1.03)}
.book-card__badges{
    position:absolute;
    top:8px;
    left:8px;
    display:flex;
    flex-direction:column;
    gap:4px;
    align-items:flex-start;
    pointer-events:none;
}
.book-card h3{
    font-size:15px;
    margin:6px 0;
    line-height:1.35;
    word-wrap:break-word;
    overflow-wrap:break-word;
}
.book-card .author{
    font-size:13px;
    color:var(--muted);
    margin-bottom:8px;
}
.book-annonce{
    font-size:12.5px;
    color:var(--muted);
    margin:8px 0;
    line-height:1.4;
    text-align:left;
    display:-webkit-box;
    -webkit-line-clamp:20;
    -webkit-box-orient:vertical;
    overflow:hidden;
    flex:1;
}
.book-meta{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:8px;
    margin-top:auto;
    padding-top:12px;
    border-top:1px solid #f0ece8;
}
.age-badge{
    display:inline-block;
    background:var(--accent-soft);
    color:var(--accent);
    font-size:11.5px;
    font-weight:700;
    padding:3px 10px;
    border-radius:20px;
    line-height:1;
}
.book-card .price{
    font-weight:700;
    color:var(--accent);
    font-size:17px;
    white-space:nowrap;
}
.book-card .price .old-price{
    color:#999;
    text-decoration:line-through;
    font-size:12px;
    margin-left:6px;
}
.book-card .price .bundle-discount{
    display:inline-block;
    background:#ffe8e8;
    color:#c00;
    font-size:11px;
    padding:2px 6px;
    border-radius:5px;
    margin-left:6px;
    font-weight:700;
}
.book-card--warning{
    border:2px solid #e8a87c;
    background:#fff8f0;
}
.book-card--warning:hover{
    background:#fff3e6;
    border-color:#d97742;
}

/* ============================================================
   10. БЕЙДЖИ НА КАРТОЧКАХ
   ============================================================ */

.card-badge{
    display:inline-block;
    padding:3px 8px;
    font-size:11px;
    font-weight:700;
    border-radius:6px;
    line-height:1.3;
    box-shadow:0 1px 3px rgba(0,0,0,.08);
    white-space:nowrap;
}
.card-badge--bundle{background:#d8ead8;color:#2e7d5b}
.card-badge--new{
    background:linear-gradient(135deg,#2e7d5b,#4a9c78);
    color:#fff;
    box-shadow:0 2px 6px rgba(46,125,91,0.25);
}
.card-badge--top{background:#fff3e0;color:#b06a00}

/* ============================================================
   11. СЕКЦИИ ГЛАВНОЙ
   ============================================================ */

.section{padding:50px 0}
.section h2{text-align:center;margin-bottom:10px}
.section .sub{
    text-align:center;
    color:var(--muted);
    margin-bottom:36px;
}

.choose-options{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:20px;
}
.choose-options .option{
    background:#fff;
    border-radius:14px;
    padding:28px 24px;
    border-top:3px solid #e1e4e8;
    box-shadow:0 2px 8px rgba(0,0,0,0.04);
    transition:.2s;
    text-align:center;
}
.choose-options .option:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 20px rgba(0,0,0,0.08);
}
.choose-options .option:nth-child(1){border-top-color:#2e7d5b}
.choose-options .option:nth-child(2){border-top-color:#2a6ebb}
.choose-options .option:nth-child(3){border-top-color:#e8a87c}
.choose-options .option h3{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    font-size:19px;
    margin-bottom:12px;
}
.choose-options .option h3::before{
    content:'';
    display:inline-block;
    width:28px;
    height:28px;
    background-size:contain;
    background-repeat:no-repeat;
    background-position:center;
    flex-shrink:0;
}
.choose-options .option:nth-child(1) h3::before{background-image:url('/images/icon-test.svg')}
.choose-options .option:nth-child(2) h3::before{background-image:url('/images/icon-chat.svg')}
.choose-options .option:nth-child(3) h3::before{background-image:url('/images/icon-phone.svg')}
.choose-options .option p{color:var(--muted);font-size:14.5px;margin-bottom:18px}

/* ============================================================
   12. ПАГИНАЦИЯ
   ============================================================ */

.pagination{
    display:flex;
    justify-content:center;
    gap:8px;
    margin:30px 0;
    flex-wrap:wrap;
}
.pagination a,
.pagination span{
    padding:8px 14px;
    border-radius:8px;
    background:var(--card);
    color:var(--ink);
    border:1px solid #eae6e1;
    font-size:14px;
    min-width:40px;
    text-align:center;
}
.pagination a:hover{background:var(--accent-soft);color:var(--accent);border-color:var(--accent)}
.pagination .active{background:var(--accent);color:#fff;border-color:var(--accent)}

/* ============================================================
   13. ЮРИДИЧЕСКИЕ
   ============================================================ */

.legal{max-width:800px;margin:0 auto}
.legal h2{margin-top:30px}
.legal p, .legal li{margin-bottom:10px;color:var(--ink)}
.legal ul, .legal ol{padding-left:24px;margin-bottom:16px}
.legal i{color:var(--muted)}

/* ============================================================
   14. ФОРМЫ ВХОДА И РЕГИСТРАЦИИ
   ============================================================ */

.auth-page{
    display:flex;
    justify-content:center;
    align-items:flex-start;
    padding:40px 0 60px;
}
.auth-card{
    background:var(--card);
    border-radius:var(--radius);
    padding:40px 36px;
    box-shadow:var(--shadow);
    width:100%;
    max-width:440px;
    box-sizing:border-box;
}
.auth-card h1{font-size:26px;margin-bottom:8px;text-align:center}
.auth-sub{
    color:var(--muted);
    font-size:14.5px;
    line-height:1.55;
    text-align:center;
    margin-bottom:28px;
}
.auth-form{display:block;margin:0}
.auth-form .field{display:block;margin-bottom:18px}
.auth-form .field > span{
    display:block;
    font-size:14px;
    color:var(--ink);
    font-weight:600;
    margin-bottom:6px;
}
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="tel"],
.auth-form input[type="password"]{
    display:block;
    width:100%;
    height:50px;
    padding:0 16px;
    border:1px solid #eae6e1;
    border-radius:12px;
    font-size:16px;
    font-family:inherit;
    background:#fff;
    color:var(--ink);
    outline:none;
    box-sizing:border-box;
    transition:border-color .2s, box-shadow .2s;
}
.auth-form input:focus{
    border-color:var(--accent);
    box-shadow:0 0 0 3px var(--accent-soft);
}
.auth-form .agree-label{
    display:flex;
    align-items:flex-start;
    gap:10px;
    margin:12px 0;
    font-size:14px;
    color:var(--ink);
    line-height:1.5;
    cursor:pointer;
}
.auth-form .agree-label input[type="checkbox"]{
    width:20px;
    height:20px;
    margin-top:2px;
    flex-shrink:0;
    accent-color:var(--accent);
    cursor:pointer;
}
.auth-form .agree-label a{color:var(--accent);text-decoration:underline}
.auth-submit{
    display:flex;
    width:100%;
    height:52px;
    font-size:16px;
    margin-top:8px;
}
.auth-alt{
    text-align:center;
    font-size:14.5px;
    color:var(--muted);
    margin-top:22px;
    padding-top:22px;
    border-top:1px solid #f0ece8;
}
.auth-alt a{color:var(--accent);font-weight:600}

/* ============================================================
   15. КАБИНЕТ
   ============================================================ */

.cabinet h1{margin-bottom:24px}

.cabinet-guest{
    background:var(--card);
    border-radius:var(--radius);
    padding:30px;
    text-align:center;
    box-shadow:var(--shadow-sm);
}
.cabinet-guest p{margin-bottom:16px;color:var(--muted)}
.cabinet-guest .btn-primary,
.cabinet-guest .btn-outline{margin:6px}

.cabinet-nav{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(150px, 1fr));
    gap:12px;
    margin-bottom:32px;
}
.cabinet-tab{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:6px;
    background:var(--card);
    border:2px solid transparent;
    border-radius:14px;
    padding:16px 10px;
    text-decoration:none;
    color:var(--ink);
    text-align:center;
    transition:.2s;
    box-shadow:var(--shadow-sm);
    min-height:88px;
    box-sizing:border-box;
}
.cabinet-tab:hover{
    background:var(--accent-soft);
    border-color:var(--accent);
    color:var(--accent-dark);
    transform:translateY(-2px);
    box-shadow:var(--shadow);
    text-decoration:none;
}
.cabinet-tab.active{
    background:var(--accent);
    border-color:var(--accent);
    color:#fff;
    box-shadow:var(--shadow);
}
.cabinet-tab.active:hover{
    background:var(--accent-dark);
    color:#fff;
}
.cabinet-tab__icon{font-size:26px;line-height:1;display:block}
.cabinet-tab__label{
    font-size:13px;
    font-weight:600;
    line-height:1.3;
    display:block;
}
.cabinet-tab--logout{
    color:var(--muted);
    background:#f9fafb;
}
.cabinet-tab--logout:hover{
    background:#ffeef0;
    border-color:#e8a87c;
    color:#b45a4a;
}

.cabinet-content{
    position:relative;
    background:var(--card);
    border-radius:var(--radius);
    padding:28px;
    box-shadow:var(--shadow-sm);
}
.cabinet-content h2{font-size:20px;margin-bottom:16px}
.cabinet-content .empty{
    color:var(--muted);
    padding:20px 0;
    text-align:center;
}

.cabinet-form{max-width:520px}
.cabinet-form .field{display:block;margin-bottom:16px}
.cabinet-form .field > span{
    display:block;
    font-size:14px;
    color:var(--ink);
    font-weight:600;
    margin-bottom:6px;
}
.cabinet-form input[type="text"],
.cabinet-form input[type="email"],
.cabinet-form input[type="tel"],
.cabinet-form input[type="password"]{
    display:block;
    width:100%;
    height:48px;
    padding:0 16px;
    border:1px solid #eae6e1;
    border-radius:10px;
    font-size:16px;
    font-family:inherit;
    background:#fff;
    color:var(--ink);
    outline:none;
    box-sizing:border-box;
    transition:.2s;
}
.cabinet-form input:focus{
    border-color:var(--accent);
    box-shadow:0 0 0 3px var(--accent-soft);
}
.cabinet-form .agree-label{
    display:flex;
    align-items:flex-start;
    gap:10px;
    margin:12px 0;
    font-size:14px;
    color:var(--ink);
    line-height:1.5;
    cursor:pointer;
}
.cabinet-form .agree-label input[type="checkbox"]{
    width:20px;
    height:20px;
    margin-top:2px;
    flex-shrink:0;
    accent-color:var(--accent);
    cursor:pointer;
}
.cabinet-fieldset{
    border:1px solid #eae6e1;
    border-radius:12px;
    padding:18px 22px;
    margin-bottom:20px;
}
.cabinet-fieldset legend{
    font-weight:700;
    color:var(--accent);
    padding:0 10px;
    font-size:15px;
}
.cabinet-fieldset label{
    display:block;
    margin:10px 0;
    font-size:14.5px;
    color:var(--ink);
    cursor:pointer;
}
.cabinet-fieldset input[type="radio"],
.cabinet-fieldset input[type="checkbox"]{
    margin-right:8px;
    accent-color:var(--accent);
}

/* Заказы */
.orders-list{display:flex;flex-direction:column;gap:16px}
.order-card{
    background:var(--bg);
    border-radius:12px;
    padding:18px 20px;
    border-left:4px solid var(--accent);
}
.order-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-bottom:8px;
    flex-wrap:wrap;
}
.order-head b{font-size:16px}
.order-status{
    font-size:12.5px;
    font-weight:700;
    padding:4px 12px;
    border-radius:20px;
    text-transform:uppercase;
    letter-spacing:.3px;
}
.order-status--new{background:#fff3e6;color:#b45a4a}
.order-status--paid{background:#e6ffed;color:#22863a}
.order-status--shipped{background:#e6f0ff;color:#1e5599}
.order-status--delivered{background:#e6efec;color:#3d6a5e}
.order-status--cancelled{background:#ffeef0;color:#d73a49}
.order-date{font-size:13px;color:var(--muted);margin-bottom:10px}
.order-items{list-style:none;padding:0;margin:0 0 10px;font-size:14px}
.order-items li{padding:4px 0;color:var(--ink)}
.order-total{font-size:15px}
.order-total b{color:var(--accent);font-size:17px}

/* Мои отзывы */
.my-reviews-list{display:flex;flex-direction:column;gap:14px}
.my-review{
    background:var(--bg);
    border-radius:12px;
    padding:16px 18px;
}
.my-review__head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-bottom:6px;
    flex-wrap:wrap;
}
.my-review__head b{font-size:15px}
.my-review p{font-size:14.5px;color:var(--ink);line-height:1.5}
.my-review__meta{font-size:12.5px;color:var(--muted);margin-top:8px}
.review-stars{color:var(--warm);font-size:16px;letter-spacing:1.5px}

/* ============================================================
   16. ПОДБОРОЧНАЯ
   ============================================================ */

.selection-page h1{margin-bottom:8px}
.selection-list{
    display:flex;
    flex-direction:column;
    gap:20px;
}
.selection-item{
    display:grid;
    grid-template-columns:100px 1fr auto;
    gap:20px;
    background:var(--bg);
    border-radius:var(--radius);
    padding:20px;
    box-shadow:var(--shadow-sm);
    transition:.25s;
    align-items:start;
    border:2px solid transparent;
}
.selection-item:hover{box-shadow:var(--shadow)}
.selection-item--warning{
    border-color:#e8a87c;
    background:#fff8f0;
}
.selection-cover img{
    width:100px;
    height:140px;
    object-fit:cover;
    border-radius:10px;
}
.selection-info h3{font-size:16px;margin-bottom:6px;line-height:1.35}
.selection-info h3 a{color:var(--ink);text-decoration:none}
.selection-info h3 a:hover{color:var(--accent)}
.selection-author{color:var(--muted);font-size:13.5px;margin-bottom:8px}
.selection-price{
    font-size:20px;
    font-weight:800;
    color:var(--accent);
    margin:8px 0;
}
.selection-note{
    background:var(--accent-soft);
    color:var(--accent-dark);
    padding:10px 14px;
    border-radius:10px;
    font-size:13.5px;
    margin:10px 0;
    line-height:1.5;
}
.selection-added{font-size:12.5px;color:var(--muted);margin-top:6px}
.selection-actions{
    display:flex;
    flex-direction:column;
    gap:8px;
    min-width:160px;
}
.selection-actions .btn-primary,
.selection-actions .btn-secondary,
.selection-actions .btn-outline{
    width:100%;
    height:44px;
    font-size:14px;
    padding:0 18px;
}

/* ============================================================
   17. ЧАТ
   ============================================================ */

.chat-messages{
    background:var(--bg);
    padding:20px;
    border-radius:var(--radius);
    min-height:320px;
    max-height:520px;
    overflow-y:auto;
    margin-bottom:24px;
    box-sizing:border-box;
    display:flex;
    flex-direction:column;
    gap:12px;
}

.chat-message{
    padding:12px 16px;
    border-radius:12px;
    max-width:75%;
    box-sizing:border-box;
    word-wrap:break-word;
    word-break:break-word;
}
.chat-message.chat-client{
    background:#fff;
    border-left:3px solid var(--accent);
    align-self:flex-end;
    text-align:right;
    margin-left:auto;
}
.chat-message.chat-seller{
    background:var(--accent-soft);
    border-left:3px solid var(--accent-dark);
    align-self:flex-start;
    text-align:left;
    margin-right:auto;
}
.chat-sender{
    font-weight:700;
    font-size:12.5px;
    color:var(--accent);
    margin-bottom:4px;
    text-transform:uppercase;
    letter-spacing:.3px;
}
.chat-body{
    font-size:14.5px;
    color:var(--ink);
    line-height:1.5;
}
.chat-time{
    font-size:11.5px;
    color:var(--muted);
    margin-top:6px;
}
.chat-empty{
    color:var(--muted);
    text-align:center;
    font-size:14px;
    padding:20px 0;
    margin:0;
}

.chat-form{
    display:flex;
    flex-direction:column;
    gap:14px;
    width:100%;
    box-sizing:border-box;
}
.chat-form textarea{
    width:100%;
    min-height:120px;
    padding:16px 20px;
    border:1px solid #eae6e1;
    border-radius:12px;
    font-family:inherit;
    font-size:15px;
    line-height:1.5;
    resize:vertical;
    outline:none;
    box-sizing:border-box;
    background:#fff;
    color:var(--ink);
    transition:border-color .2s, box-shadow .2s;
}
.chat-form textarea::placeholder{color:#9aa5ac}
.chat-form textarea:focus{
    border-color:var(--accent);
    box-shadow:0 0 0 3px var(--accent-soft);
}
.chat-form button{
    align-self:flex-end;
    min-width:200px;
    height:48px;
    padding:0 32px;
    background:var(--accent);
    color:#fff;
    border:none;
    border-radius:50px;
    font-weight:600;
    font-size:15px;
    font-family:inherit;
    cursor:pointer;
    transition:background .2s, transform .15s;
    box-sizing:border-box;
}
.chat-form button:hover{
    background:var(--accent-dark);
    transform:translateY(-2px);
}
.chat-form button:disabled{
    background:#c9d3cd;
    cursor:wait;
    transform:none;
}

/* ============================================================
   18. АВТОПОДБОР — HERO
   ============================================================ */

.test-hero {
    position: relative;
    background: #2b3a33 url('/images/hero-autopick.jpg') no-repeat 70% center / cover;
    border-radius: 20px;
    padding: 56px 40px;
    margin: 0 0 28px;
    overflow: hidden;
    color: #fff;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.test-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(28, 38, 33, 0.9) 0%,
        rgba(28, 38, 33, 0.75) 35%,
        rgba(28, 38, 33, 0.35) 55%,
        rgba(28, 38, 33, 0) 75%);
    z-index: 0;
}

.test-hero > * {
    position: relative;
    z-index: 1;
}

.test-hero h1 {
    font-size: 36px;
    line-height: 1.2;
    color: #fff;
    margin: 0 0 12px;
    max-width: 640px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.test-hero p {
    font-size: 17px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    max-width: 540px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

@media (max-width: 860px) {
    .test-hero {
        background-image: linear-gradient(180deg,
            rgba(28, 38, 33, 0.55) 0%,
            rgba(28, 38, 33, 0.35) 100%),
            url('/images/hero-autopick-mobile.jpg');
        background-size: cover;
        background-position: 70% center;
        padding: 36px 20px;
        min-height: 260px;
    }
    .test-hero::before { display: none; }
    .test-hero h1 { font-size: 26px; }
    .test-hero p { font-size: 15px; }
}

/* ============================================================
   19. АВТОПОДБОР — ФОН СЕКЦИИ
   ============================================================ */

.cabinet .cabinet-content {
    position: relative;
    background: #fdfaf5;
    background-image: url('/images/texture-dots.svg');
    background-size: 30px 30px;
    background-repeat: repeat;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(139, 118, 90, 0.06);
    border: 1px solid #f0e8dc;
}

.cabinet-form {
    position: relative;
    z-index: 1;
}

.cabinet-fieldset {
    background: rgba(255, 253, 248, 0.85);
    border: 1px solid #efe5d5;
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 18px;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.cabinet-fieldset legend {
    font-weight: 700;
    color: #6b5a45;
    padding: 0 10px;
    font-size: 16px;
}

.cabinet-fieldset label {
    display: block;
    padding: 6px 0;
    color: #3a332b;
    line-height: 1.5;
    cursor: pointer;
    transition: color .15s;
}
.cabinet-fieldset label:hover {
    color: #2e7d5b;
}
.cabinet-fieldset input[type="radio"],
.cabinet-fieldset input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #4a9c78;
    transform: scale(1.1);
}

/* ============================================================
   21. АДАПТИВ — ПЛАНШЕТ (≤ 960px)
   ============================================================ */

@media (max-width: 960px){
    .nav{gap:16px;min-height:64px}
    .nav-links{gap:14px}
    .nav-links a{font-size:13.5px}
}

/* ============================================================
   22. АДАПТИВ — МОБИЛЬНЫЙ (≤ 860px)
   ============================================================ */

@media (max-width: 860px){
    .container{
        padding-left:16px;
        padding-right:16px;
    }
    .nav{
        padding-top:10px;
        padding-bottom:10px;
        min-height:60px;
        gap:12px;
    }
    .nav-links{display:none}
    .btn-header{display:none}
    .burger{display:block}
    .logo__main{font-size:20px}
    .logo__sub{font-size:10.5px;letter-spacing:.7px}
    .header-actions{gap:10px}
    .cart-link{font-size:20px}
    .cart-count{font-size:10px;padding:1px 5px;min-width:16px;line-height:14px}
    .hero{padding:40px 20px;min-height:300px}
    .hero h1{font-size:26px}
    .hero p{font-size:15px}
    .hero .btn-primary,
    .hero .btn-outline{width:100%;text-align:center;justify-content:center}
    .hero-cta{gap:10px}
    .books-grid{
        grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
        gap:16px;
    }
    .book-card{padding:12px}
    .book-card img{height:180px}
    .book-card h3{font-size:14px}
    .book-card .author{font-size:12px}
    .book-annonce{font-size:12px;-webkit-line-clamp:5}
    .age-badge{font-size:11px;padding:2px 8px}
    .book-card .price{font-size:15px}
    .section{padding:36px 0}
    .section h2{font-size:22px}
    .section .sub{font-size:14px;margin-bottom:24px}
    .choose-options{grid-template-columns:1fr;gap:16px}
    .choose-options .option{padding:22px}
    .cabinet-nav{grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px}
    .cabinet-tab{min-height:78px;padding:12px 8px}
    .cabinet-tab__icon{font-size:22px}
    .cabinet-tab__label{font-size:12px}
    .cabinet-content{padding:20px}
    .selection-item{grid-template-columns:80px 1fr;gap:14px}
    .selection-cover img{width:80px;height:112px}
    .selection-actions{grid-column:1 / -1;flex-direction:row;flex-wrap:wrap;min-width:0}
    .selection-actions .btn-primary,
    .selection-actions .btn-secondary,
    .selection-actions .btn-outline{flex:1;min-width:140px}
    .chat-messages{padding:14px;min-height:280px}
    .chat-message{max-width:88%;padding:10px 12px}
    .chat-form textarea{min-height:100px;padding:14px 16px}
    .chat-form button{align-self:stretch;width:100%;min-width:0}
    .auth-card{padding:28px 22px}
    .footer-grid{grid-template-columns:1fr;gap:24px;margin-bottom:24px}
    .site-footer{padding:36px 0 24px}
    .pagination a,.pagination span{padding:7px 12px;font-size:13px}
    .legal{max-width:100%}
}

/* ============================================================
   23. БАННЕР «АВТОПОДБОР» — картинка фоном
   ============================================================ */

.autopick-banner {
    position: relative;
    background: #2b3a33 url('/images/hero-autopick.jpg') no-repeat 70% center / cover;
    border-radius: 20px;
    padding: 56px 40px;
    margin: 32px 0;
    overflow: hidden;
    color: #fff;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.autopick-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(28, 38, 33, 0.9) 0%,
        rgba(28, 38, 33, 0.75) 35%,
        rgba(28, 38, 33, 0.35) 55%,
        rgba(28, 38, 33, 0) 75%);
    z-index: 0;
    pointer-events: none;
}

.autopick-banner__text {
    position: relative;
    z-index: 1;
    max-width: 640px;
}

.autopick-banner__text h2 {
    font-size: 36px;
    line-height: 1.2;
    color: #fff;
    margin: 0 0 12px;
    text-align: left;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.autopick-banner__text p {
    font-size: 17px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 24px;
    max-width: 540px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Кнопка — как в .hero (крупнее, чем базовый .btn-primary) */
.autopick-banner__text .btn-primary {
    display: inline-block;
    background: #4a9c78;
    color: #fff;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: .15s;
    height: auto;
    white-space: nowrap;
}
.autopick-banner__text .btn-primary:hover {
    background: #3a7d5e;
    color: #fff;
}

/* Правый div оставлен в HTML, но картинка теперь фоном у секции.
   Прячем пустой блок, чтобы он не влиял на layout. */
.autopick-banner__image {
    display: none;
}

@media (max-width: 860px) {
    .autopick-banner {
        background-image: linear-gradient(180deg,
            rgba(28, 38, 33, 0.55) 0%,
            rgba(28, 38, 33, 0.35) 100%),
            url('/images/hero-autopick-mobile.jpg');
        background-size: cover;
        background-position: 70% center;
        padding: 36px 20px;
        min-height: 260px;
    }
    .autopick-banner::before { display: none; }
    .autopick-banner__text { max-width: 100%; }
    .autopick-banner__text h2 { font-size: 26px; }
    .autopick-banner__text p { font-size: 15px; }
    .autopick-banner__text .btn-primary {
        width: 100%;
        text-align: center;
    }
}

/* ============================================================
   24. БЕЙДЖИ В ШАПКЕ (Подбор, Заказы, Отзывы)
   ============================================================ */

.nav-links .nav-badge {
    display: inline-block;
    background: #2e7d5b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 3px 7px;
    border-radius: 10px;
    margin-left: 4px;
    vertical-align: middle;
    min-width: 16px;
    text-align: center;
}
/* ============================================================
   25. HERO ДЛЯ РАЗДЕЛОВ КАБИНЕТА (Чат, Заказы, Отзывы, Подбор)
   ============================================================ */

.cabinet-hero {
    position: relative;
    background: #2b3a33 url('/images/hero-operator.jpg') no-repeat 70% center / cover;
    border-radius: 20px;
    padding: 48px 40px;
    margin: 0 0 28px;
    overflow: hidden;
    color: #fff;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cabinet-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(28, 38, 33, 0.9) 0%,
        rgba(28, 38, 33, 0.75) 35%,
        rgba(28, 38, 33, 0.35) 55%,
        rgba(28, 38, 33, 0) 75%);
    z-index: 0;
    pointer-events: none;
}

.cabinet-hero > * {
    position: relative;
    z-index: 1;
}

.cabinet-hero h1 {
    font-size: 34px;
    line-height: 1.2;
    color: #fff;
    margin: 0 0 14px;
    max-width: 720px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.cabinet-hero p {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    max-width: 720px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

@media (max-width: 860px) {
    .cabinet-hero {
        padding: 32px 20px;
        min-height: 220px;
        background-position: 70% center;
    }
    .cabinet-hero h1 { font-size: 26px; }
    .cabinet-hero p  { font-size: 14.5px; }
    .cabinet-hero::before {
        background: linear-gradient(180deg,
            rgba(28, 38, 33, 0.85) 0%,
            rgba(28, 38, 33, 0.55) 55%,
            rgba(28, 38, 33, 0.25) 100%);
    }
}

/* Hero для «Подбора» — своя картинка */
.cabinet-hero--choice {
    background-image: url('/images/hero-choice.jpg');
}

/* Hero для «Заказов» — своя картинка */
.cabinet-hero--orders {
    background-image: url('/images/hero-orders.jpg');
}

/* Hero для «Отзывов» — своя картинка */
.cabinet-hero--reviews {
    background-image: url('/images/hero-nice.jpg');
}