:root {
    --bg: #070b12;
    --bg-soft: #0d1320;
    --card: #101827;
    --card-2: #0d1624;
    --text: #eaf1ff;
    --muted: #9aa8c7;
    --line: rgba(255, 255, 255, 0.08);
    --blue: #2d8cff;
    --blue-hover: #58a5ff;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    --radius: 20px;
    --container: 1280px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(45, 140, 255, 0.12), transparent 25%),
        radial-gradient(circle at top right, rgba(45, 140, 255, 0.08), transparent 20%),
        var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    background: rgba(7, 11, 18, 0.78);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 82px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-mark {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #42a5ff, #1f5eff);
    color: white;
    font-weight: 800;
    box-shadow: var(--shadow);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-subtitle {
    color: var(--muted);
    font-size: 13px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.main-nav a {
    color: var(--muted);
    font-weight: 600;
    transition: 0.2s ease;
}

.main-nav a:hover {
    color: var(--text);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    min-height: 50px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-weight: 700;
}

.inline-form {
    margin: 0;
}

.hero {
    padding: 42px 0 30px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: stretch;
}

.hero-content,
.hero-panel {
    background: linear-gradient(180deg, rgba(16, 24, 39, 0.92), rgba(9, 14, 25, 0.96));
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.hero-content {
    padding: 42px;
}

.hero-badge,
.detail-badge,
.section-kicker {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(45, 140, 255, 0.14);
    color: #8dc1ff;
    border: 1px solid rgba(45, 140, 255, 0.22);
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.02;
    max-width: 10ch;
}

.hero-text {
    margin: 0 0 24px;
    max-width: 58ch;
    color: var(--muted);
    font-size: 18px;
}

.hero-actions,
.detail-actions,
.product-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue), #1b6eff);
    color: white;
    box-shadow: 0 12px 30px rgba(45, 140, 255, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--blue-hover), #2d8cff);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 28px;
}

.stat-card {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: #8dc1ff;
}

.stat-label {
    color: var(--muted);
    font-size: 14px;
}

.hero-panel {
    position: relative;
    overflow: hidden;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-window {
    padding: 24px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(45, 140, 255, 0.25), transparent 30%),
        linear-gradient(180deg, #14243d 0%, #0d1523 100%);
    border: 1px solid var(--line);
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.window-frame {
    width: 100%;
    max-width: 520px;
    height: 280px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 14px;
    background: #f4f7fb;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.window-glass {
    border-radius: 6px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.04)),
        linear-gradient(135deg, #8ec5ff 0%, #395f92 100%);
    border: 4px solid #d9dee8;
}

.hero-panel-text {
    margin-top: 18px;
}

.panel-title {
    font-size: 24px;
    font-weight: 800;
}

.panel-subtitle {
    color: var(--muted);
    margin-top: 6px;
}

.catalog-section,
.product-detail-section,
.auth-section,
.cart-section {
    padding: 24px 0 70px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.section-head h2 {
    margin: 12px 0 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.05;
}

.search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-form input,
.auth-form input {
    min-width: 280px;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    outline: none;
    font-size: 16px;
}

.search-form input::placeholder,
.auth-form input::placeholder {
    color: #7c8bac;
}

.search-form input:focus,
.auth-form input:focus,
.auth-input:focus {
    border-color: rgba(45, 140, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(45, 140, 255, 0.12);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.product-card,
.detail-image-card,
.detail-info-card,
.auth-card,
.cart-item-card,
.cart-summary-card,
.empty-state,
.gallery-card {
    background: linear-gradient(180deg, rgba(16, 24, 39, 0.92), rgba(9, 14, 25, 0.98));
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.product-card {
    overflow: hidden;
}

.product-image-wrap {
    display: block;
    aspect-ratio: 4 / 3;
    background:
        radial-gradient(circle at top right, rgba(45, 140, 255, 0.16), transparent 25%),
        #0a1220;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-placeholder,
.detail-image-placeholder,
.cart-item-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background:
        radial-gradient(circle at top right, rgba(45, 140, 255, 0.16), transparent 25%),
        #0a1220;
}

.product-body {
    padding: 22px;
}

.product-title {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.15;
}

.product-title a:hover,
.cart-item-title a:hover {
    color: #8dc1ff;
}

.product-description {
    margin: 0 0 18px;
    color: var(--muted);
}

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

.product-price,
.detail-price {
    font-size: 30px;
    font-weight: 800;
    color: #8dc1ff;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.detail-image-card {
    overflow: hidden;
    min-height: 420px;
}

.detail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info-card {
    padding: 28px;
}

.detail-info-card h1 {
    margin: 16px 0 14px;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.02;
}

.detail-description {
    margin: 18px 0 24px;
    color: var(--muted);
    font-size: 17px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    margin-bottom: 18px;
}

.breadcrumbs a:hover {
    color: var(--text);
}

.gallery-section {
    margin-top: 28px;
}

.gallery-section h2 {
    margin: 0 0 16px;
    font-size: 28px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-card {
    overflow: hidden;
}

.gallery-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.auth-card {
    width: min(100%, 640px);
    margin: 0 auto;
    padding: 28px;
}

.auth-head {
    margin-bottom: 18px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row label {
    font-weight: 700;
    color: var(--text);
}

.auth-input {
    min-height: 52px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    outline: none;
    font-size: 16px;
    width: 100%;
}

.auth-input::placeholder {
    color: #7c8bac;
}

.auth-submit,
.checkout-btn {
    width: 100%;
}

.auth-switch {
    margin-top: 18px;
    color: var(--muted);
    text-align: center;
}

.auth-switch a {
    color: var(--text);
    font-weight: 700;
}

.form-messages {
    margin-bottom: 16px;
}

.form-message.error,
.field-error {
    color: #ff9b9b;
    font-size: 14px;
}

.form-message.error {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 120, 120, 0.2);
    background: rgba(255, 80, 80, 0.08);
}

.field-help {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.auth-form ul {
    margin: 6px 0 0 18px;
    color: var(--muted);
    font-size: 13px;
}

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cart-item-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) auto;
    gap: 20px;
    padding: 20px;
    align-items: start;
}

.cart-item-image-wrap {
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(45, 140, 255, 0.16), transparent 25%),
        #0a1220;
}

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

.cart-item-title {
    margin: 0 0 10px;
    font-size: 28px;
    line-height: 1.1;
}

.cart-item-description {
    margin: 0 0 14px;
    color: var(--muted);
}

.cart-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: var(--muted);
    font-size: 14px;
}

.cart-item-total {
    font-size: 28px;
    font-weight: 800;
    color: #8dc1ff;
    white-space: nowrap;
}

.cart-summary-card {
    padding: 22px;
    position: sticky;
    top: 100px;
}

.cart-summary-card h3 {
    margin: 0 0 18px;
    font-size: 28px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
}

.summary-row.total {
    color: var(--text);
    font-size: 20px;
    font-weight: 800;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 18px;
}

.empty-state {
    padding: 32px;
    text-align: center;
}

.empty-state h3 {
    margin: 0 0 10px;
    font-size: 28px;
}

.empty-state p {
    margin: 0 0 18px;
    color: var(--muted);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(5, 8, 14, 0.75);
}

.footer-inner {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
}

.footer-brand {
    font-size: 18px;
    font-weight: 800;
}

.footer-muted,
.footer-contacts {
    color: var(--muted);
}

@media (max-width: 1100px) {
    .hero-grid,
    .product-detail-grid,
    .cart-layout,
    .products-grid {
        grid-template-columns: 1fr;
    }

    .cart-summary-card {
        position: static;
    }
}

@media (max-width: 860px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 14px 0;
        justify-content: center;
    }

    .main-nav,
    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .cart-item-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero-content,
    .hero-panel,
    .detail-info-card,
    .auth-card,
    .cart-summary-card,
    .product-body,
    .cart-item-card {
        padding: 20px;
    }

    .hero h1,
    .detail-info-card h1,
    .section-head h2 {
        max-width: none;
    }

    .logo-title {
        font-size: 22px;
    }

    .search-form input,
    .auth-form input,
    .auth-input {
        min-width: 100%;
        width: 100%;
    }

    .search-form,
    .hero-actions,
    .detail-actions,
    .product-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
.qty-controls{
display:flex;
align-items:center;
gap:10px;
margin-top:10px;
}

.qty-btn{
width:36px;
height:36px;
display:flex;
align-items:center;
justify-content:center;
border-radius:10px;
border:1px solid var(--line);
background:rgba(255,255,255,.04);
font-size:20px;
font-weight:700;
}

.qty-btn:hover{
background:rgba(255,255,255,.08);
}

.qty-value{
font-weight:700;
font-size:18px;
}

.remove-btn{
margin-left:10px;
color:#ff9b9b;
font-size:14px;
}