:root {
    --navy: #2f3540;
    --gold: #ffb020;
    --magenta: #d946ef;
    --cyan: #06b6d4;
    --red: #ef4444;
    --royal: #4b5563;
    --card: rgba(40, 44, 52, .78);
    --line: rgba(255,255,255,.12);
    --muted: #b7c0cc;
    --text: #e8edf3;
    --row: rgba(255,255,255,.04);
    --shadow: 0 14px 36px rgba(0, 0, 0, .28);
    --rgb: linear-gradient(90deg, #ffb020, #ff5a1f, #d946ef, #06b6d4, #2563eb, #ef4444, #ffb020);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html {
    scroll-behavior: smooth;
    min-height: 100%;
    background-color: #1a1d24;
    background-image: var(--site-bg, url("img/bg.png"));
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100% 100%;
    background-attachment: fixed;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
html::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(12, 14, 20, .5);
    pointer-events: none;
    z-index: 0;
}
body {
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    line-height: 1.45;
    min-height: 100vh;
    min-height: 100dvh;
    background: transparent;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.rgb-frame {
    position: relative;
    border: 1.5px solid transparent;
}
.rgb-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: var(--rgb);
    background-size: 220% 100%;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    pointer-events: none;
}
@media (min-width: 1024px) and (hover: hover) and (prefers-reduced-motion: no-preference) {
    .rgb-frame::after { animation: rgbSlide 14s linear infinite; }
}
@keyframes rgbSlide {
    to { background-position: 220% 0; }
}

/* HEADER */
.topbar {
    background: rgba(28, 32, 40, .72);
    color: #eef2f6;
    position: relative;
    z-index: 200;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
}
@media (min-width: 1024px) {
    .topbar { backdrop-filter: blur(14px); }
}
.topbar::after {
    content: '';
    display: block;
    height: 3px;
    background: var(--rgb);
    background-size: 220% 100%;
}
@media (min-width: 1024px) and (hover: hover) and (prefers-reduced-motion: no-preference) {
    .topbar::after { animation: rgbLine 14s linear infinite; }
}
@keyframes rgbLine {
    to { background-position: 220% 0; }
}
.topbar-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 10px 22px 8px;
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr) auto;
    align-items: center;
    gap: 16px;
}
.brand { display: flex; align-items: center; min-width: 0; }
.brand-logo {
    height: 132px;
    width: auto;
    max-width: 380px;
    object-fit: contain;
    object-position: left center;
}
.topbar-title {
    text-align: center;
    padding: 0 22px 10px;
}
.topbar-title h1 {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1.6px;
    color: #e6eaf0;
}
.topbar-title p {
    font-size: 11px;
    color: #b4becb;
    margin-top: 2px;
}

.search-wrap {
    position: relative;
    max-width: 560px;
    width: 100%;
    justify-self: center;
}
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid transparent;
    border-radius: 12px;
    padding: 0 12px;
    background:
        linear-gradient(#2a303a, #2a303a) padding-box,
        var(--rgb) border-box;
    background-size: auto, 220% 100%;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
}
.search-box svg {
    width: 18px;
    height: 18px;
    color: #d1d5db;
    flex-shrink: 0;
}
.search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #f3f4f6;
    font-family: inherit;
    font-size: 14px;
    padding: 11px 0;
    outline: none;
}
.search-box input::placeholder { color: #9ca3af; }
.search-results {
    position: absolute;
    left: 0; right: 0; top: calc(100% + 8px);
    background: #2b3038;
    color: #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
    overflow: hidden;
    display: none;
    z-index: 30;
}
.search-results.open { display: block; }
.search-hit {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    cursor: pointer;
}
.search-hit:last-child { border-bottom: 0; }
.search-hit:hover, .search-hit.active { background: rgba(255,255,255,.06); }
.search-hit .tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: #e5e7eb;
    background: #3f4652;
    border-radius: 6px;
    display: grid;
    place-items: center;
    height: 22px;
    align-self: center;
}
.search-hit .tag.urun { color: #ffd7a8; background: #4a3b2f; }
.search-hit b { display: block; font-size: 13.5px; color: #f3f4f6; }
.search-hit small { color: #9ca3af; font-size: 11.5px; }
.search-empty { padding: 14px; color: #9ca3af; font-size: 13px; }

.top-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
#authSlot { display: contents; }
.btn {
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    border-radius: 8px;
    padding: 9px 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: .15s transform, .15s filter;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-gold { background: var(--gold); color: #3b2500; }
.btn-navy { background: #4b5563; color: #fff; }
.btn-ghost {
    background: rgba(255,255,255,.1);
    color: #f3f4f6;
    border: 1px solid rgba(255,255,255,.16);
}
.auth-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e5e7eb;
    font-size: 13px;
    font-weight: 650;
}
.btn svg { width: 16px; height: 16px; }
.modal {
    position: fixed;
    inset: 0;
    background: rgba(8, 10, 14, .72);
    display: grid;
    place-items: center;
    z-index: 80;
    padding: 16px;
}
.modal.hidden { display: none; }
.bayi-card {
    position: relative;
    width: min(420px, 100%);
    background: #2a2e36;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    padding: 28px 24px 22px;
    color: #f3f4f6;
    box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.modal-x {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    color: #d1d5db;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
}
.bayi-logo { height: 72px; display: block; margin: 0 auto 10px; object-fit: contain; }
.bayi-card h2 { text-align: center; font-size: 22px; margin-bottom: 6px; }
.bayi-card p { text-align: center; color: #c5ccd6; font-size: 13px; margin-bottom: 16px; line-height: 1.45; }
.bayi-card label { display: block; font-size: 12px; color: #c5ccd6; margin: 8px 0 5px; }
.bayi-card input {
    width: 100%;
    border: 1px solid rgba(255,255,255,.14);
    background: #1f242c;
    color: #fff;
    border-radius: 8px;
    padding: 11px 12px;
    font-family: inherit;
    outline: none;
}
.bayi-submit { width: 100%; justify-content: center; margin-top: 14px; }
.bayi-err { min-height: 18px; margin-top: 8px; color: #fca5a5; font-size: 13px; text-align: center; }

.wrap {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 22px;
    flex: 1 0 auto;
}

.toc {
    background: var(--card);
    border-radius: 14px;
    padding: 22px 26px 10px;
    box-shadow: var(--shadow);
    margin-bottom: 22px;
    border: 1.5px solid transparent;
    background-image:
        linear-gradient(rgba(42, 46, 54, .86), rgba(42, 46, 54, .86)),
        var(--rgb);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}
.toc-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 12px;
}
.sec-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e5e7eb;
    font-weight: 800;
    letter-spacing: 1.2px;
    font-size: 15px;
}
.sec-title::before {
    content: '';
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: var(--rgb);
}
.toc-meta { color: var(--muted); font-size: 13px; font-weight: 500; }
.toc-meta b { color: #f3f4f6; font-weight: 700; }
.catalog-groups {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding-bottom: 12px;
}
.catalog-col {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    padding: 12px 14px 8px;
}
.catalog-col-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .6px;
    color: #f3f4f6;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.toc-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 9px 4px;
    border-bottom: 1px solid var(--line);
    color: #d1d5db;
    font-size: 13.5px;
    font-weight: 500;
}
.toc-main {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    align-items: center;
    min-width: 0;
}
.toc-item:last-child { border-bottom: 0; }
.toc-item:hover .toc-name { color: #fbbf24; }
.toc-num {
    width: 26px; height: 26px;
    color: #fff;
    border-radius: 6px;
    display: grid; place-items: center;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255,255,255,.06);
    border: 1.5px solid rgba(255,255,255,.82);
}
.toc-list .toc-item:nth-child(7n+1) .toc-num { border-color: #ffb020; color: #ffd27a; }
.toc-list .toc-item:nth-child(7n+2) .toc-num { border-color: #e879f9; color: #f0abfc; }
.toc-list .toc-item:nth-child(7n+3) .toc-num { border-color: #22d3ee; color: #67e8f9; }
.toc-list .toc-item:nth-child(7n+4) .toc-num { border-color: #f87171; color: #fca5a5; }
.toc-list .toc-item:nth-child(7n+5) .toc-num { border-color: #a78bfa; color: #c4b5fd; }
.toc-list .toc-item:nth-child(7n+6) .toc-num { border-color: #34d399; color: #6ee7b7; }
.toc-list .toc-item:nth-child(7n+7) .toc-num { border-color: #fb923c; color: #fdba74; }
.toc-pair {
    font-size: 11px;
    color: #9ca3af;
    white-space: nowrap;
}
.toc-pair:hover { color: #ffd27a; }

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

.cat-block { margin-bottom: 28px; scroll-margin-top: 128px; }
.cat-bar {
    color: #f3f4f6;
    border-radius: 10px 10px 0 0;
    padding: 11px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: .6px;
    font-weight: 700;
    font-size: 14px;
    background: linear-gradient(90deg, #3f4652 0%, #2f3540 100%);
}
.cat-bar span { color: #d1d5db; font-weight: 650; font-size: 13px; }
.cat-block:nth-child(4n+1) .cat-bar { background: linear-gradient(90deg, #4b5563, #374151); }
.cat-block:nth-child(4n+2) .cat-bar { background: linear-gradient(90deg, #52525b, #3f3f46); }
.cat-block:nth-child(4n+3) .cat-bar { background: linear-gradient(90deg, #57534e, #44403c); }
.cat-block:nth-child(4n+4) .cat-bar { background: linear-gradient(90deg, #3f4652, #1f2937); }

.product {
    background: var(--card);
    border: 1px solid rgba(255,255,255,.08);
    border-top: 0;
    overflow: hidden;
}
.product:last-child { border-radius: 0 0 10px 10px; }
.prod-head {
    padding: 8px 16px;
    font-weight: 650;
    font-size: 14px;
    background: #3a404a;
    color: #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.stok-badge {
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 3px 9px;
    white-space: nowrap;
}
.stok-badge.var { background: #14532d; color: #bbf7d0; }
.stok-badge.yok { background: #7f1d1d; color: #fecaca; }
.cat-block:nth-child(4n+1) .prod-head { background: #3f4650; color: #e5e7eb; }
.cat-block:nth-child(4n+2) .prod-head { background: #3b3b42; color: #e5e7eb; }
.cat-block:nth-child(4n+3) .prod-head { background: #3d3a36; color: #e5e7eb; }
.cat-block:nth-child(4n+4) .prod-head { background: #353b45; color: #e5e7eb; }
.prod-body {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 8px;
    padding: 14px;
    background: rgba(36, 40, 48, .88);
}
.prod-info p {
    font-size: 12.5px;
    color: #c5ced8;
    margin-bottom: 12px;
}
.prod-img {
    width: 170px;
    margin: 0 auto;
    filter: drop-shadow(0 10px 14px rgba(22,58,115,.16));
}
.prod-img img {
    width: 100%;
    height: 190px;
    object-fit: contain;
}

.prod-table { overflow-x: auto; }
table.price {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}
table.price th {
    background: #3a404a;
    color: #e5e7eb;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .4px;
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    white-space: nowrap;
}
table.price td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    color: #d1d5db;
}
table.price tbody tr:nth-child(even) { background: var(--row); }
table.price tbody tr:hover { background: rgba(255,255,255,.06); }
.col-price {
    font-weight: 700;
    color: #f3f4f6;
    white-space: nowrap;
    text-align: right;
}
.col-price.is-off { color: #fbbf24; }
.col-price.is-locked {
    letter-spacing: 2px;
    color: #9ca3af;
    font-variant-numeric: tabular-nums;
}
.price-lock-note {
    margin-top: 8px;
    font-size: 12px;
    color: #fbbf24;
    font-weight: 600;
}
.old-price {
    display: block;
    font-size: 10.5px;
    color: #93a1ae;
    font-weight: 500;
    text-decoration: line-through;
}
.calc.is-locked input { opacity: .55; pointer-events: none; }

.sidebar { position: sticky; top: 128px; display: grid; gap: 16px; }
.calc {
    color: #f3f4f6;
    border-radius: 14px;
    padding: 18px 16px 16px;
    box-shadow: var(--shadow);
    background: linear-gradient(160deg, #3f4652 0%, #2a303a 100%);
    border: 1.5px solid rgba(255,255,255,.1);
}
.calc-icon {
    width: 42px; height: 42px;
    background: var(--gold);
    color: #3b2500;
    border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 10px;
}
.calc h3 { font-size: 16px; font-weight: 700; }
.calc .sub { font-size: 12px; opacity: .86; margin: 3px 0 14px; }
.calc label {
    display: block;
    font-size: 11px;
    letter-spacing: .4px;
    font-weight: 650;
    margin-bottom: 6px;
    opacity: .95;
}
.calc input {
    width: 100%;
    border: 0;
    border-radius: 8px;
    padding: 11px 12px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}
.calc-hint { margin-top: 8px; font-size: 11px; opacity: .8; }
.calc-result {
    margin-top: 12px;
    background: rgba(255,255,255,.16);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    display: none;
}
.calc-result.on { display: block; }
.side-cats {
    background: var(--card);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
    max-height: calc(100vh - 380px);
    display: flex;
    flex-direction: column;
}
.side-cats h3 {
    padding: 12px 14px;
    font-size: 14px;
    color: #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    background: #3a404a;
}
.side-cats nav { overflow: auto; padding: 6px 0 10px; }
.side-link {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 8px;
    align-items: center;
    padding: 8px 14px;
    font-size: 12.5px;
    color: #d1d5db;
}
.side-link:hover, .side-link.active { background: rgba(255,255,255,.06); }
.side-link .n {
    width: 22px; height: 22px;
    background: #4b5563;
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: grid; place-items: center;
}

.is-hit { outline: 2px solid var(--cyan); outline-offset: 2px; }

.top {
    position: fixed;
    right: 22px; bottom: 22px;
    width: 42px; height: 42px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #4b5563, #374151);
    color: #fff;
    cursor: pointer;
    box-shadow: var(--shadow);
    font-size: 18px;
    z-index: 50;
}
footer.site-end {
    flex-shrink: 0;
    width: 100%;
    margin-top: auto;
    background: #0b1c33;
    color: #fff;
    text-align: center;
    font-size: 13px;
    padding: 0;
    position: relative;
    z-index: 5;
    overflow: hidden;
}
.site-end-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 36px 22px 28px;
    align-items: stretch;
}
.end-col {
    min-width: 0;
    padding: 0 22px;
    border-right: 1px solid rgba(255,255,255,.28);
    overflow-wrap: anywhere;
    word-break: break-word;
}
.end-col:last-child { border-right: 0; }
.end-col h3 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .6px;
    margin-bottom: 14px;
}
.end-col p {
    line-height: 1.55;
    color: #f3f6fa;
    font-weight: 500;
}
.end-contact { text-align: left; }
.end-contact h3 { text-align: left; }
.end-mail {
    display: inline-block;
    max-width: 100%;
    color: #7ec8e8;
    text-decoration: none;
    margin-bottom: 8px;
    font-weight: 600;
}
.end-mail:hover { text-decoration: underline; }
.end-contact p { margin: 6px 0; }
.end-social {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.end-social span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.end-social svg { width: 16px; height: 16px; fill: #0b1c33; }
.end-copy {
    padding: 8px 16px 6px;
    font-size: 12px;
    color: #c5ccd6;
}
.end-designer {
    display: block;
    padding: 10px 16px 18px;
    color: #dbe4ee;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .4px;
}
.end-designer:hover { color: #fff; text-decoration: underline; }

@media (max-width: 1100px) {
    .topbar-inner {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }
    .search-wrap { max-width: 100%; }
    .brand, .top-actions { justify-content: center; }
    .catalog-groups { grid-template-columns: 1fr; }
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .prod-body { grid-template-columns: 1fr; }
    .prod-img { width: 140px; }
    .site-end-inner { grid-template-columns: 1fr; gap: 0; padding: 28px 18px 12px; }
    .end-col {
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,.28);
        padding: 0 8px 18px;
        margin-bottom: 18px;
    }
    .end-col:last-child { border-bottom: 0; margin-bottom: 0; }
    .end-contact, .end-contact h3 { text-align: center; }
    .end-social { justify-content: center; }
    .rgb-frame::after, .topbar::after { animation: none !important; }
    html { background-attachment: scroll; background-size: 100% 100%; }
}
@media (max-width: 700px) {
    .catalog-groups { grid-template-columns: 1fr; }
    table.price { font-size: 12px; min-width: 0; width: 100%; table-layout: fixed; }
    table.price th, table.price td { padding: 7px 6px; white-space: normal; }
    .col-price { font-size: 13px; }
    .prod-table { -webkit-overflow-scrolling: touch; }
    .wrap { padding: 12px; }
    .brand-logo { height: 96px; max-width: 280px; }
    .search-box input, .bayi-card input, .calc input { font-size: 16px; }
    .btn { min-height: 44px; }
    .top-actions { width: 100%; justify-content: center; }
    .top { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
    .site-end { padding-bottom: env(safe-area-inset-bottom, 0px); }
    .bayi-card { max-height: min(90dvh, 640px); overflow: auto; }
}

@media print {
    .topbar, .sidebar, .top, .toc, .search-wrap, .modal, .price-lock-note, .site-end { display: none !important; }
    .layout { grid-template-columns: 1fr; }
    .cat-block { break-inside: avoid; }
    body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) {
    .rgb-frame::after, .topbar::after { animation: none !important; }
}
