/* ============================================================
   БАЗОВЫЕ СТИЛИ
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0c10;
    --bg-secondary: #0f131c;
    --bg-card: rgba(18, 22, 32, 0.85);
    --bg-nav: rgba(10, 12, 16, 0.85);
    --text-primary: #eef2ff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border-color: rgba(230, 57, 70, 0.3);
    --accent: #e63946;
    --accent-hover: #c1121f;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    --radius: 1.5rem;
    --transition: all 0.3s ease;
}

/* Светлая тема */
[data-theme="light"] {
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.9);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8888aa;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 12px;
}

/* ============================================================
   НАВИГАЦИЯ
   ============================================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(16px);
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 2rem;
    transition: var(--transition);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8rem;
}

/* ============================================================
   ЛОГОТИП
   ============================================================ */

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
    transition: var(--transition);
}

.logo-img:hover {
    transform: scale(1.05);
}

.logo span {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
    display: block;
}

/* ============================================================
   АДАПТИВНОСТЬ ЛОГОТИПА
   ============================================================ */

@media (max-width: 860px) {
    .logo-img {
        height: 40px;
        max-width: 150px;
    }
}

@media (max-width: 540px) {
    .logo-img {
        height: 34px;
        max-width: 130px;
    }
    
    .logo span {
        font-size: 0.6rem;
    }
}

/* ----- ЦЕНТРАЛЬНОЕ МЕНЮ ----- */
.nav-links {
    display: flex;
    gap: 1.2rem;
    list-style: none;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a i {
    font-size: 0.9rem;
    color: var(--accent);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-links a.active {
    border-bottom: 2px solid var(--accent);
    padding-bottom: 4px;
}

/* ----- ПРАВАЯ ЧАСТЬ (вход + тема) ----- */
.nav-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-left: auto;
    flex-shrink: 0;
}

/* Кнопки входа и регистрации */
.auth-buttons {
    display: flex;
    gap: 0.6rem;
}

.btn-login,
.btn-register {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-login {
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    background: transparent;
}

.btn-login:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-register {
    background: var(--accent);
    color: white;
    border: 1px solid var(--accent);
}

.btn-register:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: scale(1.03);
}

/* Профиль пользователя */
.user-menu {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.user-profile:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.user-profile i {
    font-size: 1.3rem;
    color: var(--accent);
}

.logout-btn {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.4rem 0.6rem;
    border-radius: 50%;
    transition: var(--transition);
}

.logout-btn:hover {
    color: var(--accent);
    background: rgba(230, 57, 70, 0.1);
}

/* Переключатель темы */
.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */
@media (max-width: 860px) {
    .nav-container {
        flex-direction: column;
        text-align: center;
    }

    .nav-right {
        margin-left: 0;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-links {
        justify-content: center;
        gap: 0.8rem;
    }

    .auth-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .btn-login,
    .btn-register {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 540px) {
    .navbar {
        padding: 0.6rem 0.8rem;
    }

    .nav-links {
        gap: 0.5rem;
        font-size: 0.8rem;
    }
    .nav-links a {
        font-size: 0.75rem;
    }

    .btn-login,
    .btn-register {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }

    .user-profile {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .theme-toggle {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .nav-right {
        gap: 0.4rem;
    }
}
/* ============================================================
   ГЛАВНАЯ СТРАНИЦА
   ============================================================ */
.hero {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.hero-slider {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    position: relative;
    height: 450px;
}

.hero-slide {
    display: none;
    height: 100%;
    padding: 3rem 4rem;
    background: linear-gradient(135deg, var(--bg-secondary), var(--accent));
    align-items: center;
    justify-content: space-between;
}

.hero-slide.active {
    display: flex;
}

.hero-slide-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-slide-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 1.5rem;
}

.hero-btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

.hero-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.hero-slide-image {
    font-size: 8rem;
    opacity: 0.3;
}

.hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.hero-dot.active {
    background: var(--accent);
    width: 30px;
    border-radius: 20px;
}

/* ============================================================
   СЕКЦИЯ ТОВАРОВ
   ============================================================ */
.section {
    max-width: 1400px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
}

.section-header h2:after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--accent);
    border-radius: 4px;
    margin-top: 4px;
}

.section-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.section-link:hover {
    color: var(--accent-hover);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(230, 57, 70, 0.1);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 5;
}

.product-badge.new {
    background: var(--accent);
    color: white;
}

.product-badge.popular {
    background: #f59e0b;
    color: white;
}

.product-image {
    height: 200px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--text-muted);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 1.2rem;
}

.product-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.product-info .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
}

.product-info .old-price {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 8px;
}

.product-info .rating {
    color: #f59e0b;
    font-size: 0.8rem;
    margin-top: 4px;
}

.product-actions {
    padding: 0 1.2rem 1.2rem;
    display: flex;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    flex: 1;
    justify-content: center;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================================
   КНОПКА НАВЕРХ
   ============================================================ */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4);
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    transform: translateY(-5px) scale(1.05);
    background: var(--accent-hover);
}

/* ============================================================
   ФУТЕР
   ============================================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.footer-col p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 4px 0;
}

.footer-col p i {
    color: var(--accent);
    width: 20px;
}

.footer-social {
    display: flex;
    gap: 0.8rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
    font-size: 1.2rem;
}

.footer-social a:hover {
    background: var(--accent);
    color: white;
}

.footer-bottom {
    max-width: 1400px;
    margin: 1.5rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */
@media (max-width: 860px) {
    .nav-container {
        flex-direction: column;
        text-align: center;
    }
    .nav-links {
        justify-content: center;
        gap: 0.8rem;
    }
    .hero-slide {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }
    .hero-slide-content h1 {
        font-size: 2rem;
    }
    .hero-slider {
        height: auto;
        min-height: 300px;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 540px) {
    .navbar {
        padding: 0.6rem 0.8rem;
    }
    .nav-links {
        gap: 0.5rem;
        font-size: 0.8rem;
    }
    .nav-links a {
        font-size: 0.75rem;
    }
    .hero-slide-content h1 {
        font-size: 1.5rem;
    }
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }
    .section-header h2 {
        font-size: 1.2rem;
    }
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-social {
        justify-content: center;
    }
}
/* ============================================================
   АВТОРИЗАЦИЯ / РЕГИСТРАЦИЯ
   ============================================================ */
.auth-container {
    max-width: 500px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

.auth-box {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.auth-box h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.auth-box h2:after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--accent);
    margin: 0.5rem auto 0;
    border-radius: 4px;
}

.auth-error {
    background: rgba(230, 57, 70, 0.15);
    color: var(--accent);
    padding: 0.8rem 1rem;
    border-radius: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(230, 57, 70, 0.3);
    text-align: center;
}

.auth-success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    padding: 0.8rem 1rem;
    border-radius: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(34, 197, 94, 0.3);
    text-align: center;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.8rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

.auth-box .btn-primary {
    width: 100%;
    padding: 0.9rem;
    font-size: 1rem;
}

.auth-box a {
    color: var(--accent);
    text-decoration: none;
}

.auth-box a:hover {
    text-decoration: underline;
}
/* ============================================================
   О НАС
   ============================================================ */
.about-section {
    max-width: 1400px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.about-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.about-text h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.about-text h2:after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 4px;
    margin-top: 4px;
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.about-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.about-features div {
    background: var(--bg-primary);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-color);
}

.about-features i {
    color: var(--accent);
}

.about-quote {
    background: var(--bg-primary);
    border-radius: 1rem;
    padding: 1.8rem;
    border-left: 4px solid var(--accent);
}

.about-quote i {
    font-size: 1.8rem;
    color: var(--accent);
    opacity: 0.5;
    display: block;
    margin-bottom: 0.5rem;
}

.about-quote p {
    font-style: italic;
    font-size: 1.05rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.about-quote span {
    display: block;
    margin-top: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
}

@media (max-width: 860px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 540px) {
    .about-container {
        padding: 1.2rem;
    }
    .about-features {
        gap: 0.5rem;
    }
    .about-features div {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }
}

/* ============================================================
   КОНТАКТЫ С КАРТОЙ
   ============================================================ */
.contacts-section {
    max-width: 1400px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.contacts-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.contacts-header {
    text-align: center;
    margin-bottom: 2rem;
}

.contacts-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
}

.contacts-header h2:after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 4px;
    margin: 0.5rem auto 0;
}

.contacts-header p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

/* Левая колонка — информация */
.contacts-info {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    background: var(--bg-primary);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.contact-item i {
    font-size: 1.3rem;
    color: var(--accent);
    margin-top: 2px;
    width: 24px;
}

.contact-item h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
}

.contact-item p {
    font-size: 0.95rem;
    font-weight: 500;
    margin: 2px 0 0;
}

.contact-item p a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item p a:hover {
    color: var(--accent);
}

/* ============================================================
   СОЦСЕТИ — ЛОГОТИПЫ-КАРТИНКИ
   ============================================================ */

.contacts-social-icons,
.footer-social {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}

.contacts-social-icons a,
.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.contacts-social-icons a img,
.footer-social a img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

.contacts-social-icons a:hover,
.footer-social a:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--accent);
}

/* Для футера — чуть меньше */
.footer-social a {
    width: 40px;
    height: 40px;
}

.footer-social a img {
    width: 24px;
    height: 24px;
}

/* Адаптивность */
@media (max-width: 540px) {
    .contacts-social-icons a,
    .footer-social a {
        width: 38px;
        height: 38px;
    }
    
    .contacts-social-icons a img,
    .footer-social a img {
        width: 22px;
        height: 22px;
    }
}

/* Кнопка маршрута */
.btn-route {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-route:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

/* Правая колонка — карта */
.contacts-map {
    min-height: 400px;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.contacts-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 400px;
}

/* ============================================================
   АДАПТИВНОСТЬ КОНТАКТОВ
   ============================================================ */
@media (max-width: 860px) {
    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contacts-map {
        min-height: 300px;
        order: -1;
    }

    .contacts-map iframe {
        min-height: 300px;
    }
}

@media (max-width: 540px) {
    .contacts-container {
        padding: 1.2rem;
    }

    .contacts-grid {
        gap: 1rem;
    }

    .contacts-map {
        min-height: 250px;
    }

    .contacts-map iframe {
        min-height: 250px;
    }

    .contact-item {
        padding: 0.6rem 0.8rem;
        gap: 0.6rem;
    }

    .contact-item i {
        font-size: 1rem;
    }

    .contact-item h4 {
        font-size: 0.75rem;
    }

    .contact-item p {
        font-size: 0.85rem;
    }
}
/* Отступ для якорей, чтобы навигация не перекрывала контент */
:target {
    scroll-margin-top: 80px;
}
/* ============================================================
   МОБИЛЬНОЕ МЕНЮ (ГАМБУРГЕР)
   ============================================================ */

   
/* Кнопка гамбургер */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 6px;
    z-index: 1001;
    border-radius: 8px;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.menu-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 28px;
}

.menu-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--text-primary);
    border-radius: 4px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Анимация гамбургера в крестик */
.menu-toggle.active .menu-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.active .menu-icon span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle.active .menu-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* ============================================================
   АДАПТИВНОСТЬ НАВИГАЦИИ
   ============================================================ */

@media (max-width: 860px) {
    .menu-toggle {
        display: flex;
    }

    .desktop-only {
        display: none !important;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 80px 1.5rem 1.5rem;
        gap: 0.5rem;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid var(--border-color);
        overflow-y: auto;
        z-index: 999;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
        align-items: stretch;
        list-style: none;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        padding: 0.8rem 1rem;
        font-size: 1rem;
        border-radius: 0.8rem;
        transition: var(--transition);
        width: 100%;
        justify-content: flex-start;
        gap: 12px;
        border: 1px solid transparent;
    }

    .nav-links a:hover,
    .nav-links a.active {
        background: rgba(230, 57, 70, 0.1);
        border-color: var(--border-color);
        transform: none;
    }

    .nav-links a i {
        width: 24px;
        text-align: center;
        font-size: 1.1rem;
        color: var(--accent);
    }

    /* Мобильные кнопки входа/регистрации */
    .mobile-auth {
        display: flex !important;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 0.5rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }

    .mobile-auth a {
        padding: 0.8rem 1rem;
        border-radius: 0.8rem;
        font-weight: 600;
        text-align: center;
        transition: var(--transition);
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        border: 1px solid var(--border-color);
    }

    .mobile-auth .mobile-login {
        color: var(--text-primary);
        background: transparent;
    }

    .mobile-auth .mobile-login:hover {
        border-color: var(--accent);
        color: var(--accent);
    }

    .mobile-auth .mobile-register {
        background: var(--accent);
        color: white;
        border-color: var(--accent);
    }

    .mobile-auth .mobile-register:hover {
        background: var(--accent-hover);
        border-color: var(--accent-hover);
    }

    .mobile-auth .mobile-profile {
        color: var(--text-primary);
        background: rgba(230, 57, 70, 0.05);
        border-color: var(--border-color);
    }

    .mobile-auth .mobile-profile:hover {
        border-color: var(--accent);
        color: var(--accent);
    }

    .mobile-auth .mobile-logout {
        color: var(--accent);
        background: rgba(230, 57, 70, 0.05);
        border-color: rgba(230, 57, 70, 0.2);
    }

    .mobile-auth .mobile-logout:hover {
        background: rgba(230, 57, 70, 0.15);
        border-color: var(--accent);
    }

    /* Оверлей (затемнение фона) */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Запрещаем скролл при открытом меню */
    body.menu-open {
        overflow: hidden;
    }

    /* Скрываем кнопки входа из правой части на мобильных */
    .nav-right .auth-buttons,
    .nav-right .user-menu {
        display: none !important;
    }

    .nav-right {
        gap: 0.4rem;
    }

    .logo h2 {
        font-size: 1.2rem;
    }

    .logo span {
        font-size: 0.6rem;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

@media (max-width: 540px) {
    .nav-links {
        width: 85%;
        max-width: 280px;
        padding: 70px 1rem 1rem;
    }

    .nav-links a {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
        gap: 10px;
    }

    .mobile-auth a {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
}

/* Скрываем мобильные кнопки на десктопе */
.mobile-auth {
    display: none !important;
}

/* Показываем мобильные кнопки только когда меню открыто */
@media (max-width: 860px) {
    .mobile-auth {
        display: none !important;
    }
    .nav-links.open .mobile-auth {
        display: flex !important;
    }
}
/* Подсказки под полями */
.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Ошибка валидации на клиенте (JS) */
.input-error {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15) !important;
}

.input-success {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15) !important;
}
/* ============================================================
   УСПЕШНАЯ РЕГИСТРАЦИЯ — ИСПРАВЛЕННАЯ
   ============================================================ */

.auth-success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    padding: 1rem 1.2rem;
    border-radius: 0.8rem;
    margin-bottom: 1.2rem;
    border: 2px solid rgba(34, 197, 94, 0.3);
    text-align: center;
    font-weight: 600;
    font-size: 1.05rem;
}

.auth-success-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.btn-success-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.9rem 2.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    background: var(--accent) !important;
    color: #ffffff !important;
    border-radius: 50px;
    border: none;
    transition: var(--transition);
    cursor: pointer;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.btn-success-action:hover {
    background: var(--accent-hover) !important;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.4);
    color: #ffffff !important;
}

.btn-success-action i {
    font-size: 1.1rem;
}

/* Светлая тема */
[data-theme="light"] .btn-success-action {
    background: var(--accent) !important;
    color: #ffffff !important;
}

[data-theme="light"] .btn-success-action:hover {
    background: var(--accent-hover) !important;
    color: #ffffff !important;
}
/* ============================================================
   КАТАЛОГ
   ============================================================ */
.catalog-section {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.catalog-header {
    margin-bottom: 2rem;
}

.catalog-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.catalog-header h1:after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 4px;
    margin-top: 4px;
}

.catalog-header p {
    color: var(--text-secondary);
    margin-top: 0.3rem;
}

/* ----- ФИЛЬТРЫ ----- */
.catalog-filters {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 140px;
}

.filter-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-group input,
.filter-group select {
    padding: 0.7rem 1rem;
    border-radius: 0.8rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    width: 100%;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.filter-actions {
    flex-direction: row;
    gap: 0.6rem;
    align-items: center;
    flex: 0 1 auto;
    min-width: auto;
}

.filter-actions .btn-primary,
.filter-actions .btn-outline {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-actions .btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.filter-actions .btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ----- ПУСТОЙ КАТАЛОГ ----- */
.catalog-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.catalog-empty i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.catalog-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.catalog-empty p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ============================================================
   АДАПТИВНОСТЬ КАТАЛОГА
   ============================================================ */
@media (max-width: 860px) {
    .catalog-filters {
        padding: 1rem 1.2rem;
    }

    .filters-form {
        flex-direction: column;
        gap: 0.8rem;
    }

    .filter-group {
        min-width: 100%;
    }

    .filter-actions {
        flex-direction: row;
        justify-content: stretch;
        gap: 0.6rem;
    }

    .filter-actions .btn-primary,
    .filter-actions .btn-outline {
        flex: 1;
        text-align: center;
        justify-content: center;
    }

    .catalog-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 540px) {
    .catalog-section {
        padding: 0 0.8rem;
    }

    .catalog-filters {
        padding: 0.8rem;
    }

    .filter-group input,
    .filter-group select {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }

    .filter-actions .btn-primary,
    .filter-actions .btn-outline {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .catalog-empty {
        padding: 2rem 1rem;
    }
}
/* ============================================================
   ЛИЧНАЯ КАРТОЧКА ТОВАРА
   ============================================================ */
.product-page {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.product-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

/* ----- ХЛЕБНЫЕ КРОШКИ ----- */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: var(--accent);
}

.breadcrumbs .current {
    color: var(--text-primary);
    font-weight: 600;
}

/* ----- ОСНОВНАЯ ИНФОРМАЦИЯ ----- */
.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

/* ЛЕВАЯ КОЛОНКА — ФОТО */
.product-image-large {
    position: relative;
    background: var(--bg-primary);
    border-radius: 1rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.product-image-placeholder {
    font-size: 8rem;
    color: var(--text-muted);
    opacity: 0.3;
}

.product-image-large .product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 5;
}

.product-image-large .product-badge.new {
    background: var(--accent);
    color: white;
}

.product-image-large .product-badge.popular {
    background: #f59e0b;
    color: white;
}

/* ПРАВАЯ КОЛОНКА — ДЕТАЛИ */
.product-details {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.product-details h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.product-category i {
    color: var(--accent);
}

.product-rating {
    color: #f59e0b;
}

.rating-count {
    color: var(--text-muted);
    margin-left: 4px;
}

/* ЦЕНА */
.product-price-block {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.product-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
}

.product-old-price {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-discount {
    background: var(--accent);
    color: white;
    padding: 2px 12px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* НАЛИЧИЕ */
.product-availability {
    font-size: 0.95rem;
}

.in-stock {
    color: #22c55e;
}

.in-stock i {
    color: #22c55e;
}

.out-of-stock {
    color: var(--accent);
}

.out-of-stock i {
    color: var(--accent);
}

/* ОПИСАНИЕ */
.product-description h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.product-description p {
    color: var(--text-secondary);
    line-height: 1.3;
    font-size: 0.9em;
}

/* ДЕЙСТВИЯ С ТОВАРОМ */
.product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.quantity-selector {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quantity-selector label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ----- ВЫБОР КОЛИЧЕСТВА ----- */
.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 0.8rem;
    overflow: hidden;
}

.qty-btn {
    background: var(--bg-primary);
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 44px;
    cursor: pointer;
    font-size: 1.3rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--accent);
    color: white;
}

.quantity-control input {
    width: 60px;
    height: 44px;
    text-align: center;
    border: none;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    appearance: textfield;
    -moz-appearance: textfield;
}

.quantity-control input::-webkit-outer-spin-button,
.quantity-control input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-add-cart {
    padding: 0.9rem 2.5rem;
    font-size: 1.05rem;
}

.btn-add-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ПОДЕЛИТЬСЯ */
.product-share {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.product-share span {
    color: var(--text-secondary);
}

.product-share a {
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 1.3rem;
}

.product-share a:hover {
    color: var(--accent);
    transform: scale(1.1);
}

/* ----- ПОХОЖИЕ ТОВАРЫ ----- */
.related-products {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.related-products h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.related-products .products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.related-products .product-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* ============================================================
   АДАПТИВНОСТЬ КАРТОЧКИ ТОВАРА
   ============================================================ */
@media (max-width: 860px) {
    .product-main {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-image-large {
        min-height: 250px;
    }

    .product-image-placeholder {
        font-size: 5rem;
    }

    .product-details h1 {
        font-size: 1.5rem;
    }

    .product-price {
        font-size: 1.8rem;
    }

    .related-products .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px) {
    .product-container {
        padding: 1rem;
    }

    .product-image-large {
        min-height: 180px;
    }

    .product-image-placeholder {
        font-size: 4rem;
    }

    .product-details h1 {
        font-size: 1.2rem;
    }

    .product-price {
        font-size: 1.4rem;
    }

    .product-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .quantity-control {
        justify-content: center;
    }

    .btn-add-cart {
        width: 100%;
        justify-content: center;
    }

    .related-products .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }
}
.product-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.product-link:hover {
    color: var(--accent);
}
/* ============================================================
   КЛИКАБЕЛЬНАЯ КАРТОЧКА
   ============================================================ */

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(230, 57, 70, 0.1);
}

/* Убираем подчёркивание у ссылок внутри карточки */
.product-card a {
    text-decoration: none;
    color: inherit;
}

/* Кнопка "В корзину" должна быть кликабельной отдельно */
.product-actions .btn-primary {
    position: relative;
    z-index: 2;
    cursor: pointer;
}
/* ============================================================
   КОРЗИНА
   ============================================================ */
.cart-section {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.cart-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.cart-container h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.cart-container h1:after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 4px;
    margin-top: 4px;
}

/* ----- СЕТКА КОРЗИНЫ ----- */
.cart-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* ============================================================
   ТОВАРЫ В КОРЗИНЕ
   ============================================================ */

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 60px 1fr auto auto auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: var(--bg-primary);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.cart-item:hover {
    border-color: var(--accent);
}

/* ФОТО ТОВАРА В КОРЗИНЕ */
.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 0.8rem;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-image i {
    font-size: 1.8rem;
    color: var(--text-muted);
    opacity: 0.3;
}

/* ИНФОРМАЦИЯ О ТОВАРЕ */
.cart-item-info {
    flex: 1;
    min-width: 120px;
}

.cart-item-name {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.95rem;
    display: block;
}

.cart-item-name:hover {
    color: var(--accent);
}

.cart-item-price {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* БЛОК КОЛИЧЕСТВА */
.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    border: 1px solid var(--border-color);
    border-radius: 0.6rem;
    padding: 0.1rem 0.2rem;
    background: var(--bg-primary);
}

.cart-item-quantity .qty-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.3rem;
    flex-shrink: 0;
}

.cart-item-quantity .qty-btn:hover {
    background: var(--accent);
    color: white;
}

.cart-qty-input {
    width: 36px;
    height: 30px;
    text-align: center;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    appearance: textfield;
    -moz-appearance: textfield;
    flex-shrink: 0;
}

.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ============================================================
   АДАПТИВНОСТЬ КОРЗИНЫ
   ============================================================ */

@media (max-width: 860px) {
    .cart-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cart-item {
        grid-template-columns: 50px 1fr;
        grid-template-rows: auto auto auto auto;
        gap: 0.5rem 0.6rem;
    }

    .cart-item-image {
        grid-row: span 4;
        width: 50px;
        height: 50px;
    }

    .cart-item-info {
        grid-column: 2;
        grid-row: 1;
    }

    .cart-item-quantity {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
        padding: 0.1rem 0.15rem;
    }

    .cart-item-quantity .qty-btn {
        width: 26px;
        height: 26px;
        font-size: 0.85rem;
    }

    .cart-qty-input {
        width: 32px;
        height: 26px;
        font-size: 0.8rem;
    }

    .cart-item-total {
        grid-column: 2;
        grid-row: 3;
        text-align: left;
        min-width: auto;
    }

    .cart-item-remove {
        grid-column: 2;
        grid-row: 4;
        justify-self: start;
        width: auto;
        height: auto;
        padding: 0.2rem 0.8rem;
        background: rgba(230, 57, 70, 0.05);
        border-radius: 0.4rem;
        color: var(--accent);
        font-size: 0.8rem;
        gap: 0.3rem;
    }

    .cart-item-remove i {
        font-size: 0.8rem;
    }
}

@media (max-width: 540px) {
    .cart-container {
        padding: 1rem;
    }

    .cart-container h1 {
        font-size: 1.3rem;
    }

    .cart-item {
        padding: 0.6rem;
        gap: 0.3rem 0.4rem;
        grid-template-columns: 40px 1fr;
    }

    .cart-item-image {
        width: 40px;
        height: 40px;
        grid-row: span 4;
    }

    .cart-item-name {
        font-size: 0.8rem;
    }

    .cart-item-price {
        font-size: 0.7rem;
    }

    .cart-item-quantity {
        padding: 0.05rem 0.1rem;
        gap: 0.1rem;
    }

    .cart-item-quantity .qty-btn {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }

    .cart-qty-input {
        width: 26px;
        height: 22px;
        font-size: 0.7rem;
    }

    .cart-item-total {
        font-size: 0.8rem;
        min-width: auto;
    }

    .cart-summary .cart-total-price {
        font-size: 1.1rem;
    }

    .cart-item-remove {
        font-size: 0.7rem;
        padding: 0.15rem 0.6rem;
    }

    .cart-item-remove i {
        font-size: 0.7rem;
    }
}

@media (max-width: 400px) {
    .cart-item {
        grid-template-columns: 32px 1fr;
        gap: 0.2rem 0.3rem;
        padding: 0.4rem;
    }

    .cart-item-image {
        width: 32px;
        height: 32px;
        grid-row: span 4;
    }

    .cart-item-name {
        font-size: 0.7rem;
    }

    .cart-item-price {
        font-size: 0.65rem;
    }

    .cart-item-quantity .qty-btn {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
    }

    .cart-qty-input {
        width: 20px;
        height: 18px;
        font-size: 0.6rem;
    }

    .cart-item-total {
        font-size: 0.7rem;
    }

    .cart-item-remove {
        font-size: 0.6rem;
        padding: 0.1rem 0.4rem;
    }

    .cart-item-remove i {
        font-size: 0.6rem;
    }
}

/* КНОПКА УДАЛЕНИЯ */
.cart-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: 0.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-remove:hover {
    color: var(--accent);
    background: rgba(230, 57, 70, 0.1);
}

/* ============================================================
   АДАПТИВНОСТЬ КОРЗИНЫ
   ============================================================ */

@media (max-width: 860px) {
    .cart-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cart-item {
        grid-template-columns: 50px 1fr;
        grid-template-rows: auto auto auto auto;
        gap: 0.6rem 0.8rem;
    }

    .cart-item-image {
        grid-row: span 4;
        width: 50px;
        height: 50px;
    }

    .cart-item-info {
        grid-column: 2;
        grid-row: 1;
    }

    .cart-item-quantity {
        grid-column: 2;
        grid-row: 2;
        flex-wrap: wrap;
    }

    .cart-item-total {
        grid-column: 2;
        grid-row: 3;
        text-align: left;
        min-width: auto;
    }

    .cart-item-remove {
        grid-column: 2;
        grid-row: 4;
        justify-self: start;
        width: auto;
        height: auto;
        padding: 0.3rem 1rem;
        background: rgba(230, 57, 70, 0.05);
        border-radius: 0.5rem;
        color: var(--accent);
        font-size: 0.85rem;
        gap: 0.3rem;
    }

    .cart-item-remove i {
        font-size: 0.85rem;
    }

}

@media (max-width: 540px) {
    .cart-container {
        padding: 1rem;
    }

    .cart-container h1 {
        font-size: 1.5rem;
    }

    .cart-item {
        padding: 0.8rem;
        gap: 0.4rem 0.6rem;
    }

    .cart-item-image {
        width: 40px;
        height: 40px;
        grid-row: span 4;
    }

    .cart-item-name {
        font-size: 0.9rem;
    }

    .cart-item-quantity .qty-btn {
        width: 28px;
        height: 30px;
        font-size: 0.9rem;
    }

    .cart-qty-input {
        width: 34px;
        height: 30px;
        font-size: 0.85rem;
    }

    .cart-item-total {
        font-size: 0.95rem;
        min-width: auto;
    }

    .cart-summary .cart-total-price {
        font-size: 1.2rem;
    }
}
/* ============================================================
   КОРЗИНА В НАВИГАЦИИ
   ============================================================ */

/* Ссылка на корзину */
.cart-link {
    position: relative;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.4rem;
    padding: 6px 10px;
    border-radius: 0.8rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.cart-link:hover {
    color: var(--accent);
    background: rgba(230, 57, 70, 0.05);
}

/* Бейдж с количеством */
.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-nav);
    transition: var(--transition);
}

[data-theme="light"] .cart-badge {
    border-color: var(--bg-nav);
}

/* Для мобильного меню */
.cart-badge-mobile {
    background: var(--accent);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    margin-left: 4px;
}

/* Адаптивность */
@media (max-width: 860px) {
    .cart-link {
        font-size: 1.2rem;
        padding: 4px 8px;
    }
    
    .cart-badge {
        font-size: 0.55rem;
        min-width: 16px;
        height: 16px;
        top: -2px;
        right: -2px;
    }
}

@media (max-width: 540px) {
    .cart-link {
        font-size: 1rem;
        padding: 2px 6px;
    }
    
    .cart-badge {
        font-size: 0.5rem;
        min-width: 14px;
        height: 14px;
        top: -2px;
        right: -2px;
    }
}
/* ============================================================
   ГЕРОЙ-КАРУСЕЛЬ (плавная смена)
   ============================================================ */

.hero-carousel {
    max-width: 1400px;
    margin: 2rem auto 1rem;
    padding: 0 1.5rem;
}

.hero-carousel-container {
    position: relative;
    height: 550px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--bg-secondary);
}

.hero-carousel-slide {
    display: none;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.hero-carousel-slide.active {
    display: block;
    opacity: 1;
}

.hero-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ----- СТРЕЛКИ ----- */
.hero-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-carousel-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-50%) scale(1.05);
}

.hero-carousel-btn.prev {
    left: 20px;
}

.hero-carousel-btn.next {
    right: 20px;
}

/* ----- ТОЧКИ ----- */
.hero-carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.hero-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.hero-carousel-dot.active {
    background: var(--accent);
    width: 30px;
    border-radius: 20px;
}

.hero-carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */

@media (max-width: 860px) {
    .hero-carousel-container {
        height: 380px;
    }
    .hero-carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    .hero-carousel-btn.prev {
        left: 12px;
    }
    .hero-carousel-btn.next {
        right: 12px;
    }
}

@media (max-width: 540px) {
    .hero-carousel-container {
        height: 250px;
        border-radius: 1rem;
    }
    .hero-carousel-btn {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }
    .hero-carousel-btn.prev {
        left: 8px;
    }
    .hero-carousel-btn.next {
        right: 8px;
    }
    .hero-carousel-dot {
        width: 10px;
        height: 10px;
    }
    .hero-carousel-dot.active {
        width: 24px;
    }
}
/* ============================================================
   КНОПКА ПОД HERO-КАРУСЕЛЬЮ
   ============================================================ */

.hero-after {
    max-width: 1400px;
    margin: 0 auto 2rem;
    padding: 0 1.5rem;
    text-align: center;
}

.hero-after-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--accent);
    color: white;
    padding: 1rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.15rem;
    transition: var(--transition);
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.3);
    border: 2px solid transparent;
}

.hero-after-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(230, 57, 70, 0.4);
    color: white;
}

.hero-after-btn i {
    font-size: 1.3rem;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */

@media (max-width: 540px) {
    .hero-after-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
        width: 100%;
    }
}
/* ============================================================
   ЛИЧНЫЙ КАБИНЕТ — КРАСИВЫЙ СТИЛЬ
   ============================================================ */

.profile-section {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.profile-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

/* ===== ШАПКА ПРОФИЛЯ ===== */
.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    border-radius: 1.2rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    position: relative;
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.3);
    flex-shrink: 0;
}

.profile-head-info h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-primary);
}

.profile-email {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 4px 0 8px;
}

.profile-email i {
    color: var(--accent);
    margin-right: 6px;
}

.profile-badges {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-role {
    background: rgba(230, 57, 70, 0.1);
    color: var(--accent);
}

.badge-admin {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.badge-user {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.badge-date {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.badge-date i {
    color: var(--accent);
    margin-right: 4px;
}

/* ===== СТАТИСТИКА ===== */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--bg-primary);
    border-radius: 1rem;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(230, 57, 70, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--accent);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== ИСТОРИЯ ЗАКАЗОВ ===== */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

.section-title h2 i {
    color: var(--accent);
    margin-right: 8px;
}

.section-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== КАРТОЧКА ЗАКАЗА ===== */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-card {
    background: var(--bg-primary);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.order-card:hover {
    border-color: rgba(230, 57, 70, 0.3);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.order-left {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.order-number {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--accent);
}

.order-date,
.order-time {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.order-date i,
.order-time i {
    margin-right: 4px;
}

.order-right {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.order-status {
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.order-status.status-new { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.order-status.status-processing { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.order-status.status-shipped { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.order-status.status-completed { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.order-status.status-cancelled { background: rgba(230, 57, 70, 0.15); color: var(--accent); }

.order-total {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--accent);
}

/* ===== ТЕЛО ЗАКАЗА ===== */
.order-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.order-info {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.order-info-item {
    display: flex;
    flex-direction: column;
}

.order-info-item .label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-info-item .label i {
    color: var(--accent);
    margin-right: 4px;
}

.order-info-item .value {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.btn-details {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
    font-family: inherit;
}

.btn-details:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== ТОВАРЫ В ЗАКАЗЕ ===== */
.order-items-wrapper {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.4s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.order-items-wrapper.open {
    max-height: 800px;
    opacity: 1;
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.order-items-loading,
.order-error {
    text-align: center;
    color: var(--text-secondary);
    padding: 1rem;
}

/* ===== ТОВАР В ЗАКАЗЕ ===== */
.order-items {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1rem;
    background: var(--bg-secondary);
    border-radius: 0.8rem;
}

.order-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(230, 57, 70, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1rem;
}

.order-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.order-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.order-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.order-item-total {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--accent);
}

/* ===== ПУСТАЯ ИСТОРИЯ ===== */
.orders-empty {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.orders-empty h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.orders-empty p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */

@media (max-width: 740px) {
    .profile-container {
        padding: 1.2rem;
    }
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    .profile-stats {
        grid-template-columns: 1fr 1fr;
    }
    .order-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .order-right {
        width: 100%;
        justify-content: space-between;
    }
    .order-body {
        flex-direction: column;
        align-items: flex-start;
    }
    .order-info {
        flex-direction: column;
        gap: 0.4rem;
        width: 100%;
    }
    .btn-details {
        width: 100%;
        justify-content: center;
        padding: 0.6rem;
    }
    .order-items-wrapper.open {
        padding: 0.8rem;
    }
    .order-item {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .profile-stats {
        grid-template-columns: 1fr;
    }
    .profile-avatar {
        align-self: center;
    }
    .avatar-circle {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    .profile-head-info h1 {
        font-size: 1.4rem;
    }
    .order-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    .order-right {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .order-total {
        font-size: 1rem;
    }
}
/* ============================================================
   ТАБЛИЦА ТОВАРОВ В ЗАКАЗЕ
   ============================================================ */

.order-items-table-wrapper {
    padding: 0.5rem 0;
}

.order-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    border-radius: 0.8rem;
    overflow: hidden;
}

.order-items-table thead {
    background: var(--bg-secondary);
}

.order-items-table thead th {
    text-align: left;
    padding: 0.7rem 1rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.order-items-table tbody tr {
    transition: var(--transition);
}

.order-items-table tbody tr:hover {
    background: rgba(230, 57, 70, 0.03);
}

.order-items-table tbody td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.order-items-table tbody tr:last-child td {
    border-bottom: none;
}

/* Товар в строке */
.order-item-product {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.order-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(230, 57, 70, 0.08);
    border-radius: 8px;
    color: var(--accent);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.order-item-name {
    font-weight: 500;
}

.order-item-qty {
    text-align: center;
}

.order-item-price {
    color: var(--text-secondary);
}

.order-item-subtotal {
    font-weight: 600;
    color: var(--accent);
}

/* Подвал таблицы */
.order-items-table tfoot {
    background: var(--bg-secondary);
}

.order-items-table tfoot td {
    padding: 0.7rem 1rem;
    font-weight: 700;
    border-top: 2px solid var(--border-color);
}

.order-total-label {
    text-align: right;
    color: var(--text-secondary);
    font-weight: 600;
}

.order-total-value {
    color: var(--accent);
    font-size: 1.1rem;
}

/* ============================================================
   АДАПТИВНОСТЬ ТАБЛИЦЫ
   ============================================================ */

@media (max-width: 640px) {
    .order-items-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .order-items-table {
        font-size: 0.8rem;
        min-width: 400px;
    }
    
    .order-items-table thead th,
    .order-items-table tbody td,
    .order-items-table tfoot td {
        padding: 0.5rem 0.7rem;
    }
    
    .order-item-icon {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }
}
/* ============================================================
   ФОТО ТОВАРОВ
   ============================================================ */

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image {
    height: 200px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--text-muted);
    overflow: hidden;
}

/* В админке фото */
.current-image {
    margin-bottom: 8px;
}

.current-image img {
    border: 1px solid var(--border-color);
}
/* ============================================================
   КАРТИНКА-ЗАГЛУШКА
   ============================================================ */

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image {
    height: 200px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Для карточки товара */
.product-image-large {
    position: relative;
    background: var(--bg-primary);
    border-radius: 1rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.product-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Фото товара в корзине */
.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 0.8rem;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-image i {
    font-size: 1.8rem;
    color: var(--text-muted);
    opacity: 0.3;
}


@media (max-width: 540px) {
    .cart-item-image {
        width: 40px;
        height: 40px;
    }
}
/* ============================================================
   КОММЕНТАРИЙ К ЗАКАЗУ
   ============================================================ */

/* В личном кабинете */
.order-info-item .value {
    word-break: break-word;
}

/* В деталях заказа (ajax) */
.order-comment {
    background: var(--bg-secondary);
    border-radius: 0.8rem;
    padding: 0.8rem 1.2rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--accent);
}

.order-comment strong {
    color: var(--text-secondary);
    font-size: 0.8rem;
    display: block;
    margin-bottom: 2px;
}

.order-comment strong i {
    color: var(--accent);
    margin-right: 4px;
}

.order-comment p {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.9rem;
    word-break: break-word;
}

/* В админке — обрезание длинного комментария */
.admin-table td span[title] {
    max-width: 150px;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* ============================================================
   КРАСИВОЕ ПОЛЕ ДЛЯ КОММЕНТАРИЯ
   ============================================================ */

.comment-group {
    margin-top: 0.5rem;
}

.comment-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.comment-group label i {
    color: var(--accent);
    font-size: 1rem;
}

.comment-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.8rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    resize: vertical;
    min-height: 80px;
    max-height: 180px;
    line-height: 1.5;
}

.comment-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12);
}

.comment-group textarea::placeholder {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Адаптивность */
@media (max-width: 540px) {
    .comment-group textarea {
        min-height: 60px;
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
}
/* ============================================================
   ПУСТАЯ КОРЗИНА — КРАСИВЫЙ ЦЕНТР
   ============================================================ */

.cart-empty {
    text-align: center;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 350px;
}

.cart-empty .empty-icon {
    width: 100px;
    height: 100px;
    background: rgba(230, 57, 70, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.cart-empty .empty-icon i {
    font-size: 3.5rem;
    color: var(--accent);
    opacity: 0.6;
}

.cart-empty:hover .empty-icon {
    transform: scale(1.05);
    background: rgba(230, 57, 70, 0.15);
}

.cart-empty h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.cart-empty p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.8rem;
    max-width: 400px;
}

.cart-empty .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 2rem;
    font-size: 0.9rem;
    border-radius: 50px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.cart-empty .btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.3);
}

.cart-empty .btn-primary i {
    font-size: 0.9rem;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */

@media (max-width: 540px) {
    .cart-empty {
        padding: 2.5rem 1rem;
        min-height: 250px;
    }

    .cart-empty .empty-icon {
        width: 70px;
        height: 70px;
    }

    .cart-empty .empty-icon i {
        font-size: 2.5rem;
    }

    .cart-empty h3 {
        font-size: 1.2rem;
    }

    .cart-empty p {
        font-size: 0.85rem;
        margin-bottom: 1.2rem;
    }

    @media (max-width: 540px) {
    .cart-empty .btn-primary {
        padding: 0.5rem 1.5rem;
        font-size: 0.8rem;
    }
}
}
/* ============================================================
   АДАПТИВНОСТЬ АДМИН-ПАНЕЛИ (без горизонтального скролла)
   ============================================================ */

.admin-container {
    max-width: 100%;
    overflow-x: hidden;
}

/* Общие стили для админ-таблиц */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--bg-primary);
    padding: 0.8rem 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: rgba(230, 57, 70, 0.03);
}

/* Адаптивность: таблица превращается в карточки */
@media (max-width: 860px) {
    .admin-table {
        border-radius: 0.5rem;
    }
    
    .admin-table thead {
        display: none;
    }
    
    .admin-table tbody tr {
        display: block;
        margin-bottom: 0.8rem;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 0.5rem;
        overflow: hidden;
        padding: 0.3rem 0;
    }
    
    .admin-table tbody tr td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.3rem 0.6rem;
        border: none;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        font-size: 0.85rem;
        flex-wrap: wrap;
        gap: 0.3rem;
        background: transparent !important;
    }
    
    .admin-table tbody tr td:last-child {
        border-bottom: none;
    }
    
    .admin-table tbody tr td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        flex-shrink: 0;
    }
    
    .admin-table tbody tr td .actions {
        justify-content: flex-end;
        width: 100%;
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    
    .admin-table tbody tr td .actions a,
    .admin-table tbody tr td .actions button {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
    }
    
    /* Товары в заказе на мобильных */
    .admin-table tbody tr td div[style*="display:flex; flex-direction:column"] {
        width: 100% !important;
        align-items: flex-end !important;
    }
    
    .admin-table tbody tr td div[style*="display:flex; flex-direction:column"] > div {
        background: var(--bg-primary);
        border-radius: 0.3rem;
        padding: 2px 8px;
        width: 100% !important;
        max-width: 200px;
        border: 1px solid var(--border-color);
    }

    /* Строка с деталями заказа (адрес, телефон, комментарий) */
    .order-details-row td {
        padding: 0 !important;
    }

    .order-details-row td > div {
        margin: 0.3rem !important;
        border-radius: 0.4rem !important;
        padding: 0.5rem 0.8rem !important;
        background: var(--bg-primary) !important;
    }

    .order-details-row td > div > div {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .order-details-row td > div > div > div {
        width: 100% !important;
    }
    
    .order-details-row td > div > div > div strong {
        font-size: 0.6rem !important;
    }
    
    .order-details-row td > div > div > div p {
        font-size: 0.8rem !important;
        margin: 0 !important;
    }

    /* Админ-навигация */
    .admin-nav {
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    
    .admin-nav a {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .admin-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .admin-stat {
        padding: 0.6rem;
    }
    
    .admin-stat .number {
        font-size: 1.3rem;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .admin-table tbody tr td {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        flex-wrap: wrap;
    }
    
    .admin-table tbody tr td::before {
        font-size: 0.6rem;
        min-width: 60px;
    }
    
    .admin-table tbody tr td .actions a,
    .admin-table tbody tr td .actions button {
        font-size: 0.6rem;
        padding: 0.1rem 0.4rem;
    }
    
    .admin-table tbody tr td div[style*="display:flex; flex-direction:column"] > div {
        max-width: 150px;
        font-size: 0.7rem;
        padding: 2px 6px;
    }
    
    .admin-container {
        padding: 0 0.3rem;
    }
    
    .admin-header h1 {
        font-size: 1.2rem;
    }
    
    .admin-nav a {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    
    .admin-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.3rem;
    }
    
    .admin-stat .number {
        font-size: 1.1rem;
    }
    
    .admin-stat .label {
        font-size: 0.65rem;
    }
    
    .order-details-row td > div {
        padding: 0.4rem 0.6rem !important;
        margin: 0.2rem !important;
    }
    
    .order-details-row td > div > div {
        gap: 0.3rem !important;
    }
    
    .order-details-row td > div > div > div p {
        font-size: 0.7rem !important;
    }
}
/* ============================================================
   УЛУЧШЕННОЕ ОФОРМЛЕНИЕ ЗАКАЗА
   ============================================================ */

/* Сводка заказа */
.order-summary {
    background: var(--bg-primary);
    border-radius: 0.8rem;
    padding: 1rem 1.2rem;
    margin-bottom: 1.2rem;
    border: 1px solid var(--border-color);
}

.order-summary h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.2rem 0;
}

.order-summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 700;
    padding-top: 0.4rem;
    border-top: 2px solid var(--border-color);
    margin-top: 0.2rem;
}

.order-summary-total span:last-child {
    color: var(--accent);
}

/* Способы оплаты */
.payment-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 4px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.6rem;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.payment-option:hover {
    border-color: var(--accent);
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-option:has(input:checked) {
    border-color: var(--accent);
    background: rgba(230, 57, 70, 0.05);
}

.payment-option span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.payment-option span i {
    color: var(--accent);
    margin-right: 4px;
}

/* Адаптивность */
@media (max-width: 540px) {
    .payment-options {
        flex-direction: column;
    }
    
    .payment-option {
        min-width: auto;
        justify-content: center;
    }
}
/* ============================================================
   ОКНО УСПЕШНОГО ОФОРМЛЕНИЯ ЗАКАЗА
   ============================================================ */

.order-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease;
}

.order-success-modal {
    background: var(--bg-card);
    border-radius: 2rem;
    padding: 2.5rem 3rem;
    max-width: 480px;
    width: 92%;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.order-success-icon {
    width: 80px;
    height: 80px;
    background: rgba(34, 197, 94, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    font-size: 3.5rem;
    color: #22c55e;
}

.order-success-modal h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.order-success-modal .order-number {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.order-success-modal .order-number strong {
    color: var(--accent);
    font-weight: 800;
}

.order-success-modal .order-message {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.2rem;
    padding: 0.8rem 1rem;
    background: var(--bg-primary);
    border-radius: 0.8rem;
    border-left: 3px solid var(--accent);
}

.order-success-info {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.order-success-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.order-success-info i {
    color: var(--accent);
    margin-right: 6px;
}

.order-success-btn {
    padding: 0.8rem 2.5rem;
    font-size: 1rem;
    border-radius: 50px;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
    font-family: inherit;
}

.order-success-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(40px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Адаптивность */
@media (max-width: 540px) {
    .order-success-modal {
        padding: 1.8rem 1.5rem;
        border-radius: 1.5rem;
    }
    
    .order-success-icon {
        width: 60px;
        height: 60px;
        font-size: 2.5rem;
    }
    
    .order-success-modal h2 {
        font-size: 1.4rem;
    }
    
    .order-success-modal .order-number {
        font-size: 0.95rem;
    }
    
    .order-success-modal .order-message {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
    
    .order-success-info {
        gap: 0.8rem;
        flex-direction: column;
        align-items: center;
    }
}
/* ============================================================
   ПАГИНАЦИЯ
   ============================================================ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 0.6rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
}

.pagination-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.pagination-btn.active:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.pagination-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-dots {
    color: var(--text-muted);
    font-size: 1.2rem;
    padding: 0 4px;
}

/* Адаптивность пагинации */
@media (max-width: 540px) {
    .pagination {
        gap: 0.3rem;
    }
    
    .pagination-btn {
        min-width: 34px;
        height: 34px;
        font-size: 0.8rem;
        padding: 0 8px;
    }
}

@media (max-width: 400px) {
    .pagination-btn {
        min-width: 30px;
        height: 30px;
        font-size: 0.7rem;
        padding: 0 6px;
    }
}
/* ============================================================
   БЕЙДЖ ПРЕДЗАКАЗ
   ============================================================ */

.product-badge.preorder {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
}
/* ============================================================
   ГАЛЕРЕЯ И ЦВЕТА НА КАРТОЧКЕ ТОВАРА
   ============================================================ */

/* Галерея */
.gallery-main {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gallery-main #mainImage {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
}

.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

.gallery-thumbs img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.3rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.gallery-thumbs img:hover {
    border-color: var(--accent);
}

.gallery-thumbs img.active {
    border-color: var(--accent);
}

/* Цвета */
.product-colors {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    padding: 0.5rem 0;
}

.colors-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.colors-list {
    display: flex;
    gap: 0.5rem;
}

.color-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: var(--transition);
    flex-shrink: 0;
}

.color-circle:hover {
    transform: scale(1.15);
}

.color-circle.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--accent);
}
/* ============================================================
   ДОКУМЕНТ ТОВАРА
   ============================================================ */

.product-doc {
    margin: 0.8rem 0;
}

.doc-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 1.2rem;
    background: rgba(230, 57, 70, 0.05);
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: 0.6rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.doc-link:hover {
    background: rgba(230, 57, 70, 0.1);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.doc-link i:first-child {
    font-size: 1.4rem;
}

.doc-link i:last-child {
    font-size: 0.8rem;
    opacity: 0.6;
}
/* ============================================================
   ГАЛЕРЕЯ ТОВАРА (с подсветкой миниатюр)
   ============================================================ */

/* Основной блок галереи */
.gallery-main {
    position: relative;
    width: 100%;
    background: var(--bg-primary);
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Главное фото */
#mainImage {
    width: 100%;
    max-height: 450px;
    object-fit: contain;
    border-radius: 0.5rem;
}

/* Контейнер миниатюр */
.gallery-thumbs {
    display: flex;
    gap: 0.6rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    padding: 0.3rem;
}

/* Каждая миниатюра */
.gallery-thumbs img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.5;
    flex-shrink: 0;
}

/* При наведении на миниатюру */
.gallery-thumbs img:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

/* Активная миниатюра (подсветка) */
.gallery-thumbs img.active {
    border-color: var(--accent);
    opacity: 1;
    box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--accent);
    transform: scale(1.02);
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */

@media (max-width: 860px) {
    #mainImage {
        max-height: 350px;
    }
    .gallery-thumbs img {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 540px) {
    #mainImage {
        max-height: 260px;
    }
    .gallery-thumbs {
        gap: 0.4rem;
    }
    .gallery-thumbs img {
        width: 44px;
        height: 44px;
        border-width: 2px;
    }
    .gallery-thumbs img.active {
        box-shadow: 0 0 0 1px var(--bg-primary), 0 0 0 3px var(--accent);
    }
}
/* ============================================================
   ГАЛЕРЕЯ — СТРЕЛКИ И СВАЙП
   ============================================================ */

.gallery-slider-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y;
}

/* Стрелки */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-arrow:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-50%) scale(1.05);
}

.gallery-arrow.prev {
    left: 12px;
}

.gallery-arrow.next {
    right: 12px;
}

/* Счётчик */
.gallery-counter {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */

@media (max-width: 860px) {
    .gallery-arrow {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    .gallery-arrow.prev {
        left: 8px;
    }
    .gallery-arrow.next {
        right: 8px;
    }
    .gallery-counter {
        font-size: 0.7rem;
        padding: 2px 10px;
        bottom: 12px;
        right: 12px;
    }
}

@media (max-width: 540px) {
    .gallery-arrow {
        width: 30px;
        height: 30px;
        font-size: 0.7rem;
    }
    .gallery-arrow.prev {
        left: 6px;
    }
    .gallery-arrow.next {
        right: 6px;
    }
    .gallery-counter {
        font-size: 0.6rem;
        padding: 2px 8px;
        bottom: 10px;
        right: 10px;
    }
}
/* ============================================================
   ЛАЙТБОКС — ПОЛНОЭКРАННЫЙ ПРОСМОТР ФОТО
   ============================================================ */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: lightboxFadeIn 0.3s ease;
    padding: 60px 20px 80px;
    box-sizing: border-box;
}

.lightbox.active {
    display: flex;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lightboxZoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
    -webkit-user-drag: none;
}

@keyframes lightboxZoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Кнопка закрытия */
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}

.lightbox-close:hover,
.lightbox-close:active {
    background: var(--accent);
    border-color: var(--accent);
    transform: rotate(90deg);
}

/* Стрелки */
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}

.lightbox-arrow:hover,
.lightbox-arrow:active {
    background: var(--accent);
    border-color: var(--accent);
}

.lightbox-arrow.prev {
    left: 20px;
}

.lightbox-arrow.next {
    right: 20px;
}

/* Счётчик */
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================================
   АДАПТАЦИЯ ДЛЯ ТЕЛЕФОНОВ
   ============================================================ */

@media (max-width: 768px) {
    .lightbox {
        padding: 50px 10px 70px;
    }
    
    .lightbox-close {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
        top: 10px;
        right: 10px;
    }
    
    .lightbox-arrow {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
    
    .lightbox-arrow.prev {
        left: 8px;
    }
    
    .lightbox-arrow.next {
        right: 8px;
    }
    
    .lightbox-counter {
        font-size: 0.8rem;
        padding: 6px 16px;
        bottom: 14px;
    }
}

@media (max-width: 540px) {
    .lightbox {
        padding: 55px 8px 65px;
    }
    
    .lightbox-close {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        top: 8px;
        right: 8px;
    }
    
    .lightbox-arrow {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
        background: rgba(0, 0, 0, 0.5);
    }
    
    .lightbox-arrow.prev {
        left: 6px;
    }
    
    .lightbox-arrow.next {
        right: 6px;
    }
    
    .lightbox-counter {
        font-size: 0.75rem;
        padding: 5px 14px;
        bottom: 12px;
    }
    
    .lightbox-image {
        border-radius: 0.3rem;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 400px) {
    .lightbox-arrow {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .lightbox-arrow.prev {
        left: 4px;
    }
    
    .lightbox-arrow.next {
        right: 4px;
    }
    
    .lightbox-close {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }
    
    .lightbox-counter {
        font-size: 0.7rem;
        padding: 4px 12px;
    }
}

/* Планшеты в портретной ориентации */
@media (min-width: 768px) and (max-width: 1024px) {
    .lightbox-image {
        max-width: 90%;
        max-height: 85%;
    }
}

/* Ландшафтная ориентация на телефонах */
@media (max-width: 900px) and (orientation: landscape) {
    .lightbox {
        padding: 30px 60px;
    }
    
    .lightbox-image {
        max-height: 90vh;
    }
    
    .lightbox-counter {
        bottom: 8px;
    }
}
/* ============================================================
   ЗАПРЕТ ГОРИЗОНТАЛЬНОЙ ПРОКРУТКИ НА МОБИЛЬНЫХ
   ============================================================ */

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Для мобильных */
@media (max-width: 860px) {
    html, body {
        overflow-x: hidden !important;
        position: relative;
        width: 100%;
        overscroll-behavior-x: none;
    }
    
    /* Скрываем вылезающие элементы */
    body {
        overflow-x: clip;
    }
}
/* ============================================================
   ЗАПРЕТ СКРОЛЛА ПРИ ОТКРЫТОМ МЕНЮ
   ============================================================ */

body.menu-open {
    overflow: hidden;
    height: 100vh;
}
/* Способы доставки */
.delivery-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 4px;
}

.delivery-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 0.6rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
}

.delivery-option:hover {
    border-color: var(--accent);
}

.delivery-option input[type="radio"] {
    display: none;
}

.delivery-option:has(input:checked) {
    border-color: var(--accent);
    background: rgba(230, 57, 70, 0.05);
}

.delivery-option span {
    font-weight: 600;
    color: var(--text-primary);
}

.delivery-option span i {
    color: var(--accent);
    margin-right: 4px;
}

@media (max-width: 540px) {
    .delivery-options {
        grid-template-columns: 1fr;
    }
}
/* ============================================================
   КАРТОЧКИ ВЫБОРА ДОСТАВКИ
   ============================================================ */

.delivery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    margin-top: 6px;
}

.delivery-card {
    cursor: pointer;
    display: block;
    position: relative;
}

.delivery-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.delivery-card-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.7rem 0.9rem;
    border: 2px solid var(--border-color);
    border-radius: 0.8rem;
    background: var(--bg-primary);
    transition: all 0.3s ease;
    height: 100%;
    box-sizing: border-box;
}

.delivery-card:hover .delivery-card-content {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.1);
}

.delivery-card input[type="radio"]:checked + .delivery-card-content {
    border-color: var(--accent);
    background: rgba(230, 57, 70, 0.05);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.15);
}

.delivery-card input[type="radio"]:checked + .delivery-card-content::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Иконки */
.delivery-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 800;
    font-size: 1rem;
    color: white;
    letter-spacing: -0.5px;
}

.delivery-icon i {
    font-size: 1.3rem;
}

/* Цвета брендов */
.delivery-icon.pickup {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.delivery-icon.cdek {
    background: linear-gradient(135deg, #00A651, #007a3d);
    font-size: 0.75rem;
}

.delivery-icon.ozon {
    background: linear-gradient(135deg, #005BFF, #0047c7);
    font-size: 0.7rem;
}

.delivery-icon.wb {
    background: linear-gradient(135deg, #CB11AB, #9400d3);
    font-size: 0.85rem;
}

.delivery-icon.yandex {
    background: linear-gradient(135deg, #FC3F1D, #d63012);
    font-size: 1.1rem;
}

.delivery-icon.energy {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Информация */
.delivery-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.delivery-info strong {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.delivery-info small {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Адаптивность */
@media (max-width: 540px) {
    .delivery-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .delivery-card-content {
        padding: 0.6rem 0.8rem;
    }
    
    .delivery-icon {
        width: 38px;
        height: 38px;
    }
    
    .delivery-icon i {
        font-size: 1.1rem;
    }
    
    .delivery-info strong {
        font-size: 0.85rem;
    }
    
    .delivery-info small {
        font-size: 0.65rem;
    }
}
/* ============================================================
   ПОДСКАЗКИ АДРЕСА
   ============================================================ */

.address-input-wrapper {
    position: relative;
}

.address-input-wrapper input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.8rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.address-input-wrapper input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

/* ============================================================
   ПОДСКАЗКИ АДРЕСА (DaData)
   ============================================================ */

/* Обёртка поля адреса */
.address-input-wrapper {
    position: relative;
    width: 100%;
}

/* Поле ввода адреса */
.address-input-wrapper input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.8rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    box-sizing: border-box;
}

.address-input-wrapper input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

/* Выпадающий список подсказок */
.address-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.8rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    max-height: 300px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    min-width: 100%;
}

/* Показ, когда есть подсказки */
.address-suggestions.show {
    display: block;
}

/* Отдельная подсказка */
.address-suggestion {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0.7rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.address-suggestion:last-child {
    border-bottom: none;
}

.address-suggestion:hover {
    background: rgba(230, 57, 70, 0.08);
}

.address-suggestion i {
    color: var(--accent);
    margin-top: 4px;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.address-suggestion div {
    flex: 1;
    min-width: 0;
}

.address-suggestion strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    word-break: break-word;
}

.address-suggestion small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Пустой результат */
.address-suggestion.empty {
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: default;
    padding: 1rem;
}

.address-suggestion.empty:hover {
    background: transparent;
}

/* Скроллбар */
.address-suggestions::-webkit-scrollbar {
    width: 6px;
}

.address-suggestions::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.address-suggestions::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

/* Светлая тема */
[data-theme="light"] .address-suggestions {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .address-suggestion {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .address-suggestion:hover {
    background: rgba(230, 57, 70, 0.05);
}

/* Адаптивность */
@media (max-width: 540px) {
    .address-suggestion {
        padding: 0.6rem 0.8rem;
    }
    
    .address-suggestion strong {
        font-size: 0.85rem;
    }
    
    .address-suggestion small {
        font-size: 0.7rem;
    }
    
    .address-suggestions {
        max-height: 200px;
    }
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 5px 0;
    font-size: 13px;
    line-height: 1.6;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #667eea;
}

.footer-links .sep {
    margin: 0 8px;
    opacity: 0.4;
}

@media (max-width: 768px) {
    .footer-links {
        flex-direction: column;
        gap: 5px;
    }
    .footer-links .sep {
        display: none;
    }
}
/* ============================================
   ЧЕКБОКС СОГЛАСИЯ НА ОБРАБОТКУ ПДН
   ============================================ */

.consent-checkbox {
    margin: 15px 0;
    padding: 12px 15px;
    background: #f8f9fc;
    border-radius: 8px;
    border: 1px solid #eef2f7;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}

.consent-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.consent-checkmark {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: white;
    border: 2px solid #ccc;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-top: 1px;
}

.consent-label:hover .consent-checkmark {
    border-color: #667eea;
}

.consent-label input[type="checkbox"]:checked + .consent-checkmark {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
}

.consent-label input[type="checkbox"]:checked + .consent-checkmark::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.consent-label input[type="checkbox"]:focus + .consent-checkmark {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.consent-label input[type="checkbox"]:invalid + .consent-checkmark {
    border-color: #e74c3c;
}

.consent-text {
    flex: 1;
}

.consent-text a {
    color: #667eea;
    text-decoration: underline;
}

.consent-text a:hover {
    color: #764ba2;
}

/* Для мобильных */
@media (max-width: 768px) {
    .consent-label {
        font-size: 12px;
    }
}