/* ============ RESET & VARIABLES ============ */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eff6ff;

    --text: #0f172a;
    --text-muted: #64748b;
    --text-soft: #94a3b8;

    --bg: #ffffff;
    --bg-soft: #f8fafc;
    --bg-muted: #f1f5f9;
    --border: #e2e8f0;

    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
    --shadow: 0 4px 16px rgba(15, 23, 42, .06);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, .12);

    --transition: .2s cubic-bezier(.4, 0, .2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============ HEADER ============ */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 17px;
    color: var(--text);
    letter-spacing: -.01em;
}
.logo:hover { color: var(--primary); }
.logo img { height: 32px; width: auto; }

.nav { display: flex; gap: 8px; align-items: center; }
.nav a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
}
.nav a:hover { background: var(--bg-muted); text-decoration: none; }
.cart-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--text) !important;
    color: #fff !important;
    font-weight: 600;
}
.cart-link:hover { background: var(--primary) !important; }
#cart-count {
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-full);
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}
.cart-link:hover #cart-count { background: #fff; color: var(--primary); }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn--primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, .25);
}
.btn--primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, .35);
    text-decoration: none;
}
.btn--primary.is-added { background: var(--success); }
.btn--outline {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}
.btn--outline:hover { border-color: var(--text); text-decoration: none; }
.btn--lg { padding: 14px 28px; font-size: 15px; }
.btn--link { background: none; color: var(--text-soft); font-size: 18px; padding: 4px 8px; }
.btn--link:hover { color: var(--danger); }

/* ============ HERO ============ */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #db2777 100%);
    border-radius: var(--radius-lg);
    padding: 30px 60px;
    margin: 24px 0 48px;
    text-align: center;
    color: #fff;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,.15), transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,.1), transparent 40%);
    pointer-events: none;
}
.hero__inner { position: relative; max-width: 720px; margin: 0 auto; }
.hero__badge {
    display: inline-block;
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.25);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: .02em;
}
.hero h1 {
    font-size: 52px;
    line-height: 1.1;
    margin: 0 0 20px;
    font-weight: 800;
    letter-spacing: -.03em;
}
.hero p {
    font-size: 18px;
    opacity: .92;
    margin: 0 0 32px;
    line-height: 1.5;
}
.hero__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.hero .btn--primary {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 8px 30px rgba(0,0,0,.15);
}
.hero .btn--primary:hover { background: #fff; color: var(--primary-dark); }
.hero .btn--outline { color: #fff; border-color: rgba(255,255,255,.5); }
.hero .btn--outline:hover { border-color: #fff; background: rgba(255,255,255,.1); }

/* ============ FEATURES ============ */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 48px 0;
}
.feature {
    padding: 28px 20px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: all var(--transition);
}
.feature:hover {
    background: #fff;
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.feature__icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: inline-block;
}
.feature h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
}
.feature p { margin: 0; color: var(--text-muted); font-size: 13px; }

/* ============ SECTIONS ============ */
.section { margin: 64px 0; }
.section__head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 28px;
    gap: 16px;
}
.section__head h2 {
    margin: 0;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.link-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.link-more:hover { gap: 8px; }

/* ============ CATEGORIES ============ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.category-card {
    position: relative;
    padding: 40px 24px;
    background: linear-gradient(135deg, var(--bg-soft), var(--bg-muted));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
    overflow: hidden;
    transition: all var(--transition);
}
.category-card::after {
    content: '→';
    position: absolute;
    bottom: 16px;
    right: 20px;
    font-size: 18px;
    color: var(--primary);
    opacity: 0;
    transform: translateX(-8px);
    transition: all var(--transition);
}
.category-card:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, .25);
    text-decoration: none;
}
.category-card:hover::after { opacity: 1; transform: translateX(0); color: #fff; }

/* ============ PRODUCT GRID ============ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
}
.product-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}
.product-card__image {
    position: relative;
    display: block;
    aspect-ratio: 1;
    background: var(--bg-soft);
    overflow: hidden;
}
.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s cubic-bezier(.4, 0, .2, 1);
}
.product-card:hover .product-card__image img { transform: scale(1.05); }
.product-card__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.product-card__body h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}
.product-card__body h3 a { color: var(--text); }
.product-card__body h3 a:hover { color: var(--primary); text-decoration: none; }
.product-card__desc {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
    line-height: 1.4;
}
.product-card__price {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin-top: auto;
    padding-top: 8px;
}
.price { font-weight: 800; font-size: 18px; color: var(--text); letter-spacing: -.01em; }
.price--old {
    text-decoration: line-through;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 500;
}

/* ============ BADGE ============ */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.badge--promo {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, .3);
}
.product-card__image .badge--promo {
    position: absolute;
    top: 12px;
    left: 12px;
}

/* ============ PRODUCT DETAIL ============ */
.breadcrumbs {
    font-size: 13px;
    color: var(--text-muted);
    margin: 20px 0 24px;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin: 20px 0 64px;
}
.product-detail__gallery { position: sticky; top: 88px; align-self: start; }
.main-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--bg-soft);
    transition: opacity .3s;
}
.thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.thumbs img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
}
.thumbs img:hover { border-color: var(--text-soft); }
.thumbs img.active { border-color: var(--primary); }

.product-detail__info h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0 0 16px;
    line-height: 1.2;
}
.product-detail__price {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
}
.product-detail__price .price { font-size: 32px; }
.product-detail__price .price--old { font-size: 18px; }

.variants {
    margin: 24px 0;
    padding: 20px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.variants__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.variants__select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color var(--transition);
}
.variants__select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.stock-info {
    margin: 12px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}
.stock-info--ok { color: var(--success); }
.stock-info--no { color: var(--danger); }

.product-detail__description {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.product-detail__description h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px;
}
.product-detail__description p { color: var(--text-muted); line-height: 1.7; }

/* ============ CATALOG ============ */
.catalog-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    margin: 24px 0 64px;
}
.catalog-sidebar {
    position: sticky;
    top: 88px;
    align-self: start;
}
.catalog-sidebar h3 {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
}
.cat-list { list-style: none; padding: 0; margin: 0; }
.cat-list li { margin-bottom: 2px; }
.cat-list a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
}
.cat-list a:hover { background: var(--bg-muted); text-decoration: none; }
.cat-list a.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.catalog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}
.catalog-count { color: var(--text-muted); font-size: 14px; }
.sort-select {
    padding: 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: border-color var(--transition);
}
.sort-select:focus { outline: none; border-color: var(--primary); }

.pagination {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin: 48px 0 24px;
    font-size: 14px;
}
.pagination a {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 500;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

/* ============ CART ============ */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.cart-table th, .cart-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.cart-table th {
    background: var(--bg-soft);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
}
.cart-table tr:last-child td { border-bottom: none; }
.cart-table input[type=number] {
    width: 72px;
    padding: 8px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    text-align: center;
}
.cart-table input[type=number]:focus { outline: none; border-color: var(--primary); }

.cart-summary {
    padding: 28px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: right;
}
.cart-summary p {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    color: var(--text-muted);
}
.cart-summary p strong { color: var(--text); }
.cart-summary .btn { margin-top: 16px; }

/* ============ CTA ============ */
.cta {
    position: relative;
    overflow: hidden;
    margin: 80px 0 48px;
    padding: 30px 40px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    border-radius: var(--radius-lg);
    text-align: center;
}
.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, .4), transparent 60%);
    pointer-events: none;
}
.cta > * { position: relative; }
.cta h2 { font-size: 36px; font-weight: 800; margin: 0 0 12px; letter-spacing: -.02em; }
.cta p { opacity: .75; margin: 0 0 28px; font-size: 17px; }

/* ============ MESSAGES ============ */
.messages { margin: 20px 0; }
.message {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}
.message-success { background: #dcfce7; color: #166534; }
.message-error { background: #fee2e2; color: #991b1b; }

/* ============ FOOTER ============ */
.footer {
    margin-top: 80px;
    padding: 40px 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
}
.footer p { margin: 4px 0; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .catalog-layout { grid-template-columns: 1fr; gap: 20px; }
    .catalog-sidebar { position: static; }
}
@media (max-width: 768px) {
    .hero { padding: 60px 24px; border-radius: 0; margin-left: -20px; margin-right: -20px; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .product-detail { grid-template-columns: 1fr; gap: 24px; }
    .product-detail__gallery { position: static; }
    .section__head h2 { font-size: 24px; }
    .cta { padding: 48px 24px; }
    .cta h2 { font-size: 26px; }
}
@media (max-width: 480px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-card__body { padding: 12px; }
    .product-card__body h3 { font-size: 13px; }
    .price { font-size: 15px; }
    .btn { padding: 8px 14px; font-size: 13px; }
}

/* ============ CHECKOUT ============ */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    margin: 32px 0 64px;
    align-items: start;
}

.checkout-form-wrap {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}

.form-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}
.form-section:last-of-type { border-bottom: none; padding-bottom: 0; }
.form-section h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}
.required { color: var(--danger); }

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { color: var(--text-muted); font-size: 13px; margin: 4px 0 8px; }

.form-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 4px;
}

/* Радиокнопки доставки */
.delivery-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}
.delivery-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}
.delivery-option:hover { border-color: var(--text-soft); }
.delivery-option input[type="radio"] {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}
.delivery-option input[type="radio"]:checked ~ span {
    font-weight: 600;
    color: var(--primary);
}
.delivery-option:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.btn--block { width: 100%; }

/* Сводка заказа */
.checkout-summary {
    position: sticky;
    top: 88px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.checkout-summary h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
}
.summary-items {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}
.summary-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    font-size: 14px;
}
.summary-item__info { flex: 1; }
.summary-item__price { font-weight: 600; white-space: nowrap; }
.muted { color: var(--text-muted); }

.summary-total {
    margin-bottom: 16px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-muted);
}
.summary-row--final {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}
.summary-note {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* ============ THANKS ============ */
.thanks-page {
    max-width: 640px;
    margin: 60px auto;
    padding: 48px 32px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
}
.thanks-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-size: 40px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(34, 197, 94, .3);
}
.thanks-page h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 16px;
    letter-spacing: -.02em;
}
.thanks-number {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0 0 16px;
}
.thanks-number strong {
    color: var(--text);
    font-size: 20px;
    font-family: 'SF Mono', Menlo, monospace;
    letter-spacing: .05em;
}
.thanks-text {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 32px;
}

.thanks-details {
    background: var(--bg-soft);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 32px;
    text-align: left;
}
.thanks-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}
.thanks-row span:first-child { color: var(--text-muted); }

/* ============ Адаптив ============ */
@media (max-width: 900px) {
    .checkout-layout { grid-template-columns: 1fr; }
    .checkout-summary { position: static; order: -1; }
}
@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; }
    .checkout-form-wrap { padding: 20px; }
    .thanks-page { padding: 32px 20px; margin: 32px auto; }
    .thanks-page h1 { font-size: 24px; }
}

/* ============ LEGAL PAGES ============ */
.legal-page {
    max-width: 800px;
    margin: 40px auto 80px;
    padding: 0 20px;
    line-height: 1.7;
    color: var(--text);
}
.legal-page h1 {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 32px;
    letter-spacing: -.02em;
}
.legal-page h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 32px 0 12px;
}
.legal-page p { margin: 0 0 16px; color: var(--text); }
.legal-page ul, .legal-page ol {
    margin: 0 0 16px;
    padding-left: 24px;
    color: var(--text);
}
.legal-page li { margin-bottom: 8px; }
.legal-page a { color: var(--primary); text-decoration: underline; }

.legal-meta {
    color: var(--text-muted);
    font-size: 15px;
    padding: 16px 20px;
    background: var(--bg-soft);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    margin-bottom: 32px;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.legal-table th, .legal-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.legal-table th {
    background: var(--bg-soft);
    font-weight: 600;
    width: 200px;
}
.legal-table tr:last-child th,
.legal-table tr:last-child td { border-bottom: none; }
.legal-table thead th {
    background: var(--bg-soft);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
}

.legal-note {
    color: var(--text-muted);
    font-size: 13px;
    padding: 12px 16px;
    background: var(--primary-soft);
    border-radius: var(--radius-sm);
    margin: 16px 0 24px;
}

.legal-date {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
}

/* ============ FOOTER GRID ============ */
.footer {
    background: var(--bg-soft);
    padding: 48px 0 24px;
    margin-top: 80px;
    border-top: 1px solid var(--border);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}
.footer-col h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
}
.footer-col p {
    margin: 6px 0;
    font-size: 14px;
    color: var(--text);
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col li { margin-bottom: 6px; }
.footer-col a {
    color: var(--text);
    font-size: 14px;
    text-decoration: none;
}
.footer-col a:hover { color: var(--primary); }

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}
.footer-bottom p { margin: 4px 0; }

@media (max-width: 640px) {
    .legal-page h1 { font-size: 26px; }
    .legal-table th { width: auto; display: block; border-bottom: none; }
    .legal-table td { display: block; padding-top: 0; }
}

/* ============ AUTOCOMPLETE ============ */
.autocomplete-wrap {
    position: relative;
}
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: var(--shadow);
    margin-top: -1px;
}
.ac-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    transition: background var(--transition);
}
.ac-item:hover {
    background: var(--primary-soft);
}
.ac-region {
    color: var(--text-muted);
    font-size: 12px;
    margin-left: 6px;
}
.ac-empty {
    color: var(--text-muted);
    cursor: default;
    text-align: center;
    font-style: italic;
}

/* ============ ПВЗ ============ */
.pvz-list {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px;
    background: #fff;
    margin-top: 8px;
}
.pvz-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
}
.pvz-item:hover {
    background: var(--bg-soft);
}
.pvz-item input[type="radio"] {
    margin-top: 2px;
    accent-color: var(--primary);
}
.pvz-item:has(input:checked) {
    background: var(--primary-soft);
    box-shadow: inset 0 0 0 1px var(--primary);
}
.pvz-info {
    flex: 1;
    font-size: 13px;
    line-height: 1.4;
}
.pvz-info strong {
    display: block;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}
.pvz-info small {
    color: var(--text-muted);
    font-size: 12px;
}
.pvz-loading,
.pvz-empty {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    padding: 20px 12px;
    margin: 0;
}

.pvz-map {
    height: 400px;
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #f7f7f8;
}
@media (max-width: 640px) {
    .pvz-map { height: 300px; }
}

.pvz-marker__dot {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    transition: transform .15s;
}
.pvz-marker:hover .pvz-marker__dot {
    transform: scale(1.3);
    background: var(--primary-dark);
}