/* ============================================================
   CSS ПЕРЕМЕННЫЕ (ЧЁРНЫЙ ФОН ПО УМОЛЧАНИЮ)
   ============================================================ */

:root {
    /* Основные цвета */
    --bg-body: #000000;
    --bg-card: #111111;
    --bg-input: #1a1a1a;
    --bg-navbar: rgba(0, 0, 0, 0.95);
    --bg-overlay: rgba(0, 0, 0, 0.8);
    --bg-feature: rgba(255, 255, 255, 0.04);
    --bg-footer: #000000;
    --bg-admin: #111111;
    --bg-login: #111111;
    --bg-calculator: #111111;
    
    /* Текст */
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --text-white: #ffffff;
    
    /* Границы */
    --border-color: rgba(255, 255, 255, 0.06);
    --border-input: #333333;
    
    /* Акценты */
    --color-accent: #b5724a;
    --color-accent-hover: #9a5f3d;
    --color-error: #b13e3e;
    --color-success: #4caf50;
}

/* ============================================================
   СВЕТЛАЯ ТЕМА (как опция)
   ============================================================ */

body.light-theme {
    --bg-body: #faf8f5;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-navbar: rgba(250, 248, 245, 0.95);
    --bg-overlay: rgba(0, 0, 0, 0.5);
    --bg-feature: rgba(255, 255, 255, 0.8);
    --bg-footer: #f5f0ea;
    --bg-admin: #faf8f5;
    --bg-login: #faf8f5;
    --bg-calculator: #faf8f5;
    
    --text-primary: #2c2b28;
    --text-secondary: #5a554e;
    --text-muted: #888888;
    --text-white: #2c2b28;
    
    --border-color: rgba(0, 0, 0, 0.06);
    --border-input: #d6d0c8;
}

/* ============================================================
   ГЛОБАЛЬНЫЙ СТИЛЬ
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   МОДАЛЬНОЕ ОКНО ВХОДА
   ============================================================ */

.login-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-overlay.open {
    display: flex;
}

.login-panel {
    background: var(--bg-login);
    border-radius: 32px;
    max-width: 420px;
    width: 100%;
    padding: 40px 36px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
    animation: fade 0.4s ease;
}

.login-header {
    margin-bottom: 28px;
}

.login-header .logo span {
    color: var(--color-accent);
}

.login-field {
    margin-bottom: 18px;
}

.login-field label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.login-field label i {
    color: var(--color-accent);
    margin-right: 8px;
}

.login-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-input);
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: 0.2s;
}

.login-field input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(181, 114, 74, 0.15);
}

.login-error {
    color: var(--color-error);
    font-size: 14px;
    margin-bottom: 12px;
    min-height: 24px;
    text-align: center;
}

/* ============================================================
   НАВИГАЦИЯ
   ============================================================ */

.navbar {
    background: var(--bg-navbar);
    backdrop-filter: blur(12px);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s;
}

.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

/* ============================================================
   ЛОГО: ПЕРЕКЛЮЧЕНИЕ ПО ТЕМЕ
   favicon.png  — белое (тёмная тема)
   favicon2.png — чёрное (светлая тема)
   ============================================================ */

.logo-img,
.footer-logo-img,
.login-logo-img {
    content: url('favicon.png');
}

body.light-theme .logo-img,
body.light-theme .footer-logo-img,
body.light-theme .login-logo-img {
    content: url('favicon2.png');
}

/* Футер всегда на тёмном фоне (фото + затемнение),
   поэтому в светлой теме тексты/иконки делаем светлыми,
   как в тёмной, и оставляем белое лого. */
body.light-theme .footer {
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
}

body.light-theme .footer-logo-img {
    content: url('favicon.png');
}

.logo span {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    font-weight: 500;
    font-size: 15px;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
    cursor: pointer;
    color: var(--text-secondary);
}

.nav-links a.active,
.nav-links a:hover {
    border-bottom-color: var(--color-accent);
    color: var(--color-accent);
}

.nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-actions button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 8px;
    transition: 0.2s;
}

.nav-actions button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 30px;
    padding: 4px 16px;
    transition: background 0.3s;
}

body.light-theme .search-box {
    background: rgba(0, 0, 0, 0.04);
}

.search-box input {
    background: transparent;
    border: none;
    padding: 8px 0;
    outline: none;
    font-size: 14px;
    width: 140px;
    color: var(--text-primary);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px 8px;
}

.search-box button:hover {
    color: var(--text-primary);
}

/* ============================================================
   СТРАНИЦЫ (SPA)
   ============================================================ */

.page {
    display: none;
    padding: 48px 0 64px;
    animation: fade 0.35s ease;
}

.page.active {
    display: block;
}

@keyframes fade {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   ГЛАВНАЯ
   ============================================================ */

.hero {
    text-align: center;
    padding: 40px 0 56px;
}

.hero h1 {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 22px;
    color: var(--color-accent);
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.hero p {
    font-size: 18px;
    max-width: 560px;
    margin: 0 auto 32px;
    color: var(--text-secondary);
}

.btn-primary {
    display: inline-block;
    background: var(--color-accent);
    color: #fff;
    padding: 14px 40px;
    border-radius: 40px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: 0.25s;
    font-size: 16px;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: scale(1.02);
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--color-accent);
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 600;
    border: 2px solid var(--color-accent);
    cursor: pointer;
    transition: 0.25s;
    font-size: 16px;
}

.btn-secondary:hover {
    background: var(--color-accent);
    color: #fff;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-top: 24px;
}

.feature-card {
    text-align: center;
    padding: 32px 20px;
    border-radius: 24px;
    background: var(--bg-feature);
    transition: 0.3s;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.light-theme .feature-card:hover {
    background: rgba(0, 0, 0, 0.04);
}

.feature-card i {
    font-size: 36px;
    color: var(--color-accent);
    margin-bottom: 12px;
}

.feature-card h3 {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================================
   СТРАНИЦА 404
   ============================================================ */

.notfound {
    text-align: center;
    padding: 80px 20px 120px;
    max-width: 560px;
    margin: 0 auto;
}

.notfound-code {
    font-size: 120px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -6px;
    color: var(--color-accent);
    text-shadow: 0 10px 40px rgba(181, 114, 74, 0.3);
    margin-bottom: 8px;
}

.notfound h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.notfound p {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

/* ============================================================
   КАТАЛОГ
   ============================================================ */

.catalog-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
}

.product-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    transition: 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.product-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.product-info {
    padding: 16px 20px 20px;
}

.product-info h3 {
    font-weight: 600;
    font-size: 17px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.product-info .price {
    font-weight: 700;
    font-size: 20px;
    margin-top: 8px;
    color: var(--color-accent);
}

.product-card .admin-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: 0.2s;
}

.product-card:hover .admin-actions {
    opacity: 1;
}

.product-card .admin-actions button {
    background: rgba(0, 0, 0, 0.8);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}

.product-card .admin-actions button:hover {
    background: var(--color-accent);
}

/* ============================================================
   СТРАНИЦА "О НАС"
   ============================================================ */

.about-header {
    text-align: center;
    padding: 20px 0 40px;
}

.about-header h2 {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.about-tagline {
    font-size: 20px;
    color: var(--color-accent);
    font-weight: 300;
    letter-spacing: 2px;
    margin-top: 8px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: start;
}

.about-text h3 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.about-text > p {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 32px;
}

.about-philosophy {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.philosophy-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.philosophy-icon {
    font-size: 28px;
    color: var(--color-accent);
    min-width: 44px;
    text-align: center;
    margin-top: 2px;
}

.philosophy-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.philosophy-item p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================================
   ВИЗИТКА НА СТРАНИЦЕ "О НАС"
   ============================================================ */

.about-contacts-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.about-contacts-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(181, 114, 74, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.contact-card-inner {
    position: relative;
    z-index: 1;
}

.contact-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.brand-icon {
    font-size: 32px;
    color: var(--color-accent);
}

.contact-brand h3 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
    color: var(--text-secondary);
}

.contact-list li:last-child {
    border-bottom: none;
}

.contact-list li i {
    color: var(--color-accent);
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.contact-list li a {
    color: inherit;
    transition: color 0.2s;
}

.contact-list li a:hover {
    color: var(--color-accent);
}

/* ============================================================
   QR-КОД
   ============================================================ */

.contact-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 16px 0 20px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    transition: 0.3s;
}

.contact-qr:hover {
    background: rgba(255, 255, 255, 0.08);
}

.contact-qr img {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    display: block;
}

.qr-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    letter-spacing: 0.5px;
}

.contact-tagline {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(181, 114, 74, 0.2);
    text-align: center;
}

.tagline-line {
    display: block;
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 2px;
    color: var(--color-accent);
}

.tagline-line:first-child {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

/* ============================================================
   СТРАНИЦА КОНТАКТЫ
   ============================================================ */

#page-contacts h2 {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 8px;
}

.contacts-wrap {
    display: flex;
    justify-content: center;
    max-width: 600px;
    margin: 16px auto 0;
}

.contacts-info {
    width: 100%;
    text-align: center;
}

.contacts-info p {
    margin-bottom: 14px;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-secondary);
}

.contacts-info i {
    color: var(--color-accent);
    width: 24px;
    text-align: center;
}

.contacts-info a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.contacts-info a:hover {
    color: var(--color-accent);
}

.social-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(181, 114, 74, 0.12);
    color: var(--color-accent);
    transition: 0.2s;
    font-size: 20px;
}

.social-links a:hover {
    background: var(--color-accent);
    color: #fff;
}

.contacts-tagline {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.contacts-tagline p {
    font-size: 16px;
    color: var(--color-accent);
    font-weight: 300;
    letter-spacing: 1px;
}

/* ============================================================
   ФОРМА ОБРАТНОЙ СВЯЗИ
   ============================================================ */

.contact-form {
    background: rgba(255, 255, 255, 0.04);
    padding: 40px;
    border-radius: 24px;
    width: 100%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

body.light-theme .contact-form {
    background: rgba(255, 255, 255, 0.6);
}

.contact-form h3 {
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
}

.contact-form h3 i {
    color: var(--color-accent);
    margin-right: 10px;
}

.form-group {
    position: relative;
    margin-bottom: 14px;
}

.form-group .form-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-accent);
    font-size: 16px;
    width: 20px;
    text-align: center;
    z-index: 1;
}

.form-group.textarea-group .form-icon {
    top: 16px;
    transform: none;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border-input);
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: 0.2s;
}

.contact-form textarea {
    padding: 12px 16px 12px 44px;
    resize: vertical;
    min-height: 120px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(181, 114, 74, 0.15);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-muted);
}

.contact-form .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 6px;
}

.contact-form .btn-primary i {
    margin-right: 8px;
}

.form-message {
    margin-top: 12px;
    font-weight: 500;
    display: none;
    text-align: center;
}

.form-message.success {
    display: block;
    color: var(--color-success);
}

.form-message.error {
    display: block;
    color: var(--color-error);
}

/* ============================================================
   ПЛАВАЮЩИЙ КАЛЬКУЛЯТОР
   ============================================================ */

.floating-calculator {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 340px;
    background: var(--bg-calculator);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    z-index: 1500;
    transform: translateY(calc(100% + 30px));
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 80vh;
    overflow-y: auto;
}

.floating-calculator.open {
    transform: translateY(0);
    opacity: 1;
}

.floating-calculator .calculator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: move;
}

.floating-calculator .calculator-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.floating-calculator .calculator-header h3 i {
    color: var(--color-accent);
    margin-right: 8px;
}

.calculator-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 8px;
    transition: 0.2s;
}

.calculator-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.calculator-body {
    padding: 20px;
}

.calculator-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.calculator-field {
    margin-bottom: 14px;
}

.calculator-field label {
    display: block;
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.calculator-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-input);
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: 0.2s;
}

.calculator-field input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(181, 114, 74, 0.15);
}

.calculator-field input::placeholder {
    color: var(--text-muted);
}

.calculator-result {
    background: rgba(181, 114, 74, 0.12);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    margin-top: 16px;
    display: none;
}

.calculator-result.show {
    display: block;
    animation: fade 0.3s ease;
}

.result-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-accent);
}

.result-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.calculator-history {
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.calculator-history h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.calculator-history h4 i {
    color: var(--color-accent);
    margin-right: 6px;
}

#historyList {
    list-style: none;
    max-height: 120px;
    overflow-y: auto;
}

#historyList li {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
}

body.light-theme #historyList li {
    background: rgba(0, 0, 0, 0.03);
}

#historyList li .history-value {
    font-weight: 600;
    color: var(--color-accent);
}

/* ============================================================
   ПАНЕЛЬ УПРАВЛЕНИЯ
   ============================================================ */

.admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.admin-overlay.open {
    display: flex;
}

.admin-panel {
    background: var(--bg-admin);
    border-radius: 32px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
    padding: 0;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    border-bottom: 1px solid var(--border-color);
}

.admin-header h2 {
    font-size: 20px;
    color: var(--text-primary);
}

.admin-header h2 i {
    color: var(--color-accent);
    margin-right: 8px;
}

.admin-header button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 8px;
}

.admin-header button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.admin-body {
    padding: 24px 28px;
}

.admin-section {
    margin-bottom: 32px;
}

.admin-section h3 {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.admin-section h3 i {
    color: var(--color-accent);
    margin-right: 8px;
}

.admin-section p {
    color: var(--text-muted);
    font-size: 14px;
}

.admin-section label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-secondary);
}

.admin-product-list {
    margin-top: 16px;
}

.admin-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    margin-bottom: 6px;
}

body.light-theme .admin-product-item {
    background: rgba(0, 0, 0, 0.02);
}

.admin-product-item span {
    font-size: 14px;
    color: var(--text-secondary);
}

.admin-product-item .admin-item-actions {
    display: flex;
    gap: 8px;
}

.admin-product-item .admin-item-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: 0.2s;
    font-size: 14px;
}

.admin-product-item .admin-item-actions button:hover {
    color: var(--color-accent);
}

.admin-product-item .admin-item-actions button.delete:hover {
    color: var(--color-error);
}

/* ============================================================
   МОДАЛКА ТОВАРА
   ============================================================ */

.product-modal {
    max-width: 500px;
}

#productForm label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    margin-top: 12px;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

#productForm label i {
    color: var(--color-accent);
    margin-right: 6px;
}

#productForm input,
#productForm select,
#productForm textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-input);
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    background: var(--bg-input);
    color: var(--text-primary);
}

#productForm input:focus,
#productForm select:focus,
#productForm textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(181, 114, 74, 0.15);
}

#productForm textarea {
    resize: vertical;
}

#productForm input::placeholder {
    color: var(--text-muted);
}

#pricingForm input,
#pricingForm textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-input);
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    background: var(--bg-input);
    color: var(--text-primary);
    margin-top: 4px;
}

#pricingForm input:focus,
#pricingForm textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(181, 114, 74, 0.15);
}

#pricingForm textarea {
    resize: vertical;
}

#pricingForm label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    margin-top: 12px;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

#pricingForm label i {
    color: var(--color-accent);
    margin-right: 6px;
}

#productForm button {
    margin-top: 20px;
    width: 100%;
}

/* Загрузка картинки */
.upload-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.upload-btn {
    padding: 8px 18px !important;
    font-size: 14px !important;
    white-space: nowrap;
    flex-shrink: 0;
    width: auto !important;
    margin-top: 0 !important;
}

.upload-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border-input);
}

/* ============================================================
   ПОДВАЛ
   ============================================================ */

.footer {
    position: relative;
    padding: 48px 0 24px;
    color: var(--text-primary);
    text-align: center;
    margin-top: 40px;
    border-top: none;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: var(--bg-footer);
    width: 100%;
    min-height: 250px;
}

.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.footer .container {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo-img {
    height: 48px;
    width: auto;
    display: block;
    filter: brightness(1.1);
}

.footer-brand-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.footer-brand p {
    font-size: 13px;
    opacity: 0.7;
    margin: 0;
    color: var(--text-secondary);
}

.footer-contacts p {
    margin: 4px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-contacts a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.footer-contacts a:hover {
    color: var(--color-accent);
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    transition: 0.3s;
    font-size: 18px;
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--color-accent);
    color: #fff;
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: 20px;
    font-size: 13px;
    opacity: 0.6;
    color: var(--text-muted);
}

.footer-bottom p {
    margin: 0;
}

/* ============================================================
   КАТАЛОГ: СОРТИРОВКА И КНОПКА ЗАКАЗА
   ============================================================ */

.catalog-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
}

.catalog-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.catalog-sort label {
    font-size: 14px;
    color: var(--text-secondary);
}

.catalog-sort label i {
    color: var(--color-accent);
    margin-right: 6px;
}

.catalog-sort select {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-input);
    border-radius: 10px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}

.catalog-sort select:focus {
    outline: none;
    border-color: var(--color-accent);
}

.product-order-btn {
    padding: 8px 18px;
    font-size: 14px;
    margin-top: 12px;
    width: 100%;
}

.product-order-btn i {
    margin-right: 6px;
}

/* ============================================================
   ПАГИНАЦИЯ
   ============================================================ */

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.page-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    color: var(--text-secondary);
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-family: inherit;
    transition: 0.2s;
}

.page-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.page-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

/* ============================================================
   СТРАНИЦА ЦЕНЫ И УСЛУГИ
   ============================================================ */

#page-prices .about-header {
    text-align: center;
    padding: 8px 0 16px;
}

#page-prices .about-header h2 {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.prices-intro {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 36px;
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.7;
}

.prices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.price-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: 0.3s;
    border: 1px solid var(--border-color);
}

.price-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.price-card-icon {
    font-size: 34px;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.price-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.price-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.price-card-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-accent);
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.prices-cta {
    text-align: center;
    margin-top: 48px;
    padding: 32px;
    background: rgba(181, 114, 74, 0.08);
    border-radius: 24px;
}

.prices-cta p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 16px;
}

.prices-cta .btn-primary i {
    margin-right: 8px;
}

/* ============================================================
   МОДАЛКА ПРОСМОТРА ТОВАРА
   ============================================================ */

.detail-panel {
    background: var(--bg-card);
    border-radius: 24px;
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
    animation: fade 0.35s ease;
}

.detail-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    z-index: 5;
    transition: 0.2s;
}

.detail-close:hover {
    background: var(--color-accent);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px;
}

.detail-content img {
    width: 100%;
    height: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}

.detail-info {
    display: flex;
    flex-direction: column;
}

.detail-info h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.detail-price {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.detail-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
    flex-grow: 1;
}

.detail-info .btn-primary {
    align-self: flex-start;
}

.detail-info .btn-primary i {
    margin-right: 8px;
}

/* ============================================================
   МОДАЛКА ЗАКАЗА ИЗДЕЛИЯ
   ============================================================ */

.order-product-hint {
    font-size: 14px;
    color: var(--color-accent);
    background: rgba(181, 114, 74, 0.1);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
}

#orderForm textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-input);
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    background: var(--bg-input);
    color: var(--text-primary);
    resize: vertical;
}

#orderForm textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(181, 114, 74, 0.15);
}

/* ============================================================
   КАРТОЧКИ НА ГЛАВНОЙ (РАСКРЫВАЮТСЯ)
   ============================================================ */

.feature-card.expandable {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-card.expandable .feature-detail {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin 0.3s ease;
    width: 100%;
}

.feature-card.expandable.open .feature-detail {
    max-height: 600px;
    opacity: 1;
    margin-top: 16px;
}

.feature-card.expandable .feature-detail p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
    text-align: left;
}

.feature-card.expandable .feature-detail ul {
    list-style: none;
    text-align: left;
    margin: 0;
}

.feature-card.expandable .feature-detail ul li {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 0;
    border-top: 1px solid var(--border-color);
}

.feature-card.expandable .feature-detail ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--color-accent);
    margin-right: 10px;
}

.feature-more {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-accent);
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
}

.feature-more i {
    margin-left: 6px;
    font-size: 12px;
}

.feature-more:hover {
    opacity: 0.8;
}

/* ============================================================
   АДМИНКА: ЗАЯВКИ
   ============================================================ */

.admin-badge {
    background: var(--color-accent);
    color: #fff;
    border-radius: 20px;
    padding: 1px 10px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 6px;
}

.admin-order-item {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
}

body.light-theme .admin-order-item {
    background: rgba(0, 0, 0, 0.02);
}

.admin-order-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.admin-order-head strong {
    color: var(--text-primary);
    font-size: 15px;
}

.admin-order-date {
    font-size: 12px;
    color: var(--text-muted);
}

.admin-order-lines {
    font-size: 13px;
    color: var(--text-secondary);
}

.admin-order-lines div {
    padding: 2px 0;
}

.admin-order-msg {
    font-style: italic;
    color: var(--text-muted);
    margin-top: 4px;
}

.admin-order-actions {
    margin-top: 8px;
    text-align: right;
}

.admin-order-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-error);
    font-size: 13px;
}

.admin-order-actions button:hover {
    opacity: 0.8;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-contacts-card {
        max-width: 500px;
        margin: 0 auto;
    }

    .detail-content {
        grid-template-columns: 1fr;
    }

    .detail-content img {
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 32px 0 20px;
        min-height: 200px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .footer-brand {
        flex-direction: column;
        gap: 6px;
    }

    .footer-logo-img {
        height: 40px;
    }

    .footer-social a {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

@media (max-width: 700px) {
    .nav-wrap {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .nav-links {
        justify-content: center;
        gap: 16px;
    }

    .nav-actions {
        justify-content: center;
    }

    .search-box input {
        width: 100px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .admin-panel {
        max-width: 100%;
        margin: 12px;
        border-radius: 20px;
    }

    .login-panel {
        padding: 28px 20px;
        margin: 12px;
    }

    .floating-calculator {
        width: calc(100% - 40px);
        bottom: 20px;
        right: 20px;
    }

    .catalog-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .catalog-sort {
        justify-content: space-between;
    }

    .catalog-sort select {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 10px;
        font-size: 14px;
    }

    .nav-actions {
        gap: 6px;
    }

    .search-box input {
        width: 80px;
        font-size: 13px;
    }

    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .product-card img {
        height: 180px;
    }

    .about-header h2 {
        font-size: 30px;
    }

    .about-tagline {
        font-size: 16px;
    }

    .about-text h3 {
        font-size: 22px;
    }

    .contact-list li {
        font-size: 14px;
    }

    .contacts-wrap {
        gap: 24px;
    }

    .contact-form {
        padding: 20px;
    }

    .admin-body {
        padding: 16px;
    }

    .admin-header {
        padding: 16px 20px;
    }

    .footer {
        padding: 24px 0 16px;
        min-height: 150px;
    }

    .footer-logo-img {
        height: 32px;
    }

    .footer-brand-name {
        font-size: 17px;
    }

    .footer-contacts p {
        font-size: 13px;
    }

    .footer-social a {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .logo-img {
        height: 30px;
    }

    .logo {
        font-size: 18px;
        gap: 8px;
    }
}