* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    height: 101%;
    background: #f5f5f0;
}

body {
    font-family: Verdana, Helvetica, Arial, sans-serif;
    font-size: 13px;
    color: #333;
    background: #f5f5f0;
    line-height: 1.4;
    min-height: 100vh;
}

a { color: #1e3a8a; text-decoration: none; }
a:hover { color: #9b1c1c; text-decoration: underline; }

img { border: 0; max-width: 100%; display: block; }

hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 10px 0;
}

#wrap {
    width: 960px;
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.headerbar {
    background: #ebebeb;
    padding: 0 10px;
    margin-bottom: 0;
    border-bottom: 1px solid #ccc;
}

.headerbar .inner {
    padding: 10px 0;
    overflow: hidden;
}

.brand {
    float: left;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.brand-name {
    font-size: 2.0em;
    font-weight: bold;
    color: #1a1a1a;
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    letter-spacing: -0.5px;
    text-decoration: none;
}

.brand-name:hover { text-decoration: none; color: #1a1a1a; }

.brand-tag {
    font-size: 0.95em;
    color: #888;
    font-weight: normal;
    font-family: Verdana, Helvetica, Arial, sans-serif;
}

.header-search {
    float: right;
    margin-top: 2px;
}

.header-search form {
    display: flex;
    gap: 0;
}

.header-search input[type="text"],
.header-search input[type="search"] {
    height: 28px;
    border: 1px solid #bbb;
    border-right: none;
    padding: 0 8px;
    font-size: 12px;
    font-family: Verdana, sans-serif;
    width: 180px;
    background: #fff;
    color: #333;
    outline: none;
}

.header-search input[type="text"]:focus,
.header-search input[type="search"]:focus {
    border-color: #888;
}

.header-search button {
    height: 28px;
    padding: 0 10px;
    background: #666;
    color: #fff;
    border: 1px solid #555;
    font-size: 11px;
    font-family: Verdana, sans-serif;
    cursor: pointer;
    font-weight: bold;
}

.header-search button:hover { background: #444; }

.navbar {
    background-color: #1a1a1a;
    padding: 0 10px;
    overflow: hidden;
}

.navbar ul.linklist {
    display: block;
    margin: 0;
    padding: 0;
    overflow: hidden;
    list-style: none;
}

.navbar ul.linklist li {
    display: block;
    float: left;
    list-style: none;
    margin-right: 0;
    font-size: 1.0em;
    line-height: 2.4em;
}

.navbar ul.linklist li a,
.navbar ul.linklist li button {
    color: #d4d4d0;
    padding: 0 14px;
    font-weight: bold;
    font-size: 11px;
    font-family: Verdana, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-decoration: none;
    display: block;
    border-right: 1px solid #333;
    line-height: 2.4em;
    background: none;
    border-top: none;
    border-bottom: none;
    border-left: none;
    cursor: pointer;
}

.navbar ul.linklist li:last-child a {
    border-right: none;
}

.navbar ul.linklist li a:hover,
.navbar ul.linklist li a.active {
    background: #2d2d2d;
    color: #fff;
    text-decoration: none;
}

.navbar ul.linklist li.rightside {
    float: right;
}

.navbar ul.linklist li.rightside a {
    border-right: none;
    border-left: 1px solid #333;
}

.nav-count {
    display: inline-block;
    background: #c0392b;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 0 5px;
    border-radius: 2px;
    margin-left: 4px;
    line-height: 1.6;
    vertical-align: middle;
}

.site-notice {
    background: #ffffcc;
    border-bottom: 1px solid #e0e090;
    padding: 6px 12px;
    font-size: 1.1em;
    color: #555;
}

#page-body {
    flex: 1;
    display: flex;
    padding: 0;
    min-height: 400px;
}

.sidebar {
    width: 180px;
    flex-shrink: 0;
    border-right: 1px solid #ddd;
    padding: 10px 0;
    background: #fafafa;
}

.content {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
}

.sidebar-header {
    padding: 5px 10px;
    background: #e4e4de;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    font-weight: bold;
    font-size: 1.0em;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0;
}

.sidebar-header:first-child {
    border-top: none;
}

.cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cat-list li {
    padding: 4px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dotted #ddd;
    font-size: 1.1em;
    line-height: 1.5;
}

.cat-list li:hover {
    background: #e8e8e0;
}

.cat-list li.selected,
.cat-list li.selected a {
    color: #9b1c1c;
    font-weight: bold;
}

.cat-list li a {
    color: #1e3a8a;
    text-decoration: none;
    flex: 1;
}

.cat-list li a:hover { text-decoration: underline; }

.cat-count {
    color: #888;
    font-size: 0.9em;
    margin-left: 4px;
    flex-shrink: 0;
}

.panel {
    border: 1px solid #c0c0bc;
    margin-bottom: 10px;
    background: #fff;
}

.panel-title {
    background: #e4e4de;
    padding: 6px 10px;
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
    border-bottom: 1px solid #c0c0bc;
}

.panel-body {
    padding: 10px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.product-card {
    border: 1px solid #c8c8c0;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s;
}
.product-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.product-card-img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f0f0ea;
    border-bottom: 1px solid #e4e4de;
}
.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity .2s;
}
.product-card-img:hover img { opacity: .88; }
.product-card-img .no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 11px;
    font-style: italic;
}

.product-card-body {
    padding: 10px 12px 6px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-name {
    font-size: 1.15em;
    font-weight: bold;
    color: #1a1a1a;
    line-height: 1.3;
    margin-bottom: 5px;
}
.product-card-name a {
    color: inherit;
    text-decoration: none;
}
.product-card-name a:hover {
    color: #9b1c1c;
    text-decoration: underline;
}

.product-card-stars {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 7px;
    min-height: 15px;
}
.pc-stars {
    display: inline-flex;
    gap: 1px;
    line-height: 1;
}
.pc-star {
    position: relative;
    display: inline-block;
    width: .9em;
    color: #d8d8d0;
    font-size: 14px;
    line-height: 1;
}
.pc-star-fill {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    color: #c8a84b;
    white-space: nowrap;
    pointer-events: none;
}
.pc-rating-meta {
    font-size: 1.0em;
    color: #888;
}
.pc-rating-count { color: #aaa; }

.product-card-price {
    font-size: 1.25em;
    font-weight: bold;
    color: #1a1a1a;
    margin-top: auto;
    padding-top: 2px;
}

.product-card-actions {
    padding: 8px 10px;
    border-top: 1px solid #ebebeb;
    background: #fafaf8;
}
.product-card-actions form {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.pc-vsel {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #bbb;
    font-family: Verdana, sans-serif;
    font-size: 11px;
    background: #fff;
    color: #333;
}
.pc-btn-row {
    display: flex;
    gap: 5px;
}
.pc-btn-add {
    flex: 1;
    text-align: center;
    white-space: nowrap;
}
.pc-btn-view { white-space: nowrap; }
.pc-oos-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.pc-oos {
    font-size: 1.0em;
    color: #c0392b;
    font-weight: bold;
}

.product-layout {
    display: flex;
    gap: 20px;
}

.product-image-col {
    flex-shrink: 0;
    width: 300px;
}

.product-image-col img {
    width: 100%;
    border: 1px solid #ccc;
}

.product-info-col {
    flex: 1;
    min-width: 0;
}

.product-title {
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 2.0em;
    font-weight: normal;
    color: #1a1a1a;
    margin-bottom: 8px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.product-price {
    font-size: 2.0em;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.product-desc {
    font-size: 1.1em;
    line-height: 1.6;
    color: #444;
    margin-bottom: 16px;
}

.product-specs {
    border: 1px solid #ddd;
    margin-bottom: 14px;
}

.product-specs table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.1em;
}

.product-specs td {
    padding: 5px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.product-specs td:first-child {
    color: #888;
    width: 36%;
    font-weight: bold;
}

.btn {
    display: inline-block;
    padding: 6px 14px;
    font-family: Verdana, sans-serif;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: #1a1a1a;
    color: #fff;
    border-color: #000;
}

.btn-primary:hover {
    background: #333;
    color: #fff;
    text-decoration: none;
}

.btn-secondary {
    background: #e4e4de;
    color: #333;
    border-color: #bbb;
}

.btn-secondary:hover {
    background: #d4d4ce;
    color: #333;
    text-decoration: none;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 11px;
}

input[type="submit"],
input[type="button"],
button[type="submit"] {
    display: inline-block;
    padding: 6px 14px;
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #000;
    font-family: Verdana, sans-serif;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1.4;
}

input[type="submit"]:hover,
button[type="submit"]:hover {
    background: #333;
}

.form-row {
    margin-bottom: 10px;
}

.form-row label {
    display: block;
    font-weight: bold;
    margin-bottom: 3px;
    font-size: 1.1em;
    color: #444;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row input[type="number"],
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #bbb;
    font-family: Verdana, sans-serif;
    font-size: 12px;
    color: #333;
    background: #fff;
    outline: none;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    border-color: #888;
}

.form-row textarea {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    font-size: 0.95em;
    color: #888;
    margin-top: 2px;
}

.form-error {
    color: #c0392b;
    font-size: 1.0em;
    margin-top: 2px;
}

.flash {
    background: #ffffcc;
    border: 1px solid #c0c000;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 1.1em;
    color: #555;
}

.flash.error {
    background: #ffeeee;
    border-color: #cc0000;
    color: #990000;
}

.flash.success {
    background: #eeffee;
    border-color: #008800;
    color: #006600;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.1em;
}

.table thead th {
    background: #1a1a1a;
    color: #fff;
    padding: 6px 8px;
    text-align: left;
    font-weight: bold;
    font-size: 1.0em;
}

.table tbody td {
    padding: 6px 8px;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
}

.table tbody tr:hover td {
    background: #f5f5ef;
}

.table td.right, .table th.right { text-align: right; }

.cart-line-remove {
    background: none;
    border: none;
    color: #999;
    font-size: 1.3em;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.cart-line-remove:hover { color: #c0392b; }

.cart-totals {
    text-align: right;
    padding: 10px 0;
    font-size: 1.1em;
    color: #444;
}

.cart-totals .grand-total {
    font-size: 1.5em;
    font-weight: bold;
    color: #1a1a1a;
    margin-top: 4px;
}

.pagination {
    display: flex;
    gap: 2px;
    align-items: center;
    padding: 8px 0;
    font-size: 1.1em;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 3px 9px;
    border: 1px solid #ccc;
    color: #1e3a8a;
    text-decoration: none;
    background: #fff;
}

.pagination a:hover { background: #e8e8e0; text-decoration: none; }

.pagination .current {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
    font-weight: bold;
}

.breadcrumb {
    font-size: 1.1em;
    color: #888;
    margin-bottom: 10px;
}

.breadcrumb a { color: #1e3a8a; }
.breadcrumb span { margin: 0 4px; color: #ccc; }

.page-heading {
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-weight: normal;
    color: #1a1a1a;
    font-size: 1.9em;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 6px;
}

.info-page .panel-body {
    font-size: 1.1em;
    line-height: 1.7;
    color: #444;
    padding: 14px 16px;
}

.info-page p { margin-bottom: 12px; }
.info-page p:last-child { margin-bottom: 0; }
.info-page h3 {
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 1.25em;
    font-weight: normal;
    color: #222;
    margin: 16px 0 5px;
}
.info-page h3:first-child { margin-top: 0; }

#page-footer {
    clear: both;
    margin-top: auto;
}

#page-footer .footer-navbar {
    background-color: #ebebeb;
    padding: 0 10px;
    overflow: hidden;
    border-top: 1px solid #ccc;
}

#page-footer .footer-navbar ul.linklist {
    display: block;
    margin: 0;
    padding: 0;
    overflow: hidden;
    list-style: none;
}

#page-footer .footer-navbar ul.linklist li {
    display: block;
    float: left;
    margin-right: 0;
    font-size: 1.1em;
    line-height: 2.4em;
}

#page-footer .footer-navbar ul.linklist li a {
    color: #444;
    padding: 0 8px;
    text-decoration: none;
    display: block;
    border-right: 1px solid #ccc;
}

#page-footer .footer-navbar ul.linklist li:first-child a {
    padding-left: 0;
}

#page-footer .footer-navbar ul.linklist li a:hover {
    color: #000;
    text-decoration: underline;
}

#page-footer .footer-navbar ul.linklist li.rightside {
    float: right;
}

#page-footer .footer-navbar ul.linklist li.rightside a {
    border-right: none;
    border-left: 1px solid #ccc;
}

#page-footer .footer-navbar ul.linklist li.rightside span {
    display: block;
    padding: 0 8px;
    color: #888;
    line-height: 2.4em;
}

#page-footer .copyright {
    padding: 6px 10px;
    text-align: center;
    color: #666;
    font-size: 1.0em;
    background: #fff;
    border-top: 1px solid #e0e0d8;
}

#page-footer .copyright a {
    color: #666;
    text-decoration: underline;
}

.clearfix::after { content: ""; display: block; clear: both; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); }
.muted { color: #888; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }

@media (max-width: 768px) {
    #wrap {
        width: 100%;
        border: none;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .sidebar {
        display: none;
    }

    #page-body {
        flex-direction: column;
    }

    .content {
        padding: 10px;
    }

    .product-layout {
        flex-direction: column;
    }

    .product-image-col {
        width: 100%;
    }

    .header-search {
        display: none;
    }
}

@media print {
    .navbar, #page-footer .footer-navbar, .header-search { display: none; }
}
