/* ============================================================
   Instrument Parts Co — Public Site Styles
   Palette: slate/steel (technical, lab-instrument feel) + amber accent
   ============================================================ */
:root {
    --ink: #1c2530;
    --steel-900: #16202b;
    --steel-700: #2c3b4c;
    --steel-500: #55697c;
    --steel-200: #dde3e8;
    --steel-100: #eef1f4;
    --paper: #f7f8fa;
    --amber: #d9822b;
    --amber-dark: #b8681c;
    --green-ok: #2f7d55;
    --border: #d7dde2;
    --radius: 0;
    --font-display: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    --font-body: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
    /* Jaytee brand */
    --jaytee-green: #c9d511;
    --jaytee-red: #e30613;
    --jaytee-red-dark: #b8040f;
    --jaytee-orange: #fe6600;
    --jaytee-orange-dark: #d95700;
}

* { box-sizing: border-box; }
input, button, select, textarea { font-family: inherit; }
html { overflow-x: hidden; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden;
}
a { color: var(--steel-700); text-decoration: none; }
a:hover { color: var(--amber-dark); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 70px; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--steel-900); font-weight: 700; margin: 0 0 12px; letter-spacing: -0.01em; }

/* Jaytee-branded header */
.jaytee-topbar { background: var(--jaytee-green); color: #1c2308; }

.preview-mode-banner { background: #1c2530; color: #fff; text-align: center; padding: 10px 16px; font-size: 13.5px; font-weight: 600; }
.preview-mode-banner strong { color: var(--amber); }
.jaytee-topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; font-size: 13px; font-weight: 600; flex-wrap: wrap; }
.jaytee-topbar-links { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }
.jaytee-topbar-links a { color: #1c2308; }
.jaytee-topbar-links a:hover { text-decoration: underline; }

.site-header { background: #fff; border-bottom: 3px solid var(--jaytee-red); }
.jaytee-header-row .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap; }
.jaytee-logo { display: block; flex-shrink: 0; }
.mobile-menu-toggle { display: none; background: none; border: none; padding: 6px; cursor: pointer; color: var(--steel-900); }
.mobile-menu-toggle .icon-close { display: none; }
.mobile-menu-toggle.open .icon-burger { display: none; }
.mobile-menu-toggle.open .icon-close { display: block; }
.mobile-only-nav-item { display: none; }
.jaytee-logo img { display: block; height: 48px; width: auto; }

.search-form { display: flex; flex: 1; max-width: 420px; min-width: 0; }
.search-form input { flex: 1; min-width: 0; border: 1px solid var(--steel-200); background: var(--steel-100); color: var(--ink); padding: 10px 14px; font-size: 13.5px; }
.search-form input::placeholder { color: var(--steel-500); }
.search-form button { border: none; background: var(--jaytee-orange); color: #fff; padding: 0 16px; cursor: pointer; display: flex; align-items: center; }
.search-form button:hover { background: #e05a00; }

.jaytee-main-nav { background: #fff; border-bottom: 1px solid var(--steel-200); }
.jaytee-main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 10px 0; flex-wrap: wrap; }
.jaytee-main-nav a { display: block; padding: 6px 12px; color: var(--steel-900); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; border-radius: var(--radius); }
.jaytee-main-nav a:hover { background: var(--steel-100); color: var(--jaytee-orange); }

/* Hover mega-menu dropdowns */
.jaytee-nav-has-dropdown { position: relative; }
.jaytee-nav-trigger {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px; color: var(--steel-900); text-decoration: none;
    font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .03em;
    background: none; border: none; border-radius: var(--radius); cursor: pointer; font-family: inherit;
}
.jaytee-nav-trigger:hover,
.jaytee-nav-has-dropdown.open > .jaytee-nav-trigger { background: var(--steel-100); color: var(--jaytee-orange); }
.jaytee-nav-caret { transition: transform .15s ease; flex-shrink: 0; }
.jaytee-nav-has-dropdown.open .jaytee-nav-caret { transform: rotate(180deg); }

.jaytee-nav-panel {
    display: none;
    position: absolute; top: 100%; left: 0;
    background: #fff; border: 1px solid var(--steel-200);
    box-shadow: 0 12px 28px rgba(0,0,0,.12);
    padding: 24px; gap: 32px;
    min-width: 420px;
    z-index: 600; /* above #jaytee-sticky-header's own z-index:500 (mobile only, but kept clear regardless) */
}
.jaytee-nav-panel-wide { min-width: 760px; }
.jaytee-nav-has-dropdown.open .jaytee-nav-panel { display: flex; }

.jaytee-nav-panel-col { flex: 1; min-width: 160px; }
.jaytee-nav-panel-col h4 { margin: 0 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--steel-500); }
.jaytee-nav-panel-col ul { list-style: none; display: block; gap: 0; margin: 0; padding: 0; }
.jaytee-nav-panel-col ul li { display: block; }
.jaytee-nav-panel-col ul li a { display: block; padding: 5px 0; color: var(--steel-900); text-decoration: none; font-size: 13.5px; font-weight: 400; text-transform: none; letter-spacing: normal; border-radius: 0; }
.jaytee-nav-panel-col ul li a:hover { color: var(--jaytee-orange); background: none; }

.jaytee-ticker { background: var(--jaytee-orange); color: #fff; }
.jaytee-ticker-inner { display: flex; align-items: center; gap: 16px; padding: 10px 70px; }
.jaytee-ticker-inner-centered { justify-content: center; }

.jaytee-quicklinks { display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
.quicklink-btn { display: flex; flex-direction: column; align-items: flex-start; background: #fff; color: var(--jaytee-orange); padding: 5px 14px; line-height: 1.3; }
.quicklink-btn:hover { background: #fff3e8; }
.quicklink-btn .ql-prefix { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; opacity: .75; }
.quicklink-btn .ql-name { font-size: 13px; font-weight: 800; }

.jaytee-ticker-messages { position: relative; flex: 1; min-width: 0; min-height: 22px; overflow: hidden; }
.jaytee-ticker-item {
    position: absolute; top: 0; left: 0; width: 100%; box-sizing: border-box;
    font-size: 14px; font-weight: 600; text-align: center;
    opacity: 0; transform: translateX(100%);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}
.jaytee-ticker-item.active { opacity: 1; transform: translateX(0); pointer-events: auto; }
.jaytee-ticker-item a { color: #fff; text-decoration: underline; }

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--steel-500); padding-top: 16px; }
.breadcrumb-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.all-top-category-btn { display: inline-block; background: var(--jaytee-green); color: #1c2308; font-weight: 800; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; padding: 8px 18px; border-radius: 20px; }
.all-top-category-btn:hover { background: #b5c00f; color: #1c2308; }
.breadcrumb a { color: var(--steel-500); }
.breadcrumb .sep { margin: 0 6px; color: var(--green-ok); font-weight: 700; }

/* Category page layout */
.category-page { padding-top: 20px; padding-bottom: 60px; }
.category-title { font-size: 26px; font-weight: 800; margin: 0; border-left: 5px solid var(--jaytee-orange); padding-left: 14px; line-height: 1.25; color: var(--jaytee-orange); }
.category-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: start; }

.filters { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; position: sticky; top: 16px; }

.filter-focus-overlay { display: none; position: fixed; inset: 0; background: rgba(15,20,26,.55); z-index: 25; }
.filter-focus-overlay.active { display: block; }
.hierarchy-select { position: relative; z-index: 1; }
.hierarchy-select:focus { z-index: 30; }
.hierarchy-select { position: relative; z-index: 1; }
.hierarchy-select:focus { z-index: 25; } /* above the overlay, while everything else in the sidebar stays dimmed beneath it */
.filters h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--steel-500); margin: 18px 0 8px; }
.filters h4:first-child { margin-top: 0; }
.filters ul { list-style: none; margin: 0; padding: 0; }
.filters ul li a { display: block; padding: 5px 0; font-size: 13.5px; border-bottom: 1px dashed var(--steel-200); }
.filters select.hierarchy-select {
    width: 100%; padding: 12px 14px; border: 1px solid var(--steel-700); border-radius: var(--radius);
    font-size: 15px; font-weight: 500; background: #fff; color: var(--steel-900); margin-bottom: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.filters select.hierarchy-select:focus { outline: none; border-color: var(--amber); }
.filters select.hierarchy-select.needs-selection {
    border-color: var(--jaytee-orange);
    background: #fff6ef;
    box-shadow: 0 0 0 3px rgba(254,102,0,.15);
    animation: hierarchy-select-pulse 1.6s ease-in-out 2;
}
@keyframes hierarchy-select-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(254,102,0,.15); }
    50% { box-shadow: 0 0 0 7px rgba(254,102,0,.05); }
}
.filters-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 2px solid var(--steel-200); }
.filters-heading span { font-weight: 800; font-size: 18px; color: var(--jaytee-orange); text-transform: uppercase; letter-spacing: -0.01em; }
.filters-heading.filters-heading-secondary { margin-top: 22px; }
.filters-heading .clear-filters-top {
    display: inline-block; font-size: 12px; font-weight: 600; color: var(--steel-700);
    background: #fff; border: 1px solid var(--steel-500); padding: 5px 12px;
}
.filters-heading .clear-filters-top:hover { background: var(--jaytee-orange); border-color: var(--jaytee-orange); color: #fff; }
.filters .checkbox-row { display: flex; align-items: center; gap: 7px; padding: 4px 0; font-size: 13.5px; }
.filter-search {
    width: 100%; margin-bottom: 6px; padding: 8px 10px 8px 32px;
    border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355697c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
    background-size: 14px 14px;
}
.filter-search:focus { outline: none; border-color: var(--amber); }
.filter-checklist { max-height: 100%; overflow-y: auto; }
.filter-checklist .checkbox-row.hidden-by-search { display: none; }
.filters button.apply-filters { margin-top: 0; width: 100%; background: var(--steel-900); color: #fff; border: none; padding: 9px; border-radius: var(--radius); cursor: pointer; font-weight: 600; font-size: 13px; }
.filters button.apply-filters:hover { background: var(--amber-dark); }

.results-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 13.5px; color: var(--steel-500); flex-wrap: wrap; gap: 12px; }
.results-bar-right { display: flex; align-items: center; gap: 18px; opacity: .6; transition: opacity .15s; }
.results-bar-right:hover { opacity: 1; }
.results-bar select { border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 12px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Fade-in feedback when filters change (JS toggles .results-visible after load) */
.results { min-width: 0; overflow-x: hidden; }
.results-fade { opacity: 0; transition: opacity 0.3s ease; }
.results-fade.results-visible { opacity: 1; }

/* Grid view (default) */
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

/* Grouped list view - shared OEM/Compatible header, one row per condition */
.product-list-grouped { display: none; }
.listing-group { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.listing-group-header { padding: 14px 20px; background: var(--steel-100); font-size: 13px; color: var(--steel-500); display: flex; gap: 24px; flex-wrap: wrap; }
.listing-group-header .compatible { color: var(--steel-700); }
.listing-group-header .compatible a { color: var(--jaytee-orange); }
.listing-group-row { display: flex; align-items: center; gap: 20px; padding: 18px 20px; border-top: 1px solid var(--border); cursor: pointer; transition: background .12s; }
.listing-group-row:hover { background: var(--steel-100); }
.listing-group-row:first-of-type { border-top: none; }
.listing-group-row .thumb { flex-shrink: 0; width: 100px; height: 75px; border-radius: var(--radius); overflow: hidden; background: var(--steel-100); display: flex; align-items: center; justify-content: center; }
.listing-group-row .thumb img { width: 100%; height: 100%; object-fit: contain; }
.listing-group-row .row-info { flex: 1; min-width: 0; }
.listing-group-row .row-info h3 { font-size: 16px; margin: 4px 0 0; }
.listing-group-row .row-actions { flex-shrink: 0; text-align: right; }
.listing-group-row .row-actions .price-line { font-size: 20px; font-weight: 800; color: var(--steel-900); margin-bottom: 8px; }
.listing-group-row .row-actions .price-was { display: block; font-size: 13px; font-weight: 500; color: var(--steel-500); text-decoration: line-through; }
.product-card { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.product-card:hover { box-shadow: 0 10px 24px rgba(28,37,48,.10); transform: translateY(-2px); }
.product-card .card-link-overlay { position: absolute; inset: 0; z-index: 1; }
.product-card .card-actions { position: relative; z-index: 2; }
.product-card .thumb { position: relative; aspect-ratio: 4/3; background: var(--steel-100); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.product-card .thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.badge { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 4px 10px; color: #fff; line-height: 1.4; }
.badge.warranty { background: var(--jaytee-orange); color: #fff; }

/* Condition label — colored text only, no background/icon, sits above the product title */
.condition-label { display: inline-block; background: var(--steel-100); padding: 4px 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; line-height: 1.4; margin-bottom: 6px; }
.condition-label.new { color: var(--jaytee-orange); }
.condition-label.reconditioned { color: var(--green-ok); }
.condition-label.used { color: var(--jaytee-red); }
.product-info .condition-label { font-size: 13px; margin-bottom: 10px; }
.product-card .card-info { padding: 14px 16px 0; }
.product-card .card-info h3 { font-size: 15px; margin: 0 0 6px; line-height: 1.3; }
.product-card .card-info h3 a { color: var(--steel-900); }
.product-card .oem { font-family: var(--font-mono); font-size: 11.5px; color: var(--steel-500); margin-bottom: 6px; }
.product-card .models { font-size: 12px; color: var(--steel-500); }
.product-card .models strong { color: var(--steel-700); }
.product-card .card-actions { padding: 12px 16px 16px; margin-top: auto; }
.price-line { margin-bottom: 12px; font-family: var(--font-display); }
.price-line .price-was { text-decoration: line-through; color: var(--steel-500); font-size: 13px; margin-right: 8px; }
.price-line .price-now { font-size: 19px; font-weight: 700; color: var(--steel-900); }
.price-line .price-now.sale { color: var(--amber-dark); }
.btn { display: inline-block; padding: 9px 16px; border-radius: var(--radius); font-weight: 600; font-size: 13px; cursor: pointer; border: none; text-align: center; }
.btn-primary { background: var(--jaytee-orange); color: #fff; width: 100%; font-weight: 700; }
.btn-primary:hover { background: var(--jaytee-orange-dark); color: #fff; }
.btn-outline { background: #fff; border: 1px solid var(--steel-700); color: var(--steel-700); width: 100%; }
.btn-outline:hover { background: var(--steel-900); color: #fff; }

/* List view — same cards, same markup, just reflowed horizontally */
.product-grid.view-list { display: flex; flex-direction: column; gap: 10px; }
.product-grid.view-list .product-card { flex-direction: row; align-items: center; }
.product-grid.view-list .product-card:hover { transform: none; }
.product-grid.view-list .thumb { width: 90px; height: 90px; aspect-ratio: 1; }
.product-grid.view-list .card-info { flex: 1; padding: 12px 16px; min-width: 0; }
.product-grid.view-list .card-info .models { margin-top: 4px; }
.product-grid.view-list .card-actions { flex-shrink: 0; width: 200px; padding: 12px 16px; margin-top: 0; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.product-grid.view-list .price-line { margin-bottom: 8px; }
.product-grid.view-list .cta { width: 100%; }
.product-grid.view-list .badge.warranty { display: none; } /* keeps the small thumb clean; condition badge alone is enough in list view */

/* View toggle buttons */
.view-toggle { display: inline-flex; border: 1px solid var(--steel-500); border-radius: var(--radius); overflow: hidden; }
.view-toggle-btn { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: #fff; border: none; border-left: 1px solid var(--steel-500); font-size: 12.5px; font-weight: 600; color: var(--steel-700); cursor: pointer; }
.view-toggle-btn:first-child { border-left: none; }
.view-toggle-btn:hover { background: var(--steel-100); }
.view-toggle-btn.active { background: var(--steel-900); color: #fff; }
.view-toggle-btn svg { flex-shrink: 0; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; }
.pagination a, .pagination span { display: inline-block; min-width: 32px; text-align: center; padding: 7px 4px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; }
.pagination .current { background: var(--steel-900); color: #fff; border-color: var(--steel-900); }

/* Product detail page */
.product-page { padding-top: 20px; padding-bottom: 60px; }
.product-detail { display: grid; grid-template-columns: 460px 1fr; gap: 44px; margin-top: 20px; }
.gallery .main-image { position: relative; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery .main-image img { cursor: zoom-in; }
.image-zoom-btn { position: absolute; bottom: 10px; right: 10px; width: 34px; height: 34px; background: rgba(28,37,48,.75); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.image-zoom-btn:hover { background: var(--jaytee-orange); }

.image-modal { position: fixed; inset: 0; background: rgba(15,20,26,.92); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 40px; cursor: zoom-out; }
.image-modal.open { display: flex; }
.image-modal img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: default; }
.image-modal-close { position: absolute; top: 20px; right: 24px; width: 40px; height: 40px; background: rgba(255,255,255,.1); color: #fff; border: none; font-size: 26px; line-height: 1; cursor: pointer; transition: background .15s; }
.image-modal-close:hover { background: rgba(255,255,255,.2); }
.image-modal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; background: rgba(255,255,255,.1); color: #fff; border: none; font-size: 18px; line-height: 1; cursor: pointer; transition: background .15s; }
.image-modal-nav:hover { background: rgba(255,255,255,.2); }
.image-modal-prev { left: 20px; }
.image-modal-next { right: 20px; }
.image-modal-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 13px; background: rgba(255,255,255,.1); padding: 5px 14px; }
.gallery .main-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; }
.gallery .thumbs img { width: 64px; height: 64px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; padding: 4px; }
.gallery .thumbs img.active { border-color: var(--amber); }

.product-documents { margin-top: 46px; }
.product-documents h3 { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 8px 15px; color: var(--steel-700); }
.product-documents ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.product-documents a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13.5px; color: var(--steel-700); }
.product-documents a:hover { border-color: var(--amber); }
.product-documents .doc-icon { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 3px; background: #d92d20; color: #fff; font-size: 9px; font-weight: 800; letter-spacing: -.02em; }
.product-documents .doc-title { flex: 1; }
.product-documents .doc-download { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #d92d20; }

.product-info h1 { font-size: 26px; margin-bottom: 8px; }
.product-info .oem-line { font-family: var(--font-mono); color: var(--steel-500); font-size: 13px; margin-bottom: 14px; }
.product-badges-row { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }

.condition-switcher { margin-bottom: 18px; }
.condition-switcher-label { display: block; font-size: 12px; font-weight: 700; color: var(--steel-500); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.condition-switcher-options { display: flex; flex-wrap: wrap; gap: 8px; }
.condition-switcher-option { display: inline-block; padding: 8px 16px; border: 1px solid var(--border); font-size: 13.5px; font-weight: 600; color: var(--steel-700); }
.condition-switcher-option:hover { border-color: var(--jaytee-orange); color: var(--jaytee-orange); }
.condition-switcher-option.active { background: var(--jaytee-orange); border-color: var(--jaytee-orange); color: #fff; cursor: default; }

.also-available-badge { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 600; color: var(--steel-500); background: var(--steel-100); padding: 2px 8px; }
.product-badges-row .badge { position: static; }
.product-badges-row .condition-label { margin-bottom: 0; }
.product-page-price { margin-bottom: 20px; }
.product-page-price .price-was { text-decoration: line-through; color: var(--steel-500); font-size: 17px; margin-right: 10px; }
.product-page-price .price-now { font-size: 28px; font-weight: 700; color: var(--steel-900); font-family: var(--font-display); }
.product-page-price .price-now.sale { color: var(--amber-dark); }
.product-info .desc { color: var(--steel-700); margin-bottom: 20px; }
.product-info .desc p { margin: 0 0 12px; }
.product-info .desc p:last-child { margin-bottom: 0; }
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 0; font-size: 13.5px; }
.spec-table th, .spec-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--steel-200); vertical-align: top; }
.spec-table th { width: 200px; color: var(--steel-500); font-weight: 600; }
.spec-table td.cap-first::first-letter { text-transform: uppercase; }

.delivery-info { border-bottom: 1px solid var(--steel-200); margin-bottom: 20px; }
.delivery-info summary { padding: 9px 10px; font-weight: 600; font-size: 13.5px; color: var(--steel-500); cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.delivery-info summary::-webkit-details-marker { display: none; }
.delivery-info summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--steel-500); border-bottom: 2px solid var(--steel-500); transform: rotate(45deg); margin-top: -4px; transition: transform .35s ease; flex-shrink: 0; }
.delivery-info[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.delivery-info summary:hover { color: var(--amber-dark); }
.delivery-info-body { padding: 0 10px 16px; font-size: 13.5px; color: var(--steel-700); line-height: 1.6; overflow: hidden; transition: height .5s ease; }

.trust-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 32px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 36px 0 18px; }
.trust-strip-item { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--steel-700); }
.trust-strip-item svg { color: var(--jaytee-orange); flex-shrink: 0; }
.category-intro { color: var(--steel-500); font-size: 14px; line-height: 1.6; max-width: 760px; margin: 4px 0 0; }

.trust-panel { background: var(--steel-900); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; }
.trust-panel h3 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.trust-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.trust-list li { display: flex; align-items: flex-start; gap: 10px; }
.trust-icon { color: var(--jaytee-orange); flex-shrink: 0; margin-top: 1px; }
.trust-list span { color: #cbd5df; font-size: 13.5px; line-height: 1.5; }
.trust-list strong { color: #fff; }

.enquiry-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 50px; }

.enquiry-success-modal { display: none; position: fixed; inset: 0; background: rgba(15,20,26,.6); z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.enquiry-success-modal.open { display: flex; }
.enquiry-success-dialog { position: relative; background: #fff; border-radius: var(--radius); padding: 36px 32px; max-width: 380px; width: 100%; text-align: center; }
.enquiry-success-dialog p { font-size: 16px; color: var(--ink); margin-bottom: 20px; line-height: 1.5; }
.enquiry-success-close { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--steel-500); }
.enquiry-success-dialog .btn { width: 100%; }
.enquiry-box h3 { margin-bottom: 6px; font-size: 22px; }
.enquiry-box p.hint { color: var(--steel-500); font-size: 15px; margin-bottom: 16px; }
.enquiry-box label { display: block; font-size: 12.5px; font-weight: 600; margin: 10px 0 4px; color: var(--steel-700); }
.enquiry-box input, .enquiry-box textarea, .enquiry-box select { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; font-family: var(--font-body); font-size: 15px; }
.enquiry-box select { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #fff; }
.enquiry-box .checkbox-line { display: flex; align-items: flex-start; gap: 8px; width: auto; margin-top: 14px; font-size: 13.5px; font-weight: 400; color: var(--ink); cursor: pointer; }
.enquiry-box .checkbox-line input[type="checkbox"] { width: auto; margin-top: 2px; flex-shrink: 0; cursor: pointer; }
.enquiry-box textarea { min-height: 90px; resize: vertical; }
.enquiry-box .btn-primary { margin-top: 14px; width: auto; padding: 10px 24px; }
#enquiryForm {
    margin-top: 28px;
    background-color: #f7f8fa;
    padding: 15px 25px 25px 25px;
}
#enquiry-msg { margin-top: 12px; font-size: 13.5px; padding: 10px 12px; border-radius: var(--radius); display: none; }
#enquiry-msg.ok { background: #e5f3ea; color: var(--green-ok); display: block; }
#enquiry-msg.err { background: #fbe7e1; color: #b23c1a; display: block; }

/* Footer */
.site-footer { background: var(--steel-900); color: #cbd5df; margin-top: 60px; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 40px 70px; }
.site-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.site-footer a { color: #cbd5df; }
.site-footer a:hover { color: var(--amber); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { padding: 3px 0; }
.footer-bottom { border-top: 1px solid var(--steel-700); padding: 14px 0; font-size: 12.5px; color: var(--steel-500); }
.footer-bottom .wrap { display: block; padding: 0 70px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--steel-500); }
.empty-state-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.empty-state-cats a { display: inline-block; padding: 8px 18px; border: 1px solid var(--jaytee-orange); color: var(--jaytee-orange); font-weight: 600; font-size: 13.5px; }
.empty-state-cats a:hover { background: var(--jaytee-orange); color: #fff; }

/* Admin edit bar (shown only when a logged-in admin views the public site) */
.admin-edit-bar { display: flex; align-items: center; justify-content: space-between; background: #fff3e2; border: 1px solid #f0cf9d; border-radius: var(--radius); padding: 10px 16px; margin-top: 16px; font-size: 13.5px; color: var(--amber-dark); }
.admin-edit-bar .btn-edit-admin { background: var(--steel-900); color: #fff; padding: 7px 14px; border-radius: var(--radius); font-weight: 600; font-size: 13px; }
.admin-edit-bar .btn-edit-admin:hover { background: var(--amber-dark); }

/* Homepage sections — vertical-only padding, so .wrap's horizontal
   padding applies consistently with every other page on the site */
.home-hero { padding-top: 40px; padding-bottom: 24px; }
.home-hero .trust-strip { gap: 40px 72px; margin: 40px 0 32px; padding: 20px 0; }
.home-hero h1 { font-size: 30px; }
.home-hero p { color: var(--steel-500); max-width: 640px; }
.home-hero-grid { display: flex; justify-content: space-between; align-items: stretch; gap: 0; flex-wrap: wrap; }
.home-hero-main { flex: 1 1 380px; min-width: 0; padding-right: 32px; }
.home-hero-main p { margin: 12px 0 0; }
.home-hero-cta { flex-shrink: 0; text-align: right; padding-left: 32px; border-left: 1px solid var(--border); display: flex; flex-direction: column; justify-content: center; }
.home-hero-cta p { margin: 0; max-width: none; }
.home-hero-cta-label { font-weight: 700; color: var(--steel-900); margin: 0 0 4px; text-align: left; }
.btn-inline-cta { display: inline-block; background: var(--jaytee-orange); color: #fff; padding: 2px 10px; font-weight: 700; }
.btn-inline-cta:hover { background: #e05a00; color: #fff; }
.home-categories { padding-top: 36px; padding-bottom: 36px; }
.home-category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 24px; }
.home-category-card { display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; font-weight: 700; color: var(--steel-900); font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.home-category-card:hover { border-color: var(--jaytee-orange); color: var(--jaytee-orange); box-shadow: 0 4px 14px rgba(254,102,0,.12); }
.home-latest { padding-top: 44px; padding-bottom: 60px; }
.home-latest .product-grid { margin-top: 24px; }

@media (max-width: 900px) {
    .wrap { padding: 0 32px; }
    .category-layout { grid-template-columns: 1fr; }
    .filters { position: static; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .product-detail { grid-template-columns: 1fr; }
    .home-category-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .results-bar { flex-wrap: wrap; gap: 12px; }
    .results-bar-right { flex-wrap: wrap; gap: 10px; }

    /* Sticky logo/menu/search bar — stays put while scrolling so the
       menu and search are always one tap away, no scrolling back up */
    #jaytee-sticky-header { position: sticky; top: 0; z-index: 500; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
    .jaytee-header-row .wrap { flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
    .jaytee-logo { order: 1; }
    .jaytee-logo img { height: 38px; }
    .mobile-menu-toggle { display: inline-flex; order: 2; flex-shrink: 0; }
    .search-form { order: 3; flex: 1 0 100%; max-width: none; margin-top: 4px; width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
    .search-form input { border-radius: 0; }
    .search-form button { border-radius: 0; }

    /* The green top bar (tagline + About/Contact/News) isn't needed on
       mobile — About/Contact/News move into the hamburger menu instead */
    .jaytee-topbar { display: none; }
    .mobile-only-nav-item { display: list-item; }

    /* Hamburger-collapsed nav */
    .jaytee-main-nav { display: none; }
    .jaytee-main-nav.open { display: block; }
    .jaytee-main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 6px 0; }
    .jaytee-main-nav a { padding: 12px 4px; border-radius: 0; border-bottom: 1px solid var(--steel-100); }

    /* Mobile: dropdowns become simple inline-expanding accordions
       within the existing hamburger nav, not floating panels */
    .jaytee-nav-trigger { width: 100%; padding: 12px 4px; border-radius: 0; border-bottom: 1px solid var(--steel-100); justify-content: space-between; }
    .jaytee-nav-panel {
        position: static; display: none; flex-direction: column; gap: 20px;
        min-width: 0; width: 100%; border: none; box-shadow: none;
        padding: 4px 4px 16px 16px; background: var(--steel-100);
    }
    .jaytee-nav-panel-wide { min-width: 0; }
    .jaytee-nav-has-dropdown.open .jaytee-nav-panel { display: flex; }
    .jaytee-nav-panel-col ul li a { padding: 8px 0; }
}

@media (max-width: 640px) {
    .wrap { padding: 0 18px; }
    .home-hero h1 { font-size: 24px; }
    .category-title { font-size: 21px; }
    h1 { font-size: 24px; }
    .home-hero-cta { text-align: left; }

    .listing-group-row { flex-direction: column; align-items: stretch; text-align: left; }
    .listing-group-row .thumb { width: 100%; height: auto; aspect-ratio: 4/3; }
    .listing-group-row .row-actions { text-align: left; }

    /* List view becomes unreadable squeezed into a phone-width row —
       fall back to the same stacked layout as grid view */
    .product-grid.view-list { display: grid; grid-template-columns: 1fr; gap: 16px; }
    .product-grid.view-list .product-card { flex-direction: column; align-items: stretch; }
    .product-grid.view-list .thumb { width: 100%; height: auto; aspect-ratio: 4/3; }
    .product-grid.view-list .card-info { padding: 14px 16px 0; }
    .product-grid.view-list .card-actions { width: 100%; padding: 12px 16px 16px; align-items: stretch; text-align: left; }
    .product-grid.view-list .price-line { text-align: left; }
    .product-grid.view-list .badge.warranty { display: block; position: static; margin-top: 8px; align-self: flex-start; }

    .view-toggle { display: none; } /* the layout is forced to stack anyway at this width, so the choice is moot */

    .gallery .thumbs img { width: 52px; height: 52px; }
    .spec-table th, .spec-table td { padding: 8px 10px; font-size: 13px; }
    .enquiry-box { padding: 16px; }
    .trust-panel { padding: 18px; }
    .image-modal { padding: 16px; }
    .image-modal-close { top: 10px; right: 10px; }
}

@media (max-width: 480px) {
    .wrap { padding: 0 14px; }
    .home-category-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
    .product-grid { grid-template-columns: 1fr; }
    .site-footer .wrap { grid-template-columns: 1fr; }
    .jaytee-topbar-inner { flex-direction: column; gap: 4px; text-align: center; }
    .jaytee-topbar-links { gap: 12px; }
    .jaytee-ticker-inner { flex-direction: column; align-items: stretch; gap: 8px; }
    .jaytee-ticker-messages { min-height: 20px; }
    .jaytee-quicklinks { justify-content: center; }
}
