/* ===== ПЕРЕМЕННЫЕ (как в основном сайте) ===== */
:root {
    --bg: #0b1020;
    --bg2: #101a33;
    --card: #121c37cc;
    --text: #eef3ff;
    --muted: #b8c2e0;
    --line: #243055;
    --accent: #6be7ff;
    --accent2: #9b7bff;
    --good: #66e3a2;
    --danger: #ff6b6b;
    --shadow: 0 20px 60px rgba(0,0,0,.35);
    --radius: 24px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(107,231,255,.15), transparent 28%),
        radial-gradient(circle at top right, rgba(155,123,255,.16), transparent 24%),
        linear-gradient(180deg, var(--bg), #070a13 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color .2s;
}

a:hover {
    color: var(--accent);
}

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

.container {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}

/* ===== ШАПКА ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 16, 32, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    gap: 12px;
    align-items: center;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -.02em;
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 12px 30px rgba(107,231,255,.18);
}

.logo-text span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 24px;
    color: var(--muted);
    font-size: 15px;
}

.nav-links a:hover {
    color: var(--accent);
}

.cart-btn {
    position: relative;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 15px;
    transition: all .2s;
}

.cart-btn:hover {
    background: rgba(255,255,255,.08);
    border-color: var(--accent);
}

.cart-icon {
    font-size: 20px;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--danger);
    color: white;
    font-size: 12px;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255,107,107,.4);
}

.cart-count:empty,
.cart-count[data-count="0"] {
    display: none;
}

/* ===== HERO ===== */
.hero {
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255,255,255,.03);
    backdrop-filter: blur(10px);
    font-size: 14px;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -.04em;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--muted);
    max-width: 560px;
    margin-bottom: 32px;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 36px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: var(--text);
}

.hero-feature::before {
    content: '✓';
    color: var(--good);
    font-weight: 700;
    font-size: 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 16px;
    border: 1px solid transparent;
    transition: all .2s ease;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #07101f;
    box-shadow: 0 12px 30px rgba(107,231,255,.25);
}

.btn-primary:hover {
    box-shadow: 0 16px 40px rgba(107,231,255,.35);
}

.btn-secondary {
    border-color: var(--line);
    background: rgba(255,255,255,.03);
    color: var(--text);
}

.hero-image {
    position: relative;
}

.hero-image-placeholder {
    aspect-ratio: 1;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(107,231,255,.1), rgba(155,123,255,.1));
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    box-shadow: var(--shadow);
}

.hero-emoji {
    font-size: 120px;
    filter: drop-shadow(0 20px 40px rgba(107,231,255,.3));
}

.hero-image-text {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
}

/* ===== СЕКЦИИ ===== */
.section-head {
    text-align: center;
    margin-bottom: 48px;
}

.section-head h2 {
    font-size: clamp(28px, 3vw, 44px);
    line-height: 1.08;
    letter-spacing: -.03em;
    margin: 14px 0;
}

.section-head p {
    color: var(--muted);
    font-size: 17px;
}

.catalog, .about, .contacts {
    padding: 80px 0;
}

/* ===== КАТАЛОГ: ФИЛЬТРЫ И ПОИСК ===== */
.catalog-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.search-box input {
    width: 100%;
    padding: 16px 20px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.03);
    color: var(--text);
    font-size: 16px;
    outline: none;
    transition: border-color .2s;
}

.search-box input:focus {
    border-color: var(--accent);
}

.search-box input::placeholder {
    color: var(--muted);
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.filter-btn {
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.03);
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--text);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #07101f;
    border-color: transparent;
    font-weight: 600;
}

/* ===== СЕТКА ТОВАРОВ ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--card);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all .3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 20px 50px rgba(107,231,255,.15);
}

.product-image {
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(107,231,255,.05), rgba(155,123,255,.05));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--danger);
    color: white;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 12px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 8px;
    font-weight: 600;
}

.product-name {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.product-description {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 16px;
    flex: 1;
    line-height: 1.5;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.product-price {
    display: flex;
    flex-direction: column;
}

.price-current {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.price-old {
    font-size: 14px;
    color: var(--muted);
    text-decoration: line-through;
}

.add-to-cart {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #07101f;
    border: none;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}

.add-to-cart:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(107,231,255,.3);
}

.add-to-cart:active {
    transform: scale(0.95);
}

.loading-text {
    text-align: center;
    color: var(--muted);
    padding: 60px 20px;
    font-size: 18px;
    grid-column: 1 / -1;
}

/* ===== О НАС ===== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.about-card {
    background: var(--card);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: all .3s;
}

.about-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.about-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.about-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.about-card p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

/* ===== КОНТАКТЫ ===== */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.contact-card {
    background: var(--card);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: all .3s;
}

.contact-card:hover {
    border-color: var(--accent);
}

.contact-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.contact-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.contact-card a {
    color: var(--accent);
    font-size: 17px;
    font-weight: 600;
}

/* ===== ФУТЕР ===== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--line);
    text-align: center;
}

.footer-logo {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-text {
    color: var(--muted);
    margin-bottom: 16px;
}

.footer-copy {
    color: var(--muted);
    font-size: 14px;
}

/* ===== КОРЗИНА (ВЫЕЗЖАЮЩАЯ ПАНЕЛЬ) ===== */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all .3s;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: var(--bg2);
    border-left: 1px solid var(--line);
    z-index: 201;
    transform: translateX(100%);
    transition: transform .3s ease;
    display: flex;
    flex-direction: column;
}

.cart-panel.active {
    transform: translateX(0);
}

.cart-header {
    padding: 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 22px;
}

.cart-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    transition: all .2s;
}

.cart-close:hover {
    background: rgba(255,255,255,.05);
    color: var(--text);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.cart-empty {
    text-align: center;
    color: var(--muted);
    padding: 60px 20px;
    font-size: 16px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.cart-item-image {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    background: rgba(255,255,255,.05);
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-price {
    color: var(--accent);
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 10px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.03);
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}

.qty-btn:hover {
    border-color: var(--accent);
    background: rgba(107,231,255,.1);
}

.qty-value {
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 20px;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background .2s;
}

.cart-item-remove:hover {
    background: rgba(255,107,107,.1);
}

.cart-footer {
    padding: 24px;
    border-top: 1px solid var(--line);
    background: rgba(0,0,0,.2);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 18px;
}

.cart-total strong {
    font-size: 26px;
    color: var(--accent);
}

.btn-full {
    width: 100%;
}

/* ===== МОДАЛЬНОЕ ОКНО ОФОРМЛЕНИЯ ЗАКАЗА ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(8px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all .3s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform .3s;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--line);
    color: var(--muted);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 20px;
    transition: all .2s;
}

.modal-close:hover {
    background: rgba(255,255,255,.1);
    color: var(--text);
}

.modal h2 {
    font-size: 28px;
    margin-bottom: 12px;
}

.modal-subtitle {
    color: var(--muted);
    margin-bottom: 28px;
    font-size: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.03);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.order-summary {
    background: rgba(255,255,255,.03);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    max-height: 200px;
    overflow-y: auto;
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--line);
}

.order-summary-item:last-child {
    border-bottom: none;
}

.order-summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 2px solid var(--line);
    font-weight: 700;
    font-size: 18px;
}

.order-summary-total strong {
    color: var(--accent);
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 960px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero {
        padding: 60px 0 80px;
    }

    .nav-links {
        display: none;
    }

    .catalog, .about, .contacts {
        padding: 60px 0;
    }

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

    .modal-content {
        padding: 28px 20px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .cart-panel {
        max-width: 100%;
    }

    .header-content {
        gap: 12px;
    }

    .logo-text {
        font-size: 18px;
    }
}

/* ===== СКРОЛЛБАР ДЛЯ КОРЗИНЫ ===== */
.cart-items::-webkit-scrollbar,
.modal-content::-webkit-scrollbar,
.order-summary::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track,
.order-summary::-webkit-scrollbar-track {
    background: transparent;
}

.cart-items::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb,
.order-summary::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover,
.order-summary::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}