:root {
    --bix-ink: #12202b;
    --bix-muted: #5d6b78;
    --bix-line: #e4ebf0;
    --bix-bg: #f4f7f8;
    --bix-card: #fff;
    --bix-cyan: #18b6cf;
    --bix-cyan-deep: #0c8ea4;
    --bix-navy: #102833;
    --bix-radius: 16px;
    --bix-shadow: 0 10px 30px rgba(16, 40, 51, 0.08);
    --bix-font: "Segoe UI", system-ui, sans-serif;
}

body.catalog-portal {
    font-family: var(--bix-font);
    background: var(--bix-bg);
    color: var(--bix-ink);
    padding-bottom: 72px;
}

.bix-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.bix-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--bix-line);
    backdrop-filter: blur(10px);
}

.bix-header-row,
.bix-nav,
.portal-main,
.bix-tabbar {
    width: min(1240px, calc(100% - 32px));
    margin-inline: auto;
}

.bix-header-row {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px 0 8px;
}

.bix-logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    line-height: 1;
    min-width: 0;
}

.bix-logo-mark {
    font-weight: 800;
    letter-spacing: -0.04em;
    font-size: 28px;
    color: var(--bix-navy);
}

.bix-logo-sub {
    color: var(--bix-cyan);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.bix-search {
    display: flex;
    gap: 8px;
    min-width: 0;
}

.bix-search input,
.portal-field input,
.portal-note-label textarea,
.portal-qty-input,
.bix-price input {
    width: 100%;
    border: 1px solid var(--bix-line);
    border-radius: 999px;
    background: #fff;
    color: var(--bix-ink);
    font: inherit;
    padding: 12px 16px;
}

.bix-search input:focus,
.portal-field input:focus,
.portal-note-label textarea:focus,
.portal-qty-input:focus,
.bix-price input:focus,
.portal-btn:focus-visible,
.cd-card-action:focus-visible,
.bix-chip:focus-visible,
.bix-tool:focus-visible,
.portal-nav-link:focus-visible {
    outline: 3px solid rgba(24, 182, 207, 0.35);
    outline-offset: 2px;
}

.bix-header-tools,
.bix-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bix-account {
    text-align: right;
}

.bix-tool,
.portal-nav-link,
.bix-cat,
.bix-block-head a {
    color: var(--bix-ink);
    text-decoration: none;
    font-weight: 650;
}

.bix-tool,
.portal-nav-link {
    padding: 8px 10px;
    border-radius: 999px;
}

.bix-tool.is-active,
.portal-nav-link.is-active,
.bix-tabbar a.is-active {
    background: #e7f8fb;
    color: var(--bix-cyan-deep);
}

.bix-nav {
    width: min(1240px, calc(100% - 32px));
    padding: 0 0 10px;
}

.portal-badge {
    display: inline-grid;
    place-items: center;
    min-width: 1.3rem;
    height: 1.3rem;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--bix-cyan);
    color: #fff;
    font-size: 12px;
}

.portal-btn {
    border-radius: 999px;
    font-weight: 700;
    white-space: nowrap;
}

.portal-btn-primary {
    background: var(--bix-cyan);
    border-color: var(--bix-cyan);
}

.portal-btn-primary:hover,
.portal-btn-primary:focus-visible {
    background: var(--bix-cyan-deep);
}

.portal-btn:disabled,
.cdp-add:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.bix-icon-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--bix-line);
    border-radius: 12px;
    background: #fff;
}

.bix-icon-btn span,
.bix-icon-btn span::before,
.bix-icon-btn span::after {
    display: block;
    width: 16px;
    height: 2px;
    margin: 3px auto;
    background: var(--bix-navy);
    content: "";
}

.portal-mobile-only { display: none; }

.bix-tabbar {
    display: none;
}

.bix-hero,
.bix-panel,
.bix-summary,
.bix-empty-card,
.bix-line,
.bix-card,
.bix-success,
.portal-quote-card {
    background: var(--bix-card);
    border: 1px solid var(--bix-line);
    border-radius: var(--bix-radius);
    box-shadow: var(--bix-shadow);
}

.bix-hero,
.bix-panel,
.bix-empty-card,
.bix-success {
    padding: 24px;
}

.bix-kicker,
.bix-subhead {
    margin: 0 0 6px;
    color: var(--bix-cyan-deep);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.bix-subhead { margin-top: 14px; }

.bix-hero h1,
.portal-page-title,
.bix-section-title,
.bix-block h2 {
    margin: 0;
    letter-spacing: -0.03em;
}

.bix-search-hero { margin-top: 16px; }
.bix-search-hero input { border-radius: 14px; }

.bix-cart-continue,
.bix-block-head,
.bix-success-actions,
.bix-card-row,
.bix-card-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.bix-cart-continue,
.bix-block { margin-top: 22px; }
.bix-cart-continue { flex-wrap: wrap; }
.bix-cart-continue { padding: 18px 20px; }

.bix-cat-grid,
.bix-grid {
    display: grid;
    gap: 14px;
}

.bix-cat-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin-top: 12px; }
.bix-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-top: 14px; }
body.catalog-portal .bix-catalog .bix-section { scroll-margin-top: 200px; }
body.catalog-portal .bix-catalog .bix-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
body.catalog-portal .bix-catalog .bix-card-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.3;
}
body.catalog-portal .bix-catalog .bix-card-cat,
body.catalog-portal .bix-catalog .cd-card-actions { display: none; }
body.catalog-portal .bix-catalog .bix-card-media img { width: 86%; height: 86%; }
body.catalog-portal .bix-merch-sort,
body.catalog-portal .bix-merch-metric { display: grid; gap: 4px; font-size: 12px; font-weight: 700; }
body.catalog-portal .bix-merch-sort[hidden],
body.catalog-portal .bix-merch-metric[hidden] { display: none; }
body.catalog-portal .bix-merch-sort select,
body.catalog-portal .bix-merch-metric input { min-height: 40px; border-radius: 999px; border: 1px solid var(--bix-line); padding: 0 12px; }
@media (min-width: 768px) and (max-width: 1099px) {
    body.catalog-portal .bix-catalog .bix-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1400px) {
    body.catalog-portal .bix-catalog .bix-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.bix-cat {
    padding: 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--bix-line);
}

.bix-card { overflow: hidden; display: flex; flex-direction: column; min-width: 0; background: #fff; }
.bix-card.cd-card::before { display: none; }
.bix-card .cd-card-hit { position: static; inset: auto; display: grid; }
.bix-card-name, .bix-card-model, .bix-card-price { color: var(--bix-ink); opacity: 1; }
.bix-card-media { display: grid; place-items: center; aspect-ratio: 1; background: #f7fbfc; position: relative; }
.bix-card-media img { width: 78%; height: 78%; object-fit: contain; }
.bix-card-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bix-card-model { margin: 0; font-weight: 800; }
.bix-card-name, .bix-card-cat, .bix-line p { margin: 0; }
.bix-card-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    min-height: 2.6em;
}
.bix-card-cat, .bix-count, .portal-user-sub { color: var(--bix-muted); font-size: 13px; }
.bix-card-price { font-size: 18px; }
.bix-card .cd-card-actions { position: static; right: auto; bottom: auto; width: 100%; margin-top: 8px; }
.bix-card .cd-card-action { flex: 1; text-align: center; border-radius: 999px; position: static; }

.bix-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 700;
    background: #eef3f6;
}
.bix-badge-new { position: absolute; top: 10px; left: 10px; background: var(--bix-navy); color: #fff; }
.stock-ok { background: #e5f8ef; color: #0d7a45; }
.stock-limited { background: #fff4d8; color: #8a5a00; }
.stock-out { background: #fde8e8; color: #9f1239; }

main.bix-catalog {
    overflow-x: hidden;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding-top: 8px;
    box-sizing: border-box;
}

body.catalog-portal .bix-catalog .cd-card {
    position: relative;
    min-height: auto;
}
body.catalog-portal .bix-catalog .cd-card::before { content: none; display: none; }
body.catalog-portal .bix-catalog .cd-card-hit {
    position: static !important;
    inset: auto !important;
    display: grid;
}

main.bix-catalog .portal-catalog-bar,
.bix-catalog-tools {
    position: sticky;
    top: 108px;
    z-index: 30;
    max-width: none;
    width: 100%;
    margin: 0 0 18px;
    background: var(--bix-bg);
    box-shadow: none;
}
body.catalog-portal #kategoriler {
    flex: 1 0 100%;
    min-width: 0;
    max-width: 100%;
}
body.catalog-portal .cd-cat-nav {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    overflow: visible;
}
.bix-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bix-chip, .bix-price {
    border: 1px solid var(--bix-line);
    background: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    font: inherit;
}
.bix-chip[aria-pressed="true"] { background: var(--bix-navy); color: #fff; }
.bix-price { display: flex; align-items: center; gap: 6px; }
.bix-price input { width: 88px; border: 0; padding: 0; border-radius: 0; }
.bix-empty, .bix-empty-card { margin: 18px 0; }
.bix-empty-card h2 { margin-top: 0; }

.bix-cart-layout, .bix-checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
    align-items: start;
}
.bix-line {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto auto auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
}
.bix-line-visual { width: 72px; height: 72px; display: grid; place-items: center; background: #f7fbfc; border-radius: 12px; }
.bix-line-visual img { max-width: 64px; max-height: 64px; object-fit: contain; }
.bix-line-copy { min-width: 0; }
.bix-qty { display: flex; gap: 6px; align-items: center; }
.portal-qty-input { width: 76px; border-radius: 12px; padding: 8px; }
.bix-summary { padding: 18px; position: sticky; top: 120px; }
.bix-summary dl { margin: 0 0 16px; }
.bix-summary div, .bix-meta div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--bix-line); }
.bix-summary .is-grand { font-size: 18px; font-weight: 800; }
.bix-summary .portal-btn, .bix-checkout .portal-btn { width: 100%; }
.bix-checkout-lines { list-style: none; padding: 0; margin: 0; }
.bix-checkout-lines li { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--bix-line); }
.portal-note-label textarea { border-radius: 14px; margin-top: 6px; }
.bix-grand { font-size: 28px; font-weight: 800; margin: 8px 0 16px; }
.bix-order-list, .portal-quote-list { display: grid; gap: 10px; }
.bix-order, .portal-quote-card { display: grid; grid-template-columns: 1.2fr 1fr auto auto; gap: 8px; align-items: center; padding: 14px; text-decoration: none; color: inherit; }
.bix-success { margin-bottom: 18px; background: #f3fbfb; }

body.catalog-portal .cdm .cdp-orderbar {
    background: #f4fbfc;
    border-top: 3px solid var(--bix-cyan);
}
body.catalog-portal .cdp-chip--option {
    border-radius: 16px;
}
body.catalog-portal .cdp-add {
    border-radius: 999px;
    background: var(--bix-cyan);
}
body.catalog-portal .cdp-variant-picker {
    scroll-margin-top: 80px;
    scroll-margin-bottom: 200px;
}

.portal-login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.portal-login-card { width: min(420px, 100%); background: #fff; border-radius: 20px; padding: 28px; box-shadow: var(--bix-shadow); }
.portal-toast, .bix-toast {
    position: fixed;
    left: 50%;
    bottom: 84px;
    transform: translateX(-50%);
    background: var(--bix-navy);
    color: #fff;
    border-radius: 999px;
    padding: 12px 16px;
    z-index: 80;
}

@media (max-width: 1100px) {
    .bix-account { display: none; }
}

@media (max-width: 900px) {
    .bix-cart-layout, .bix-checkout-grid, .bix-order, .portal-quote-card { grid-template-columns: 1fr; }
    .bix-summary { position: static; }
}

@media (max-width: 768px) {
    .portal-mobile-only { display: inline-grid; place-items: center; }
    .bix-header-row { grid-template-columns: auto auto minmax(0, 1fr); width: calc(100% - 20px); }
    .bix-search { grid-column: 1 / -1; order: 4; }
    .bix-header-tools .bix-account,
    .bix-header-tools .bix-tool-orders,
    .bix-nav { display: none; }
    .bix-nav.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: calc(100% - 20px);
        padding-bottom: 12px;
    }
    .bix-tabbar {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        background: #fff;
        border-top: 1px solid var(--bix-line);
        z-index: 50;
        padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    }
    .bix-tabbar a { text-align: center; text-decoration: none; color: var(--bix-ink); font-size: 12px; font-weight: 700; padding: 6px; }
    .bix-line { grid-template-columns: 72px minmax(0, 1fr); }
    .bix-line-price span, .bix-line-total span { display: block; color: var(--bix-muted); font-size: 12px; font-weight: 600; }
.bix-line-price, .bix-line-total, .bix-qty, .bix-line form:last-child { grid-column: 1 / -1; }
    .bix-catalog-tools { top: 118px; }
    .bix-cat-grid { grid-template-columns: 1fr; }
    body.catalog-portal .bix-catalog .bix-section { scroll-margin-top: 250px; }
    body.catalog-portal .bix-catalog .bix-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    body.catalog-portal .bix-catalog .bix-card-body { padding: 8px; gap: 4px; }
    body.catalog-portal .bix-catalog .bix-card-price { font-size: 15px; }
    body.catalog-portal .cd-cat-nav { flex-wrap: nowrap; overflow-x: auto; }
    body.catalog-portal .cdm-dialog { width: 100%; height: 100%; max-height: none; border-radius: 0; }
}

@media (min-width: 769px) {
    body.catalog-portal { padding-bottom: 32px; }
}
