/*
======================================================================================
 theme.css — policar.info modern UI layer
 Loaded AFTER w3.css and style.css. Overrides the legacy layout while keeping all
 existing w3-* utility classes and server-side markup working.
======================================================================================
*/

/* ------------------------------------------------------------------ tokens */
:root {
    --qx-red: #ff392f;
    --qx-red-dark: #d91e10;
    --qx-red-ink: #b30006;
    --qx-ink: #14161b;
    --qx-ink-2: #2c313a;
    --qx-body: #40454e;
    --qx-muted: #6b7280;
    --qx-line: #e6e8ec;
    --qx-line-soft: #f0f1f4;
    --qx-bg: #f5f5f4;
    --qx-surface: #ffffff;
    --qx-sidebar-w: 220px;
    --qx-header-h: 127px;
    --qx-maxw: 1480px;
    --qx-radius: 14px;
    --qx-radius-sm: 9px;
    --qx-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 18px rgba(16, 24, 40, .06);
    --qx-shadow-hover: 0 10px 28px rgba(16, 24, 40, .16);
}

@media (max-width: 992px) {
    :root {
        --qx-header-h: 90px;
    }
}

/* ------------------------------------------------------------------ base */
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--qx-header-h) + 12px);
}

body {
    background-color: var(--qx-bg);
    color: var(--qx-body);
    font-family: "Titillium Web", "Segoe UI", Tahoma, Verdana, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    border-radius: var(--qx-radius-sm);
}

#page img {
    height: auto;
}

#page img,
#page a img {
    border: none;
}

a {
    color: var(--qx-red-dark);
    text-decoration: none;
}

a:hover {
    color: var(--qx-red-ink);
    text-decoration: underline;
}

ul {
    list-style-type: disc;
    padding-left: 1.4em;
}

ul li {
    padding-top: .3em;
    padding-bottom: .3em;
    line-height: 1.4;
}

h1, h2, h3 {
    color: var(--qx-ink);
    line-height: 1.25;
}

#page h1 {
    font-size: 1.7em;
    font-weight: 600;
    letter-spacing: -.2px;
}

h2 {
    font-size: 1.25em;
    font-weight: 700;
}

h3 {
    font-size: 1.05em;
    font-weight: 700;
    font-variant: small-caps;
    letter-spacing: .4px;
    background-color: transparent;
    border-left: 3px solid var(--qx-red-dark);
    border-radius: 0 var(--qx-radius-sm) var(--qx-radius-sm) 0;
    padding: .5em .7em;
    margin-top: 1.6em;
}

p {
    padding-top: 1em;
    padding-bottom: 1em;
    margin: 0;
    line-height: 1.75;
    text-align: justify;
}

hr {
    border: 0;
    border-top: 1px solid var(--qx-line);
    margin: 1.5em 0;
}

/* ================================================================== header */
#siteHeader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--qx-ink);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .05), 0  4px 4px rgba(0, 0, 0, .22);

}

.qx-header-inner {
    max-width: var(--qx-maxw);
    margin: 0 auto;
    min-height: 88px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    background-image: url('/Style/policar-head.jpg');
    background-position: right -20px top -34px;
    background-repeat: no-repeat;
    background-size: auto 150px;
}

#hdrLogo {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 0;
    background-image: url('/Style/policar-logo.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    text-indent: -9999px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

#hdrTitleBlock {
    flex: 1 1 auto;
    color: #f5f6f8;
    font-weight: 600;
    font-size: 1.02em;
    line-height: 1.3;
    letter-spacing: .1px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
    max-width: 760px;
}

#hdrRight {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

#hdrRight a {
    color: #e9eaed;
    font-size: .78em;
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    transition: background .15s ease, color .15s ease;
}

#hdrRight a:hover {
    background: var(--qx-red-dark);
    color: #fff;
    text-decoration: none;
}

.qx-hamburger {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--qx-red-dark);
    color: #fff !important;
    font-size: 20px;
    cursor: pointer;
    transition: background .15s ease;
}

.qx-hamburger:hover {
    background: var(--qx-red-dark);
    text-decoration: none;
}

/* primary navigation bar */
.qx-nav {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    padding: 0 max(12px, calc((100% - var(--qx-maxw)) / 2));
    background: linear-gradient(180deg, #f23028, #cf1408);
    border-top: 1px solid rgba(255, 255, 255, .18);
}

.qx-nav a {
    color: #fff;
    text-transform: uppercase;
    white-space: nowrap;
    font-weight: 600;
    font-size: .9em;
    letter-spacing: .6px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    transition: background .15s ease;
}

.qx-nav a:hover {
    background: rgba(0, 0, 0, .18);
    color: #fff;
    text-decoration: none;
}

.qx-nav a.qx-nav-active,
.qx-nav a.w3-red {
    background: rgba(0, 0, 0, .28);
}

.qx-nav .qx-nav-lang {
    margin-left: auto;
    background: rgba(0, 0, 0, .35);
}

/* ============================================================ left sidebar */
#leftMenuBar {
    top: var(--qx-header-h);
    bottom: 0;
    width: var(--qx-sidebar-w) !important;
    height: auto !important;
    background-color: var(--qx-surface);
    border-right: 1px solid var(--qx-line);
    padding: 12px 0 4em 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#leftMenuBar .w3-bar-item,
#leftMenuBar a {
    display: block;
    width: 100%;
    padding: 10px 16px;
    font-size: 15px;
    color: var(--qx-ink-2);
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 0;
    border-left: 3px solid transparent;
    transition: color .12s ease, border-color .12s ease;
}

#leftMenuBar a:hover {
    color: var(--qx-red-dark);
    text-decoration: underline;
    border-left-color: transparent;
}

#leftMenuBar a.w3-red,
#leftMenuBar a.selected {
    color: var(--qx-red-dark) !important;
    text-decoration: underline;
    background: transparent !important;
    border-left-color: var(--qx-red-dark);
}

#leftMenuBar .hr {
    width: auto;
    margin: .5em 16px;
    border-top: 1px solid var(--qx-line);
}

/* ================================================================ content */
.w3-main {
    margin-left: var(--qx-sidebar-w);
    margin-top: var(--qx-header-h);
    margin-bottom: 0;
    background-color: transparent;
    min-height: 0;
    padding-bottom: 2em;
}

.w3-content {
    max-width: var(--qx-maxw);
}

#page {
    min-height: 0;
    padding-top: 1.5em;
    padding-bottom: 2em;
}

#page a {
    color: var(--qx-red-dark);
}

#page a:hover {
    color: var(--qx-red-ink);
}

#sidebar {
    padding-top: 1.5em;
    padding-bottom: 2em;
    background-color: var(--qx-bg);
}

#sidebar .w3-card,
#sidebar > div {
    border-radius: var(--qx-radius-sm) !important;
    background-color: var(--qx-surface);
}

section {
    margin-bottom: 2.5em;
    display: block;
}

#footer {
    text-align: center;
    border-top: 1px solid var(--qx-line);
    background: var(--qx-surface);
    margin-top: 2em !important;
    padding: 1.5em 1em 2.5em;
    color: var(--qx-muted);
}

/* ================================================================== cards */
.caption {
    padding: 8px 10px;
    color: var(--qx-ink-2) !important;
    text-align: center;
    background-color: var(--qx-surface);
    text-decoration: none;
    font-size: 13px !important;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.w3-card {
    box-shadow: var(--qx-shadow) !important;
    border-radius: var(--qx-radius-sm);
}

.w3-card:hover {
    box-shadow: var(--qx-shadow-hover) !important;
}

.w3-round {
    border-radius: var(--qx-radius-sm) !important;
}

.w3-round-large {
    border-radius: var(--qx-radius) !important;
}

/* square image tiles generated by doImage() */
.square-3,
.square-4,
.square-5,
.square-6,
.tile-3 {
    float: left;
    position: relative;
    overflow: hidden;
    border-radius: var(--qx-radius);
}

.square-3 {
    width: 32.125%;
    padding-bottom: 32.125%;
    margin: .4%;
}

.square-4 {
    width: 23.5%;
    padding-bottom: 23.5%;
    margin: .4%;
}

.square-5 {
    width: 19%;
    padding-bottom: 19%;
    margin: .4%;
}

.square-6 {
    width: 14.8%;
    padding-bottom: 14.8%;
    margin: .4%;
}

.square-3:hover,
.square-4:hover,
.square-5:hover,
.square-6:hover {
    box-shadow: var(--qx-shadow-hover) !important;
}

/* list-view rows (catalog + shop) — image left, text right, rounded card */
.qx-listitem {
    border-radius: var(--qx-radius-sm);
    background-color: #fff;
    overflow: hidden;
}

/* square pictures inside list rows (no rounded image borders) */
.qx-listitem img {
    border-radius: 0;
}

.qx-listitem .qx-title {
    color: var(--qx-ink);
    font-size: 1.05em;
    margin-bottom: .35em;
}

.qx-list-meta span {
    display: block;
    margin: 0 0 .15em 0;
    white-space: nowrap;
    color: var(--qx-body);
}

.qx-list-meta b {
    color: var(--qx-muted);
    font-weight: 600;
}

.qx-list-note {
    color: var(--qx-body) !important;
    /* w3-table w3-bordered style */
    width: 100%;
    border: 1px solid var(--qx-line-soft);
    border-collapse: collapse;
    margin-top: 0;
    outline: none !important;
    text-decoration: none !important;
}

/* make the note span full width on smaller screens */
@media (max-width: 600px) {
    .qx-list-note {
        display: block;
    }
    .qx-list-note > div {
        display: block;
        width: 100%;
    }
}

.qx-list-note > div {
    display: table-cell;
    padding: .5em 1em;
    vertical-align: top;
}

/* make the note span full width on smaller screens */
@media (max-width: 600px) {
    .qx-list-note {
        display: block;
    }
    .qx-list-note > div {
        display: block;
        width: 100%;
    }
}

/* shop list card: tight gap between title and note (same as qx-title/qx-meta) */
.qx-note {
    margin-top: .35em;
}

/* ================================================================== tables */
.tbl-list,
.tbl-grid,
.tbl-ghost {
    border-collapse: collapse;
    width: 100%;
}

.tbl-list th,
.tbl-grid th,
.tbl-ghost th {
    background-color: var(--qx-line-soft);
    border: 1px solid var(--qx-line);
    padding: 6px 8px;
    text-align: left;
}

.tbl-list td,
.tbl-grid td,
.tbl-ghost td {
    padding: 5px 8px;
}

.tbl-list tr:hover,
.tbl-grid tr:hover,
.tbl-ghost tr:hover {
    background-color: #f6f7f9;
}

#page table {
    max-width: 100%;
}

#page table td,
#page table th {
    overflow-wrap: break-word;
}

/* ================================================================== forms */
input,
textarea,
select {
    padding: .55em .7em;
    border: 1px solid var(--qx-line);
    border-radius: var(--qx-radius-sm);
    background: #fff;
    color: var(--qx-ink-2);
    font-family: inherit;
    font-size: 1em;
    max-width: 100%;
    outline: none !important;
}

input:focus,
textarea:focus,
select:focus {
    outline: none !important;
    border-color: var(--qx-line);
    box-shadow: none !important;
}

.w3-input,
.w3-select {
    width: 100%;
    border: 1px solid var(--qx-line);
    border-radius: var(--qx-radius-sm);
    padding: .55em .7em;
    background: #fff;
    color: var(--qx-ink-2);
    outline: none !important;
}

.w3-input:focus,
.w3-select:focus {
    outline: none !important;
    border-color: var(--qx-line) !important;
    box-shadow: none !important;
}

.w3-input.w3-border-0,
.w3-select.w3-border-0 {
    border: 0;
}

.w3-input.w3-border,
.w3-select.w3-border {
    border: 1px solid var(--qx-line);
}

.w3-input:focus,
.w3-select:focus {
    outline: none !important;
    border-color: var(--qx-line) !important;
    box-shadow: none !important;
}

.w3-input + .w3-input,
.w3-input + textarea,
textarea + .w3-input {
    margin-top: .6em;
}

input[type="button"],
input[type="submit"],
input[type="reset"] {
    width: auto;
    min-width: 110px;
    background: var(--qx-red);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: .6em 1.4em;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease;
}

input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover {
    background: var(--qx-red-dark);
}

/* ================================================================ buttons */
.w3-button {
    border-radius: var(--qx-radius-sm);
    font-weight: 600;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease, transform .05s ease;
}

.w3-button:active {
    transform: translateY(1px);
}

.w3-button.w3-black,
.w3-button.w3-dark-gray {
    background-color: var(--qx-ink) !important;
    color: #fff !important;
}

.w3-button.w3-black:hover,
.w3-button.w3-dark-gray:hover {
    background-color: #000 !important;
    box-shadow: var(--qx-shadow-hover);
    text-decoration: none;
}

.w3-button.w3-border {
    border: 1px solid var(--qx-line);
    background: #fff;
}

.w3-button.w3-border:hover {
    border-color: var(--qx-red) !important;
    color: var(--qx-red) !important;
}

.w3-button.w3-round-large,
.w3-button.qx-pill {
    border-radius: 999px;
}

/* ================================================================ tables */
.w3-table,
.w3-table-all {
    border: 1px solid var(--qx-line);
    border-radius: var(--qx-radius-sm);
    overflow: hidden;
}

.w3-table td,
.w3-table th,
.w3-table-all td,
.w3-table-all th {
    border-color: var(--qx-line);
    padding: 7px 10px;
}

.w3-table tr:nth-child(even),
.w3-striped tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.w3-bordered tr,
.w3-table-all tr {
    border-bottom: 1px solid var(--qx-line);
}

/* --------------------------------------------------- buy / form tables */
#page table {
    max-width: 100%;
}

.qx-buy-table td {
    vertical-align: middle;
}

@media (max-width: 600px) {
    .qx-buy-table,
    .qx-buy-table tbody,
    .qx-buy-table tr,
    .qx-buy-table td {
        display: block;
        width: 100% !important;
    }

    .qx-buy-table td {
        padding: 0 0 .8em !important;
        text-align: center;
    }
}

#page label {
    display: block;
    margin: .9em 0 .25em;
    font-weight: 600;
    color: var(--qx-ink);
}

.qx-img-table {
    border-collapse: collapse;
}

.qx-img-table td {
    padding: 6px 8px;
    vertical-align: middle;
}

.qx-img-table img {
    max-width: 100%;
    height: auto;
    border-radius: var(--qx-radius-sm);
}

.qx-img-table input[type="file"] {
    max-width: 100%;
}

@media (max-width: 600px) {
    .qx-img-table tr {
        display: block;
        padding: .5em 0;
        border-bottom: 1px solid var(--qx-line);
    }

    .qx-img-table td {
        display: inline-block;
        vertical-align: middle;
        padding: 3px 6px;
    }

    .qx-img-table td:nth-child(1) {
        width: auto;
    }
}

/* ================================================================ panels */
/*.w3-panel {
    border-radius: var(--qx-radius-sm);
}

.w3-panel.w3-pale-green,
.w3-panel.w3-light-green {
    background-color: #ecfdf3 !important;
    border-left: 4px solid #16a34a;
    color: #14532d;
}

.w3-panel.w3-pale-yellow,
.w3-panel.w3-pale-red {
    background-color: #fffbeb !important;
    border-left: 4px solid #f59e0b;
    color: #78350f;
}

.w3-panel.w3-amber {
    background-color: #fffbeb !important;
    border-left: 4px solid #f59e0b;
    color: #78350f;
}

.w3-panel.w3-deep-orange {
    background-color: #fef2f2 !important;
    border-left: 4px solid #dc2626;
    color: #7f1d1d;
}

.w3-badge {
    border-radius: 999px;
    padding: 3px 9px;
}*/

/* ================================================================ pager */
.qx-pager {
    display: flex;
    gap: 12px;
    align-items: stretch;
    justify-content: space-between;
    flex-wrap: wrap;
}

.qx-pager .qx-pager-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 48%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

@media (max-width: 600px) {
    .qx-pager .qx-pager-btn {
        max-width: 100%;
        width: 100%;
    }
}

/* ============================================== legacy red helper classes */
/*.w3-red {
    background-color: var(--qx-red) !important;
}

.w3-text-red {
    color: var(--qx-red) !important;
}

.w3-border-red {
    border-color: var(--qx-red) !important;
}

.w3-hover-red:hover {
    color: #fff !important;
    background-color: var(--qx-red) !important;
}
*/
.qx-bold { font-weight: 700; }
.qx-upper { text-transform: uppercase; }
.qx-cursor-pointer { cursor: pointer; }

.qx-item-9 {
    background: repeating-linear-gradient(45deg, #f4f4f4, #f4f4f4 2px, #fff 2px, #fff 10px);
}

/* ================================================ mobile drawer (hamburger) */
#mobileNav {
    display: none;
    position: fixed !important;
    top: var(--qx-header-h);
    bottom: 0;
    right: 0;
    width: min(320px, 86vw) !important;
    z-index: 5;
    background-color: #fff;
    padding: 0 0 3em 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: -8px 0 24px rgba(0, 0, 0, .2);
}

#mobileNav .pce-folder {
    border-bottom: 1px solid var(--qx-line-soft);
}

    #mobileNav .pce-parent {
        display: flex;
        align-items: center;
        width: 100%;
        padding: .95em 1.1em;
        background: var(--qx-red-dark);
        border: none;
        color: white;
        font-weight: 500;
        font-size: 15px;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        cursor: pointer;
    }

#mobileNav .pce-parent:hover,
#mobileNav .pce-parent.open {
    /*background: transparent;
    color: var(--qx-red);*/
    color:white;
    text-decoration: underline;
}

#mobileNav .pce-parent.active {
    /*color: var(--qx-red) !important;*/
    text-decoration: underline !important;
    /*background: transparent !important;*/
}

#mobileNav .pce-caret {
    width: 0;
    height: 0;
    margin-right: .7em;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid white;
    transition: transform .2s ease;
    color:white;
}

#mobileNav .pce-parent.open .pce-caret {
    transform: rotate(90deg);
}

#mobileNav .pce-children {
    display: none;
}

#mobileNav .pce-children.open {
    display: block;
}

#mobileNav .pce-children a {
    display: block;
    padding: .8em 1em .8em 2.2em;
    color: var(--qx-ink-2);
    text-decoration: none;
    /*border-bottom: 1px solid var(--qx-line-soft);*/
    font-size: 15px;
}

#mobileNav .pce-children a:hover {
    background: transparent;
    color: var(--qx-red);
    text-decoration: underline;
}

#mobileNav .pce-children a.w3-red {
    background: transparent !important;
    color: var(--qx-red) !important;
    text-decoration: underline !important;
    border-left: 3px solid var(--qx-red) !important;
}

#mobileNav .pce-children .hr {
    margin: .4em 0;
    border-top: 1px solid var(--qx-line-soft);
}

#myOverlay {
    background-color: rgba(10, 12, 16, .5);
    z-index: 4;
}

/* =============================================================== responsive */
@media (max-width: 992px) {
    .w3-main {
        margin-left: 0 !important;
        margin-top: var(--qx-header-h);
    }

    .qx-nav {
        display: none;
    }

    .qx-header-inner {
        min-height: var(--qx-header-h);
        padding: 0 14px;
        gap: 10px;
    }

    #hdrTitleBlock {
        font-size: .95em;
        max-width: none;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    p {
        text-align: left;
    }

    #page h1 {
        font-size: 1.45em;
    }

    .square-3,
    .square-4 {
        width: 48.5%;
        padding-bottom: 48.5%;
        margin: .6%;
    }

    .square-5,
    .square-6 {
        width: 31.5%;
        padding-bottom: 31.5%;
        margin: .6%;
    }
}

@media (max-width: 480px) {
    .qx-header-inner {
        gap: 8px;
    }

    #hdrLogo {
        width: 42px;
        height: 42px;
    }

    #hdrRight a {
        padding: 6px 9px;
    }

p {
    line-height: 1.65;
}

#divNote,
#divNote:hover,
#divNote a {
    outline: none !important;
    text-decoration: none !important;
    color: var(--qx-body) !important;
}
}
