* { margin: 0; padding: 0; box-sizing: border-box; font-family: Georgia, serif; }
body { background: #f5f5f5; color: #111; line-height: 1.6; }
a { color: #111; text-decoration: none; cursor: pointer; }
header { display: flex; justify-content: space-between; align-items: center; padding: 20px 40px; border-bottom: 1px solid #ddd; position: sticky; top: 0; background: rgba(255,255,255,.95); z-index: 100; flex-wrap: wrap; gap: 15px; }
.logo { display: flex; align-items: center; gap: 15px; cursor: pointer; }
.logo img { height: 60px; filter: invert(1); }
.logo-text { font-size: 24px; font-weight: bold; letter-spacing: 2px; text-transform: uppercase; }
.logo-text span { display: block; font-size: 12px; letter-spacing: 4px; font-weight: normal; text-transform: lowercase; color: #666; }
nav ul { display: flex; list-style: none; gap: 30px; }
nav ul li a { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }
.header-right { display: flex; align-items: center; gap: 20px; }
.cart-icon { position: relative; cursor: pointer; font-size: 20px; }
.cart-count { position: absolute; top: -10px; right: -15px; background: #111; color: #fff; font-size: 12px; font-weight: bold; padding: 2px 6px; border-radius: 50%; }
.user-btn { padding: 8px 16px; border: 1px solid #111; background: transparent; color: #111; font-family: inherit; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; }
.user-btn:hover { background: #111; color: #fff; }
.admin-btn { border-color: #8b0000; color: #8b0000; }
.admin-btn:hover { background: #8b0000; color: #fff; }
.user-info { font-size: 13px; color: #555; }
.user-info strong { color: #111; }

.hero { position: relative; min-height: 70vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; border-bottom: 1px solid #ddd; padding: 60px 20px; overflow: hidden; background: #e8e8e8; }
.hero-slider { position: absolute; inset: 0; z-index: 1; background: #ddd; }
.hero-slider .slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .8s ease; }
.hero-slider .slide.active { opacity: 1; }
.hero-slider::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,.55); z-index: 2; }
.hero-content { position: relative; z-index: 3; max-width: 800px; }
.hero h1 { font-size: 48px; letter-spacing: 5px; text-transform: uppercase; margin-bottom: 20px; font-weight: normal; }
.hero p { font-size: 18px; color: #444; max-width: 600px; margin: 0 auto 30px; font-style: italic; }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; background: rgba(255,255,255,.7); border: 1px solid #ccc; width: 44px; height: 44px; font-size: 24px; cursor: pointer; font-family: inherit; color: #111; }
.slider-arrow:hover { background: #fff; border-color: #111; }
.slider-prev { left: 20px; } .slider-next { right: 20px; }
.slider-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; gap: 10px; }
.slider-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(0,0,0,.3); cursor: pointer; }
.slider-dots .dot.active { background: #111; transform: scale(1.2); }

.btn { display: inline-block; padding: 12px 30px; border: 1px solid #111; background: transparent; color: #111; text-transform: uppercase; letter-spacing: 2px; font-size: 14px; cursor: pointer; font-family: inherit; }
.btn:hover { background: #111; color: #fff; }
.btn-danger { border-color: #8b0000; color: #8b0000; }
.btn-danger:hover { background: #8b0000; color: #fff; }
.btn-small { padding: 8px 16px; font-size: 12px; }

.catalog { padding: 60px 40px; }
.catalog h2 { font-size: 32px; text-align: center; margin-bottom: 40px; text-transform: uppercase; letter-spacing: 3px; font-weight: normal; border-bottom: 1px solid #ddd; padding-bottom: 20px; }

/* ===== ФИЛЬТРЫ ===== */
.filters-bar { display: flex; align-items: flex-end; gap: 15px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.filter-item { display: flex; flex-direction: column; gap: 6px; }
.filter-item label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: #666; }
.filter-item select { padding: 10px 15px; border: 1px solid #ccc; background: #fff; font-family: inherit; font-size: 14px; cursor: pointer; min-width: 220px; }
.filter-item select:focus { outline: none; border-color: #111; }
.filter-info { text-align: center; font-size: 13px; color: #888; font-style: italic; margin-bottom: 25px; min-height: 18px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.product-card { position: relative; background: #fff; border: 1px solid #e0e0e0; padding: 20px; text-align: center; cursor: pointer; transition: all .3s; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,.08); }
.product-card img { width: 100%; height: 300px; object-fit: cover; margin-bottom: 15px; filter: grayscale(100%); transition: filter .3s; }
.product-card:hover img { filter: grayscale(0%); }
.product-card h3 { font-size: 18px; margin-bottom: 10px; font-weight: normal; }
.product-card .price { font-size: 20px; font-weight: bold; margin-bottom: 15px; }
.product-card .btn { width: 100%; padding: 10px; font-size: 12px; }

/* ===== БЕЙДЖИ ===== */
.badge { position: absolute; top: 30px; left: 30px; z-index: 2; padding: 5px 10px; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; font-weight: bold; }
.badge-new { background: #111; color: #fff; }
.badge-discount { background: #8b0000; color: #fff; top: 30px; left: auto; right: 30px; }
.price-old { text-decoration: line-through; color: #999; font-size: 14px; margin-right: 8px; font-weight: normal; }
.price-new { color: #8b0000; }

.product-page, .brands-page, .brand-page, .cart-page, .contacts-page, .admin-page { display: none; padding: 40px; max-width: 1200px; margin: 0 auto; }
.product-page.active, .brands-page.active, .brand-page.active, .cart-page.active, .contacts-page.active, .admin-page.active { display: block; }
.back-btn { display: inline-block; margin-bottom: 30px; font-size: 14px; text-transform: uppercase; cursor: pointer; color: #555; }
.back-btn:hover { color: #111; }
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; background: #fff; border: 1px solid #e0e0e0; padding: 40px; }
.product-info h1 { font-size: 32px; font-weight: normal; letter-spacing: 2px; margin-bottom: 15px; }
.product-info .product-price { font-size: 28px; font-weight: bold; margin-bottom: 25px; }
.product-info .description { font-size: 16px; color: #555; margin-bottom: 30px; line-height: 1.8; }
.product-brand { font-size: 13px; text-transform: uppercase; letter-spacing: 2px; color: #8b0000; margin-bottom: 8px; cursor: pointer; }
.product-brand:hover { text-decoration: underline; }
.option-group { margin-bottom: 25px; }
.option-group label { display: block; font-size: 13px; text-transform: uppercase; margin-bottom: 10px; color: #666; }
.sizes { display: flex; gap: 10px; flex-wrap: wrap; }
.size-btn { padding: 10px 18px; border: 1px solid #ccc; background: #fff; cursor: pointer; font-family: inherit; font-size: 14px; }
.size-btn.selected { background: #111; color: #fff; border-color: #111; }
.quantity { display: flex; align-items: center; border: 1px solid #ccc; width: fit-content; }
.quantity button { width: 40px; height: 40px; border: none; background: #fff; font-size: 18px; cursor: pointer; font-family: inherit; }
.quantity span { width: 50px; text-align: center; font-size: 16px; border-left: 1px solid #ccc; border-right: 1px solid #ccc; line-height: 40px; }
.add-to-cart-btn { width: 100%; padding: 16px; background: #111; color: #fff; border: 1px solid #111; text-transform: uppercase; font-size: 14px; cursor: pointer; font-family: inherit; margin-top: 10px; }
.add-to-cart-btn:hover { background: #fff; color: #111; }
.product-gallery { position: relative; border: 1px solid #eee; background: #fafafa; }
.product-gallery .product-image { display: block; width: 100%; height: 600px; object-fit: cover; }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.85); border: 1px solid #ccc; width: 44px; height: 44px; font-size: 22px; cursor: pointer; font-family: inherit; }
.gallery-prev { left: 12px; } .gallery-next { right: 12px; }
.product-thumbs { display: flex; gap: 10px; margin-top: 15px; flex-wrap: wrap; }
.product-thumbs .thumb { width: 80px; height: 80px; object-fit: cover; border: 2px solid transparent; cursor: pointer; }
.product-thumbs .thumb.active { border-color: #111; }

/* БРЕНДЫ */
.brands-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 25px; }
.brand-card { background: #fff; border: 1px solid #e0e0e0; padding: 25px; text-align: center; cursor: pointer; transition: all .3s; }
.brand-card:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(0,0,0,.08); }
.brand-card .brand-logo { width: 100px; height: 100px; object-fit: contain; margin: 0 auto 15px; display: block; background: #fafafa; }
.brand-card h3 { font-size: 20px; font-weight: normal; letter-spacing: 1px; margin-bottom: 8px; }
.brand-card p { font-size: 13px; color: #666; }
.brand-header { display: flex; gap: 25px; align-items: center; background: #fff; border: 1px solid #e0e0e0; padding: 25px; }
.brand-header .brand-logo { width: 120px; height: 120px; object-fit: contain; background: #fafafa; }
.brand-header h2 { font-weight: normal; letter-spacing: 2px; margin-bottom: 8px; }
.brand-header p { color: #666; }

/* КОРЗИНА */
.cart-item { display: grid; grid-template-columns: 100px 1fr auto auto; gap: 20px; align-items: center; background: #fff; border: 1px solid #e0e0e0; padding: 15px; margin-bottom: 15px; }
.cart-item img { width: 100px; height: 100px; object-fit: cover; }
.cart-item .cart-name { font-size: 16px; }
.cart-item .cart-meta { font-size: 13px; color: #666; margin-top: 5px; }
.cart-item .cart-price { font-weight: bold; font-size: 18px; }
.cart-item .cart-remove { border: 1px solid #8b0000; color: #8b0000; background: #fff; padding: 6px 12px; cursor: pointer; font-family: inherit; font-size: 12px; }
.cart-item .cart-remove:hover { background: #8b0000; color: #fff; }
.cart-total { text-align: right; font-size: 22px; font-weight: bold; margin: 20px 0 30px; }
.cart-form { background: #fff; border: 1px solid #e0e0e0; padding: 30px; max-width: 600px; margin: 0 auto; }
.cart-form h3 { font-weight: normal; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 20px; }
.cart-empty { text-align: center; padding: 60px 20px; color: #888; font-size: 16px; }

/* КОНТАКТЫ */
.contacts-box { background: #fff; border: 1px solid #e0e0e0; padding: 40px; max-width: 600px; }
.contacts-box .contact-row { display: flex; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid #eee; font-size: 15px; }
.contacts-box .contact-row:last-child { border-bottom: none; }
.contacts-box .contact-row strong { font-weight: normal; color: #666; text-transform: uppercase; letter-spacing: 1px; font-size: 12px; }
.contacts-box .contact-row a { color: #111; text-decoration: underline; }

/* МОДАЛКА */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 1000; justify-content: center; align-items: center; padding: 20px; }
.modal-overlay.active { display: flex; }
.modal { background: #fff; padding: 40px; max-width: 420px; width: 100%; border: 1px solid #ddd; position: relative; }
.modal h2 { font-size: 24px; font-weight: normal; text-transform: uppercase; margin-bottom: 25px; text-align: center; }
.modal-close { position: absolute; top: 15px; right: 20px; font-size: 24px; background: none; border: none; cursor: pointer; color: #999; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 12px; text-transform: uppercase; margin-bottom: 6px; color: #666; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px; border: 1px solid #ccc; font-family: inherit; font-size: 14px; background: #fff; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: #111; }
.form-group textarea { min-height: 80px; resize: vertical; }
.modal .btn { width: 100%; margin-top: 10px; }
.switch-form { text-align: center; margin-top: 20px; font-size: 13px; color: #666; }
.switch-form a { color: #111; text-decoration: underline; }
.error-msg { color: #8b0000; font-size: 13px; margin-top: 10px; text-align: center; min-height: 18px; }

.admin-page h2 { font-size: 28px; font-weight: normal; text-transform: uppercase; margin-bottom: 30px; border-bottom: 1px solid #ddd; padding-bottom: 15px; }
.admin-tabs { display: flex; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; }
.admin-tab { padding: 10px 20px; border: 1px solid #ccc; background: #fff; cursor: pointer; font-family: inherit; font-size: 13px; text-transform: uppercase; }
.admin-tab.active { background: #111; color: #fff; border-color: #111; }
.admin-section { display: none; }
.admin-section.active { display: block; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e0e0e0; }
.admin-table th, .admin-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #eee; font-size: 14px; vertical-align: middle; }
.admin-table th { background: #fafafa; text-transform: uppercase; font-size: 12px; color: #666; font-weight: normal; }
.admin-table img { width: 60px; height: 60px; object-fit: cover; border: 1px solid #eee; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-form { background: #fff; border: 1px solid #e0e0e0; padding: 30px; max-width: 700px; }
.admin-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.admin-form h3 { font-size: 18px; font-weight: normal; margin-bottom: 20px; text-transform: uppercase; }
.upload-zone { border: 2px dashed #ccc; padding: 20px; text-align: center; cursor: pointer; background: #fafafa; min-height: 200px; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.upload-zone:hover { border-color: #111; }
.upload-zone.dragover { border-color: #111; background: #efefef; }
.slides-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; margin-top: 15px; }
.slide-item { position: relative; border: 1px solid #e0e0e0; background: #fafafa; padding: 8px; }
.slide-item img { width: 100%; height: 130px; object-fit: cover; display: block; }
.slide-item .slide-remove { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.9); border: 1px solid #8b0000; color: #8b0000; width: 28px; height: 28px; font-size: 16px; cursor: pointer; font-family: inherit; }
.slide-item .slide-remove:hover { background: #8b0000; color: #fff; }
.photo-item .main-badge { position: absolute; top: 8px; left: 8px; background: #111; color: #fff; font-size: 10px; padding: 3px 8px; text-transform: uppercase; }
.photo-item .make-main-btn { position: absolute; bottom: 8px; left: 8px; right: 46px; background: rgba(255,255,255,.9); border: 1px solid #111; color: #111; padding: 4px 6px; font-size: 10px; cursor: pointer; font-family: inherit; text-transform: uppercase; }
.photo-item .make-main-btn:hover { background: #111; color: #fff; }

footer { padding: 40px; text-align: center; border-top: 1px solid #ddd; background: #fff; color: #888; font-size: 14px; }



/* ===== БЕЙДЖИ НА КАРТОЧКЕ ===== */
.product-badges {
    position: absolute; top: 20px; left: 20px; z-index: 3;
    display: flex; flex-direction: column; gap: 5px;
}
.product-badges .badge-item {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; font-size: 10px; font-weight: bold;
    letter-spacing: 1px; text-transform: uppercase;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.product-badges .badge-item .badge-icon { font-size: 12px; }

/* ===== ВЫБОР БЕЙДЖЕЙ В АДМИНКЕ ===== */
.badges-checkboxes {
    display: flex; flex-wrap: wrap; gap: 10px;
    padding: 10px; background: #fafafa; border: 1px solid #eee;
}
.badges-checkboxes label {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; background: #fff; border: 1px solid #ccc;
    font-size: 13px; cursor: pointer; border-radius: 3px;
    transition: all 0.2s;
}
.badges-checkboxes label:hover { border-color: #111; }
.badges-checkboxes input[type="checkbox"] { margin: 0; }
/* ===== БЕЙДЖИ НА КАРТОЧКЕ ===== */
.product-badges {
    position: absolute; top: 20px; left: 20px; z-index: 5;
    display: flex; flex-direction: column; gap: 6px;
}
.badge-item {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px; font-size: 10px; font-weight: bold;
    letter-spacing: 1px; text-transform: uppercase;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    backdrop-filter: blur(5px);
}

/* ===== СТАТУС НАЛИЧИЯ ===== */
.stock-line {
    display: block; font-size: 12px; font-weight: 600;
    margin-bottom: 12px; padding: 6px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}
.stock-line.in { color: #2d7a2d; background: #eaf5ea; }
.stock-line.out { color: #8b0000; background: #f8e8e8; }
.stock-line.soon { color: #b8860b; background: #faf4e0; }

/* ===== КНОПКИ ОПЛАТЫ ===== */
.payment-title {
    font-size: 13px; text-transform: uppercase;
    letter-spacing: 1px; color: #666;
    margin: 25px 0 15px; text-align: center;
}
.payment-methods {
    display: flex; flex-direction: column; gap: 12px;
}
.pay-btn {
    display: flex; align-items: center; gap: 15px;
    padding: 18px 22px;
    border: 2px solid #111; border-radius: 12px;
    font-family: inherit; font-size: 15px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}
.pay-btn::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(255,255,255,0.15);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}
.pay-btn:hover::before { transform: translateX(0); }
.pay-icon { font-size: 32px; line-height: 1; flex-shrink: 0; }
.pay-text { display: flex; flex-direction: column; gap: 3px; }
.pay-text strong { font-size: 15px; letter-spacing: 0.5px; }
.pay-text small { font-size: 12px; opacity: 0.75; font-weight: normal; }

.pay-online {
    background: linear-gradient(135deg, #111111 0%, #333333 100%);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.pay-online:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.35);
}
.pay-online:active { transform: translateY(0); }

.pay-cash {
    background: linear-gradient(135deg, #f9f9f9 0%, #ececec 100%);
    color: #111111;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.pay-cash:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
}
.pay-cash:active { transform: translateY(0); }
/* ===== БЕЙДЖИ ===== */
.product-badges {
    position: absolute; top: 16px; left: 16px; z-index: 5;
    display: flex; flex-direction: column; gap: 5px;
    align-items: flex-start;
}
.badge-item {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 10px;
    font-size: 10px; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    line-height: 1;
}
.badge-item svg { width: 11px; height: 11px; flex-shrink: 0; }

/* ===== СТАТУС НАЛИЧИЯ ===== */
.stock-line {
    display: block;
    font-size: 12px; font-weight: 600;
    margin-bottom: 12px;
    padding: 6px 10px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    text-align: center;
}
.stock-line.in { color: #1e6b1e; background: #e8f5e8; }
.stock-line.out { color: #8b0000; background: #f8e8e8; }
.stock-line.soon { color: #9c6b00; background: #faf4e0; }

/* ===== КНОПКИ ОПЛАТЫ (однотипные) ===== */
.payment-title {
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.5px;
    color: #666; margin: 30px 0 15px;
    text-align: center;
}
.payment-methods {
    display: flex; flex-direction: column; gap: 10px;
}

.pay-btn {
    display: flex; align-items: center; justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    border-radius: 8px;
    border: 1px solid #111;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}
.pay-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.pay-online {
    background: #111111;
    color: #ffffff;
}
.pay-online:hover {
    background: #2a2a2a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.pay-online:active { transform: translateY(0); }

.pay-cash {
    background: #ffffff;
    color: #111111;
}
.pay-cash:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.pay-cash:active { transform: translateY(0); }
/* ===== УВЕДОМЛЕНИЯ (вместо alert) ===== */
#toast-container {
    position: fixed; top: 90px; right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px;
    max-width: 380px;
}
.toast {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 16px 20px;
    background: #fff;
    border-left: 4px solid #111;
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease;
    font-size: 14px;
    line-height: 1.5;
}
.toast.success { border-color: #2d7a2d; }
.toast.error { border-color: #8b0000; }
.toast.info { border-color: #111; }
.toast-icon { font-size: 20px; line-height: 1; }
.toast-text { flex: 1; color: #333; }
.toast-close {
    background: none; border: none; font-size: 20px;
    cursor: pointer; color: #999; padding: 0 5px;
    line-height: 1;
}
.toast-close:hover { color: #111; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
.toast.hiding { animation: slideOut 0.3s ease forwards; }

/* ===== СТРАНИЦА "ЗАКАЗ ОФОРМЛЕН" ===== */
.success-page {
    display: none;
    padding: 80px 20px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}
.success-page.active { display: block; }
.success-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 60px 40px;
    border-radius: 8px;
}
.success-icon { margin-bottom: 25px; }
.success-box h2 {
    font-size: 28px; font-weight: normal;
    letter-spacing: 2px; text-transform: uppercase;
    margin-bottom: 15px;
}
.success-box p {
    font-size: 16px; color: #666;
    margin-bottom: 30px; line-height: 1.6;
}


/* ============================================================
   ФИЛЬТРЫ
   ============================================================ */
.filters-bar {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 22px 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    max-width: 900px;
    margin: 0 auto 20px;
}
.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 220px;
}
.filter-item label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
    font-weight: 600;
}
.filter-item select {
    padding: 12px 38px 12px 15px;
    border: 1px solid #ddd;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    color: #111;
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.filter-item select:hover { border-color: #111; }
.filter-item select:focus { outline: none; border-color: #111; }
.filters-bar .btn-small {
    padding: 12px 22px;
    font-size: 11px;
    letter-spacing: 1.5px;
    height: 42px;
}
.filter-info {
    text-align: center;
    font-size: 13px;
    color: #888;
    font-style: italic;
    margin-bottom: 30px;
    min-height: 18px;
}

/* ============================================================
   БЕЙДЖИ
   ============================================================ */
.product-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}
.badge-item {
    display: inline-block;
    padding: 5px 11px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1;
    font-family: Georgia, serif;
}

/* ============================================================
   КАРТОЧКА ТОВАРА
   ============================================================ */
.product-card {
    position: relative;
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 22px 20px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-4px);
    border-color: #111;
}
.product-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    margin-bottom: 18px;
    filter: grayscale(100%);
    transition: filter 0.4s ease;
}
.product-card:hover img { filter: grayscale(0%); }
.product-card h3 {
    font-size: 17px;
    margin-bottom: 12px;
    font-weight: normal;
    min-height: 44px;
    line-height: 1.3;
}
.product-card .price {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 14px;
}
.product-card .btn {
    width: 100%;
    padding: 12px;
    font-size: 12px;
    letter-spacing: 1.5px;
    margin-top: auto;
}

/* Старая цена */
.price-old {
    text-decoration: line-through;
    color: #b0b0b0;
    font-size: 14px;
    margin-right: 8px;
    font-weight: normal;
}
.price-new { color: #8b0000; }

/* ============================================================
   НАЛИЧИЕ — строго, ч/б/красный
   ============================================================ */
.stock-line {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 8px 12px;
    margin: 0 0 14px;
    font-family: Georgia, serif;
    border: 1px solid #111;
    color: #111;
    background: #fff;
}
.stock-line.in {
    border-color: #111;
    color: #111;
}
.stock-line.out {
    border-color: #8b0000;
    color: #8b0000;
}
.stock-line.soon {
    border-color: #111;
    color: #111;
    background: #f5f5f5;
}

/* Карточка нет в наличии — просто ч/б, без прозрачности */
.product-card.out-of-stock img {
    filter: grayscale(100%);
    opacity: 1;
}

/* ============================================================
   СТРАНИЦА ТОВАРА — наличие
   ============================================================ */
.product-stock {
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #111;
    display: inline-block;
    font-weight: 700;
}

/* ============================================================
   КНОПКИ ОПЛАТЫ
   ============================================================ */
.payment-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
    margin: 30px 0 15px;
    text-align: center;
}
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pay-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #111;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}
.pay-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.pay-online { background: #111; color: #fff; }
.pay-online:hover { background: #333; }
.pay-cash { background: #fff; color: #111; }
.pay-cash:hover { background: #f5f5f5; }

/* ============================================================
   УВЕДОМЛЕНИЯ
   ============================================================ */
#toast-container {
    position: fixed; top: 90px; right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px;
    max-width: 380px;
}
.toast {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 16px 20px;
    background: #fff;
    border-left: 4px solid #111;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease;
    font-size: 14px; line-height: 1.5;
}
.toast.success { border-color: #111; }
.toast.error { border-color: #8b0000; }
.toast.info { border-color: #111; }
.toast-icon { font-size: 18px; line-height: 1; }
.toast-text { flex: 1; color: #333; }
.toast-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #999; padding: 0 5px; line-height: 1; }
.toast-close:hover { color: #111; }

@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }
.toast.hiding { animation: slideOut 0.3s ease forwards; }

/* ============================================================
   СТРАНИЦА "ЗАКАЗ ОФОРМЛЕН"
   ============================================================ */
.success-page { display: none; padding: 80px 20px; max-width: 600px; margin: 0 auto; text-align: center; }
.success-page.active { display: block; }
.success-box { background: #fff; border: 1px solid #e0e0e0; padding: 60px 40px; }
.success-icon { margin-bottom: 25px; }
.success-box h2 { font-size: 28px; font-weight: normal; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 15px; }
.success-box p { font-size: 16px; color: #666; margin-bottom: 30px; line-height: 1.6; }

/* ============================================================
   АДАПТИВ
   ============================================================ */

/* ============================================================
   НАЛИЧИЕ — финальная версия (ч/б + красный)
   ============================================================ */
.stock-line {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 10px 14px;
    margin: 0 0 14px;
    font-family: Georgia, serif;
    border: 1px solid #111;
    color: #111;
    background: #fff;
    border-radius: 0;
    text-align: center;
}
.stock-line.in {
    border-color: #111;
    color: #111;
    background: #fff;
}
.stock-line.out {
    border-color: #8b0000;
    color: #8b0000;
    background: #fff;
}
.stock-line.soon {
    border-color: #111;
    color: #111;
    background: #f5f5f5;
}
.stock-line::before,
.stock-line.in::before,
.stock-line.out::before,
.stock-line.soon::before {
    display: none !important;
    content: none !important;
}
/* === BURGER FILTERS (start) === */
:root{
  --bf-bg:#ffffff;
  --bf-fg:#111111;
  --bf-muted:#6b7280;
  --bf-border:#e5e7eb;
  --bf-hover:#f5f5f5;
  --bf-accent:#111111;
  --bf-radius:14px;
  --bf-shadow:0 6px 24px rgba(0,0,0,.08);
  --bf-shadow-lg:0 -10px 40px rgba(0,0,0,.18);
}

/* Кнопка-бургер */
.burger{
  position: fixed;
  left:16px;
  bottom:16px;
  z-index:1001;
  width:52px;height:52px;
  display:inline-flex;flex-direction:column;
  align-items:center;justify-content:center;gap:5px;
  background:var(--bf-bg);
  border:1px solid var(--bf-border);
  border-radius:50%;
  box-shadow:var(--bf-shadow);
  cursor:pointer;
  transition:background .2s,transform .15s,box-shadow .2s;
  -webkit-tap-highlight-color:transparent;
}
.burger:hover{background:var(--bf-hover);box-shadow:0 8px 28px rgba(0,0,0,.12);}
.burger:active{transform:scale(.95);}
.burger span{
  display:block;width:20px;height:2px;
  background:var(--bf-fg);border-radius:2px;
  transition:transform .25s ease,opacity .2s ease;
}
.burger.is-open span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.burger.is-open span:nth-child(2){opacity:0;}
.burger.is-open span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

/* Затемнение */
.filters-backdrop{
  position:fixed;inset:0;
  background:rgba(0,0,0,.45);
  opacity:0;pointer-events:none;
  transition:opacity .3s ease;
  z-index:1000;
}
.filters-backdrop.is-open{opacity:1;pointer-events:auto;}

/* Панель фильтров */
.filters-panel{
  position:fixed;
  left:0;right:0;bottom:0;
  background:var(--bf-bg);
  border-radius:22px 22px 0 0;
  padding:20px 20px calc(20px + env(safe-area-inset-bottom,0));
  box-shadow:var(--bf-shadow-lg);
  transform:translateY(110%);
  transition:transform .32s cubic-bezier(.22,.61,.36,1);
  z-index:1002;
  display:flex;flex-direction:column;gap:14px;
  max-height:80vh;overflow-y:auto;
}
.filters-panel.is-open{transform:translateY(0);}

.filters-panel__head{
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:4px;
}
.filters-panel__title{
  font-size:18px;font-weight:700;color:var(--bf-fg);
}
.filters-panel__close{
  width:36px;height:36px;border-radius:10px;border:1px solid var(--bf-border);
  background:var(--bf-bg);color:var(--bf-fg);cursor:pointer;font-size:16px;
  display:inline-flex;align-items:center;justify-content:center;
  transition:background .2s;
}
.filters-panel__close:hover{background:var(--bf-hover);}

.filters-field{display:flex;flex-direction:column;gap:6px;}
.filters-field__label{
  font-size:13px;color:var(--bf-muted);font-weight:500;
  text-transform:uppercase;letter-spacing:.04em;
}
.filters-select{
  width:100%;
  height:46px;
  padding:0 40px 0 14px;
  border:1px solid var(--bf-border);
  border-radius:12px;
  background:var(--bf-bg) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat right 14px center;
  color:var(--bf-fg);font-size:15px;
  appearance:none;-webkit-appearance:none;
  cursor:pointer;
  transition:border-color .2s,box-shadow .2s;
}
.filters-select:focus{
  outline:none;
  border-color:var(--bf-accent);
  box-shadow:0 0 0 3px rgba(17,17,17,.08);
}

.filters-reset{
  margin-top:4px;
  height:46px;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  border:1px solid var(--bf-border);
  border-radius:12px;
  background:var(--bf-bg);color:var(--bf-fg);
  font-size:15px;font-weight:600;cursor:pointer;
  transition:background .2s,transform .15s;
}
.filters-reset:hover{background:var(--bf-hover);}
.filters-reset:active{transform:scale(.98);}

/* Десктоп: бургер прячем, панель — обычная строка (если захотите встроить) */

/* === BURGER FILTERS (end) === */

/* === BADGE ICONS (start) === */
.badge-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 8px;
    margin-top: 8px;
    padding: 10px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
}
.badge-icon-btn {
    width: 100%;
    aspect-ratio: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all .15s;
    color: #333;
}
.badge-icon-btn:hover { border-color: #999; transform: translateY(-2px); }
.badge-icon-btn.selected { border-color: #111; background: #111; color: #fff; }
.badge-icon-btn svg { width: 24px; height: 24px; }

/* SVG внутри бейджа на сайте */
.badge-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.badge-item svg { width: 13px; height: 13px; flex-shrink: 0; }

/* В таблице админки */
.admin-table .badge-icon-cell svg { width: 22px; height: 22px; }
/* === BADGE ICONS (end) === */

/* === PRODUCT UPGRADE (start) === */
/* Красивая рамка вокруг фото */
.product-gallery{
  position:relative;
  border:1px solid #e5e5e5;
  background:linear-gradient(180deg,#fafafa 0%,#f3f3f3 100%);
  border-radius:6px;
  overflow:hidden;
  box-shadow:0 10px 30px rgba(0,0,0,.05), inset 0 0 0 8px #fff;
  transition:box-shadow .3s ease, transform .3s ease;
}
.product-gallery:hover{
  box-shadow:0 18px 45px rgba(0,0,0,.10), inset 0 0 0 8px #fff;
  transform:translateY(-2px);
}
.product-gallery .product-image{ transition:transform .4s ease; }
.product-gallery:hover .product-image{ transform:scale(1.02); }

/* Аккордеон */
.accordion{ margin-top:22px; border-top:1px solid #ececec; }
.accordion-item{ border-bottom:1px solid #ececec; }
.accordion-head{
  width:100%; display:flex; align-items:center; justify-content:space-between;
  background:none; border:0; padding:16px 2px; cursor:pointer;
  font-family:inherit; font-size:15px; letter-spacing:1px; text-transform:uppercase;
  color:#111; transition:color .2s;
}
.accordion-head:hover{ color:#8b0000; }
.acc-chev{ transition:transform .3s ease; color:#888; }
.accordion-item.open .acc-chev{ transform:rotate(180deg); color:#8b0000; }
.accordion-body{ max-height:0; overflow:hidden; transition:max-height .35s ease; }
.accordion-inner{ padding:0 2px 18px; color:#555; line-height:1.8; font-size:15px; }

/* Отзывы */
.reviews-block{ margin-top:50px; padding-top:30px; border-top:1px solid #ececec; }
.reviews-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.reviews-head h3{ font-weight:normal; letter-spacing:2px; text-transform:uppercase; font-size:18px; }
.reviews-rating{ font-size:14px; color:#8b0000; }
.review-form{
  background:#fafafa; border:1px solid #ececec; border-radius:6px;
  padding:20px; margin-bottom:25px; display:flex; flex-direction:column; gap:12px;
}
.review-stars{ display:flex; gap:4px; font-size:26px; color:#ddd; cursor:pointer; user-select:none; }
.review-stars span{ transition:color .15s, transform .15s; }
.review-stars span.active{ color:#8b0000; }
.review-stars span:hover{ transform:scale(1.15); }
.review-form textarea{
  width:100%; padding:12px; border:1px solid #e0e0e0; border-radius:4px;
  font-family:inherit; font-size:14px; resize:vertical; background:#fff;
}
.review-form textarea:focus{ outline:none; border-color:#111; }
.review-form .btn{ align-self:flex-start; padding:10px 22px; }
.review-form-note{ font-size:13px; color:#888; }
.review-form-note.err{ color:#8b0000; }
.reviews-list{ display:flex; flex-direction:column; gap:16px; }
.review-item{
  background:#fff; border:1px solid #ececec; border-radius:6px; padding:16px 18px;
  transition:box-shadow .2s;
}
.review-item:hover{ box-shadow:0 6px 18px rgba(0,0,0,.05); }
.review-item__head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.review-item__name{ font-weight:600; font-size:14px; }
.review-item__date{ font-size:12px; color:#999; }
.review-item__stars{ color:#8b0000; font-size:14px; margin-bottom:6px; letter-spacing:2px; }
.review-item__text{ font-size:14px; color:#444; line-height:1.6; }
.review-item__del{
  background:none;border:0;color:#bbb;cursor:pointer;font-size:16px;
  padding:0 4px; line-height:1;
}
.review-item__del:hover{ color:#8b0000; }
.reviews-empty{ color:#999; font-size:14px; text-align:center; padding:20px; }

/* Похожие товары */
.related-block{ margin-top:60px; padding-top:30px; border-top:1px solid #ececec; }
.related-block h3{ font-weight:normal; letter-spacing:2px; text-transform:uppercase; font-size:18px; margin-bottom:22px; }
.related-wrap{ position:relative; }
.related-track{
  display:flex; gap:20px; overflow-x:auto; scroll-snap-type:x mandatory;
  padding:6px 2px 18px; scrollbar-width:none;
}
.related-track::-webkit-scrollbar{ display:none; }
.related-track .product-card{
  flex:0 0 240px; scroll-snap-align:start;
}
.related-arrow{
  position:absolute; top:45%; transform:translateY(-50%);
  width:38px;height:38px;border-radius:50%;border:1px solid #e0e0e0;background:#fff;
  cursor:pointer;font-size:20px;line-height:1;color:#111;z-index:2;
  box-shadow:0 4px 12px rgba(0,0,0,.08); transition:background .2s,color .2s;
}
.related-arrow:hover{ background:#111; color:#fff; border-color:#111; }
.related-prev{ left:-14px; } .related-next{ right:-14px; }


/* === PRODUCT UPGRADE (end) === */

/* === SKU + SPECS (start) === */
.product-sku { font-size: 12px; color: #999; letter-spacing: 1px; margin-bottom: 14px; text-transform: uppercase; }
.specs-list { display: flex; flex-direction: column; gap: 8px; }
.specs-row { display: flex; gap: 8px; align-items: center; }
.specs-row input { flex: 1; padding: 10px 12px; border: 1px solid #e0e0e0; border-radius: 4px; font-family: inherit; font-size: 14px; }
.specs-row input:focus { outline: none; border-color: #111; }
.specs-row .specs-del {
    width: 36px; height: 36px; border: 1px solid #e0e0e0; background: #fff;
    color: #999; cursor: pointer; border-radius: 4px; font-size: 16px;
    transition: all .2s; flex-shrink: 0;
}
.specs-row .specs-del:hover { background: #8b0000; color: #fff; border-color: #8b0000; }
/* === SKU + SPECS (end) === */

/* === MY ORDERS (start) === */
.my-orders-page { padding: 40px 20px; max-width: 1100px; margin: 0 auto; }
.my-orders-title { font-weight: normal; letter-spacing: 3px; text-transform: uppercase; font-size: 26px; margin-bottom: 30px; }
.my-orders-list { display: flex; flex-direction: column; gap: 22px; }
.order-card {
  background: #fff; border: 1px solid #e5e5e5; border-radius: 8px;
  padding: 22px 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,.03);
  transition: box-shadow .25s ease, transform .25s ease;
}
.order-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,.07); transform: translateY(-2px); }
.order-card__head {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  padding-bottom: 16px; border-bottom: 1px solid #f0f0f0; margin-bottom: 16px;
}
.order-card__id { font-size: 17px; letter-spacing: 1px; font-weight: 600; }
.order-card__date { font-size: 13px; color: #999; }
.order-status {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase; font-weight: 600;
}
.order-status--new        { background: #f3f3f3; color: #333; }
.order-status--processing { background: #fff5e0; color: #b8860b; }
.order-status--shipped    { background: #e0eaff; color: #2743a0; }
.order-status--delivered  { background: #e6f5e6; color: #2d7a2d; }
.order-status--cancelled  { background: #fbe9e9; color: #8b0000; }
.order-items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.order-item { display: flex; gap: 14px; align-items: center; }
.order-item__img {
  width: 56px; height: 56px; border-radius: 6px; object-fit: cover;
  background: #fafafa; border: 1px solid #eee; flex-shrink: 0;
}
.order-item__body { flex: 1; min-width: 0; }
.order-item__name { font-size: 15px; color: #111; margin-bottom: 4px; }
.order-item__meta { font-size: 12px; color: #999; }
.order-item__price { font-weight: 600; font-size: 15px; white-space: nowrap; }
.order-card__foot {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding-top: 14px; border-top: 1px solid #f0f0f0;
}
.order-total { font-size: 18px; letter-spacing: 1px; }
.order-total span { font-size: 13px; color: #999; text-transform: uppercase; letter-spacing: 2px; margin-right: 10px; }
.order-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-chat {
  background: #111; color: #fff; border: 1px solid #111;
  padding: 10px 18px; font-size: 13px; letter-spacing: 1px; text-transform: uppercase;
  cursor: pointer; transition: all .2s; border-radius: 4px;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-chat:hover { background: #8b0000; border-color: #8b0000; }
.btn-chat svg { width: 16px; height: 16px; }
/* === MY ORDERS (end) === */

/* === SITE FOOTER (start) === */
.site-footer {
  background: #0e0e0e; color: #cfcfcf;
  margin-top: 60px;
  padding: 60px 20px 30px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
}
.footer-logo {
  font-size: 22px; letter-spacing: 3px; font-weight: bold; color: #fff;
  margin-bottom: 14px;
}
.footer-desc { font-size: 14px; line-height: 1.7; color: #999; margin-bottom: 18px; }
.footer-contacts { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer-contacts a, .footer-contacts span { color: #cfcfcf; text-decoration: none; transition: color .2s; }
.footer-contacts a:hover { color: #fff; }
.footer-col h4 {
  color: #fff; font-size: 13px; letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 18px; font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a {
  color: #999; font-size: 14px; text-decoration: none; cursor: pointer; transition: color .2s;
}
.footer-col ul a:hover { color: #fff; }
.footer-social { display: flex; flex-direction: column; gap: 12px; }
.soc-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 8px;
  font-size: 14px; text-decoration: none; color: #fff;
  border: 1px solid #2a2a2a; background: #1a1a1a;
  transition: all .2s;
}
.soc-btn:hover { background: #222; transform: translateY(-1px); }
.soc-btn--tg:hover { background: #229ED9; border-color: #229ED9; }
.soc-btn--tt:hover { background: #000; border-color: #fff; }
.footer-bottom {
  max-width: 1200px; margin: 40px auto 0;
  padding-top: 24px; border-top: 1px solid #1f1f1f;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  font-size: 13px; color: #777;
}
.footer-bottom-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-bottom-links a { color: #777; cursor: pointer; text-decoration: none; transition: color .2s; }
.footer-bottom-links a:hover { color: #fff; }


/* === SITE FOOTER (end) === */

/* === LEGAL MODAL (start) === */
.legal-modal {
  position: fixed; inset: 0; z-index: 3000;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.legal-modal.open { display: flex; }
.legal-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.legal-modal__content {
  position: relative; background: #fff; border-radius: 12px;
  max-width: 720px; width: 100%; max-height: 85vh; overflow-y: auto;
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: legalIn .25s ease;
}
@keyframes legalIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: none; } }
.legal-modal__close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  background: #f3f3f3; border: 0; cursor: pointer;
  font-size: 16px; color: #666; transition: background .2s;
}
.legal-modal__close:hover { background: #e5e5e5; }
.legal-modal h2 {
  font-weight: normal; letter-spacing: 2px; text-transform: uppercase;
  font-size: 20px; margin-bottom: 20px;
}
.legal-modal h3 { font-size: 16px; margin: 20px 0 8px; }
.legal-modal p, .legal-modal li { font-size: 14px; line-height: 1.7; color: #444; }
.legal-modal ul { padding-left: 20px; }
/* === LEGAL MODAL (end) === */

/* === CHAT WIDGET (start) === */
.chat-widget { position: fixed; right: 20px; bottom: 20px; z-index: 2500; }
.chat-launcher {
  width: 58px; height: 58px; border-radius: 50%;
  background: #111; color: #fff; border: 0; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .2s, background .2s;
  position: relative;
}
.chat-launcher:hover { background: #8b0000; transform: scale(1.06); }
.chat-unread {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: #8b0000; color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.chat-window {
  position: absolute; right: 0; bottom: 72px;
  width: 360px; max-width: calc(100vw - 40px);
  height: 480px; max-height: calc(100vh - 120px);
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  display: none; flex-direction: column;
  border: 1px solid #e5e5e5;
}
.chat-window.open { display: flex; animation: chatIn .25s ease; }
@keyframes chatIn { from { opacity: 0; transform: translateY(15px) scale(.97); } to { opacity: 1; transform: none; } }
.chat-head {
  background: #111; color: #fff; padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: center;
}
.chat-head strong { font-weight: 600; letter-spacing: .5px; }
.chat-status { font-size: 12px; color: #6ddc6d; margin-top: 2px; }
.chat-head-close { background: none; border: 0; color: #fff; cursor: pointer; font-size: 16px; opacity: .7; }
.chat-head-close:hover { opacity: 1; }
.chat-body {
  flex: 1; padding: 16px; overflow-y: auto;
  background: #fafafa; display: flex; flex-direction: column; gap: 10px;
}
.chat-body::-webkit-scrollbar { width: 6px; }
.chat-body::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.chat-msg { max-width: 78%; padding: 9px 13px; border-radius: 12px; font-size: 14px; line-height: 1.5; word-wrap: break-word; }
.chat-msg--me   { align-self: flex-end; background: #111; color: #fff; border-bottom-right-radius: 3px; }
.chat-msg--them { align-self: flex-start; background: #fff; color: #111; border: 1px solid #e5e5e5; border-bottom-left-radius: 3px; }
.chat-msg__time { font-size: 10px; opacity: .6; margin-top: 4px; display: block; text-align: right; }
.chat-msg__author { font-size: 11px; font-weight: 600; opacity: .7; margin-bottom: 3px; }
.chat-form {
  display: flex; gap: 8px; padding: 12px;
  background: #fff; border-top: 1px solid #ececec;
}
.chat-form input {
  flex: 1; border: 1px solid #e0e0e0; border-radius: 999px;
  padding: 11px 16px; font-family: inherit; font-size: 14px;
}
.chat-form input:focus { outline: none; border-color: #111; }
.chat-form button {
  width: 42px; height: 42px; border-radius: 50%;
  background: #111; color: #fff; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.chat-form button:hover { background: #8b0000; }
.chat-auth-note {
  padding: 12px; text-align: center; font-size: 13px; color: #8b0000;
  background: #fff; border-top: 1px solid #ececec;
  display: none;
}
.chat-widget--locked .chat-form { display: none; }
.chat-widget--locked .chat-auth-note { display: block; }
/* === CHAT WIDGET (end) === */


.admin-chats-wrap {
  display: grid; grid-template-columns: 320px 1fr; gap: 0;
  height: calc(100vh - 220px); min-height: 500px;
  background: #fff; border: 1px solid #e5e5e5; border-radius: 8px; overflow: hidden;
}
.admin-chats-list { border-right: 1px solid #ececec; display: flex; flex-direction: column; background: #fafafa; }
.admin-chats-list__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid #ececec; }
.admin-chats-list__head h3 { font-size: 14px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; margin: 0; }
.admin-chat-item {
  padding: 14px 16px; border-bottom: 1px solid #f0f0f0; cursor: pointer;
  transition: background .15s; display: flex; justify-content: space-between; gap: 10px; align-items: center;
}
.admin-chat-item:hover { background: #f0f0f0; }
.admin-chat-item.active { background: #111; color: #fff; }
.admin-chat-item.active .admin-chat-item__preview { color: #cfcfcf; }
.admin-chat-item__main { flex: 1; min-width: 0; }
.admin-chat-item__name { font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.admin-chat-item__preview { font-size: 12px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.admin-chat-item__badge {
  background: #8b0000; color: #fff; font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; padding: 0 6px; line-height: 20px; text-align: center;
  border-radius: 999px; flex-shrink: 0;
}
.admin-chats-room { display: flex; flex-direction: column; }
.admin-chats-room__empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #bbb; }
.admin-chats-room__active { flex: 1; display: flex; flex-direction: column; }
.admin-chats-room__head { padding: 16px 20px; border-bottom: 1px solid #ececec; }
.admin-chats-room__name { font-weight: 600; font-size: 16px; }
.admin-chats-room__status { font-size: 12px; color: #2d7a2d; margin-top: 2px; }
.admin-chats-room__body { flex: 1; padding: 20px; overflow-y: auto; background: #fafafa; display: flex; flex-direction: column; gap: 10px; }
.admin-chats-room__form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #ececec; background: #fff; }
.admin-chats-room__form input { flex: 1; border: 1px solid #e0e0e0; border-radius: 999px; padding: 11px 16px; font-family: inherit; font-size: 14px; }
.admin-chats-room__form input:focus { outline: none; border-color: #111; }
.admin-chats-room__form button { width: 42px; height: 42px; border-radius: 50%; background: #111; color: #fff; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background .2s; }
.admin-chats-room__form button:hover { background: #8b0000; }
.admin-chats-empty { color: #999; font-size: 13px; padding: 20px; text-align: center; }


/* === CHAT FIX (start) === */
.chat-msg__author {
  font-size: 11px;
  font-weight: 600;
  opacity: .65;
  margin-bottom: 3px;
  letter-spacing: .3px;
}
.chat-msg--me .chat-msg__author { text-align: right; }
.chat-msg--them .chat-msg__author { text-align: left; }
.chat-msg--me   { background: #111; color: #fff; }
.chat-msg--them { background: #fff; color: #111; border: 1px solid #e5e5e5; }
.chat-msg--them .chat-msg__author { color: #8b0000; opacity: .9; }
/* === CHAT FIX (end) === */


/* Секция чата: сбрасываем всё, что мешает */
#admin-chats.admin-section {
  padding: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

.admin-chats-wrap {
  display: grid !important;
  grid-template-columns: 320px 1fr !important;
  gap: 0 !important;
  width: 100% !important;
  height: calc(100vh - 160px) !important;
  min-height: 560px !important;
  max-height: 1000px !important;
  background: #fff !important;
  border: 1px solid #e5e5e5 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 20px rgba(0,0,0,.04) !important;
}

.admin-chats-list {
  background: #fafafa !important;
  border-right: 1px solid #ececec !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  min-width: 0 !important;
}
.admin-chats-list__head {
  padding: 14px 16px !important;
  border-bottom: 1px solid #ececec !important;
  background: #fff !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}
.admin-chats-list__head h3 {
  font-size: 13px !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  margin: 0 !important;
  color: #111 !important;
}
#admin-chats-list-body {
  flex: 1 !important;
  overflow-y: auto !important;
  min-height: 0 !important;
}
#admin-chats-list-body::-webkit-scrollbar { width: 6px; }
#admin-chats-list-body::-webkit-scrollbar-thumb { background: #d5d5d5; border-radius: 3px; }

.admin-chat-item {
  padding: 12px 16px !important;
  border-bottom: 1px solid #f0f0f0 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  transition: background .15s !important;
}
.admin-chat-item:hover { background: #f3f3f3 !important; }
.admin-chat-item.active { background: #111 !important; color: #fff !important; }
.admin-chat-item.active .admin-chat-item__name { color: #fff !important; }
.admin-chat-item.active .admin-chat-item__preview { color: #cfcfcf !important; }
.admin-chat-item__main { flex: 1 !important; min-width: 0 !important; }
.admin-chat-item__name {
  font-size: 14px !important;
  font-weight: 600 !important;
  margin-bottom: 3px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.admin-chat-item__preview {
  font-size: 12px !important;
  color: #888 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.admin-chat-item__badge {
  background: #8b0000 !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  min-width: 20px !important;
  height: 20px !important;
  padding: 0 6px !important;
  line-height: 20px !important;
  text-align: center !important;
  border-radius: 999px !important;
  flex-shrink: 0 !important;
}

/* Правая колонка — окно чата */
.admin-chats-room {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  background: #fff !important;
  overflow: hidden !important;
}
.admin-chats-room__empty {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  color: #bbb !important;
  gap: 12px !important;
  font-size: 14px !important;
}
.admin-chats-room__empty p { margin: 0 !important; }

.admin-chats-room__active {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
}
.admin-chats-room__head {
  padding: 14px 20px !important;
  border-bottom: 1px solid #ececec !important;
  background: #fff !important;
  flex-shrink: 0 !important;
}
.admin-chats-room__name {
  font-size: 15px !important;
  font-weight: 600 !important;
}
.admin-chats-room__status {
  font-size: 12px !important;
  color: #2d7a2d !important;
  margin-top: 2px !important;
}
.admin-chats-room__body {
  flex: 1 !important;
  padding: 18px 20px !important;
  overflow-y: auto !important;
  background: #f7f7f7 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  min-height: 0 !important;
}
.admin-chats-room__body::-webkit-scrollbar { width: 6px; }
.admin-chats-room__body::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 3px; }

.admin-chats-room__form {
  display: flex !important;
  gap: 8px !important;
  padding: 12px 16px !important;
  border-top: 1px solid #ececec !important;
  background: #fff !important;
  flex-shrink: 0 !important;
}
.admin-chats-room__form input {
  flex: 1 !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 999px !important;
  padding: 11px 16px !important;
  font-family: inherit !important;
  font-size: 14px !important;
  background: #fafafa !important;
  transition: background .2s, border-color .2s !important;
}
.admin-chats-room__form input:focus {
  outline: none !important;
  background: #fff !important;
  border-color: #111 !important;
}
.admin-chats-room__form button {
  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;
  background: #111 !important;
  color: #fff !important;
  border: 0 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background .2s !important;
  flex-shrink: 0 !important;
}
.admin-chats-room__form button:hover { background: #8b0000 !important; }

.admin-chats-empty {
  color: #999 !important;
  font-size: 13px !important;
  padding: 30px 20px !important;
  text-align: center !important;
}

/* Сообщения */
.admin-chats-room__body .chat-msg {
  max-width: 70% !important;
  padding: 9px 13px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  word-wrap: break-word !important;
}
.admin-chats-room__body .chat-msg--me {
  align-self: flex-end !important;
  background: #111 !important;
  color: #fff !important;
  border-bottom-right-radius: 3px !important;
}
.admin-chats-room__body .chat-msg--them {
  align-self: flex-start !important;
  background: #fff !important;
  color: #111 !important;
  border: 1px solid #e5e5e5 !important;
  border-bottom-left-radius: 3px !important;
}
.admin-chats-room__body .chat-msg__author {
  font-size: 11px !important;
  font-weight: 700 !important;
  opacity: .7 !important;
  margin-bottom: 3px !important;
  letter-spacing: .3px !important;
}
.admin-chats-room__body .chat-msg--me .chat-msg__author { text-align: right !important; color: #fff !important; }
.admin-chats-room__body .chat-msg--them .chat-msg__author { text-align: left !important; color: #8b0000 !important; }
.admin-chats-room__body .chat-msg__time {
  font-size: 10px !important;
  opacity: .6 !important;
  margin-top: 4px !important;
  display: block !important;
  text-align: right !important;
}

/* Адаптив */


/* Убеждаемся, что .admin-section.active.show для #admin-chats работает */
#admin-chats.admin-section.active {
  display: block !important;
}


#admin-chats.admin-section {
  padding: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Если .admin-page ограничивает ширину — растягиваем контейнер */
.admin-page {
  max-width: 100% !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box !important;
}

/* Сетка: 320px список + остальное чат */
#admin-chats .admin-chats-wrap {
  display: grid !important;
  grid-template-columns: 320px 1fr !important;
  gap: 0 !important;
  width: 100% !important;
  height: calc(100vh - 230px) !important;
  min-height: 500px !important;
  max-height: 900px !important;
  background: #fff !important;
  border: 1px solid #e5e5e5 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 20px rgba(0,0,0,.04) !important;
  box-sizing: border-box !important;
}

#admin-chats .admin-chats-list {
  background: #fafafa !important;
  border-right: 1px solid #ececec !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  min-width: 0 !important;
}
#admin-chats .admin-chats-list__head {
  padding: 14px 16px !important;
  border-bottom: 1px solid #ececec !important;
  background: #fff !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}
#admin-chats .admin-chats-list__head h3 {
  font-size: 13px !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  margin: 0 !important;
  color: #111 !important;
}
#admin-chats-list-body {
  flex: 1 !important;
  overflow-y: auto !important;
  min-height: 0 !important;
}
#admin-chats-list-body::-webkit-scrollbar { width: 6px; }
#admin-chats-list-body::-webkit-scrollbar-thumb { background: #d5d5d5; border-radius: 3px; }

#admin-chats .admin-chat-item {
  padding: 12px 16px !important;
  border-bottom: 1px solid #f0f0f0 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  transition: background .15s !important;
}
#admin-chats .admin-chat-item:hover { background: #f3f3f3 !important; }
#admin-chats .admin-chat-item.active { background: #111 !important; color: #fff !important; }
#admin-chats .admin-chat-item.active .admin-chat-item__name { color: #fff !important; }
#admin-chats .admin-chat-item.active .admin-chat-item__preview { color: #cfcfcf !important; }
#admin-chats .admin-chat-item__main { flex: 1 !important; min-width: 0 !important; }
#admin-chats .admin-chat-item__name {
  font-size: 14px !important; font-weight: 600 !important; margin-bottom: 3px !important;
  white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important;
}
#admin-chats .admin-chat-item__preview {
  font-size: 12px !important; color: #888 !important;
  white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important;
}
#admin-chats .admin-chat-item__badge {
  background: #8b0000 !important; color: #fff !important;
  font-size: 11px !important; font-weight: 700 !important;
  min-width: 20px !important; height: 20px !important;
  padding: 0 6px !important; line-height: 20px !important;
  text-align: center !important; border-radius: 999px !important; flex-shrink: 0 !important;
}

#admin-chats .admin-chats-room {
  display: flex !important; flex-direction: column !important;
  min-width: 0 !important; background: #fff !important; overflow: hidden !important;
}
#admin-chats .admin-chats-room__empty {
  flex: 1 !important; display: flex !important; flex-direction: column !important;
  align-items: center !important; justify-content: center !important;
  color: #bbb !important; gap: 12px !important; font-size: 14px !important;
}
#admin-chats .admin-chats-room__empty p { margin: 0 !important; }

#admin-chats .admin-chats-room__active {
  flex: 1 !important; display: flex !important; flex-direction: column !important; min-height: 0 !important;
}
#admin-chats .admin-chats-room__head {
  padding: 14px 20px !important; border-bottom: 1px solid #ececec !important;
  background: #fff !important; flex-shrink: 0 !important;
}
#admin-chats .admin-chats-room__name { font-size: 15px !important; font-weight: 600 !important; }
#admin-chats .admin-chats-room__status { font-size: 12px !important; color: #2d7a2d !important; margin-top: 2px !important; }

#admin-chats .admin-chats-room__body {
  flex: 1 !important; padding: 18px 20px !important; overflow-y: auto !important;
  background: #f7f7f7 !important; display: flex !important; flex-direction: column !important;
  gap: 10px !important; min-height: 0 !important;
}
#admin-chats .admin-chats-room__body::-webkit-scrollbar { width: 6px; }
#admin-chats .admin-chats-room__body::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 3px; }

#admin-chats .admin-chats-room__form {
  display: flex !important; gap: 8px !important;
  padding: 12px 16px !important; border-top: 1px solid #ececec !important;
  background: #fff !important; flex-shrink: 0 !important;
}
#admin-chats .admin-chats-room__form input {
  flex: 1 !important; border: 1px solid #e0e0e0 !important;
  border-radius: 999px !important; padding: 11px 16px !important;
  font-family: inherit !important; font-size: 14px !important;
  background: #fafafa !important;
}
#admin-chats .admin-chats-room__form input:focus {
  outline: none !important; background: #fff !important; border-color: #111 !important;
}
#admin-chats .admin-chats-room__form button {
  width: 42px !important; height: 42px !important; border-radius: 50% !important;
  background: #111 !important; color: #fff !important; border: 0 !important;
  cursor: pointer !important; display: inline-flex !important;
  align-items: center !important; justify-content: center !important;
  transition: background .2s !important; flex-shrink: 0 !important;
}
#admin-chats .admin-chats-room__form button:hover { background: #8b0000 !important; }

#admin-chats .admin-chats-empty {
  color: #999 !important; font-size: 13px !important;
  padding: 30px 20px !important; text-align: center !important;
}

/* Сообщения */
#admin-chats .chat-msg {
  max-width: 70% !important; padding: 9px 13px !important;
  border-radius: 12px !important; font-size: 14px !important;
  line-height: 1.5 !important; word-wrap: break-word !important;
}
#admin-chats .chat-msg--me {
  align-self: flex-end !important; background: #111 !important; color: #fff !important;
  border-bottom-right-radius: 3px !important;
}
#admin-chats .chat-msg--them {
  align-self: flex-start !important; background: #fff !important; color: #111 !important;
  border: 1px solid #e5e5e5 !important; border-bottom-left-radius: 3px !important;
}
#admin-chats .chat-msg__author {
  font-size: 11px !important; font-weight: 700 !important;
  opacity: .7 !important; margin-bottom: 3px !important; letter-spacing: .3px !important;
}
#admin-chats .chat-msg--me .chat-msg__author { text-align: right !important; color: #fff !important; }
#admin-chats .chat-msg--them .chat-msg__author { text-align: left !important; color: #8b0000 !important; }
#admin-chats .chat-msg__time {
  font-size: 10px !important; opacity: .6 !important;
  margin-top: 4px !important; display: block !important; text-align: right !important;
}

/* ============================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ — глобально
   ============================================================ */

/* Планшет/мобилка — общие правила */

/* Маленькие телефоны */


#admin-chats.admin-section {
  display: none;
  width: 100%;
  max-width: 100%;
  padding: 0 20px 40px;
  box-sizing: border-box;
  margin: 0;
}
#admin-chats.admin-section.active {
  display: block;
}

#admin-chats .admin-chats-wrap {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0;
  width: 100%;
  height: calc(100vh - 220px);
  min-height: 520px;
  max-height: 1000px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.05);
  box-sizing: border-box;
}

#admin-chats .admin-chats-list {
  background: #fafafa;
  border-right: 1px solid #ececec;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
#admin-chats .admin-chats-list__head {
  padding: 14px 16px;
  border-bottom: 1px solid #ececec;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
#admin-chats .admin-chats-list__head h3 {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0;
  color: #111;
}
#admin-chats-list-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
#admin-chats-list-body::-webkit-scrollbar { width: 6px; }
#admin-chats-list-body::-webkit-scrollbar-thumb { background: #d5d5d5; border-radius: 3px; }

#admin-chats .admin-chat-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  transition: background .15s;
}
#admin-chats .admin-chat-item:hover { background: #f3f3f3; }
#admin-chats .admin-chat-item.active { background: #111; color: #fff; }
#admin-chats .admin-chat-item.active .admin-chat-item__name { color: #fff; }
#admin-chats .admin-chat-item.active .admin-chat-item__preview { color: #cfcfcf; }
#admin-chats .admin-chat-item__main { flex: 1; min-width: 0; }
#admin-chats .admin-chat-item__name {
  font-size: 14px; font-weight: 600; margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#admin-chats .admin-chat-item__preview {
  font-size: 12px; color: #888;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#admin-chats .admin-chat-item__badge {
  background: #8b0000; color: #fff;
  font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px;
  padding: 0 6px; line-height: 20px;
  text-align: center; border-radius: 999px; flex-shrink: 0;
}

#admin-chats .admin-chats-room {
  display: flex; flex-direction: column;
  min-width: 0; background: #fff; overflow: hidden;
}
#admin-chats .admin-chats-room__empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #bbb; gap: 12px; font-size: 14px;
}
#admin-chats .admin-chats-room__empty p { margin: 0; }

#admin-chats .admin-chats-room__active {
  flex: 1; display: flex; flex-direction: column; min-height: 0;
}
#admin-chats .admin-chats-room__head {
  padding: 14px 20px; border-bottom: 1px solid #ececec;
  background: #fff; flex-shrink: 0;
}
#admin-chats .admin-chats-room__name { font-size: 15px; font-weight: 600; }
#admin-chats .admin-chats-room__status { font-size: 12px; color: #2d7a2d; margin-top: 2px; }

#admin-chats .admin-chats-room__body {
  flex: 1; padding: 18px 20px; overflow-y: auto;
  background: #f7f7f7; display: flex; flex-direction: column;
  gap: 10px; min-height: 0;
}
#admin-chats .admin-chats-room__body::-webkit-scrollbar { width: 6px; }
#admin-chats .admin-chats-room__body::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 3px; }

#admin-chats .admin-chats-room__form {
  display: flex; gap: 8px;
  padding: 12px 16px; border-top: 1px solid #ececec;
  background: #fff; flex-shrink: 0;
}
#admin-chats .admin-chats-room__form input {
  flex: 1; border: 1px solid #e0e0e0;
  border-radius: 999px; padding: 11px 16px;
  font-family: inherit; font-size: 14px; background: #fafafa;
}
#admin-chats .admin-chats-room__form input:focus {
  outline: none; background: #fff; border-color: #111;
}
#admin-chats .admin-chats-room__form button {
  width: 42px; height: 42px; border-radius: 50%;
  background: #111; color: #fff; border: 0;
  cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center;
  transition: background .2s; flex-shrink: 0;
}
#admin-chats .admin-chats-room__form button:hover { background: #8b0000; }

#admin-chats .admin-chats-empty {
  color: #999; font-size: 13px;
  padding: 30px 20px; text-align: center;
}

/* Сообщения */
#admin-chats .chat-msg {
  max-width: 70%; padding: 9px 13px;
  border-radius: 12px; font-size: 14px;
  line-height: 1.5; word-wrap: break-word;
}
#admin-chats .chat-msg--me {
  align-self: flex-end; background: #111; color: #fff;
  border-bottom-right-radius: 3px;
}
#admin-chats .chat-msg--them {
  align-self: flex-start; background: #fff; color: #111;
  border: 1px solid #e5e5e5; border-bottom-left-radius: 3px;
}
#admin-chats .chat-msg__author {
  font-size: 11px; font-weight: 700;
  opacity: .7; margin-bottom: 3px; letter-spacing: .3px;
}
#admin-chats .chat-msg--me .chat-msg__author { text-align: right; color: #fff; }
#admin-chats .chat-msg--them .chat-msg__author { text-align: left; color: #8b0000; }
#admin-chats .chat-msg__time {
  font-size: 10px; opacity: .6;
  margin-top: 4px; display: block; text-align: right;
}

/* Мобильный админ-чат */

/* Когда открыта вкладка чатов — снимаем ограничения у admin-page */
body.admin-chats-active .admin-page {
  max-width: 100% !important;
  padding: 20px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* Скрываем лишнее (заголовок, бэкт-баттон, табы оставляем) */
body.admin-chats-active .admin-page > .back-btn,
body.admin-chats-active .admin-page > h2 {
  display: none !important;
}

/* Сама секция чата */
#admin-chats.admin-section {
  display: none;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}
#admin-chats.admin-section.active {
  display: block !important;
}

#admin-chats .admin-chats-wrap {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0;
  width: 100%;
  height: calc(100vh - 200px);
  min-height: 520px;
  max-height: 1000px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.05);
  box-sizing: border-box;
}

#admin-chats .admin-chats-list {
  background: #fafafa;
  border-right: 1px solid #ececec;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
#admin-chats .admin-chats-list__head {
  padding: 14px 16px;
  border-bottom: 1px solid #ececec;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
#admin-chats .admin-chats-list__head h3 {
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  font-weight: 700; margin: 0; color: #111;
}
#admin-chats-list-body {
  flex: 1; overflow-y: auto; min-height: 0;
}
#admin-chats-list-body::-webkit-scrollbar { width: 6px; }
#admin-chats-list-body::-webkit-scrollbar-thumb { background: #d5d5d5; border-radius: 3px; }

#admin-chats .admin-chat-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  transition: background .15s;
}
#admin-chats .admin-chat-item:hover { background: #f3f3f3; }
#admin-chats .admin-chat-item.active { background: #111; color: #fff; }
#admin-chats .admin-chat-item.active .admin-chat-item__name { color: #fff; }
#admin-chats .admin-chat-item.active .admin-chat-item__preview { color: #cfcfcf; }
#admin-chats .admin-chat-item__main { flex: 1; min-width: 0; }
#admin-chats .admin-chat-item__name {
  font-size: 14px; font-weight: 600; margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#admin-chats .admin-chat-item__preview {
  font-size: 12px; color: #888;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#admin-chats .admin-chat-item__badge {
  background: #8b0000; color: #fff;
  font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px;
  padding: 0 6px; line-height: 20px;
  text-align: center; border-radius: 999px; flex-shrink: 0;
}

#admin-chats .admin-chats-room {
  display: flex; flex-direction: column;
  min-width: 0; background: #fff; overflow: hidden;
}
#admin-chats .admin-chats-room__empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #bbb; gap: 12px; font-size: 14px;
}
#admin-chats .admin-chats-room__empty p { margin: 0; }

#admin-chats .admin-chats-room__active {
  flex: 1; display: flex; flex-direction: column; min-height: 0;
}
#admin-chats .admin-chats-room__head {
  padding: 14px 20px; border-bottom: 1px solid #ececec;
  background: #fff; flex-shrink: 0;
}
#admin-chats .admin-chats-room__name { font-size: 15px; font-weight: 600; }
#admin-chats .admin-chats-room__status { font-size: 12px; color: #2d7a2d; margin-top: 2px; }

#admin-chats .admin-chats-room__body {
  flex: 1; padding: 18px 20px; overflow-y: auto;
  background: #f7f7f7; display: flex; flex-direction: column;
  gap: 10px; min-height: 0;
}
#admin-chats .admin-chats-room__body::-webkit-scrollbar { width: 6px; }
#admin-chats .admin-chats-room__body::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 3px; }

#admin-chats .admin-chats-room__form {
  display: flex; gap: 8px;
  padding: 12px 16px; border-top: 1px solid #ececec;
  background: #fff; flex-shrink: 0;
}
#admin-chats .admin-chats-room__form input {
  flex: 1; border: 1px solid #e0e0e0;
  border-radius: 999px; padding: 11px 16px;
  font-family: inherit; font-size: 14px; background: #fafafa;
}
#admin-chats .admin-chats-room__form input:focus {
  outline: none; background: #fff; border-color: #111;
}
#admin-chats .admin-chats-room__form button {
  width: 42px; height: 42px; border-radius: 50%;
  background: #111; color: #fff; border: 0;
  cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center;
  transition: background .2s; flex-shrink: 0;
}
#admin-chats .admin-chats-room__form button:hover { background: #8b0000; }

#admin-chats .admin-chats-empty {
  color: #999; font-size: 13px;
  padding: 30px 20px; text-align: center;
}

#admin-chats .chat-msg {
  max-width: 70%; padding: 9px 13px;
  border-radius: 12px; font-size: 14px;
  line-height: 1.5; word-wrap: break-word;
}
#admin-chats .chat-msg--me {
  align-self: flex-end; background: #111; color: #fff;
  border-bottom-right-radius: 3px;
}
#admin-chats .chat-msg--them {
  align-self: flex-start; background: #fff; color: #111;
  border: 1px solid #e5e5e5; border-bottom-left-radius: 3px;
}
#admin-chats .chat-msg__author {
  font-size: 11px; font-weight: 700;
  opacity: .7; margin-bottom: 3px; letter-spacing: .3px;
}
#admin-chats .chat-msg--me .chat-msg__author { text-align: right; color: #fff; }
#admin-chats .chat-msg--them .chat-msg__author { text-align: left; color: #8b0000; }
#admin-chats .chat-msg__time {
  font-size: 10px; opacity: .6;
  margin-top: 4px; display: block; text-align: right;
}
/* ============================================================
   MOBILE OPTIMIZATION v3
   ============================================================ */

/* Планшет / небольшой десктоп */


/* Мобильные */


/* Очень узкие телефоны */


/* Уже 360px */

/* === MOBILE OPTIMIZATION v3 (end) === */

/* ============================================================
   ADMIN CHAT — FINAL v7
   Работает через body.admin-chats-active
   ============================================================ */

/* 1. Когда открыта вкладка чатов — снимаем ограничения у admin-page */
body.admin-chats-active .admin-page {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* 2. Скрываем всё лишнее в шапке админки, когда открыт чат */
body.admin-chats-active .admin-page > .back-btn { display: none !important; }
body.admin-chats-active .admin-page > h2      { display: none !important; }

/* 3. Табы на вкладке чатов — оставляем видимыми, но без отступа сверху */
body.admin-chats-active .admin-page > .admin-tabs {
  margin: 12px 20px 16px !important;
  padding: 0 !important;
}

/* 4. Сама секция чата — во всю ширину, занимает всё доступное пространство */
body.admin-chats-active #admin-chats.admin-section {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 20px 30px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

#admin-chats .admin-chats-wrap {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0;
  width: 100%;
  height: calc(100vh - 220px);
  min-height: 520px;
  max-height: 900px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.05);
  box-sizing: border-box;
}

#admin-chats .admin-chats-list {
  background: #fafafa;
  border-right: 1px solid #ececec;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
#admin-chats .admin-chats-list__head {
  padding: 14px 16px;
  border-bottom: 1px solid #ececec;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
#admin-chats .admin-chats-list__head h3 {
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  font-weight: 700; margin: 0; color: #111;
}
#admin-chats-list-body {
  flex: 1; overflow-y: auto; min-height: 0;
}

#admin-chats .admin-chat-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  transition: background .15s;
}
#admin-chats .admin-chat-item:hover { background: #f3f3f3; }
#admin-chats .admin-chat-item.active { background: #111; color: #fff; }
#admin-chats .admin-chat-item.active .admin-chat-item__name { color: #fff; }
#admin-chats .admin-chat-item.active .admin-chat-item__preview { color: #cfcfcf; }
#admin-chats .admin-chat-item__main { flex: 1; min-width: 0; }
#admin-chats .admin-chat-item__name {
  font-size: 14px; font-weight: 600; margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#admin-chats .admin-chat-item__preview {
  font-size: 12px; color: #888;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#admin-chats .admin-chat-item__badge {
  background: #8b0000; color: #fff;
  font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px;
  padding: 0 6px; line-height: 20px;
  text-align: center; border-radius: 999px; flex-shrink: 0;
}

#admin-chats .admin-chats-room {
  display: flex; flex-direction: column;
  min-width: 0; background: #fff; overflow: hidden;
}
#admin-chats .admin-chats-room__empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #bbb; gap: 12px; font-size: 14px;
}
#admin-chats .admin-chats-room__empty p { margin: 0; }

#admin-chats .admin-chats-room__active {
  flex: 1; display: flex; flex-direction: column; min-height: 0;
}
#admin-chats .admin-chats-room__head {
  padding: 14px 20px; border-bottom: 1px solid #ececec;
  background: #fff; flex-shrink: 0;
}
#admin-chats .admin-chats-room__name { font-size: 15px; font-weight: 600; }
#admin-chats .admin-chats-room__status { font-size: 12px; color: #2d7a2d; margin-top: 2px; }

#admin-chats .admin-chats-room__body {
  flex: 1; padding: 18px 20px; overflow-y: auto;
  background: #f7f7f7; display: flex; flex-direction: column;
  gap: 10px; min-height: 0;
}
#admin-chats .admin-chats-room__form {
  display: flex; gap: 8px;
  padding: 12px 16px; border-top: 1px solid #ececec;
  background: #fff; flex-shrink: 0;
}
#admin-chats .admin-chats-room__form input {
  flex: 1; border: 1px solid #e0e0e0;
  border-radius: 999px; padding: 11px 16px;
  font-family: inherit; font-size: 14px; background: #fafafa;
}
#admin-chats .admin-chats-room__form input:focus {
  outline: none; background: #fff; border-color: #111;
}
#admin-chats .admin-chats-room__form button {
  width: 42px; height: 42px; border-radius: 50%;
  background: #111; color: #fff; border: 0;
  cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center;
  transition: background .2s; flex-shrink: 0;
}
#admin-chats .admin-chats-room__form button:hover { background: #8b0000; }

#admin-chats .admin-chats-empty {
  color: #999; font-size: 13px;
  padding: 30px 20px; text-align: center;
}

#admin-chats .chat-msg {
  max-width: 70%; padding: 9px 13px;
  border-radius: 12px; font-size: 14px;
  line-height: 1.5; word-wrap: break-word;
}
#admin-chats .chat-msg--me {
  align-self: flex-end; background: #111; color: #fff;
  border-bottom-right-radius: 3px;
}
#admin-chats .chat-msg--them {
  align-self: flex-start; background: #fff; color: #111;
  border: 1px solid #e5e5e5; border-bottom-left-radius: 3px;
}
#admin-chats .chat-msg__author {
  font-size: 11px; font-weight: 700;
  opacity: .7; margin-bottom: 3px; letter-spacing: .3px;
}
#admin-chats .chat-msg--me .chat-msg__author { text-align: right; color: #fff; }
#admin-chats .chat-msg--them .chat-msg__author { text-align: left; color: #8b0000; }
#admin-chats .chat-msg__time {
  font-size: 10px; opacity: .6;
  margin-top: 4px; display: block; text-align: right;
}

/* 5. Мобильный админ-чат */

/* === ADMIN CHAT — FINAL v7 (end) === */

/* === CHAT EMPTY COMPACT (start) === */
/* Плашка "Выберите диалог слева" — компактная, не растягивается */
#admin-chats .admin-chats-room__empty {
  flex: 0 0 auto !important;
  padding: 40px 20px !important;
  min-height: auto !important;
  max-height: 240px !important;
  gap: 8px !important;
  justify-content: center !important;
  border-bottom: 1px solid #f0f0f0 !important;
}
#admin-chats .admin-chats-room__empty > div:first-child {
  font-size: 32px !important;
  opacity: .35 !important;
}
#admin-chats .admin-chats-room__empty p {
  font-size: 13px !important;
  color: #aaa !important;
}
/* Если диалог выбран — заглушка скрывается, чат занимает всё */
#admin-chats .admin-chats-room__active ~ .admin-chats-room__empty,
#admin-chats .admin-chats-room__empty[style*="display: none"] {
  display: none !important;
}
/* === CHAT EMPTY COMPACT (end) === */

/* Кнопка Забронировать */
.reserve-btn {
    width: 100%;
    padding: 16px;
    margin-top: 10px;
    background: #fff;
    color: #8b0000;
    border: 1px solid #8b0000;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s;
}
.reserve-btn:hover {
    background: #8b0000;
    color: #fff;
}


/* ============================================================
   ПРЕЛОАДЕР
   ============================================================ */
#preloader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
#preloader.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.preloader-text {
    text-align: center;
    font-family: Georgia, serif;
}
.preloader-line {
    display: block;
    font-size: 42px;
    letter-spacing: 3px;
    color: #111;
    opacity: 0;
    transform: translateY(20px);
    animation: preloaderFadeIn 0.7s ease forwards;
    margin-bottom: 15px;
}
.preloader-line:nth-child(2) {
    animation-delay: 0.7s;
    font-size: 32px;
    letter-spacing: 5px;
    color: #8b0000;
}
@keyframes preloaderFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}



/* ============================================================
   ПРЕЛОАДЕР
   ============================================================ */
#preloader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.9s ease, visibility 0.9s ease;
}
#preloader.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.preloader-content {
    text-align: center;
    font-family: Georgia, serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}
.preloader-wave {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    animation: preloaderIn 0.7s ease forwards, waveHand 1.2s ease 0.7s infinite;
    transform-origin: 70% 70%;
}
.preloader-title {
    font-size: 38px;
    letter-spacing: 5px;
    color: #111;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    animation: preloaderIn 0.8s ease 0.5s forwards;
    font-weight: normal;
}
.preloader-flag {
    opacity: 0;
    transform: translateY(20px);
    animation: preloaderIn 0.8s ease 1s forwards;
}
.preloader-flag svg {
    border-radius: 2px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
    display: block;
}
@keyframes preloaderIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes waveHand {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(14deg); }
    75% { transform: rotate(-8deg); }
}




/* ============================================================
   ПРЕЛОАДЕР — в стиле сайта
   ============================================================ */
#preloader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.9s ease, visibility 0.9s ease;
}
#preloader.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.preloader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
}
.preloader-wave {
    opacity: 0;
    transform: translateY(20px);
    animation: preloaderIn 0.7s ease forwards, waveHand 1.4s ease-in-out 0.7s infinite;
    transform-origin: 70% 70%;
}
.preloader-wave svg {
    display: block;
}
.preloader-title {
    font-family: Georgia, serif;
    font-size: 40px;
    font-weight: normal;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: #111;
    line-height: 1.1;
    opacity: 0;
    transform: translateY(20px);
    animation: preloaderIn 0.9s ease 0.5s forwards;
    padding-left: 6px;
}
@keyframes preloaderIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes waveHand {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(16deg); }
    40% { transform: rotate(-8deg); }
    60% { transform: rotate(14deg); }
    80% { transform: rotate(-6deg); }
}




/* ============================================================
   ПРЕЛОАДЕР — печатная машинка
   ============================================================ */
#preloader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.9s ease, visibility 0.9s ease;
}
#preloader.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.preloader-content {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
}
.preloader-title {
    font-size: 44px;
    font-weight: normal;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: #111;
    line-height: 1.1;
    white-space: nowrap;
}
.preloader-cursor {
    font-size: 44px;
    font-weight: normal;
    color: #111;
    margin-left: 4px;
    animation: blinkCursor 0.7s step-end infinite;
    line-height: 1.1;
}
@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}




/* ============================================================
   НАЛИЧИЕ — внизу карточки, компактно
   ============================================================ */
.stock-line {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 8px 8px;
    margin: 10px 0 0;
    font-family: Georgia, serif;
    border-top: 1px solid #eee;
    color: #111;
    background: transparent;
    text-align: center;
}
.stock-line.in { color: #111; border-top-color: #111; }
.stock-line.out { color: #8b0000; border-top-color: #8b0000; }
.stock-line.soon { color: #666; border-top-color: #ccc; background: #fafafa; }

/* Кнопка Подробнее — отступ снизу меньше, чтобы stock прижался */
.product-card .btn { margin-bottom: 0; }




/* ============================================================
   СТАТУС НАЛИЧИЯ — компактно, под кнопкой Подробнее
   ============================================================ */
.stock-line {
    display: block;
    font-family: Georgia, serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 10px 8px;
    margin: 6px 0 0;
    text-align: center;
    background: transparent;
    border: 1px solid #ddd;
    color: #111;
    line-height: 1;
}
.stock-line.in {
    color: #111;
    border-color: #111;
}
.stock-line.out {
    color: #8b0000;
    border-color: #8b0000;
}
.stock-line.soon {
    color: #666;
    border-color: #ccc;
    background: #fafafa;
}

/* Кнопка Подробнее — единый размер со статусом */
.product-card .btn {
    padding: 10px 8px;
    font-size: 11px;
    letter-spacing: 1px;
    margin-bottom: 0;
}

/* ============================================================
   МОБИЛЬНАЯ ВЕРСИЯ — исправляем разъезд
   ============================================================ */





/* ============================================================
   СТАТУС НАЛИЧИЯ — просто текст, без рамки
   ============================================================ */
.stock-line {
    display: block;
    font-family: Georgia, serif;
    font-size: 12px;
    font-weight: normal;
    letter-spacing: 0.5px;
    padding: 6px 0 0;
    margin: 4px 0 0;
    text-align: center;
    background: none;
    border: none;
    line-height: 1.3;
}
.stock-line.in {
    color: #111;
}
.stock-line.out {
    color: #8b0000;
}
.stock-line.soon {
    color: #888;
    font-style: italic;
}

/* Кнопка Подробнее — компактнее и без большого отступа снизу */
.product-card .btn {
    padding: 10px;
    font-size: 11px;
    letter-spacing: 1.2px;
    margin-bottom: 0;
}

/* ============================================================
   МОБИЛЬНАЯ ВЕРСИЯ — статус текстом
   ============================================================ */





/* ============================================================
   СТАТУС НАЛИЧИЯ — цифры одного размера с текстом
   ============================================================ */
.stock-line {
    display: block;
    font-family: Georgia, serif;
    font-size: 12px;
    font-weight: normal;
    letter-spacing: 0.3px;
    padding: 6px 0 0;
    margin: 4px 0 0;
    text-align: center;
    background: none;
    border: none;
    line-height: 1;
    font-variant-numeric: tabular-nums;      /* одинаковые цифры */
    font-feature-settings: "tnum" 1, "lnum" 1; /* табличные цифры */
}
.stock-line.in {
    color: #111;
}
.stock-line.out {
    color: #8b0000;
}
.stock-line.soon {
    color: #888;
    font-style: italic;
}

/* Цена — тоже табличные цифры, чтобы выглядело ровно */
.product-card .price {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
}

/* Кнопка Подробнее */
.product-card .btn {
    padding: 10px;
    font-size: 11px;
    letter-spacing: 1.2px;
    margin-bottom: 0;
}





/* ============================================================
   НАСТРОЙКИ В АДМИНКЕ
   ============================================================ */
.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}
.setting-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #111;
}
.setting-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.5;
    max-width: 500px;
}
.setting-status {
    margin-top: 15px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Переключатель */
.switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 30px;
    flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #ccc;
    transition: 0.3s;
    border-radius: 30px;
}
.switch .slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background: #fff;
    transition: 0.3s;
    border-radius: 50%;
}
.switch input:checked + .slider {
    background: #111;
}
.switch input:checked + .slider:before {
    transform: translateX(24px);
}




/* ============================================================
   МОБИЛЬНАЯ ВЕРСИЯ — единый чистый 

/* Основной мобильный брейкпоинт */


/* Маленькие телефоны */


/* Отключаем hover-эффекты на тач-устройствах */


/* Поля ввода 16px — чтобы iOS не зумил */



/* ============================================================
   МОБИЛЬНАЯ ВЕРСИЯ — современные стандарты (увеличенные размеры)
   ============================================================ */





/* Маленькие телефоны */






/* ============================================================
   МОБИЛЬНАЯ ВЕРСИЯ — единый блок
   ============================================================ */








/* ============================================================
   МОБИЛЬНАЯ ВЕРСИЯ — финальная
   ============================================================ */

@media (max-width: 768px) {

    /* ===== ГЛОБАЛЬНО ===== */
    * { box-sizing: border-box; }
    html, body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        margin: 0;
        padding: 0;
    }
    img { max-width: 100%; height: auto; }

    /* ===== ШАПКА ===== */
    header {
        display: flex;
        flex-direction: column;
        padding: 12px 14px;
        gap: 12px;
        align-items: stretch;
        width: 100%;
        box-sizing: border-box;
    }
    .logo {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
    }
    .logo img { height: 40px; width: auto; }
    .logo-text { font-size: 18px; line-height: 1.1; }
    .logo-text span { font-size: 9px; letter-spacing: 2px; }

    nav { width: 100%; order: 3; }
    nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 16px;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    nav ul li a { font-size: 13px; letter-spacing: 0.5px; }

    .header-right {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }
    .cart-icon { font-size: 22px; }
    .user-btn {
        padding: 8px 12px;
        font-size: 11px;
        min-height: 40px;
    }
    .user-info { font-size: 12px; width: 100%; text-align: center; }

    /* ===== HERO ===== */
    .hero {
        min-height: auto;
        padding: 40px 16px;
        width: 100%;
        box-sizing: border-box;
    }
    .hero h1 { font-size: 26px; letter-spacing: 3px; }
    .hero p { font-size: 14px; line-height: 1.5; padding: 0 4px; }
    .hero .btn { padding: 12px 22px; font-size: 12px; }
    .slider-arrow { width: 36px; height: 36px; font-size: 18px; }
    .slider-prev { left: 8px; }
    .slider-next { right: 8px; }

    /* ===== КАТАЛОГ ===== */
    .catalog { padding: 24px 14px; width: 100%; box-sizing: border-box; }
    .catalog h2 { font-size: 22px; margin-bottom: 18px; }

    /* Фильтры */
    .filters-bar {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 14px;
        width: 100%;
        box-sizing: border-box;
    }
    .filter-item {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    .filter-item label { font-size: 11px; margin-bottom: 5px; }
    .filter-item select {
        width: 100%;
        padding: 12px 14px;
        font-size: 15px;
        box-sizing: border-box;
    }
    .filters-bar .btn-small {
        width: 100%;
        padding: 13px;
        font-size: 12px;
        box-sizing: border-box;
    }
    .filter-info { font-size: 12px; margin-bottom: 16px; padding: 0 4px; }

    /* Товары */
    .grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        width: 100%;
    }
    .product-card {
        width: 100%;
        padding: 0 0 16px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
    }
    .product-card img {
        width: 100%;
        height: 260px;
        object-fit: cover;
        margin: 0 0 14px;
    }
    .product-card h3 {
        font-size: 16px;
        margin: 0 14px 8px;
        text-align: center;
        line-height: 1.3;
    }
    .product-card .price {
        font-size: 20px;
        margin: 0 14px 12px;
        text-align: center;
    }
    .product-card .btn {
        width: calc(100% - 28px);
        margin: 0 14px 10px;
        padding: 13px;
        font-size: 12px;
        box-sizing: border-box;
    }
    .stock-line {
        display: block;
        font-size: 13px;
        padding: 0 14px;
        margin: 0;
        text-align: center;
    }
    .product-badges { top: 12px; left: 12px; gap: 5px; }
    .badge-item { font-size: 10px; padding: 5px 10px; }

    /* ===== СТРАНИЦА ТОВАРА ===== */
    .product-page { padding: 16px 14px; width: 100%; box-sizing: border-box; }
    .back-btn { font-size: 13px; margin-bottom: 14px; display: inline-block; }
    .product-layout {
        display: grid;
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 0;
        border: none;
        background: transparent;
        width: 100%;
    }
    .product-gallery {
        width: 100%;
        border-radius: 8px;
        overflow: hidden;
    }
    .product-gallery .product-image {
        width: 100%;
        height: 340px;
        object-fit: cover;
        display: block;
    }
    .gallery-arrow { width: 38px; height: 38px; font-size: 18px; }
    .product-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
    .product-thumbs .thumb { width: 64px; height: 64px; object-fit: cover; }

    .product-info h1 { font-size: 22px; margin-bottom: 10px; line-height: 1.3; }
    .product-info .product-price { font-size: 24px; margin-bottom: 14px; }
    .product-info .description { font-size: 14px; line-height: 1.6; margin-bottom: 18px; }
    .product-brand { font-size: 12px; margin-bottom: 8px; display: block; }
    .product-stock { font-size: 13px; padding: 10px 14px; margin-bottom: 16px; display: block; text-align: center; }

    .option-group { margin-bottom: 16px; }
    .option-group label { font-size: 12px; margin-bottom: 8px; display: block; }
    .sizes { display: flex; gap: 8px; flex-wrap: wrap; }
    .size-btn { padding: 11px 16px; font-size: 14px; min-width: 48px; }
    .quantity { display: flex; align-items: center; width: fit-content; }
    .quantity button { width: 44px; height: 44px; font-size: 18px; }
    .quantity span { width: 54px; font-size: 15px; line-height: 44px; text-align: center; }
    .add-to-cart-btn,
    .reserve-btn {
        width: 100%;
        padding: 15px;
        font-size: 13px;
        margin-top: 10px;
        box-sizing: border-box;
    }

    /* ===== КОРЗИНА ===== */
    .cart-page { padding: 16px 14px; width: 100%; box-sizing: border-box; }
    .cart-page h2 { font-size: 22px; margin-bottom: 18px; }
    .cart-item {
        display: grid;
        grid-template-columns: 70px 1fr;
        gap: 12px;
        padding: 12px;
        margin-bottom: 12px;
        width: 100%;
        box-sizing: border-box;
    }
    .cart-item img { width: 70px; height: 70px; object-fit: cover; }
    .cart-item .cart-name { font-size: 14px; line-height: 1.3; }
    .cart-item .cart-meta { font-size: 12px; margin-top: 4px; }
    .cart-item .cart-price { grid-column: 2; font-size: 16px; text-align: right; margin-top: 4px; }
    .cart-item .cart-remove {
        grid-column: 2;
        justify-self: end;
        padding: 7px 12px;
        font-size: 11px;
        margin-top: 4px;
    }
    .cart-total { font-size: 19px; margin: 16px 0 20px; padding: 14px 0; text-align: right; }
    .cart-form { padding: 18px 14px; width: 100%; box-sizing: border-box; }
    .cart-form h3 { font-size: 18px; margin-bottom: 16px; }
    .form-group { margin-bottom: 14px; }
    .form-group label { font-size: 12px; margin-bottom: 6px; display: block; }
    .form-group input,
    .form-group textarea {
        width: 100%;
        padding: 13px 14px;
        font-size: 16px;
        box-sizing: border-box;
    }
    .payment-title { font-size: 12px; margin: 20px 0 12px; text-align: center; }
    .payment-methods { display: flex; flex-direction: column; gap: 10px; }
    .pay-btn {
        width: 100%;
        padding: 15px;
        font-size: 13px;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }
    .pay-btn svg { width: 20px; height: 20px; }

    /* ===== БРЕНДЫ ===== */
    .brands-page, .brand-page { padding: 16px 14px; width: 100%; box-sizing: border-box; }
    .brands-page h2, .brand-page h2 { font-size: 22px; margin-bottom: 18px; }
    .brands-grid { display: grid; grid-template-columns: 1fr; gap: 14px; width: 100%; }
    .brand-card { padding: 20px; width: 100%; box-sizing: border-box; }
    .brand-card .brand-logo { width: 90px; height: 90px; margin-bottom: 12px; }
    .brand-card h3 { font-size: 18px; }
    .brand-card p { font-size: 13px; }
    .brand-header {
        display: flex;
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 14px;
        width: 100%;
        box-sizing: border-box;
    }
    .brand-header .brand-logo { width: 100px; height: 100px; }

    /* ===== КОНТАКТЫ ===== */
    .contacts-page { padding: 16px 14px; width: 100%; box-sizing: border-box; }
    .contacts-page h2 { font-size: 22px; margin-bottom: 18px; }
    .contacts-box { padding: 18px 16px; width: 100%; box-sizing: border-box; }
    .contacts-box .contact-row {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 12px 0;
        font-size: 14px;
        width: 100%;
        box-sizing: border-box;
    }

    /* ===== МОДАЛКА ===== */
    .modal-overlay.active { display: flex; padding: 12px; box-sizing: border-box; }
    .modal {
        padding: 26px 20px;
        margin: 0;
        max-width: none;
        width: 100%;
        box-sizing: border-box;
    }
    .modal h2 { font-size: 20px; margin-bottom: 20px; }
    .modal .btn { padding: 14px; font-size: 13px; width: 100%; }

    /* ===== АДМИНКА ===== */
    .admin-page { padding: 16px 14px; width: 100%; box-sizing: border-box; }
    .admin-page h2 { font-size: 22px; margin-bottom: 16px; }
    .admin-tabs {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 8px;
        flex-wrap: nowrap;
        margin-bottom: 18px;
        width: 100%;
        box-sizing: border-box;
    }
    .admin-tabs::-webkit-scrollbar { display: none; }
    .admin-tab {
        padding: 10px 14px;
        font-size: 11px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .admin-table { font-size: 12px; width: 100%; }
    .admin-table th, .admin-table td { padding: 10px 8px; font-size: 12px; }
    .admin-table img { width: 44px; height: 44px; object-fit: cover; }
    .admin-actions { display: flex; flex-direction: column; gap: 5px; }
    .btn-small { padding: 8px 12px; font-size: 11px; }
    .admin-form { padding: 18px 14px; width: 100%; box-sizing: border-box; }
    .admin-form .form-row { display: grid; grid-template-columns: 1fr; gap: 12px; }

    /* ===== УВЕДОМЛЕНИЯ ===== */
    #toast-container {
        position: fixed;
        top: 70px;
        left: 12px;
        right: 12px;
        max-width: none;
        box-sizing: border-box;
    }
    .toast { padding: 14px 16px; font-size: 14px; }

    /* ===== ФУТЕР ===== */
    footer { padding: 24px 14px; font-size: 13px; width: 100%; box-sizing: border-box; }

    /* ===== ПРЕЛОАДЕР ===== */
    .preloader-title { font-size: 22px !important; letter-spacing: 3px !important; }
    .preloader-cursor { font-size: 22px !important; }
}

@media (max-width: 380px) {
    .logo img { height: 34px; }
    .logo-text { font-size: 16px; }
    .hero h1 { font-size: 22px; }
    .product-card img { height: 220px; }
    .product-gallery .product-image { height: 280px; }
    .cart-item { grid-template-columns: 60px 1fr; }
    .cart-item img { width: 60px; height: 60px; }
    .preloader-title { font-size: 18px !important; }
    .preloader-cursor { font-size: 18px !important; }
}

/* ============================================================
   ФУТЕР — мобильная версия
   ============================================================ */
@media (max-width: 768px) {

    footer {
        padding: 30px 16px !important;
        font-size: 13px !important;
        text-align: center !important;
    }
    footer > * {
        max-width: 100% !important;
    }

    /* Футер в 3 колонки — превращаем в столбик */
    .footer,
    .footer-inner,
    .site-footer,
    .footer-grid,
    .footer__grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 22px !important;
        align-items: center !important;
        text-align: center !important;
    }

    /* Все колонки футера — по центру */
    .footer > div,
    .footer-inner > div,
    .footer-grid > div,
    .footer__grid > *,
    .footer-col {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
    }

    /* Заголовки колонок */
    .footer h3, .footer h4,
    .footer-inner h3, .footer-inner h4 {
        margin-bottom: 12px !important;
        font-size: 15px !important;
    }

    /* Ссылки и текст */
    .footer a,
    .footer p,
    .footer li {
        font-size: 13px !important;
        line-height: 1.6 !important;
    }

    /* Телефон, соцсети — покрупнее */
    .footer a[href^="tel:"],
    .footer a[href*="t.me"],
    .footer a[href*="instagram"] {
        font-size: 14px !important;
        display: inline-block !important;
        padding: 6px 0 !important;
    }

    /* Лого в футере */
    .footer img {
        max-width: 140px !important;
        height: auto !important;
        margin: 0 auto 14px !important;
        display: block !important;
    }

    /* Нижняя строка копирайта */
    .footer-bottom,
    .footer__bottom,
    .copyright {
        flex-direction: column !important;
        gap: 10px !important;
        text-align: center !important;
        padding-top: 20px !important;
        border-top: 1px solid rgba(255,255,255,0.1) !important;
        margin-top: 20px !important;
    }

    /* Юридические ссылки */
    .footer-bottom a,
    .footer__bottom a {
        display: inline-block !important;
        padding: 4px 8px !important;
        font-size: 12px !important;
    }
}

/* ============================================================
   АДМИНКА — мобильная версия
   ============================================================ */
@media (max-width: 768px) {

    /* ===== Страница админки ===== */
    .admin-page {
        padding: 16px 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    .admin-page h2 {
        font-size: 22px !important;
        margin-bottom: 16px !important;
        padding-bottom: 12px !important;
        letter-spacing: 2px !important;
    }
    .back-btn {
        font-size: 13px !important;
        margin-bottom: 14px !important;
    }

    /* ===== Вкладки — горизонтальный скролл ===== */
    .admin-tabs {
        display: flex !important;
        gap: 8px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        flex-wrap: nowrap !important;
        padding: 4px 4px 12px 4px !important;
        margin: 0 -12px 16px -12px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }
    .admin-tabs::-webkit-scrollbar { display: none !important; }
    .admin-tab {
        padding: 11px 16px !important;
        font-size: 11px !important;
        letter-spacing: 0.5px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        min-height: 42px !important;
        box-sizing: border-box !important;
    }

    /* ===== Секции ===== */
    .admin-section {
        width: 100% !important;
        overflow-x: hidden !important;
    }
    .admin-section.active {
        display: block !important;
    }

    /* ===== Таблицы — карточками ===== */
    .admin-table {
        display: block !important;
        width: 100% !important;
        border: none !important;
        background: transparent !important;
        font-size: 13px !important;
        overflow-x: auto !important;
    }
    .admin-table thead {
        display: none !important;
    }
    .admin-table tbody {
        display: block !important;
        width: 100% !important;
    }
    .admin-table tr {
        display: block !important;
        background: #fff !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 8px !important;
        padding: 14px !important;
        margin-bottom: 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .admin-table td {
        display: block !important;
        width: 100% !important;
        padding: 6px 0 !important;
        border: none !important;
        text-align: left !important;
        font-size: 13px !important;
        box-sizing: border-box !important;
    }
    .admin-table td:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #888;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        display: inline-block;
        min-width: 80px;
        margin-right: 6px;
    }
    .admin-table td img {
        width: 60px !important;
        height: 60px !important;
        object-fit: cover !important;
        border-radius: 6px !important;
    }
    .admin-table select {
        width: 100% !important;
        padding: 10px !important;
        font-size: 14px !important;
        box-sizing: border-box !important;
    }

    /* ===== Кнопки действий ===== */
    .admin-actions {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
        margin-top: 8px !important;
        padding-top: 10px !important;
        border-top: 1px solid #f0f0f0 !important;
    }
    .admin-actions .btn-small {
        flex: 1 !important;
        padding: 11px 10px !important;
        font-size: 11px !important;
        min-width: 100px !important;
        box-sizing: border-box !important;
    }

    /* ===== Формы ===== */
    .admin-form {
        padding: 18px 14px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        border-radius: 8px !important;
    }
    .admin-form h3 {
        font-size: 16px !important;
        margin-bottom: 16px !important;
        letter-spacing: 1.5px !important;
    }
    .admin-form .form-row {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .admin-form .form-group {
        margin-bottom: 14px !important;
        width: 100% !important;
    }
    .admin-form .form-group label {
        font-size: 11px !important;
        letter-spacing: 0.5px !important;
        margin-bottom: 6px !important;
        display: block !important;
    }
    .admin-form input,
    .admin-form select,
    .admin-form textarea {
        width: 100% !important;
        padding: 13px 14px !important;
        font-size: 16px !important;
        box-sizing: border-box !important;
        border-radius: 6px !important;
    }
    .admin-form textarea {
        min-height: 100px !important;
    }
    .admin-form .btn {
        width: 100% !important;
        padding: 14px !important;
        font-size: 12px !important;
        letter-spacing: 1.5px !important;
        margin-top: 10px !important;
        box-sizing: border-box !important;
    }
    .admin-form .btn + .btn {
        margin-left: 0 !important;
        margin-top: 8px !important;
    }

    /* ===== Загрузка фото ===== */
    .upload-zone {
        min-height: 160px !important;
        padding: 20px 14px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* ===== Список фото/слайдов ===== */
    .slides-list {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
        gap: 10px !important;
        width: 100% !important;
    }
    .slide-item {
        padding: 6px !important;
    }
    .slide-item img {
        height: 110px !important;
    }

    /* ===== Секция "Бейджи" ===== */
    .badge-icon-grid,
    .badges-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)) !important;
        gap: 6px !important;
    }

    /* ===== Чекбоксы бейджей ===== */
    .badge-checkbox {
        display: inline-flex !important;
        padding: 8px 12px !important;
        font-size: 12px !important;
        margin: 4px 6px 4px 0 !important;
    }

    /* ===== Спецификации ===== */
    .specs-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        padding: 10px !important;
        margin-bottom: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .specs-row input {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .specs-del {
        align-self: flex-end !important;
        padding: 8px 12px !important;
    }

    /* ===== Заказы в админке ===== */
    .admin-table tr td:nth-child(1) { /* ID */
        font-weight: bold;
        font-size: 14px !important;
    }

    /* ===== Контакты в админке ===== */
    .admin-form .form-row {
        grid-template-columns: 1fr !important;
    }

    /* ===== Настройки (тумблер) ===== */
    .setting-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 14px !important;
    }
    .switch {
        align-self: flex-end !important;
    }
}

/* ===== Очень маленькие экраны ===== */
@media (max-width: 400px) {
    .admin-page { padding: 12px 8px !important; }
    .admin-page h2 { font-size: 18px !important; }
    .admin-tab { padding: 9px 12px !important; font-size: 10px !important; }
    .admin-table tr { padding: 10px !important; }
    .admin-table td { font-size: 12px !important; }
    .admin-form { padding: 14px 10px !important; }
    .admin-actions .btn-small { min-width: 80px !important; font-size: 10px !important; }
}

/* ============================================================
   АДМИНКА — исправление подписей в карточках
   ============================================================ */
@media (max-width: 768px) {

    /* Убираем старые подписи через :before */
    .admin-table td:before {
        content: none !important;
        display: none !important;
    }

    /* Новые подписи — как блоки */
    .admin-table td {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 12px !important;
        padding: 8px 0 !important;
        border-bottom: 1px solid #f5f5f5 !important;
        text-align: right !important;
        font-size: 13px !important;
    }
    .admin-table td:last-child {
        border-bottom: none !important;
    }

    /* Первая ячейка — фото, без подписи */
    .admin-table td:first-child {
        justify-content: center !important;
        text-align: center !important;
        padding: 10px 0 !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }
    .admin-table td:first-child img {
        width: 80px !important;
        height: 80px !important;
        object-fit: cover !important;
        border-radius: 6px !important;
    }

    /* Подпись к каждой ячейке через псевдоэлемент в JS-разметке нет,
       поэтому добавляем вручную — через порядок ячеек */

    /* ===== Явные подписи по позиции ===== */
    /* ID */
    .admin-table td:nth-child(1)::before { content: none; }
    /* Название */
    .admin-table td:nth-child(2)::before {
        content: "Название" !important;
        display: inline-block !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        color: #999 !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        margin-right: 8px !important;
        flex-shrink: 0 !important;
        text-align: left !important;
    }
    /* Категория */
    .admin-table td:nth-child(3)::before {
        content: "Категория" !important;
        display: inline-block !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        color: #999 !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        margin-right: 8px !important;
        flex-shrink: 0 !important;
        text-align: left !important;
    }
    /* Бренд */
    .admin-table td:nth-child(4)::before {
        content: "Бренд" !important;
        display: inline-block !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        color: #999 !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        margin-right: 8px !important;
        flex-shrink: 0 !important;
        text-align: left !important;
    }
    /* Цена */
    .admin-table td:nth-child(5)::before {
        content: "Цена" !important;
        display: inline-block !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        color: #999 !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        margin-right: 8px !important;
        flex-shrink: 0 !important;
        text-align: left !important;
    }
    /* Скидка */
    .admin-table td:nth-child(6)::before {
        content: "Скидка" !important;
        display: inline-block !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        color: #999 !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        margin-right: 8px !important;
        flex-shrink: 0 !important;
        text-align: left !important;
    }
    /* Наличие */
    .admin-table td:nth-child(7)::before {
        content: "В наличии" !important;
        display: inline-block !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        color: #999 !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        margin-right: 8px !important;
        flex-shrink: 0 !important;
        text-align: left !important;
    }

    /* Последняя ячейка — кнопки */
    .admin-table td:last-child {
        display: block !important;
        padding-top: 12px !important;
        text-align: center !important;
    }

    /* Кнопки на всю ширину */
    .admin-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
    }
    .admin-actions .btn-small {
        width: 100% !important;
        min-width: auto !important;
        padding: 12px 8px !important;
        font-size: 11px !important;
    }

    /* ===== Для таблицы "Заказы" (другая структура) ===== */
    #admin-orders .admin-table td:nth-child(1)::before { content: "ID" !important; display: inline-block !important; font-size: 10px !important; color: #999 !important; text-transform: uppercase !important; margin-right: 8px !important; }
    #admin-orders .admin-table td:nth-child(2)::before { content: "Клиент" !important; display: inline-block !important; font-size: 10px !important; color: #999 !important; text-transform: uppercase !important; margin-right: 8px !important; }
    #admin-orders .admin-table td:nth-child(3)::before { content: "Телефон" !important; display: inline-block !important; font-size: 10px !important; color: #999 !important; text-transform: uppercase !important; margin-right: 8px !important; }
    #admin-orders .admin-table td:nth-child(4)::before { content: "Адрес" !important; display: inline-block !important; font-size: 10px !important; color: #999 !important; text-transform: uppercase !important; margin-right: 8px !important; }
    #admin-orders .admin-table td:nth-child(5)::before { content: "Товары" !important; display: inline-block !important; font-size: 10px !important; color: #999 !important; text-transform: uppercase !important; margin-right: 8px !important; }
    #admin-orders .admin-table td:nth-child(6)::before { content: "Сумма" !important; display: inline-block !important; font-size: 10px !important; color: #999 !important; text-transform: uppercase !important; margin-right: 8px !important; }
    #admin-orders .admin-table td:nth-child(7)::before { content: "Оплата" !important; display: inline-block !important; font-size: 10px !important; color: #999 !important; text-transform: uppercase !important; margin-right: 8px !important; }
    #admin-orders .admin-table td:nth-child(8)::before { content: "Статус" !important; display: inline-block !important; font-size: 10px !important; color: #999 !important; text-transform: uppercase !important; margin-right: 8px !important; }

    /* ===== Пользователи ===== */
    #admin-users .admin-table td:nth-child(1)::before { content: "ID" !important; }
    #admin-users .admin-table td:nth-child(2)::before { content: "Имя" !important; }
    #admin-users .admin-table td:nth-child(3)::before { content: "Email" !important; }
    #admin-users .admin-table td:nth-child(4)::before { content: "Роль" !important; }
    #admin-users .admin-table td:nth-child(5)::before { content: "Дата" !important; }

    #admin-users .admin-table td:nth-child(1)::before,
    #admin-users .admin-table td:nth-child(2)::before,
    #admin-users .admin-table td:nth-child(3)::before,
    #admin-users .admin-table td:nth-child(4)::before,
    #admin-users .admin-table td:nth-child(5)::before {
        display: inline-block !important;
        font-size: 10px !important;
        color: #999 !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        margin-right: 8px !important;
    }
}
