:root {
    --bg: #0a0a0a;
    --bg-soft: #141414;
    --panel: rgba(15, 15, 15, 0.95);
    --panel-strong: #0f0f0f;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 42, 0, 0.24);
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.68);
    --dim: rgba(255, 255, 255, 0.5);
    --accent: #ff2a00;
    --accent-soft: rgba(255, 42, 0, 0.12);
    --success: #51cf66;
    --warning: #ffb300;
    --danger: #ff6b6b;
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --shadow-accent: 0 18px 48px rgba(255, 42, 0, 0.16);
}

/* ===== КРИТИЧЕСКИЙ CSS: Предотвращение FOUC ===== */
[data-hide-on-init],
#cartIcon,
#userInfo,
#cabinetLink,
#adminLink {
    display: none !important;
}

/* Form visibility control */
#loginForm,
#registerForm {
    display: none;
}

#loginForm.show,
#registerForm.show {
    display: block !important;
}
/* ============================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: #0a0a0a;
    overscroll-behavior-y: none;
}

body {
    font-family: "Inter", system-ui, sans-serif;
    background:
        radial-gradient(circle at top, rgba(255, 42, 0, 0.12), transparent 26%),
        linear-gradient(180deg, #050505 0%, var(--bg) 28%, #111111 100%);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    overscroll-behavior-y: none;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 26px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    mix-blend-mode: difference;
    flex-wrap: wrap;
    min-height: 70px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    text-decoration: none;
    font-weight: 500;
    transition: color 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-shrink: 0;
}

.icon-button {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-button:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.cart-button {
    width: 46px;
    min-width: 46px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
    flex-shrink: 0;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    font-size: 0.72rem;
    font-weight: 800;
}

.auth-btn,
.primary-btn,
.secondary-btn,
.ghost-btn {
    border: none;
    border-radius: 999px;
    padding: 0.78rem 1.45rem;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.auth-btn,
.primary-btn {
    background: var(--accent);
    color: white;
}

.auth-btn:hover,
.primary-btn:hover {
    background: #ff4422;
    transform: translateY(-1px);
}

.secondary-btn,
.ghost-btn {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.secondary-btn:hover,
.ghost-btn:hover {
    border-color: var(--line-strong);
    color: var(--accent);
}

/* Auth area container with state management */
.auth-area {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-shrink: 0;
}

/* Show main action button only in logged-out state */
.auth-area[data-auth-state="logged-out"] #authActionBtn {
    display: inline-flex;
}

.auth-area[data-auth-state="logged-in"] #authActionBtn {
    display: none;
}

/* Show user menu only in logged-in state */
.auth-area[data-auth-state="logged-out"] #userMenu {
    display: none !important;
}

.auth-area[data-auth-state="logged-in"] #userMenu {
    display: flex !important;
}

/* Cabinet link visibility based on auth state */
.nav-links .cabinet-link {
    display: none;
}

.nav-links .cabinet-link.visible {
    display: block !important;
}

/* Cart icon visibility */
#cartIcon {
    display: none;
}

#cartIcon.visible {
    display: inline-flex !important;
}

#adminLink.visible {
    display: inline-block !important;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-shrink: 0;
}

.user-name {
    color: var(--muted);
    font-weight: 600;
}

.user-name-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-weight: 600;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    margin: 0;
    transition: color 0.2s;
}

.user-name-btn:hover {
    color: var(--accent);
}

.page-main {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 180px 0 64px;
}

/* ── Текстовые страницы (политика, гарантия, обмен, доставка и т.п.) ── */
.content-section {
    margin-top: 24px;
}

.content-container {
    max-width: 760px;
}

.content-container h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    letter-spacing: -0.02em;
}

.content-container h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 1.5rem 0 0.5rem;
}

.content-container p {
    line-height: 1.75;
    margin-bottom: 1rem;
    color: var(--muted);
}

.content-container p strong {
    color: var(--fg);
}

.content-container a {
    color: var(--accent);
    text-decoration: none;
}

.content-container a:hover {
    text-decoration: underline;
}

.content-container ul,
.content-container ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-container li {
    line-height: 1.75;
    margin-bottom: 0.4rem;
    color: var(--muted);
}

.contact-box {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-top: 2rem;
}

.contact-box h3 {
    margin-top: 0;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 200px 5% 80px;
}

.hero-wordmark {
    font-size: clamp(4rem, 14vw, 13rem);
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 0.85;
    transition: opacity 0.25s ease;
}

.hero-accent {
    color: var(--accent);
    min-height: 1.05em;
    display: inline-block;
}

.hero-subtitle {
    margin-top: 32px;
    color: var(--muted);
    font-size: 1.1rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section {
    padding: 0 5% 88px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.7rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    margin-bottom: 18px;
}

.section-copy {
    max-width: 720px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 42px;
}

.sports-grid,
.catalog-grid,
.orders-grid {
    display: grid;
    gap: 28px;
}

.sports-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.catalog-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.orders-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.sport-card {
    position: relative;
    min-height: 460px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    background: #111;
}

.sport-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 36px 80px rgba(255, 42, 0, 0.22);
}

.sport-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sport-card:hover img {
    transform: scale(1.06);
}

.card-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 56px 34px 32px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.94));
}

.sport-name {
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    margin-bottom: 10px;
}

.sport-desc {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.6;
}

.panel,
.page-banner,
.order-card,
.cart-shell,
.cart-summary,
.catalog-card,
.auth-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-accent);
    backdrop-filter: blur(14px);
}

.page-banner {
    padding: 34px;
    display: grid;
    grid-template-columns: 1.2fr auto;
    gap: 24px;
    align-items: end;
    margin-bottom: 34px;
}

.eyebrow {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.page-title {
    font-size: clamp(2rem, 6vw, 4.2rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 0.94;
    margin-bottom: 16px;
}

.page-copy {
    max-width: 720px;
    color: var(--muted);
    line-height: 1.7;
}

.banner-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.meta-chip,
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
    font-size: 0.92rem;
}

.catalog-card {
    padding: 22px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.catalog-card:hover {
    transform: translateY(-5px);
    border-color: var(--line-strong);
    box-shadow: 0 18px 48px rgba(255, 42, 0, 0.2);
}

.catalog-media {
    min-height: 190px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    background: linear-gradient(135deg, rgba(255, 42, 0, 0.22), rgba(20, 20, 20, 0.4));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.4rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.catalog-label {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.catalog-title {
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.catalog-description {
    color: var(--muted);
    line-height: 1.65;
    min-height: 4.9em;
    margin-bottom: 16px;
}

.catalog-price {
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.card-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.qty-input,
.address-input,
.auth-input {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: white;
    padding: 0.9rem 1rem;
}

.qty-input {
    width: 82px;
    text-align: center;
}

/* Hide default number input arrows */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input[type=number] {
    -moz-appearance: textfield;
}

/* Quantity control with +/- buttons */
.qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    width: fit-content;
}

.qty-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(0, 102, 204, 0.5);
    color: #0066cc;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: rgba(0, 102, 204, 0.1);
    border-color: #0066cc;
    color: #fff;
}

.qty-btn:active {
    background: rgba(0, 102, 204, 0.2);
    transform: scale(0.95);
}

.auth-input:focus,
.qty-input:focus,
.address-input:focus {
    outline: none;
    border-color: var(--accent);
}

.notification {
    position: fixed;
    top: 94px;
    right: 20px;
    min-width: 260px;
    max-width: 360px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(17, 17, 17, 0.96);
    color: white;
    box-shadow: var(--shadow);
    z-index: 300;
}

.notification.success {
    border-left: 4px solid var(--success);
}

.notification.error {
    border-left: 4px solid var(--danger);
}

.orders-section {
    padding-top: 20px;
}

.order-card {
    padding: 24px;
}

.order-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.order-sport {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--accent);
}

.order-status {
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    background: rgba(255, 42, 0, 0.16);
    color: var(--accent);
}

.order-status.pending {
    background: rgba(255, 179, 0, 0.16);
    color: var(--warning);
}

.order-status.completed {
    background: rgba(81, 207, 102, 0.16);
    color: var(--success);
}

.order-status.cancelled {
    background: rgba(255, 107, 107, 0.16);
    color: var(--danger);
}

.order-amount {
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.order-meta {
    color: var(--muted);
    line-height: 1.6;
}

.empty-state {
    padding: 42px 26px;
    text-align: center;
    color: var(--dim);
}

.loading-dot {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 42, 0, 0.26);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
    gap: 28px;
}

.cart-shell,
.cart-summary {
    padding: 28px;
}

.cart-item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-item:last-child {
    border-bottom: none;
}

.item-media {
    width: 88px;
    height: 88px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 42, 0, 0.18), rgba(255, 255, 255, 0.06));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.item-name {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.item-meta {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.item-price {
    color: var(--accent);
    font-weight: 800;
    margin-top: 10px;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.danger-btn {
    border: none;
    background: rgba(255, 107, 107, 0.12);
    color: var(--danger);
    padding: 0.78rem 1rem;
    border-radius: 999px;
    font-weight: 700;
}

.summary-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 18px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 0.8rem 0;
    color: var(--muted);
}

.summary-row.total {
    margin-top: 10px;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
}

.delivery-block {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.map-panel {
    margin-top: 16px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.map-frame {
    width: 100%;
    height: 240px;
    border: 0;
    display: block;
    background: #111;
}

.map-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--muted);
    font-size: 0.9rem;
}

.delivery-option {
    display: flex;
    align-items: start;
    gap: 12px;
    padding: 14px 0;
    color: var(--muted);
}

.delivery-option input {
    margin-top: 4px;
}

.message {
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    display: none;
}

.message.show {
    display: block;
}

.message.success {
    background: rgba(81, 207, 102, 0.14);
    color: #c6f6ce;
    border: 1px solid rgba(81, 207, 102, 0.18);
}

.message.error {
    background: rgba(255, 107, 107, 0.14);
    color: #ffd3d3;
    border: 1px solid rgba(255, 107, 107, 0.18);
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.82);
    z-index: 400;
    padding: 24px;
}

.modal.active {
    display: flex;
}

.auth-card {
    position: relative;
    width: min(420px, 100%);
    padding: 28px;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: transparent;
    color: var(--dim);
    font-size: 1.8rem;
}

.modal-title {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-weight: 600;
}

.helper-text {
    margin-top: 16px;
    color: var(--muted);
    text-align: center;
}

.helper-text a {
    color: var(--accent);
    cursor: pointer;
}

.feedback {
    display: none;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.feedback.show {
    display: block;
}

.feedback.error {
    color: #ffb4b4;
}

.feedback.success {
    color: #9ee2aa;
}


/* FOOTER STYLES */
.footer {
    margin-top: 60px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 42, 0, 0.04), rgba(0, 0, 0, 0));
    padding: 40px 5% 20px;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 24px;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-brand {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    color: var(--text);
}

.footer-title {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--text);
    text-transform: uppercase;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.92rem;
    line-height: 1.4;
    transition: color 0.25s ease, transform 0.25s ease;
    width: fit-content;
}

.footer-link:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.footer-icon {
    display: inline-block;
    font-size: 1.1rem;
    margin-right: 2px;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    gap: 16px;
}

.footer-copyright {
    color: var(--dim);
    font-size: 0.92rem;
    font-weight: 600;
}

.footer-payments {
    display: flex;
    gap: 28px;
    align-items: center;
}

.payment-icon {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.25s ease, transform 0.25s ease;
}

.payment-icon:hover {
    color: var(--accent);
    transform: scale(1.08);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* COOKIE BANNER STYLES */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--panel);
    border-top: 1px solid var(--line);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    padding: 24px 5%;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    z-index: 350;
}

.cookie-banner.show {
    display: flex;
}

.cookie-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cookie-title {
    font-weight: 800;
    color: var(--text);
}

.cookie-text {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-text a {
    color: var(--accent);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-accept {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.78rem 1.45rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.cookie-accept:hover {
    background: #ff4422;
    transform: translateY(-1px);
}

.cookie-reject {
    background: transparent;
    color: var(--muted);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.78rem 1.45rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.cookie-reject:hover {
    border-color: var(--line-strong);
    color: var(--accent);
}

/* PRODUCT MODAL STYLES */
.product-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-modal.active {
    display: flex;
    opacity: 1;
}

.product-modal-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: min(90vh, 680px);
    background: linear-gradient(135deg, rgba(255, 42, 0, 0.08), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 42, 0, 0.2);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 0;
    overflow: hidden;
    box-shadow: 0 32px 96px rgba(255, 42, 0, 0.12), 0 0 60px rgba(255, 42, 0, 0.08);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.88) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.product-viewer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 35% 65%, rgba(255, 42, 0, 0.12) 0%, transparent 50%);
    padding: 40px;
    overflow: hidden;
    perspective: 1000px;
}

.product-viewer svg {
    cursor: grab;
    user-select: none;
    transition: transform 0.2s ease;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.product-viewer svg:active {
    cursor: grabbing;
}

.product-viewer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.03) 50%, transparent 100%),
        radial-gradient(circle at 40% 50%, rgba(255, 42, 0, 0.06), transparent 70%);
    pointer-events: none;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 16px 48px rgba(255, 42, 0, 0.16));
    animation: imageReveal 0.6s ease-out 0.1s both;
}

@keyframes imageReveal {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.product-side-panel {
    background: linear-gradient(180deg, rgba(255, 42, 0, 0.08), rgba(255, 42, 0, 0.04));
    border-left: 1px solid rgba(255, 42, 0, 0.15);
    padding: 24px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}

.product-info {
    position: absolute;
    top: 28px;
    left: 40px;
    right: 180px;
    animation: infoFade 0.5s ease-out 0.2s both;
}

@keyframes infoFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-meta-label {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.product-name {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 8px;
}

.product-desc {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.5;
    max-width: 480px;
}

.product-price-block {
    position: absolute;
    bottom: 28px;
    left: 40px;
    animation: priceReveal 0.5s ease-out 0.3s both;
}

@keyframes priceReveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-price-label {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.product-price {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent);
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 42, 0, 0.12);
    color: white;
    font-size: 1.6rem;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close-btn:hover {
    background: rgba(255, 42, 0, 0.24);
    transform: scale(1.08);
}

.size-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.size-title {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 4px;
}

.size-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.size-btn {
    padding: 8px 6px;
    border: 1px solid rgba(255, 42, 0, 0.2);
    background: rgba(255, 42, 0, 0.06);
    color: var(--muted);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.size-btn:hover {
    border-color: rgba(255, 42, 0, 0.4);
    background: rgba(255, 42, 0, 0.12);
    color: var(--accent);
}

.size-btn.selected {
    border-color: var(--accent);
    background: rgba(255, 42, 0, 0.2);
    color: white;
    box-shadow: 0 0 16px rgba(255, 42, 0, 0.2);
}

/* Размер "нет в наличии" */
.size-btn--oos,
.size-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
    pointer-events: none;
    border-color: rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: var(--dim, #666);
}

/* ===== CDEK PICKUP INTEGRATION ===== */

.cdek-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    margin-top: 12px;
}

.cdek-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cdek-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.cdek-search-input {
    padding: 10px 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.cdek-search-input:focus {
    border-color: var(--accent);
    background: rgba(255, 42, 0, 0.08);
}

.cdek-map {
    width: 100%;
    height: 300px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    overflow: hidden;
    background: var(--bg);
}

.cdek-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.cdek-item {
    padding: 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.cdek-item:hover {
    background: rgba(255, 42, 0, 0.08);
    border-color: rgba(255, 42, 0, 0.3);
}

.cdek-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
}

.cdek-item-distance {
    font-size: 0.8rem;
    color: var(--muted);
}

.cdek-item-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--muted);
}

.cdek-item-details p {
    margin: 0;
}

.cdek-select-btn {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 42, 0, 0.2);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cdek-select-btn:hover {
    background: rgba(255, 42, 0, 0.3);
    box-shadow: 0 0 12px rgba(255, 42, 0, 0.2);
}

.cdek-no-results {
    padding: 16px;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}
}

.modal-action-btn {
    margin-top: 12px;
    width: 100%;
    padding: 12px 8px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-action-btn:hover {
    background: #ff4422;
    transform: translateY(-2px);
}

.modal-buttons-group {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.modal-buttons-group .modal-action-btn {
    flex: 1;
    margin-top: 0;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 999;
    display: none;
}

.modal-overlay.active {
    display: block;
}

@media (max-width: 900px) {
    .page-banner,
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .banner-meta {
        justify-content: flex-start;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .product-modal-content {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
        height: auto;
        max-height: 90vh;
    }

    .product-viewer {
        min-height: 300px;
    }

    .product-side-panel {
        border-left: none;
        border-top: 1px solid rgba(255, 42, 0, 0.15);
        padding: 20px 16px;
        flex-direction: row;
        gap: 12px;
    }

    .size-selector {
        flex-direction: row;
        flex: 1;
        gap: 8px;
    }

    .size-title {
        display: none;
    }

    .size-options {
        flex-direction: row;
        gap: 6px;
        flex: 1;
    }

    .size-btn {
        flex: 1;
        padding: 12px 6px;
    }

    .modal-action-btn {
        margin-top: 0;
    }

    .product-info {
        top: 20px;
        left: 20px;
        right: 20px;
    }

    .product-price-block {
        position: static;
        margin-top: 12px;
    }

    .product-name {
        font-size: 1.4rem;
    }

    .product-desc {
        max-width: 100%;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .product-modal-content {
        border-radius: var(--radius-md);
        max-width: calc(100% - 16px);
    }

    .product-viewer {
        padding: 20px;
        min-height: 240px;
    }

    .product-side-panel {
        padding: 16px 12px;
    }

    .product-info {
        top: 16px;
        left: 16px;
        right: 16px;
    }

    .product-name {
        font-size: 1.2rem;
    }

    .product-price {
        font-size: 1.6rem;
    }

    .modal-close-btn {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
        top: 12px;
        right: 12px;
    }
}

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .site-nav {
        padding: 18px 20px;
        gap: 1rem;
    }

    .nav-links {
        display: none;
    }

    .page-main {
        width: min(100% - 32px, 1280px);
        padding-top: 108px;
    }

    .section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .sport-card {
        min-height: 360px;
    }

    .cart-item {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .item-controls {
        justify-content: space-between;
        width: 100%;
    }

    .cookie-banner {
        flex-direction: column;
        gap: 18px;
        padding: 18px 20px;
    }

    .cookie-actions {
        width: 100%;
        flex-direction: column;
    }

    .cookie-accept,
    .cookie-reject {
        width: 100%;
    }
}

/* ===== CITY SELECT DROPDOWN ===== */
.city-select-wrapper {
    position: relative;
    width: 100%;
}

.city-search {
    position: relative;
    z-index: 10;
}

.city-search:focus ~ .city-suggestions,
.city-suggestions:hover {
    display: block !important;
}

.city-search:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 42, 0, 0.1);
}

.city-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--panel);
    border: 1px solid var(--line-strong);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.city-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    color: var(--text);
}

.city-option:last-child {
    border-bottom: none;
}

.city-option:hover {
    background: rgba(255, 42, 0, 0.15);
    color: var(--accent);
}

.city-option.selected {
    background: rgba(255, 42, 0, 0.25);
    color: var(--accent);
    font-weight: 600;
}

/* Custom scrollbar for city suggestions */
.city-suggestions::-webkit-scrollbar {
    width: 6px;
}

.city-suggestions::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.city-suggestions::-webkit-scrollbar-thumb {
    background: rgba(255, 42, 0, 0.3);
    border-radius: 3px;
    transition: background 0.2s ease;
}

.city-suggestions::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 42, 0, 0.5);
}
