/* ============================================================
   LEBON — Стили для упаковочных коробок
   ============================================================ */

/* ============================================================
   1. ПЕРЕМЕННЫЕ
   ============================================================ */
:root {
    --bg-dark: #1a1f2e;
    --bg-light: #f8f7f4;
    --white: #ffffff;
    --accent: #e8a850;
    --accent-hover: #f0c070;
    --accent-soft: #fdf3e4;
    --text-dark: #1e1e1e;
    --text-mid: #4a4a4a;
    --text-light: #6b6b6b;
    --border: #e2ddd4;
    --border-light: #f0ebe0;
    --shadow-sm: 0 4px 14px rgba(0,0,0,0.06);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.1);
    --radius: 16px;
    --radius-sm: 10px;
    --in-stock: #22c55e;
    --out-of-stock: #ef4444;
    --on-order: #f59e0b;
}

/* ============================================================
   2. БАЗОВЫЕ СТИЛИ
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================================
   3. АНИМАЦИЯ ЗАГРУЗКИ
   ============================================================ */
.box-animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 31, 46, 0.96);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeOut 0.6s ease 2.2s forwards;
    pointer-events: all;
}

.box-scene {
    position: relative;
    width: 160px;
    height: 160px;
}

.box-lid {
    position: absolute;
    width: 130px;
    height: 65px;
    background: var(--accent);
    border-radius: 10px 10px 0 0;
    top: 8px;
    left: 15px;
    transform-origin: left bottom;
    animation: openLid 0.8s ease 0.6s forwards;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.box-body {
    width: 130px;
    height: 90px;
    background: linear-gradient(180deg, #d4953a, #b07028);
    border-radius: 0 0 8px 8px;
    position: absolute;
    bottom: 15px;
    left: 15px;
    box-shadow: inset 0 -8px 16px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
}

.box-text {
    position: absolute;
    bottom: -45px;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 4px;
    text-align: center;
    width: 100%;
    animation: fadeInText 0.5s ease 1s forwards;
    opacity: 0;
}

@keyframes openLid {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-130deg); }
}

@keyframes fadeOut {
    0% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; }
}

@keyframes fadeInText {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   4. СКРЫТАЯ АДМИН-КНОПКА
   ============================================================ */
.admin-secret-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.01);
    font-size: 0.8rem;
}

.admin-secret-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.2);
}

.admin-secret-btn:active {
    transform: scale(0.9);
}

.admin-secret-btn i {
    font-size: 0.7rem;
}

/* ============================================================
   5. КОРЗИНА (ПЛАВАЮЩАЯ)
   ============================================================ */
.floating-cart {
    position: fixed;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: var(--white);
    padding: 12px 8px;
    border-radius: 40px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--accent);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 56px;
}

.floating-cart:hover {
    transform: translateY(-50%) scale(1.05);
}

.floating-cart i {
    font-size: 1.2rem;
    color: var(--bg-dark);
}

.floating-cart-count {
    background: var(--accent);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.floating-cart-total {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-mid);
    text-align: center;
}

/* ============================================================
   6. МОДАЛЬНЫЕ ОКНА
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content-custom {
    background: var(--white);
    border-radius: var(--radius);
    max-width: 600px;
    width: 100%;
    padding: 24px;
    position: relative;
    animation: modalIn 0.3s ease;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-content-custom.wide {
    max-width: 800px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.4rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #999;
    font-weight: 700;
    z-index: 5;
}

.modal-close:hover {
    color: #333;
}

/* ============================================================
   7. ПОЛНОЭКРАННЫЙ КАТАЛОГ
   ============================================================ */
.fullscreen-catalog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    z-index: 1040;
    overflow-y: auto;
    display: none;
    padding: 16px 0;
}

.fullscreen-catalog.active {
    display: block;
}

.catalog-header {
    position: sticky;
    top: 0;
    background: var(--bg-light);
    z-index: 10;
    padding: 12px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.catalog-header h2 {
    font-size: 1.2rem;
    margin: 0;
}

/* ============================================================
   8. КНОПКИ
   ============================================================ */
.btn-custom {
    background: var(--bg-dark);
    color: white;
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.3s;
    font-family: inherit;
    font-size: 0.85rem;
    white-space: nowrap;
}

.btn-custom:hover {
    background: #2d3548;
    transform: translateY(-1px);
}

.btn-accent {
    background: var(--accent);
    color: #fff;
}

.btn-accent:hover {
    background: var(--accent-hover);
}

.btn-outline-custom {
    background: transparent;
    border: 2px solid var(--bg-dark);
    color: var(--bg-dark);
}

.btn-outline-custom:hover {
    background: var(--bg-dark);
    color: white;
}

.btn-sm-custom {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================
   9. ШАПКА
   ============================================================ */
.site-header {
    background: var(--bg-dark);
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 3px solid var(--accent);
    padding: 8px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--accent);
    text-transform: uppercase;
    line-height: 1.1;
    cursor: pointer;
    text-decoration: none;
}

.logo small {
    display: block;
    font-size: 0.5rem;
    letter-spacing: 4px;
    color: #8890a0;
    font-weight: 400;
    margin-top: 2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nav-links .nav-btn {
    color: #c0c5ce;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links .nav-btn i {
    font-size: 0.9rem;
}

.nav-links .nav-btn:hover {
    color: var(--accent);
}

.phone-btn {
    background: var(--accent);
    color: #fff !important;
    padding: 10px 18px;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.phone-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.03);
    color: #fff !important;
}

/* ============================================================
   10. HERO
   ============================================================ */
.hero {
    background: linear-gradient(135deg, #fdf8f0 0%, #f8f7f4 100%);
    padding: 40px 0;
}

.hero h1 {
    font-size: 2.2rem;
}

.hero-image-wrapper {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 20px 20px 0 rgba(232, 168, 80, 0.15);
    border: 2px solid var(--accent-soft);
    aspect-ratio: 4/3;
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================================
   11. КАРТОЧКИ ТОВАРОВ
   ============================================================ */
.product-card {
    background: var(--white);
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.product-card-img {
    aspect-ratio: 4/3;
    background: #f0ebe0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category-badge {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--accent-soft);
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    align-self: flex-start;
    margin-bottom: 4px;
}

.product-title {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: var(--bg-dark);
    line-height: 1.2;
}

.product-specs {
    font-size: 0.65rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.product-price {
    font-weight: 700;
    font-size: 1rem;
    color: var(--bg-dark);
    margin-bottom: 6px;
}

.product-opt-price {
    font-size: 0.65rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: -2px;
    margin-bottom: 6px;
}

.product-actions {
    display: flex;
    gap: 4px;
    margin-top: auto;
    flex-wrap: wrap;
}

.product-actions .btn-custom {
    flex: 1;
    min-width: 60px;
    font-size: 0.7rem;
    padding: 6px 10px;
    text-align: center;
}

/* ============================================================
   12. СТАТУС НАЛИЧИЯ
   ============================================================ */
.stock-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.stock-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.stock-dot.in-stock { background: var(--in-stock); }
.stock-dot.out-of-stock { background: var(--out-of-stock); }
.stock-dot.on-order { background: var(--on-order); }

.stock-text.in-stock { color: var(--in-stock); }
.stock-text.out-of-stock { color: var(--out-of-stock); }
.stock-text.on-order { color: var(--on-order); }

.stock-quantity {
    font-size: 0.6rem;
    color: var(--text-light);
    margin-left: 2px;
}

/* ============================================================
   13. О КОМПАНИИ
   ============================================================ */
.about-section {
    padding: 40px 0;
    background: #fdf8f0;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 0.8rem;
}

.feature-list li i {
    color: var(--accent);
    width: 20px;
}

.info-card {
    background: var(--white);
    padding: 16px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    box-shadow: var(--shadow-sm);
}

.info-card i {
    color: var(--accent);
    margin-right: 8px;
    width: 20px;
}

/* ============================================================
   14. ФИЛЬТРЫ И ПОИСК
   ============================================================ */
.filter-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    background: var(--white);
    padding: 12px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.filter-btn {
    background: transparent;
    border: 2px solid #ddd;
    padding: 4px 10px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.2s;
    font-size: 0.65rem;
    white-space: nowrap;
    font-family: inherit;
    color: var(--text-mid);
}

.filter-btn.active {
    background: var(--bg-dark);
    color: white;
    border-color: var(--bg-dark);
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-btn.active:hover {
    color: white;
}

.search-input {
    padding: 6px 12px;
    border: 2px solid #ddd;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.75rem;
    outline: none;
    transition: all 0.3s;
    background: var(--white);
    font-family: inherit;
    width: 100%;
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 168, 80, 0.15);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    z-index: 50;
    margin-top: 4px;
    display: none;
    max-height: 220px;
    overflow-y: auto;
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.75rem;
}

.suggestion-item:hover {
    background: var(--accent-soft);
}

.highlight-match {
    background: #fef3c7;
    padding: 0 2px;
    border-radius: 2px;
}

/* ============================================================
   15. КОНТАКТЫ
   ============================================================ */
.map-container {
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--border-light);
    aspect-ratio: 4/3;
    min-height: 250px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.contact-card {
    background: #fdf8f0;
    padding: 20px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    border: 2px solid var(--border-light);
    height: 100%;
}

.contact-card i {
    color: var(--accent);
    width: 22px;
}

.contact-card a {
    color: var(--text-dark);
    text-decoration: none;
}

.contact-card a:hover {
    color: var(--accent);
}

/* ============================================================
   16. ОТЗЫВЫ
   ============================================================ */
.review-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    border: 2px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    height: 100%;
    position: relative;
}

.review-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.review-card .review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.review-card .review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent);
    flex-shrink: 0;
}

.review-card .review-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.review-card .review-company {
    font-size: 0.7rem;
    color: var(--text-light);
}

.review-card .review-rating {
    color: var(--accent);
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.review-card .review-text {
    font-size: 0.8rem;
    color: var(--text-mid);
    line-height: 1.6;
}

.review-card .review-photo {
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
}

.review-card .review-photo img {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.review-card .review-delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.3s;
    padding: 4px 8px;
    border-radius: 50%;
}

.review-card .review-delete-btn:hover {
    color: var(--out-of-stock);
    background: #fee2e2;
}

.review-card .review-type {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 700;
    margin-top: 4px;
}

.review-card .review-type.positive {
    background: #dcfce7;
    color: #16a34a;
}

.review-card .review-type.negative {
    background: #fee2e2;
    color: #dc2626;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.review-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.review-filters .filter-btn {
    padding: 6px 16px;
    border-radius: 30px;
    border: 2px solid #ddd;
    background: transparent;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    color: var(--text-mid);
}

.review-filters .filter-btn.active {
    background: var(--bg-dark);
    color: white;
    border-color: var(--bg-dark);
}

.review-filters .filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.review-filters .filter-btn.active:hover {
    color: white;
}

/* ============================================================
   17. КОРЗИНА (МОДАЛКА)
   ============================================================ */
.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.cart-item-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0ebe0;
    flex-shrink: 0;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: white;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.qty-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================================
   18. ФОРМЫ
   ============================================================ */
.order-form input,
.order-form select,
.order-form textarea {
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 0.85rem;
    font-family: inherit;
    width: 100%;
    margin-bottom: 10px;
}

.order-form input:focus,
.order-form select:focus,
.order-form textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 168, 80, 0.15);
}

.order-form label {
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 4px;
    display: block;
}

/* ============================================================
   19. АВТОРИЗАЦИЯ (ВКЛАДКИ)
   ============================================================ */
.auth-tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    font-weight: 600;
    cursor: pointer;
    color: #999;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    font-size: 0.85rem;
    font-family: inherit;
}

.auth-tab-btn:hover {
    color: var(--accent);
}

.auth-tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.auth-tab-btn i {
    margin-right: 6px;
}

#authModal .modal-content-custom {
    max-width: 420px;
}

/* ============================================================
   20. ГАЛЕРЕЯ
   ============================================================ */
.product-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: 10px 0;
}

.product-gallery img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border-light);
    cursor: pointer;
    transition: all 0.3s;
}

.product-gallery img:hover {
    border-color: var(--accent);
    transform: scale(1.02);
}

/* ============================================================
   21. СТРАНИЦЫ
   ============================================================ */
.page-section {
    display: none;
    padding: 30px 0;
    background: var(--white);
    min-height: 80vh;
}

.page-section.active {
    display: block;
}

/* ============================================================
   22. ФУТЕР
   ============================================================ */
footer {
    background: var(--bg-dark);
    color: #8890a0;
    padding: 16px 0;
    text-align: center;
    font-size: 0.7rem;
}

footer i {
    margin: 0 4px;
}

/* ============================================================
   23. ТОСТ
   ============================================================ */
.toast-custom {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-dark);
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: 600;
    z-index: 2000;
    animation: slideUp 0.3s ease;
    box-shadow: var(--shadow-md);
    font-size: 0.85rem;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   24. АДМИН-ПАНЕЛЬ
   ============================================================ */
.admin-panel-content {
    position: fixed;
    top: 0;
    right: -550px;
    width: 520px;
    max-width: 95vw;
    height: 100%;
    background: var(--white);
    z-index: 2100;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.admin-panel-content.active {
    right: 0;
}

.admin-panel-content .admin-close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.6rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #999;
    z-index: 10;
    padding: 4px 8px;
}

.admin-panel-content .admin-close-btn:hover {
    color: #333;
}

.admin-panel-content .admin-header {
    padding: 16px 20px 12px 20px;
    border-bottom: 2px solid var(--border-light);
    flex-shrink: 0;
    background: var(--white);
    z-index: 5;
}

.admin-panel-content .admin-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.admin-panel-content #adminContent {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.admin-panel-content #adminContent .admin-login {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.admin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2050;
    display: none;
}

.admin-overlay.active {
    display: block;
}

/* ===== АДМИН: ВКЛАДКИ ===== */
.admin-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 16px 4px 16px;
    flex-wrap: wrap;
    flex-shrink: 0;
    background: var(--white);
    border-bottom: 2px solid var(--border-light);
    z-index: 5;
}

.admin-tabs .tab-btn {
    padding: 6px 14px;
    border-radius: 20px;
    border: 2px solid #ddd;
    background: transparent;
    font-weight: 600;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    color: var(--text-mid);
    display: flex;
    align-items: center;
    gap: 4px;
}

.admin-tabs .tab-btn.active {
    background: var(--bg-dark);
    color: white;
    border-color: var(--bg-dark);
}

.admin-tabs .tab-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.admin-tabs .tab-btn.active:hover {
    color: white;
}

/* ===== АДМИН: КОНТЕНТ ===== */
.admin-tab-content {
    flex: 1;
    overflow: hidden;
    padding: 8px 16px 8px 16px;
    display: flex;
    flex-direction: column;
}

.admin-tab-content .admin-scroll-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 8px;
}

.admin-tab-content .admin-scroll-container::-webkit-scrollbar {
    width: 4px;
}

.admin-tab-content .admin-scroll-container::-webkit-scrollbar-track {
    background: #f0ebe0;
    border-radius: 4px;
}

.admin-tab-content .admin-scroll-container::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

.admin-tab-content .btn-custom {
    flex-shrink: 0;
    margin-top: 4px;
    margin-bottom: 4px;
}

/* ===== АДМИН: СТРОКИ ТОВАРОВ ===== */
.admin-stock-row,
.admin-price-row,
.admin-label-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid #f0ebe0;
    flex-wrap: wrap;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 2px;
    transition: background 0.2s;
}

.admin-stock-row:hover,
.admin-price-row:hover,
.admin-label-row:hover {
    background: #faf8f5;
}

.admin-stock-number,
.admin-price-number,
.admin-label-number {
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
    min-width: 28px;
    font-size: 0.7rem;
}

.admin-stock-name,
.admin-price-name {
    flex: 1;
    min-width: 120px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1a1f2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-stock-original,
.admin-price-original {
    font-size: 0.6rem;
    color: #999;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ===== АДМИН: ОСТАТКИ (КОНТРОЛЫ) ===== */
.admin-stock-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.admin-stock-input {
    width: 60px;
    padding: 4px 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.75rem;
    background: white;
    text-align: center;
}

.admin-stock-input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 168, 80, 0.15);
}

.admin-stock-select {
    width: 100px;
    padding: 4px 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.7rem;
    background: white;
    cursor: pointer;
}

.admin-stock-select:focus {
    border-color: var(--accent);
    outline: none;
}

/* ===== АДМИН: ЦЕНЫ (КОНТРОЛЫ) ===== */
.admin-price-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.admin-price-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.admin-price-label {
    font-size: 0.5rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.admin-price-input {
    width: 60px;
    padding: 4px 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.75rem;
    background: white;
    text-align: center;
}

.admin-price-input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 168, 80, 0.15);
}

.admin-checkbox-label {
    font-size: 0.65rem;
    color: var(--text-mid);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.2s;
    white-space: nowrap;
}

.admin-checkbox-label:hover {
    background: #f0ebe0;
}

.admin-checkbox-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: var(--accent);
}

/* ===== АДМИН: НАЗВАНИЯ ===== */
.admin-label-row {
    flex-wrap: wrap;
    gap: 6px 12px;
}

.admin-label-original {
    flex: 1;
    min-width: 120px;
}

.admin-label-original-title {
    font-size: 0.55rem;
    color: #999;
    font-weight: 500;
}

.admin-label-original-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: #1a1f2e;
}

.admin-label-edit {
    flex: 2;
    min-width: 160px;
}

.admin-label-edit-title {
    font-size: 0.55rem;
    color: #999;
    font-weight: 500;
}

.admin-label-input {
    width: 100%;
    padding: 4px 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.75rem;
    background: white;
    transition: border-color 0.3s;
}

.admin-label-input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 168, 80, 0.15);
}

.admin-label-input::placeholder {
    color: #bbb;
    font-size: 0.65rem;
}

/* ===== АДМИН: ЗАКАЗЫ ===== */
.admin-order-item {
    background: #f8f7f4;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 12px;
    border: 2px solid var(--border-light);
    transition: all 0.3s;
}

.admin-order-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.admin-order-item .order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.admin-order-item .order-id {
    font-weight: 700;
    color: var(--bg-dark);
    font-size: 0.85rem;
}

.admin-order-item .order-date {
    font-size: 0.7rem;
    color: var(--text-light);
}

.admin-order-item .order-status-badge {
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-order-item .order-status-badge.new { background: #dbeafe; color: #1d4ed8; }
.admin-order-item .order-status-badge.work { background: #fef3c7; color: #d97706; }
.admin-order-item .order-status-badge.ready { background: #dcfce7; color: #16a34a; }
.admin-order-item .order-status-badge.closed { background: #e5e7eb; color: #4b5563; }

.admin-order-item .order-client {
    font-size: 0.7rem;
    color: var(--text-mid);
    margin-bottom: 2px;
}

.admin-order-item .order-client i {
    color: var(--accent);
    width: 16px;
}

.admin-order-item .order-client i.fa-city {
    color: #3b82f6;
}

.admin-order-item .order-client i.fa-envelope {
    color: #8b5cf6;
}

.admin-order-item .order-address {
    font-size: 0.65rem;
    color: var(--text-light);
    margin-top: 2px;
}

.admin-order-item .order-address i {
    color: var(--accent);
    width: 16px;
}

.admin-order-item .order-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
    align-items: center;
}

.admin-order-item .order-actions .btn-custom {
    font-size: 0.6rem;
    padding: 4px 12px;
}

.admin-order-item .order-history {
    font-size: 0.6rem;
    color: var(--text-light);
    margin-top: 6px;
    padding: 4px 8px;
    background: #f8f7f4;
    border-radius: 4px;
    border-left: 3px solid var(--accent);
}

.admin-order-item .order-items {
    margin: 8px 0 4px 0;
    overflow-x: auto;
}

/* ===== АДМИН: ТАБЛИЦА ТОВАРОВ В ЗАКАЗЕ ===== */
.admin-order-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    margin: 6px 0;
    border-radius: 6px;
    overflow: hidden;
}

.admin-order-items-table thead {
    background: #f0ebe0;
}

.admin-order-items-table thead th {
    padding: 6px 10px;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.admin-order-items-table tbody tr {
    border-bottom: 1px solid #f0ebe0;
    transition: background 0.2s;
}

.admin-order-items-table tbody tr:hover {
    background: #faf8f5;
}

.admin-order-items-table tbody td {
    padding: 6px 10px;
    font-size: 0.7rem;
    color: var(--text-mid);
}

.admin-order-items-table tfoot {
    background: var(--accent-soft);
}

.admin-order-items-table tfoot td {
    padding: 8px 10px;
    font-weight: 700;
}

/* ===== АДМИН: ЛОГИН ===== */
.admin-login input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.admin-login input:focus {
    border-color: var(--accent);
    outline: none;
}

/* ============================================================
   25. ЛИЧНЫЙ КАБИНЕТ (ПОЛНАЯ СТРАНИЦА)
   ============================================================ */

.profile-page {
    display: none;
    min-height: 100vh;
    background: var(--bg-light);
    padding: 24px 0 40px 0;
}

.profile-page.active {
    display: block;
}

/* Шапка профиля */
.profile-page-header {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #2d3548 100%);
    color: white;
    padding: 36px 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.profile-page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(232, 168, 80, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.profile-page-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 10px 35px rgba(232, 168, 80, 0.5);
    z-index: 1;
}

.profile-page-user {
    flex: 1;
    min-width: 0;
    z-index: 1;
}

.profile-page-user h2 {
    margin: 0 0 12px 0;
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.profile-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 10px;
}

.profile-page-meta span {
    font-size: 0.95rem;
    color: #c0c5ce;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-page-meta i {
    color: var(--accent);
}

.profile-page-registered {
    font-size: 0.85rem;
    color: #8890a0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-page-registered i {
    color: var(--accent);
}

.profile-page-logout {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 14px 28px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    flex-shrink: 0;
    z-index: 1;
}

.profile-page-logout:hover {
    background: var(--out-of-stock);
    border-color: var(--out-of-stock);
    transform: translateY(-2px);
}

/* Вкладки */
.profile-page-tabs {
    display: flex;
    gap: 0;
    background: white;
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: 2px solid var(--border-light);
    padding: 0 36px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.profile-page-tab {
    background: none;
    border: none;
    padding: 20px 36px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.profile-page-tab:hover {
    color: var(--accent);
}

.profile-page-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.profile-page-tab i {
    font-size: 1.05rem;
}

/* Контент — БЕЗ СКРОЛЛА, страница скроллится целиком */
.profile-page-content {
    background: white;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 36px 40px;
    box-shadow: var(--shadow-sm);
    min-height: 500px;
    /* УБРАН max-height и overflow-y: auto */
}

/* Статистика */
.user-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 36px;
}

.user-stat-card {
    background: #f8f7f4;
    border-radius: 16px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 2px solid var(--border-light);
    transition: all 0.3s;
}

.user-stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.user-stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.user-stat-icon.active {
    background: #dbeafe;
    color: #1d4ed8;
}

.user-stat-icon.money {
    background: #dcfce7;
    color: #16a34a;
}

.user-stat-info {
    flex: 1;
    min-width: 0;
}

.user-stat-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--bg-dark);
    line-height: 1.2;
}

.user-stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Заголовок истории */
.user-orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-light);
}

.user-orders-header h6 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-orders-header h6 i {
    color: var(--accent);
}

/* Таблица заказов */
.user-orders-table-wrapper {
    overflow-x: auto;
    border-radius: 16px;
    border: 2px solid var(--border-light);
    background: white;
}

.user-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.user-orders-table thead {
    background: #f0ebe0;
}

.user-orders-table thead th {
    padding: 18px 24px;
    text-align: left;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.user-orders-table thead th:last-child {
    width: 60px;
    text-align: center;
}

.user-order-row {
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.2s;
}

.user-order-row:hover {
    background: #faf8f5;
}

.user-order-row.expanded {
    background: var(--accent-soft);
}

.user-orders-table tbody td {
    padding: 18px 24px;
    vertical-align: middle;
}

.user-order-number {
    font-weight: 700;
    color: var(--accent);
    font-size: 1rem;
}

.user-order-date {
    font-size: 0.88rem;
    color: var(--text-light);
    white-space: nowrap;
}

.user-order-items {
    font-size: 0.88rem;
    color: var(--text-mid);
    display: block;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-order-total {
    font-weight: 700;
    color: var(--bg-dark);
    font-size: 1.05rem;
    white-space: nowrap;
}

.user-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.user-status-badge.new { background: #dbeafe; color: #1d4ed8; }
.user-status-badge.work { background: #fef3c7; color: #d97706; }
.user-status-badge.ready { background: #dcfce7; color: #16a34a; }
.user-status-badge.closed { background: #e5e7eb; color: #4b5563; }
.user-status-badge.paid { background: #d1fae5; color: #059669; }

.user-order-expand {
    text-align: center;
    color: var(--text-light);
    font-size: 1rem;
    transition: transform 0.3s;
}

.user-order-row.expanded .user-order-expand {
    transform: rotate(180deg);
    color: var(--accent);
}

/* Детали заказа */
.user-order-details {
    background: #faf8f5;
}

.user-order-details td {
    padding: 0 !important;
}

.user-order-details-content {
    padding: 28px 32px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-order-details-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.user-order-details-header h6 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-order-details-header h6 i {
    color: var(--accent);
}

.user-order-address {
    font-size: 0.88rem;
    color: var(--text-mid);
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 18px;
    border-radius: 20px;
    border: 1px solid var(--border-light);
}

.user-order-address i {
    color: var(--accent);
}

/* Таблица товаров внутри заказа */
.user-order-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    background: white;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.user-order-items-table thead {
    background: #f0ebe0;
}

.user-order-items-table thead th {
    padding: 14px 20px;
    text-align: left;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.user-order-items-table tbody tr {
    border-bottom: 1px solid #f5f5f5;
}

.user-order-items-table tbody td {
    padding: 14px 20px;
    color: var(--text-mid);
}

.user-order-items-table tbody td:nth-child(2) {
    text-align: center;
    white-space: nowrap;
}

.user-order-items-table tbody td:nth-child(3),
.user-order-items-table tbody td:nth-child(4) {
    text-align: right;
    white-space: nowrap;
}

.user-order-items-table tfoot {
    background: var(--accent-soft);
}

.user-order-items-table tfoot td {
    padding: 16px 20px;
    font-weight: 700;
    color: var(--bg-dark);
    font-size: 1.05rem;
}

.user-order-items-table tfoot td:first-child {
    text-align: right;
}

.user-order-items-table tfoot td:last-child {
    text-align: right;
    color: var(--accent);
    font-size: 1.15rem;
}

/* Таймлайн */
.user-order-history {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid var(--border-light);
}

.user-order-history h6 {
    margin: 0 0 18px 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-mid);
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-order-history h6 i {
    color: var(--accent);
}

.user-order-history-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-left: 10px;
}

.user-order-history-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    padding-bottom: 20px;
}

.user-order-history-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 20px;
    bottom: 0;
    width: 2px;
    background: var(--border-light);
}

.user-order-history-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ddd;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #ddd;
    flex-shrink: 0;
    margin-top: 2px;
    z-index: 1;
}

.user-order-history-item.active .user-order-history-dot {
    background: var(--accent);
    box-shadow: 0 0 0 2px var(--accent);
}

.user-order-history-info {
    flex: 1;
}

.user-order-history-status {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-dark);
}

.user-order-history-date {
    font-size: 0.78rem;
    color: var(--text-light);
}

/* Пустое состояние */
.user-orders-empty {
    text-align: center;
    padding: 100px 20px;
    color: var(--text-light);
}

.user-orders-empty i {
    font-size: 5rem;
    color: var(--accent);
    opacity: 0.4;
    margin-bottom: 24px;
    display: block;
}

.user-orders-empty p {
    margin: 0 0 24px 0;
    font-size: 1.1rem;
}

/* ===== ВКЛАДКА ПРОФИЛЬ ===== */
.profile-page-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.profile-page-info-card {
    background: #f8f7f4;
    border-radius: 16px;
    padding: 28px;
    border: 2px solid var(--border-light);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.profile-page-info-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.profile-page-info-card h6 {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.profile-page-info-card h6 i {
    color: var(--accent);
}

.profile-page-info-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #f0ebe0;
    font-size: 0.95rem;
}

.profile-page-info-row:last-child {
    border-bottom: none;
}

.profile-page-info-row .label {
    color: var(--text-light);
    font-weight: 500;
}

.profile-page-info-row .value {
    color: var(--text-dark);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
    margin-left: 12px;
}

/* Кнопки внутри карточки профиля — НЕ ЛОЖАТСЯ ДРУГ НА ДРУГА */
.profile-page-info-card .btn-custom,
.profile-page-info-card .btn-outline-custom {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    padding: 12px 20px;
    text-align: center;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
    box-sizing: border-box;
}

.profile-page-info-card .btn-custom:last-child,
.profile-page-info-card .btn-outline-custom:last-child {
    margin-bottom: 0;
}

.profile-page-info-card .btn-outline-custom {
    background: transparent;
    border: 2px solid var(--bg-dark);
    color: var(--bg-dark);
}

.profile-page-info-card .btn-outline-custom:hover {
    background: var(--bg-dark);
    color: white;
    transform: translateY(-2px);
}

.profile-page-logout-btn {
    background: transparent;
    border: 2px solid var(--out-of-stock);
    color: var(--out-of-stock);
}

.profile-page-logout-btn:hover {
    background: var(--out-of-stock);
    color: white;
}

/* ============================================================
   26. РЕКВИЗИТЫ ИП
   ============================================================ */
.legal-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px 28px;
    border: 2px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    margin: 16px 0;
    transition: all 0.3s;
}

.legal-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.legal-card .legal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-soft);
    flex-wrap: wrap;
}

.legal-card .legal-header i {
    font-size: 1.5rem;
    color: var(--accent);
}

.legal-card .legal-header h4 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bg-dark);
}

.legal-card .legal-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
}

.legal-card .legal-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    align-items: baseline;
    gap: 10px;
}

.legal-card .legal-row:last-child {
    border-bottom: none;
}

.legal-card .legal-label {
    font-weight: 600;
    color: var(--text-mid);
    min-width: 180px;
    flex-shrink: 0;
    font-size: 0.82rem;
}

.legal-card .legal-value {
    color: var(--text-dark);
    font-size: 0.85rem;
    word-break: break-word;
    flex: 1;
}

.legal-card .legal-badge {
    display: inline-block;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: auto;
}

.legal-card .legal-badge.active {
    background: #dcfce7;
    color: #16a34a;
}

.legal-card .legal-badge.inactive {
    background: #fee2e2;
    color: #dc2626;
}

.legal-card .legal-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.legal-card .legal-footer small {
    font-size: 0.72rem;
    color: var(--text-light);
}

/* ============================================================
   27. АДАПТИВ ДЛЯ МОБИЛЬНЫХ
   ============================================================ */

@media (max-width: 992px) {
    .profile-page-header {
        padding: 28px 32px;
        gap: 22px;
    }

    .profile-page-avatar {
        width: 90px;
        height: 90px;
        font-size: 2rem;
    }

    .profile-page-user h2 {
        font-size: 1.6rem;
    }

    .user-stats {
        gap: 16px;
    }

    .user-stat-card {
        padding: 18px;
        gap: 16px;
    }

    .user-stat-icon {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
    }

    .user-stat-value {
        font-size: 1.3rem;
    }

    .profile-page-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 6px 0;
    }

    .site-header .d-flex {
        gap: 8px;
        flex-direction: column;
        align-items: center !important;
        justify-content: center !important;
    }

    .logo {
        font-size: 1.3rem;
        letter-spacing: 2px;
        text-align: center;
        padding: 0;
        margin: 0;
    }

    .logo small {
        font-size: 0.4rem;
        letter-spacing: 2px;
        margin-top: 0;
    }

    .nav-links {
        gap: 6px;
        width: 100%;
        justify-content: center !important;
        flex-wrap: wrap;
    }

    .nav-links .nav-btn {
        font-size: 0.6rem;
        padding: 4px 10px;
        gap: 4px;
    }

    .nav-links .nav-btn i {
        font-size: 0.65rem;
    }

    .phone-btn {
        font-size: 0.6rem;
        padding: 5px 12px;
        gap: 4px;
    }

    .floating-cart {
        left: 10px;
        padding: 8px 6px;
        width: 46px;
    }

    .floating-cart i {
        font-size: 1rem;
    }

    .floating-cart-count {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
    }

    .floating-cart-total {
        font-size: 0.5rem;
    }

    .hero {
        padding: 20px 0;
    }

    .hero h1 {
        font-size: 1.4rem;
    }

    .hero .d-flex.gap-3 {
        gap: 12px !important;
    }

    .hero .text-center span.fw-bold {
        font-size: 1.2rem !important;
    }

    .hero-image-wrapper {
        aspect-ratio: 1/1;
        max-width: 100%;
    }

    .product-card-body {
        padding: 10px;
    }

    .product-title {
        font-size: 0.75rem;
    }

    .product-price {
        font-size: 0.85rem;
    }

    .product-actions .btn-custom {
        font-size: 0.6rem;
        padding: 4px 8px;
        min-width: 50px;
    }

    .filter-panel {
        padding: 8px;
        gap: 4px;
    }

    .filter-btn {
        font-size: 0.55rem;
        padding: 3px 8px;
    }

    .search-input {
        font-size: 0.65rem;
        padding: 4px 10px;
    }

    .modal-content-custom {
        padding: 16px;
        margin: 10px;
    }

    .btn-custom {
        font-size: 0.75rem;
        padding: 8px 16px;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .review-card {
        padding: 14px;
    }

    .product-gallery {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
    }

    /* Личный кабинет на мобильных */
    .profile-page {
        padding: 12px 0 24px 0;
    }

    .profile-page-header {
        padding: 24px 20px;
        flex-direction: column;
        text-align: center;
        gap: 18px;
        margin-bottom: 20px;
    }

    .profile-page-avatar {
        width: 85px;
        height: 85px;
        font-size: 1.8rem;
    }

    .profile-page-user h2 {
        font-size: 1.4rem;
    }

    .profile-page-meta {
        justify-content: center;
        flex-direction: column;
        gap: 8px;
    }

    .profile-page-meta span {
        font-size: 0.85rem;
        justify-content: center;
    }

    .profile-page-registered {
        justify-content: center;
        font-size: 0.78rem;
    }

    .profile-page-logout {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }

    .profile-page-tabs {
        padding: 0 16px;
    }

    .profile-page-tab {
        padding: 16px 20px;
        font-size: 0.85rem;
    }

    .profile-page-content {
        padding: 20px;
    }

    .user-stats {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 24px;
    }

    .user-stat-card {
        padding: 16px;
    }

    .user-stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .user-stat-value {
        font-size: 1.2rem;
    }

    .user-stat-label {
        font-size: 0.72rem;
    }

    /* Мобильная таблица заказов */
    .user-orders-table thead {
        display: none;
    }

    .user-orders-table,
    .user-orders-table tbody,
    .user-orders-table tr,
    .user-orders-table td {
        display: block;
        width: 100%;
    }

    .user-order-row {
        padding: 16px;
        border-bottom: 2px solid var(--border-light);
        position: relative;
    }

    .user-orders-table tbody td {
        padding: 6px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
    }

    .user-orders-table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-light);
        font-size: 0.72rem;
        text-transform: uppercase;
        margin-right: 10px;
    }

    .user-order-items {
        max-width: 60%;
        text-align: right;
    }

    .user-order-expand {
        position: absolute;
        top: 16px;
        right: 16px;
        width: auto !important;
    }

    .user-order-expand::before {
        display: none;
    }

    .user-order-details-content {
        padding: 18px 16px;
    }

    .user-order-items-table {
        font-size: 0.78rem;
    }

    .user-order-items-table thead th,
    .user-order-items-table tbody td {
        padding: 10px 12px;
        font-size: 0.72rem;
    }

    .user-order-details-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-page-info-card {
        padding: 20px;
    }

    /* Реквизиты */
    .legal-card {
        padding: 18px;
    }

    .legal-card .legal-row {
        flex-direction: column;
        padding: 8px 0;
        gap: 4px;
    }

    .legal-card .legal-label {
        min-width: auto;
        font-size: 0.75rem;
    }

    .legal-card .legal-value {
        font-size: 0.82rem;
    }

    /* Админка */
    .admin-panel-content {
        width: 100% !important;
        max-width: 100% !important;
        right: -100% !important;
    }

    .admin-panel-content.active {
        right: 0 !important;
    }

    .admin-tabs .tab-btn {
        padding: 4px 10px !important;
        font-size: 0.6rem !important;
    }

    .admin-stock-row,
    .admin-price-row,
    .admin-label-row {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 8px 10px;
    }

    .admin-stock-name,
    .admin-price-name {
        white-space: normal;
        font-size: 0.7rem;
        min-width: auto;
    }

    .admin-stock-controls {
        justify-content: stretch;
    }

    .admin-stock-input {
        flex: 1;
        min-width: 50px;
        width: auto;
    }

    .admin-stock-select {
        flex: 1;
        min-width: 70px;
        width: auto;
    }

    .admin-price-controls {
        justify-content: stretch;
    }

    .admin-price-field {
        flex: 1;
        min-width: 60px;
    }

    .admin-price-input {
        width: 100%;
        min-width: 50px;
    }

    .admin-label-original {
        min-width: auto;
    }

    .admin-label-edit {
        min-width: auto;
    }

    .admin-order-items-table {
        font-size: 0.65rem;
    }

    .admin-order-items-table thead th,
    .admin-order-items-table tbody td {
        padding: 4px 6px;
        font-size: 0.6rem;
    }

    .admin-order-items-table tfoot td {
        font-size: 0.7rem;
        padding: 6px 8px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.2rem;
    }

    .product-title {
        font-size: 0.65rem;
    }

    .product-price {
        font-size: 0.75rem;
    }

    .product-actions .btn-custom {
        font-size: 0.5rem;
        padding: 3px 6px;
        min-width: 40px;
    }

    .floating-cart {
        width: 40px;
        padding: 6px 4px;
        left: 6px;
    }

    .floating-cart i {
        font-size: 0.8rem;
    }

    .floating-cart-count {
        width: 16px;
        height: 16px;
        font-size: 0.5rem;
    }

    .floating-cart-total {
        font-size: 0.4rem;
    }

    .product-gallery {
        grid-template-columns: repeat(3, 1fr);
    }

    .admin-secret-btn {
        width: 30px;
        height: 30px;
        bottom: 12px;
        right: 12px;
    }

    .admin-secret-btn i {
        font-size: 0.5rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo small {
        font-size: 0.35rem;
        letter-spacing: 2px;
    }

    .nav-links .nav-btn {
        font-size: 0.5rem;
        padding: 3px 6px;
    }

    .phone-btn {
        font-size: 0.5rem;
        padding: 4px 8px;
    }

    #authModal .modal-content-custom {
        margin: 10px;
        padding: 16px;
    }

    .auth-tab-btn {
        font-size: 0.7rem;
        padding: 8px;
    }

    /* Личный кабинет */
    .profile-page-avatar {
        width: 75px;
        height: 75px;
        font-size: 1.5rem;
    }

    .profile-page-user h2 {
        font-size: 1.15rem;
    }

    .profile-page-tab {
        padding: 14px 14px;
        font-size: 0.75rem;
        gap: 6px;
    }

    .user-stat-value {
        font-size: 1rem;
    }

    .user-order-number {
        font-size: 0.88rem;
    }

    .user-order-total {
        font-size: 0.88rem;
    }

    .user-status-badge {
        padding: 4px 10px;
        font-size: 0.65rem;
    }

    .profile-page-info-row {
        flex-direction: column;
        gap: 4px;
    }

    .profile-page-info-row .value {
        text-align: left;
        margin-left: 0;
    }
}

@media (max-width: 400px) {
    .admin-stock-input {
        font-size: 0.7rem;
        padding: 4px 6px;
        min-width: 50px;
    }

    .admin-stock-select {
        font-size: 0.65rem;
        padding: 4px 6px;
        min-width: 70px;
    }

    .admin-price-input {
        font-size: 0.7rem;
        padding: 4px 6px;
    }

    .admin-price-label {
        font-size: 0.5rem;
    }

    .admin-price-field {
        min-width: 60px;
    }

    .admin-checkbox-label {
        font-size: 0.6rem;
        padding: 2px 8px;
    }
}
/* ============================================================
   РАСЧЁТ ДОСТАВКИ СДЭК
   ============================================================ */
.delivery-calculator {
    background: #f8f7f4;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 2px solid var(--border-light);
}

.delivery-calculator-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
    font-weight: 700;
    color: var(--bg-dark);
    font-size: 0.9rem;
}

.delivery-calculator-header i {
    color: var(--accent);
    font-size: 1.1rem;
}

.delivery-spinner {
    margin-left: auto;
    color: var(--accent);
}

.delivery-city {
    font-size: 0.8rem;
    color: var(--text-mid);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.delivery-city i {
    color: var(--accent);
}

.delivery-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.delivery-option:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.delivery-option.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 3px rgba(232, 168, 80, 0.15);
}

.delivery-option-radio {
    flex-shrink: 0;
}

.delivery-option-radio input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
    cursor: pointer;
}

.delivery-option-info {
    flex: 1;
    min-width: 0;
}

.delivery-option-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--bg-dark);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.delivery-option-name i {
    color: var(--accent);
}

.delivery-option-period {
    font-size: 0.72rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.delivery-option-price {
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent);
    white-space: nowrap;
    flex-shrink: 0;
}

.delivery-error {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Итоговая сумма заказа */
.order-total-block {
    background: #f8f7f4;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    border: 2px solid var(--border-light);
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text-mid);
}

.order-total-row.final {
    border-top: 2px solid var(--border-light);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 1.1rem;
    color: var(--bg-dark);
}

.order-total-row.final strong {
    color: var(--accent);
    font-size: 1.3rem;
}

/* Мобильная версия */
@media (max-width: 480px) {
    .delivery-option {
        flex-wrap: wrap;
    }
    
    .delivery-option-price {
        width: 100%;
        text-align: right;
        margin-top: 4px;
    }
}
/* ============================================================
   АВТОДОПОЛНЕНИЕ ГОРОДОВ
   ============================================================ */
.city-autocomplete-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.city-autocomplete-wrapper input {
    margin-bottom: 0 !important;
}

.city-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--accent);
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: var(--shadow-md);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.city-suggestions.active {
    display: block;
}

.city-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-light);
}

.city-suggestion-item:last-child {
    border-bottom: none;
}

.city-suggestion-item:hover {
    background: var(--accent-soft);
}

.city-suggestion-item > i {
    color: var(--accent);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.city-suggestion-info {
    flex: 1;
    min-width: 0;
}

.city-suggestion-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--bg-dark);
}

.city-suggestion-region {
    font-size: 0.7rem;
    color: var(--text-light);
}

.city-suggestion-loading,
.city-suggestion-empty {
    padding: 12px 14px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.8rem;
}

.city-suggestion-loading i {
    color: var(--accent);
    margin-right: 6px;
}

/* Стили для правильной иконки в опциях доставки */
.delivery-option-name i.fa-store {
    color: #f59e0b;
}

.delivery-option-name i.fa-archive {
    color: #8b5cf6;
}

.delivery-option-name i.fa-truck {
    color: #3b82f6;
}
/* ============================================================
   АДМИН: ПАНЕЛЬ УПРАВЛЕНИЯ ЗАКАЗАМИ
   ============================================================ */

.admin-orders-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px;
    background: #f8f7f4;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.admin-orders-filters {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    flex: 1;
}

.orders-filter-btn {
    padding: 5px 10px;
    border-radius: 20px;
    border: 2px solid #ddd;
    background: white;
    font-weight: 600;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    color: var(--text-mid);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.orders-filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.orders-filter-btn.active {
    background: var(--bg-dark);
    color: white;
    border-color: var(--bg-dark);
}

.admin-orders-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-danger {
    background: var(--out-of-stock);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.admin-order-item .order-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
}

.order-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.order-select-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

.order-delete-btn {
    background: transparent;
    border: 2px solid #fca5a5;
    color: #dc2626;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    margin-left: auto;
    flex-shrink: 0;
}

.order-delete-btn:hover {
    background: var(--out-of-stock);
    border-color: var(--out-of-stock);
    color: white;
    transform: scale(1.1);
}

.admin-order-item:has(.order-select-checkbox:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
}

@media (max-width: 768px) {
    .admin-orders-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-orders-filters {
        justify-content: center;
    }
    
    .orders-filter-btn {
        font-size: 0.6rem;
        padding: 4px 8px;
    }
    
    .admin-orders-actions {
        justify-content: stretch;
    }
    
    .admin-orders-actions .btn-custom {
        flex: 1;
        justify-content: center;
    }
    
    .order-delete-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
}
#deliveryForm .row {
    margin-bottom: 10px;
}

#deliveryForm label {
    font-size: 0.8rem;
    margin-bottom: 4px;
}

#deliveryForm input {
    margin-bottom: 0;
}
/* ============================================================
   ГЛАЗИК ДЛЯ ПАРОЛЯ
   ============================================================ */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding-right: 45px !important;
    margin-bottom: 10px !important;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 0.95rem;
    padding: 4px 6px;
    transition: color 0.2s;
    z-index: 2;
    margin-top: -5px;
}

.password-toggle:hover {
    color: var(--accent);
}

.password-toggle.active {
    color: var(--accent);
}