/* Trojanowski Group Web — V1.1 enhancements */

html,
body,
.site-header,
.card,
.hero-panel,
.product-visual,
.section-white,
.site-footer,
.download-item,
.callout {
    transition: background-color .32s ease, color .32s ease, border-color .32s ease, box-shadow .32s ease;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0d0e10;
    --surface: #151619;
    --surface-dark: #08090b;
    --text: #f4f4f2;
    --muted: #a5a8ae;
    --line: #2c2e32;
    --line-dark: rgba(255, 255, 255, .14);
    --accent: #f4f4f2;
    --shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

.brand {
    min-width: 86px;
    line-height: 0;
}

.brand-logo {
    width: auto;
    height: 52px;
    object-fit: contain;
    filter: invert(1);
    transform-origin: left center;
    transition: filter .28s ease, transform .22s ease, opacity .22s ease;
}

.brand:hover .brand-logo {
    transform: translateY(-1px) scale(1.015);
    opacity: .86;
}

html[data-theme="dark"] .brand-logo {
    filter: none;
}

.nav-shell {
    height: 80px;
}

.brand { order: 1; }
.main-nav { order: 2; margin-left: auto; }
.header-tools { order: 3; }
.menu-toggle { order: 4; }

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

.header-tool,
.language-picker {
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 78%, transparent);
    color: var(--text);
    box-shadow: 0 1px 0 rgba(255,255,255,.08) inset;
}

.header-tool {
    position: relative;
    width: 38px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    cursor: pointer;
    transition: transform .18s ease, background .2s ease, border-color .2s ease;
}

.header-tool:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--text) 36%, var(--line));
    background: var(--surface);
}

.header-tool svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.language-picker {
    min-width: 66px;
    padding: 0 28px 0 13px;
    appearance: none;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    background-image:
        linear-gradient(45deg, transparent 50%, currentColor 50%),
        linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position:
        calc(100% - 14px) 16px,
        calc(100% - 10px) 16px;
    background-size: 4px 4px, 4px 4px;
    background-repeat: no-repeat;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    border: 2px solid var(--bg);
    border-radius: 999px;
    background: var(--text);
    color: var(--bg);
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
}

.cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, .38);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(3px);
    transition: opacity .24s ease;
}

.cart-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 3001;
    width: min(440px, 100%);
    height: 100dvh;
    padding: 28px;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    color: var(--text);
    border-left: 1px solid var(--line);
    box-shadow: -30px 0 80px rgba(0,0,0,.16);
    transform: translateX(103%);
    transition: transform .32s cubic-bezier(.22,.72,.2,1);
}

.cart-drawer.open {
    transform: translateX(0);
}

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

.cart-head h2 {
    font-size: 25px;
    font-weight: 650;
    letter-spacing: -.035em;
}

.cart-close {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.cart-body {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 42px 0;
}

.cart-empty {
    max-width: 310px;
    text-align: center;
}

.cart-empty-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 20px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 18px;
}

.cart-empty-icon svg {
    width: 25px;
    height: 25px;
    stroke: currentColor;
}

.cart-empty strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 650;
}

.cart-empty p,
.cart-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.cart-footer {
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.cart-subtotal {
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 14px;
}

.cart-subtotal strong {
    font-size: 17px;
}

.cart-checkout {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 999px;
    background: var(--text);
    color: var(--bg);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
}

.cart-checkout:disabled {
    opacity: .42;
    cursor: not-allowed;
}

.cart-note {
    margin-top: 11px;
    text-align: center;
}

body.cart-open {
    overflow: hidden;
}

html[data-theme="dark"] .site-header {
    background: rgba(13, 14, 16, .9);
    border-bottom-color: rgba(255,255,255,.08);
}

html[data-theme="dark"] .main-nav a,
html[data-theme="dark"] .hero-copy,
html[data-theme="dark"] .panel-status {
    color: #b3b5ba;
}

html[data-theme="dark"] .button-primary {
    background: #f4f4f2;
    color: #111214;
}

html[data-theme="dark"] .button-primary:hover {
    background: #ffffff;
}

html[data-theme="dark"] .button-secondary {
    border-color: #34363b;
    background: rgba(255,255,255,.035);
    color: var(--text);
}

html[data-theme="dark"] .button-secondary:hover {
    border-color: #54575d;
    background: rgba(255,255,255,.075);
}

html[data-theme="dark"] .hero-panel,
html[data-theme="dark"] .card,
html[data-theme="dark"] .download-item,
html[data-theme="dark"] .callout {
    background: var(--surface);
}

html[data-theme="dark"] .section-white {
    background: #121316;
}

html[data-theme="dark"] .product-visual {
    background: #1b1d21;
}

html[data-theme="dark"] .route-line::before,
html[data-theme="dark"] .route-line::after {
    background: #34363a;
}

html[data-theme="dark"] .product-copy {
    background: #07080a;
}

html[data-theme="dark"] .site-footer {
    background: #0b0c0e;
    border-color: #25272b;
}

html[data-theme="dark"] .footer-note,
html[data-theme="dark"] .footer-nav a,
html[data-theme="dark"] .card p,
html[data-theme="dark"] .section-intro,
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .download-meta,
html[data-theme="dark"] .download-status {
    color: var(--muted);
}

html[data-theme="dark"] .stats-strip,
html[data-theme="dark"] .stat + .stat,
html[data-theme="dark"] .panel-metrics {
    border-color: var(--line);
}

@media (max-width: 960px) {
    .main-nav {
        gap: 20px;
    }

    .nav-shell {
        width: min(calc(100% - 28px), var(--max-width));
        gap: 12px;
    }
}

@media (max-width: 720px) {
    .nav-shell {
        height: 72px;
    }

    .brand-logo {
        height: 43px;
    }

    .main-nav {
        order: 5;
        inset: 72px 0 auto 0;
        min-height: calc(100vh - 72px);
        background: var(--bg);
    }

    html[data-theme="dark"] .main-nav {
        background: #0d0e10;
    }

    .header-tools {
        margin-left: auto;
        gap: 5px;
    }

    .language-picker {
        width: 58px;
        min-width: 58px;
        padding-left: 10px;
        padding-right: 22px;
    }

    .header-tool {
        width: 36px;
        height: 36px;
    }

    .cart-drawer {
        padding: 22px;
    }
}

@media (max-width: 410px) {
    .brand-logo {
        height: 38px;
    }

    .language-picker {
        width: 52px;
        min-width: 52px;
        font-size: 11px;
    }

    .header-tool {
        width: 34px;
        height: 34px;
    }
}
