/* ============================================================
   STYLE.CSS — гранитная мастерская «Мемориал Сервис»
   Палитра сохранена с оригинала: тёмный фон + золото.
   ============================================================ */

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #222222;
    --bg-card: #2a2a2a;
    --bg-elevated: #303030;
    --gold: #c9a84c;
    --gold-hover: #d4b75e;
    --gold-light: rgba(201, 168, 76, 0.15);
    --text-white: #ffffff;
    --text-gray: #a3a3a3;
    --text-muted: #8a8a8a;
    --border-color: #333333;
    --error: #e05c5c;
    --success: #4caf7d;
    --wa-green: #25d366;
    --tg-blue: #2aabee;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    --transition: 0.3s ease;
    --header-h: 76px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-white);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body.modal-open,
body.drawer-open {
    overflow: hidden;
}

img { max-width: 100%; display: block; }

a {
    color: var(--gold);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--gold-hover); }

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.container-narrow { max-width: 860px; }

.section { padding: 80px 0; }

.section-header { text-align: center; margin-bottom: 44px; }
.section-title {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}
.section-title::after {
    content: '';
    display: block;
    width: 64px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), transparent);
    margin: 14px auto 0;
    border-radius: 2px;
}
.section-subtitle {
    color: var(--text-gray);
    font-size: 17px;
    max-width: 640px;
    margin: 0 auto;
}

.muted { color: var(--text-muted); }

/* Секции должны учитывать фиксированную шапку при якорных переходах */
section[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 3000;
    background: var(--gold);
    color: #1a1a1a;
    padding: 10px 18px;
    border-radius: 0 0 8px 0;
    font-weight: 600;
}
.skip-link:focus { left: 0; color: #1a1a1a; }

/* ===== КНОПКИ ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-gold {
    background: linear-gradient(135deg, var(--gold), #b8943d);
    color: #1a1a1a;
    box-shadow: 0 4px 18px rgba(201, 168, 76, 0.25);
}
.btn-gold:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--gold-hover), #c9a84c);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(201, 168, 76, 0.35);
}

.btn-outline {
    background: transparent;
    border-color: var(--gold);
    color: var(--gold);
}
.btn-outline:hover {
    background: var(--gold-light);
    color: var(--gold-hover);
}

.btn-outline-light {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
}
.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-block { width: 100%; }

.link-btn {
    background: none;
    border: none;
    color: var(--gold);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}
.link-btn:hover { color: var(--gold-hover); }

/* ===== ШАПКА ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(26, 26, 26, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: box-shadow var(--transition);
}
.header.scrolled { box-shadow: 0 6px 30px rgba(0, 0, 0, 0.5); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: var(--header-h);
}

.logo-img { height: 56px; width: auto; }

.header-nav {
    display: flex;
    gap: 22px;
    list-style: none;
}
.header-nav a {
    color: var(--text-white);
    font-size: 14.5px;
    font-weight: 500;
    padding: 6px 0;
    position: relative;
}
.header-nav a::after {
    content: '';
    position: absolute;
    left: 0; right: 100%;
    bottom: 0;
    height: 2px;
    background: var(--gold);
    transition: right var(--transition);
}
.header-nav a:hover { color: var(--gold); }
.header-nav a:hover::after { right: 0; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-white);
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
}
.header-phone:hover { color: var(--gold); }
.header-phone svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--gold);
    stroke-width: 1.8;
}

/* Бургер */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 9px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--gold);
    border-radius: 2px;
    transition: all var(--transition);
}
body.drawer-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.drawer-open .burger span:nth-child(2) { opacity: 0; }
body.drawer-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== МОБИЛЬНОЕ МЕНЮ (DRAWER) ===== */
.drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity var(--transition);
}
.drawer-overlay.visible { opacity: 1; }

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    width: min(340px, 88vw);
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    transform: translateX(105%);
    transition: transform var(--transition);
    padding: 64px 28px 28px;
    overflow-y: auto;
    visibility: hidden;
}
.mobile-drawer.open { transform: translateX(0); visibility: visible; }

.drawer-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition);
}
.drawer-close:hover { border-color: var(--gold); color: var(--gold); }

.mobile-drawer ul { list-style: none; margin-bottom: 28px; }
.mobile-drawer li { border-bottom: 1px solid var(--border-color); }
.mobile-drawer li a {
    display: block;
    padding: 13px 4px;
    color: var(--text-white);
    font-size: 16px;
    font-weight: 500;
}
.mobile-drawer li a:hover { color: var(--gold); padding-left: 10px; }

.drawer-contacts { border-top: 1px solid var(--border-color); padding-top: 20px; }
.drawer-phone {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 4px;
}
.drawer-hours { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }

/* ===== HERO ===== */
.hero {
    padding: calc(var(--header-h) + 56px) 0 72px;
    background:
        radial-gradient(ellipse at 80% 20%, rgba(201, 168, 76, 0.07), transparent 55%),
        linear-gradient(180deg, #1f1f1f 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border-color);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
}

.hero-subtitle {
    color: var(--gold);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 14px;
}

.hero-title {
    font-size: clamp(30px, 4.4vw, 50px);
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
}

.hero-price {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 22px;
}
.hero-price span { color: var(--gold); font-size: 34px; }

.hero-usp {
    list-style: none;
    margin-bottom: 30px;
}
.hero-usp li {
    position: relative;
    padding-left: 28px;
    color: var(--text-gray);
    margin-bottom: 10px;
    font-size: 15.5px;
}
.hero-usp li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--gold);
    font-weight: 700;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 30px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.hero-badge {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    padding: 7px 14px;
    font-size: 13px;
    color: var(--text-gray);
}

/* Декоративный памятник в hero */
.hero-image {
    display: flex;
    justify-content: center;
}
.hero-monument {
    position: relative;
    width: 290px;
    height: 440px;
    background: linear-gradient(135deg, #3a3a3d 0%, #26262a 55%, #1d1d20 100%);
    border-radius: 120px 120px 6px 6px;
    border: 1px solid #454549;
    border-bottom: none;
    box-shadow: 0 34px 70px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-monument::before {
    content: '';
    position: absolute;
    inset: 14px 14px 0;
    border: 1px solid rgba(201, 168, 76, 0.35);
    border-radius: 108px 108px 4px 4px;
    border-bottom: none;
    pointer-events: none;
}
.hero-monument::after {
    content: '';
    position: absolute;
    bottom: -34px;
    left: -44px;
    right: -44px;
    height: 34px;
    background: linear-gradient(180deg, #3d3d40, #26262a);
    border-radius: 5px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
.hero-logo-overlay {
    width: 180px;
    height: auto;
    opacity: 0.92;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
    position: relative;
    z-index: 2;
}

/* ===== ПРЕИМУЩЕСТВА ===== */
.features {
    padding: 40px 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 10px;
}
.feature-icon {
    width: 40px;
    height: 40px;
    fill: none;
    stroke: var(--gold);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.feature-text {
    color: var(--text-gray);
    font-size: 14.5px;
}

/* ===== КОНСТРУКТОР ПАМЯТНИКА ===== */
.monument-builder { background: var(--bg-secondary); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }

.builder-layout {
    display: grid;
    grid-template-columns: minmax(320px, 420px) 1fr;
    gap: 40px;
    align-items: start;
}

.builder-canvas-area {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.canvas-wrapper {
    background: #171717;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}
#monumentCanvas {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    display: block;
    cursor: pointer;
}

.canvas-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.canvas-hint { color: var(--text-muted); font-size: 13px; text-align: center; }

.builder-controls {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.control-group {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 18px 20px;
}
.control-group legend {
    color: var(--gold);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 8px;
}
.control-label {
    display: block;
    color: var(--text-gray);
    font-size: 14px;
    margin: 12px 0 6px;
}
.control-label:first-of-type { margin-top: 4px; }
.control-hint { color: var(--text-muted); font-size: 12.5px; margin-top: 8px; }

.control-input {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    font-family: inherit;
    font-size: 15px;
    padding: 11px 14px;
    transition: border-color var(--transition);
}
.control-input:focus {
    outline: none;
    border-color: var(--gold);
}
textarea.control-input { resize: vertical; }

input[type="range"] {
    width: 100%;
    accent-color: var(--gold);
    cursor: pointer;
}

/* Кнопки-селекторы (шрифты, обрамление, позиция) */
.font-selector,
.photo-style-selector,
.photo-position-selector,
.granite-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.font-btn, .style-btn, .pos-btn, .granite-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-gray);
    font-family: inherit;
    font-size: 13.5px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.font-btn:hover, .style-btn:hover, .pos-btn:hover, .granite-btn:hover { border-color: var(--gold); color: var(--text-white); }
.font-btn.active, .style-btn.active, .pos-btn.active, .granite-btn.active {
    background: var(--gold-light);
    border-color: var(--gold);
    color: var(--gold);
    font-weight: 600;
}

.granite-swatch {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}
.swatch-diabase { background: linear-gradient(135deg, #4a4a4f, #1c1c1e); }
.swatch-dymovsky { background: linear-gradient(135deg, #7d6154, #40302a); }
.swatch-mansurovsky { background: linear-gradient(135deg, #a9a9a4, #6d6d69); }
.swatch-pokostovsky { background: linear-gradient(135deg, #878b80, #4e524a); }

.builder-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.builder-notice {
    background: rgba(201, 168, 76, 0.07);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: var(--radius-sm);
    color: var(--text-gray);
    font-size: 13px;
    padding: 12px 16px;
}

/* ===== КАТАЛОГ ===== */
.catalog { background: var(--bg-primary); }

.catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.catalog-search {
    position: relative;
    flex: 1 1 320px;
    max-width: 460px;
}
.catalog-search svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--text-muted);
    stroke-width: 2;
    pointer-events: none;
}
.catalog-search input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-white);
    font-family: inherit;
    font-size: 15px;
    padding: 12px 18px 12px 42px;
    transition: border-color var(--transition);
}
.catalog-search input:focus { outline: none; border-color: var(--gold); }

.catalog-sort {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.catalog-sort select {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    font-family: inherit;
    font-size: 14px;
    padding: 10px 12px;
    cursor: pointer;
}
.catalog-sort select:focus { outline: none; border-color: var(--gold); }

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.category-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-gray);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    padding: 9px 18px;
    cursor: pointer;
    transition: all var(--transition);
    text-transform: capitalize;
}
.category-btn:hover { border-color: var(--gold); color: var(--text-white); }
.category-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: #1a1a1a;
    font-weight: 600;
}
.cat-count {
    display: inline-block;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 100px;
    font-size: 11.5px;
    padding: 1px 8px;
    margin-left: 4px;
}
.category-btn.active .cat-count { background: rgba(0, 0, 0, 0.2); }

.catalog-count { color: var(--text-muted); font-size: 14px; margin-bottom: 18px; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}
.product-card:hover,
.product-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.product-card-image {
    aspect-ratio: 4 / 3;
    background: linear-gradient(180deg, #242424, #1d1d1d);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}
.product-card-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform var(--transition);
}
.product-card:hover .product-card-image img { transform: scale(1.04); }

.placeholder-img { font-size: 56px; opacity: 0.5; }

.product-card-info {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.product-card-category {
    color: var(--gold);
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}
.product-card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}
.product-card-specs { display: flex; flex-wrap: wrap; gap: 6px; }
.spec-chip {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-muted);
    font-size: 11.5px;
    padding: 3px 10px;
}
.product-card-price {
    margin-top: auto;
    color: var(--gold);
    font-size: 21px;
    font-weight: 700;
}
.product-card-price span { font-size: 15px; font-weight: 600; }
.price-on-request { font-size: 16px; color: var(--text-gray); font-weight: 600; }
.product-card-btn { align-self: flex-start; pointer-events: none; }

.catalog-more { text-align: center; margin-top: 34px; }

.catalog-empty {
    text-align: center;
    color: var(--text-gray);
    padding: 50px 20px;
    grid-column: 1 / -1;
}
.catalog-empty p { margin-bottom: 16px; }

.loading {
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
    grid-column: 1 / -1;
    position: relative;
}
.loading::after {
    content: '';
    display: block;
    width: 34px;
    height: 34px;
    margin: 16px auto 0;
    border: 3px solid var(--border-color);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== ЭТАПЫ РАБОТЫ ===== */
.process { background: var(--bg-secondary); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }

.process-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    counter-reset: step;
}
.process-step {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 26px 24px;
    position: relative;
    transition: border-color var(--transition), transform var(--transition);
}
.process-step:hover { border-color: var(--gold); transform: translateY(-3px); }
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gold-light);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
}
.process-step h3 { font-size: 17px; margin-bottom: 8px; }
.process-step p { color: var(--text-gray); font-size: 14.5px; }

/* ===== ПРОМО-БАННЕР (РАССРОЧКА) ===== */
.promo-banner {
    padding: 56px 0;
    background:
        radial-gradient(ellipse at 15% 50%, rgba(201, 168, 76, 0.22), transparent 55%),
        linear-gradient(120deg, #2b2416 0%, #241f14 50%, #1d1a12 100%);
    border-top: 1px solid rgba(201, 168, 76, 0.3);
    border-bottom: 1px solid rgba(201, 168, 76, 0.3);
}
.promo-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}
.promo-text { max-width: 620px; }
.promo-text h2 { font-size: 28px; margin-bottom: 10px; letter-spacing: -0.01em; }
.promo-text p { color: var(--text-gray); font-size: 16px; }
.promo-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ===== КЛАДБИЩА ===== */
.cemeteries-section { background: var(--bg-primary); }

.cemetery-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.cemetery-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition);
}
.cemetery-item[open] { border-color: var(--gold); grid-column: 1 / -1; }

.cemetery-item summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.cemetery-item summary::-webkit-details-marker { display: none; }
.cemetery-item summary:hover .cemetery-name { color: var(--gold); }

.cemetery-name { font-weight: 600; font-size: 16px; transition: color var(--transition); }
.cemetery-addr { color: var(--text-muted); font-size: 13.5px; margin-left: auto; text-align: right; }
.cemetery-toggle {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    transition: all var(--transition);
}
.cemetery-toggle::before, .cemetery-toggle::after {
    content: '';
    position: absolute;
    background: var(--gold);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.cemetery-toggle::before { width: 11px; height: 2px; }
.cemetery-toggle::after { width: 2px; height: 11px; transition: opacity var(--transition); }
.cemetery-item[open] .cemetery-toggle { background: var(--gold-light); border-color: var(--gold); }
.cemetery-item[open] .cemetery-toggle::after { opacity: 0; }

.cemetery-body {
    padding: 6px 22px 24px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px 28px;
    border-top: 1px solid var(--border-color);
}
.cemetery-transport { color: var(--text-gray); font-size: 14px; padding-top: 16px; }
.cemetery-desc { color: var(--text-gray); font-size: 14.5px; grid-column: 1; }
.cemetery-services { grid-column: 1; }
.cemetery-services h4 { font-size: 14.5px; margin-bottom: 8px; color: var(--text-white); }
.cemetery-services ul { list-style: none; }
.cemetery-services li { color: var(--text-gray); font-size: 14px; margin-bottom: 5px; }
.cemetery-map {
    grid-column: 2;
    grid-row: 1 / span 4;
    min-height: 320px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}
.cemetery-item .js-cemetery-lead { grid-column: 1; justify-self: start; }

/* ===== ОТЗЫВЫ ===== */
.reviews { background: var(--bg-secondary); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.review-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
}
.review-stars { color: var(--gold); letter-spacing: 3px; margin-bottom: 12px; font-size: 15px; }
.review-text { color: var(--text-gray); font-size: 14.5px; margin-bottom: 16px; }
.review-author { font-size: 14px; }

.reviews-empty {
    grid-column: 1 / -1;
    text-align: center;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 44px 30px;
}
.reviews-empty p { color: var(--text-gray); max-width: 520px; margin: 0 auto 20px; }

/* ===== БЛОГ ===== */
.blog-section { background: var(--bg-primary); }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}
.blog-card:hover, .blog-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}
.blog-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #242424;
    border-bottom: 1px solid var(--border-color);
}
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-content { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-card-date { color: var(--text-muted); font-size: 12.5px; }
.blog-card-title { font-size: 16.5px; line-height: 1.4; }
.blog-card-excerpt { color: var(--text-gray); font-size: 14px; flex: 1; }
.blog-card-link { color: var(--gold); font-size: 14px; font-weight: 600; }

/* ===== FAQ ===== */
.faq { background: var(--bg-secondary); border-top: 1px solid var(--border-color); }

.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition);
}
.faq-item[open] { border-color: var(--gold); }
.faq-item summary {
    padding: 18px 52px 18px 22px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15.5px;
    list-style: none;
    position: relative;
    user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 22px;
    font-weight: 400;
    transition: transform var(--transition);
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p {
    padding: 0 22px 20px;
    color: var(--text-gray);
    font-size: 14.5px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin: 0 22px 20px;
    padding-left: 0;
    padding-right: 0;
}
.faq-more { text-align: center; color: var(--text-gray); margin-top: 26px; }

/* ===== ФОРМА ЗАЯВКИ ===== */
.lead-section {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(201, 168, 76, 0.09), transparent 60%),
        var(--bg-primary);
}
.lead-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.lead-form { margin-top: 26px; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-field { margin-bottom: 16px; }
.form-field label {
    display: block;
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 6px;
    font-weight: 500;
}
.form-field input,
.form-field textarea {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    font-family: inherit;
    font-size: 15px;
    padding: 12px 14px;
    transition: border-color var(--transition);
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--gold); }
.form-field textarea { resize: vertical; }
.field-error input, .field-error textarea { border-color: var(--error) !important; }

.consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    color: var(--text-muted);
    margin: 4px 0 20px;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
}
.consent.field-error { border-color: var(--error); }
.consent input { margin-top: 3px; accent-color: var(--gold); flex-shrink: 0; width: 16px; height: 16px; }
.consent a { text-decoration: underline; }

.form-alt { text-align: center; color: var(--text-muted); font-size: 14px; margin-top: 14px; }

.lead-success { text-align: center; padding: 30px 10px; }
.lead-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: rgba(76, 175, 125, 0.15);
    border: 2px solid var(--success);
    color: var(--success);
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lead-success h3 { font-size: 22px; margin-bottom: 10px; }
.lead-success p { color: var(--text-gray); margin-bottom: 22px; max-width: 440px; margin-left: auto; margin-right: auto; }

.lead-mockup-preview { margin-bottom: 18px; }
.lead-mockup-preview img {
    max-width: 150px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-top: 8px;
}
.lead-modal-subtitle { color: var(--text-gray); font-size: 15px; margin-bottom: 20px; }

/* ===== КОНТАКТЫ ===== */
.contacts { background: var(--bg-secondary); border-top: 1px solid var(--border-color); }

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-bottom: 36px;
}
.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    transition: border-color var(--transition);
}
.contact-card:hover { border-color: var(--gold); }
.contact-icon {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: var(--gold);
    stroke-width: 1.6;
    margin: 0 auto 14px;
}
.contact-label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}
.contact-value { font-size: 16.5px; font-weight: 600; }
.contact-extra { color: var(--text-muted); font-size: 13px; margin-top: 6px; }

.map-container { display: grid; gap: 22px; }
#yandexMap {
    width: 100%;
    height: 420px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}
.map-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
}
.map-loading { color: var(--text-muted); }

.map-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.map-info-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    color: var(--text-gray);
    font-size: 14px;
}
.map-info-item strong { color: var(--text-white); }

/* ===== ПОДВАЛ ===== */
.footer {
    background: #141414;
    border-top: 1px solid var(--border-color);
    padding: 56px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 36px;
    padding-bottom: 40px;
}
.footer-logo { height: 52px; width: auto; margin-bottom: 16px; }
.footer-about p { color: var(--text-muted); font-size: 14px; }
.footer-col h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold);
    margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 9px; }
.footer-col li a, .footer-contacts li { color: var(--text-gray); font-size: 14px; }
.footer-col li a:hover { color: var(--gold); }

.footer-messengers { display: flex; gap: 12px; margin-top: 16px; }
.footer-messengers a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.footer-messengers svg { width: 19px; height: 19px; fill: var(--text-gray); transition: fill var(--transition); }
.footer-messengers a:hover { border-color: var(--gold); }
.footer-messengers a:hover svg { fill: var(--gold); }

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 13px;
}

/* ===== ПЛАВАЮЩИЕ ЭЛЕМЕНТЫ ===== */
.float-widget {
    position: fixed;
    right: 22px;
    bottom: 26px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.float-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    transition: transform var(--transition);
    border: none;
    cursor: pointer;
}
.float-btn:hover { transform: scale(1.08); }
.float-btn svg { width: 25px; height: 25px; fill: #fff; }
.float-wa { background: var(--wa-green); }
.float-tg { background: var(--tg-blue); }
.float-top { background: var(--bg-elevated); border: 1px solid var(--border-color); }
.float-top svg { fill: var(--gold); width: 20px; height: 20px; }

/* Мобильная панель действий */
.mobile-action-bar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 950;
    background: rgba(20, 20, 20, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--border-color);
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
}
.mab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px;
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-gray);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.mab-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.mab-call { color: var(--gold); }
.mab-wa { color: var(--wa-green); }
.mab-wa svg, .mab-lead svg { fill: currentColor; stroke: none; }
.mab-lead { color: var(--text-white); background: linear-gradient(135deg, var(--gold), #b8943d); color: #1a1a1a; }

/* Баннер согласия */
.privacy-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1300;
    max-width: 640px;
    margin: 0 auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(14px);
    transition: all var(--transition);
}
.privacy-banner.visible { opacity: 1; transform: translateY(0); }
.privacy-banner p { flex: 1; min-width: 240px; color: var(--text-gray); font-size: 13px; }
.privacy-banner a { text-decoration: underline; }

/* ===== ТОСТ ===== */
.toast {
    position: fixed;
    top: calc(var(--header-h) + 14px);
    left: 50%;
    transform: translate(-50%, -16px);
    z-index: 2000;
    background: var(--bg-elevated);
    border: 1px solid var(--success);
    color: var(--text-white);
    border-radius: var(--radius-sm);
    padding: 12px 22px;
    font-size: 14.5px;
    box-shadow: var(--shadow);
    opacity: 0;
    transition: all var(--transition);
    max-width: min(92vw, 480px);
    text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { border-color: var(--error); }

/* ===== МОДАЛЬНЫЕ ОКНА ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    max-width: 820px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(18px) scale(0.98);
    transition: transform var(--transition);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal-wide { max-width: 860px; }
.modal-lead { max-width: 520px; }

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    width: 40px;
    height: 40px;
    background: rgba(26, 26, 26, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-white);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition);
}
.modal-close:hover { border-color: var(--gold); color: var(--gold); transform: rotate(90deg); }

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.modal-image {
    background: linear-gradient(180deg, #242424, #1c1c1c);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px;
    min-height: 320px;
    border-right: 1px solid var(--border-color);
}
.modal-image img { max-width: 100%; max-height: 58vh; object-fit: contain; }
.modal-info { padding: 34px 32px; }
.modal-category {
    color: var(--gold);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 8px;
}
.modal-title { font-size: 23px; line-height: 1.3; margin-bottom: 18px; }

.specs-list { margin-bottom: 16px; }
.spec-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 14px;
}
.spec-row dt { color: var(--text-muted); }
.spec-row dd { color: var(--text-white); }

.modal-description {
    color: var(--text-gray);
    font-size: 14px;
    white-space: pre-line;
    margin-bottom: 18px;
}
.modal-price { color: var(--gold); font-size: 28px; font-weight: 700; margin-bottom: 22px; }
.modal-price span { font-size: 18px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.modal-body-article { display: block; padding: 42px 44px; }
.modal-body-article h2 { color: var(--gold); font-size: 25px; margin-bottom: 10px; line-height: 1.3; }
.article-date { color: var(--text-muted); font-size: 13.5px; margin-bottom: 22px; }
.article-body { color: var(--text-gray); font-size: 15.5px; line-height: 1.75; }
.article-body h2, .article-body h3 { color: var(--text-white); margin: 22px 0 10px; font-size: 19px; }
.article-body p { margin-bottom: 14px; }
.article-body ul, .article-body ol { margin: 0 0 14px 22px; }
.article-body li { margin-bottom: 6px; }
.article-body strong { color: var(--text-white); }

.modal-body-lead { display: block; padding: 38px 36px; }
.modal-body-lead h2 { font-size: 24px; margin-bottom: 8px; }

.noscript-note {
    background: var(--gold-light);
    border-bottom: 1px solid var(--gold);
    color: var(--text-white);
    text-align: center;
    padding: 14px 20px;
    font-size: 14.5px;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 1100px) {
    .header-nav { gap: 14px; }
    .header-nav a { font-size: 13.5px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .process-steps { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-image { order: -1; }
    .hero-monument { width: 230px; height: 350px; }
    .hero-monument::before { border-radius: 88px 88px 4px 4px; }
    .hero-logo-overlay { width: 140px; }
    .hero-content { text-align: center; }
    .hero-usp { display: inline-block; text-align: left; }
    .hero-cta, .hero-badges { justify-content: center; }
}

@media (max-width: 999px) {
    .desktop-nav { display: none; }
    .burger { display: flex; }
    .builder-layout { grid-template-columns: 1fr; }
    .builder-canvas-area { position: static; }
    .canvas-wrapper { max-width: 360px; margin: 0 auto; }
    .reviews-grid { grid-template-columns: 1fr 1fr; }
    .blog-grid { grid-template-columns: 1fr 1fr; }
    .cemetery-list { grid-template-columns: 1fr; }
    .cemetery-body { grid-template-columns: 1fr; }
    .cemetery-map { grid-column: 1; grid-row: auto; }
    .modal-body { grid-template-columns: 1fr; }
    .modal-image { border-right: none; border-bottom: 1px solid var(--border-color); min-height: 240px; }
}

@media (max-width: 900px) {
    .header-phone span { display: none; }
    .header-actions .btn-gold { display: none; }
    .contacts-grid { grid-template-columns: 1fr; }
    .map-info { grid-template-columns: 1fr; }
    .section { padding: 60px 0; }
    .section-title { font-size: 28px; }
    .lead-card { padding: 28px 22px; }
    .modal-body-article { padding: 32px 24px; }
    .modal-body-lead { padding: 30px 24px; }
}

@media (max-width: 768px) {
    :root { --header-h: 64px; }
    .logo-img { height: 44px; }
    .features-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
    .process-steps { grid-template-columns: 1fr; }
    .reviews-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .promo-inner { flex-direction: column; text-align: center; }
    .promo-text h2 { font-size: 23px; }
    .cemetery-item summary { flex-wrap: wrap; }
    .cemetery-addr { margin-left: 0; text-align: left; width: 100%; order: 3; }
    #yandexMap { height: 320px; }

    /* Мобильная панель действий вместо плавающих кнопок */
    .float-widget { display: none; }
    .mobile-action-bar { display: flex; gap: 8px; }
    body { padding-bottom: 74px; }
    .privacy-banner { bottom: 86px; }
    .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 480px) {
    .features-grid { grid-template-columns: 1fr; }
    .hero-cta .btn { width: 100%; }
    .canvas-actions { flex-direction: column; width: 100%; }
    .canvas-actions .btn { width: 100%; }
    .modal-overlay { padding: 10px; }
    .spec-row { grid-template-columns: 1fr; gap: 2px; }
}

/* Уважение к настройкам анимации */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   АДМИН-ПАНЕЛЬ (admin.php)
   ============================================================ */

.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(201, 168, 76, 0.08), transparent 60%),
        var(--bg-primary);
}
.login-box {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: var(--shadow);
}
.login-box h2 {
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
    margin-bottom: 6px;
}
.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 13.5px;
    margin-bottom: 26px;
}
.error-box {
    background: rgba(224, 92, 92, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}
.login-back { text-align: center; margin-top: 22px; font-size: 13.5px; }

/* Каркас */
.admin-body { background: var(--bg-primary); }
.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #151515;
    border-right: 1px solid var(--border-color);
    padding: 24px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.admin-sidebar-logo {
    padding: 0 22px 22px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}
.admin-sidebar-logo img { height: 44px; width: auto; margin-bottom: 8px; }
.admin-sidebar-logo span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.admin-nav { list-style: none; }
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px;
    color: var(--text-gray);
    font-size: 14.5px;
    border-left: 3px solid transparent;
    transition: all var(--transition);
}
.admin-nav a:hover { color: var(--text-white); background: rgba(255, 255, 255, 0.04); }
.admin-nav a.active {
    color: var(--gold);
    background: var(--gold-light);
    border-left-color: var(--gold);
}
.admin-nav a svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
    flex-shrink: 0;
}
.admin-nav-danger:hover { color: var(--error) !important; }
.admin-nav-sep { height: 1px; background: var(--border-color); margin: 12px 0; }

.nav-badge {
    margin-left: auto;
    background: var(--error);
    color: #fff;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
}

.admin-main {
    flex: 1;
    padding: 26px 32px 60px;
    min-width: 0;
}

.admin-userbar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    background: var(--gold-light);
    border: 1px solid rgba(201, 168, 76, 0.4);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 13.5px;
    margin-bottom: 26px;
}

.admin-h1 {
    font-size: 26px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 24px;
}
.admin-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.admin-section-head .admin-h1 { margin-bottom: 24px; }

.admin-section { display: none; }
.admin-section.active { display: block; }

/* Статистика */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 26px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 22px 16px;
    text-align: center;
}
.stat-number { font-size: 34px; font-weight: 700; color: var(--gold); }
.stat-label {
    font-size: 11.5px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 6px;
}
.stat-accent { border-color: var(--gold); background: var(--gold-light); }

/* Панели */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 22px;
}
.panel h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold);
    margin-bottom: 18px;
}
.panel-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
.admin-help-list { margin-left: 20px; color: var(--text-gray); font-size: 14px; }
.admin-help-list li { margin-bottom: 8px; }
.admin-help-list code {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 12.5px;
    color: var(--gold);
}

/* Таблицы */
.admin-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow-x: auto;
}
.admin-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.admin-table th {
    padding: 13px 16px;
    text-align: left;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-gray);
    font-weight: 600;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.admin-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .row-new { background: rgba(201, 168, 76, 0.06); }
.table-empty { text-align: center; color: var(--text-muted); padding: 40px !important; }
.table-error { color: var(--error); }
.table-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: #222;
}
.table-thumb-empty {
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: #222;
    border-radius: var(--radius-sm);
}
.table-actions { display: flex; gap: 8px; }
.nowrap { white-space: nowrap; }
.lead-comment {
    max-width: 320px;
    white-space: pre-line;
    color: var(--text-gray);
    font-size: 13.5px;
}

/* Бейджи */
.badge {
    display: inline-block;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 12px;
    white-space: nowrap;
}
.badge-on { color: var(--success); background: rgba(76, 175, 125, 0.12); }
.badge-off { color: var(--text-muted); background: rgba(255, 255, 255, 0.06); }
.badge-new { color: #1a1a1a; background: var(--gold); }
.badge-done { color: var(--success); background: rgba(76, 175, 125, 0.12); }

.btn-danger {
    background: rgba(224, 92, 92, 0.15);
    border: 1px solid var(--error);
    color: var(--error);
}
.btn-danger:hover { background: var(--error); color: #fff; }

/* Формы админки */
.admin-body .form-group { margin-bottom: 18px; }
.admin-body .form-group label,
.login-box .form-group label {
    display: block;
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}
.admin-body .form-group input[type="text"],
.admin-body .form-group input[type="email"],
.admin-body .form-group input[type="number"],
.admin-body .form-group input[type="file"],
.admin-body .form-group textarea,
.login-box .form-group input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    font-family: inherit;
    font-size: 14px;
    transition: border-color var(--transition);
}
.admin-body .form-group input:focus,
.admin-body .form-group textarea:focus,
.login-box .form-group input:focus { outline: none; border-color: var(--gold); }
.admin-body .form-group textarea { resize: vertical; }
.admin-body .form-group small { display: block; margin-top: 6px; font-size: 12px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-gray);
    padding: 6px 0 14px;
    cursor: pointer;
}
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--gold); }
.image-preview {
    max-width: 200px;
    max-height: 150px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: #222;
    margin-top: 10px;
    border: 1px solid var(--border-color);
}

/* Модалки админки */
.adm-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.adm-overlay[hidden] { display: none; }
.adm-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    width: 620px;
    max-width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.adm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
}
.adm-modal-header h3 { font-size: 17px; text-transform: uppercase; letter-spacing: 0.05em; }
.adm-modal-close {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    transition: all var(--transition);
}
.adm-modal-close:hover { color: var(--gold); background: rgba(255, 255, 255, 0.05); }
.adm-modal-body { padding: 22px 24px; }
.adm-modal-footer {
    padding: 18px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Последние заявки на дашборде */
.dash-lead {
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    align-items: baseline;
}
.dash-lead-new { border-color: var(--gold); background: rgba(201, 168, 76, 0.06); }
.dash-lead .muted { margin-left: auto; font-size: 12.5px; }
.dash-lead-comment {
    flex-basis: 100%;
    color: var(--text-gray);
    font-size: 13.5px;
    white-space: pre-line;
}

@media (max-width: 1100px) {
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: static;
        padding: 16px 0;
    }
    .admin-nav { display: flex; flex-wrap: wrap; }
    .admin-nav a { padding: 10px 14px; border-left: none; border-bottom: 3px solid transparent; }
    .admin-nav a.active { border-left: none; border-bottom-color: var(--gold); }
    .admin-nav-sep { display: none; }
    .admin-main { padding: 20px 16px 50px; }
    .form-grid-2 { grid-template-columns: 1fr; }
}
