/* Shop page layout */
.shop-layout {
 display: grid;
 grid-template-columns: 260px 1fr;
 gap: 32px;
 padding: 40px 0 70px;
}

/* Sidebar filters */
.shop-sidebar {
 position: sticky;
 top: calc(var(--header-height, 72px) + 16px);
 align-self: start;
 max-height: calc(100vh - var(--header-height, 72px) - 32px);
 z-index: 20;
}

.shop-sidebar-scroll {
 max-height: calc(100vh - var(--header-height, 72px) - 32px);
 overflow-y: auto;
 overscroll-behavior: contain;
 padding-right: 4px;
 scrollbar-width: thin;
 scrollbar-color: rgba(8, 146, 212, 0.35) transparent;
}

.shop-sidebar-scroll::-webkit-scrollbar {
 width: 6px;
}

.shop-sidebar-scroll::-webkit-scrollbar-thumb {
 background: rgba(8, 146, 212, 0.35);
 border-radius: 3px;
}

.shop-sidebar-scroll:hover {
 scrollbar-color: rgba(8, 146, 212, 0.55) transparent;
}

#categoryFilterGroup {
 flex: 0 0 auto;
 height: auto;
 min-height: 0;
 max-height: none;
}

#categoryFilterGroup .filter-list {
 overflow: visible;
 max-height: none;
}

#manufacturerFilterGroup {
 flex: 0 0 auto;
 display: flex;
 flex-direction: column;
 min-height: 0;
 overflow: hidden;
}

#manufacturerFilterGroup .filter-search-input {
 flex-shrink: 0;
}

#manufacturerFilterGroup .filter-list-scroll {
 flex: 1;
 min-height: 120px;
 overflow-y: auto;
 overscroll-behavior: contain;
 scrollbar-width: thin;
 scrollbar-color: rgba(8, 146, 212, 0.45) transparent;
}

#manufacturerFilterGroup .filter-list-scroll::-webkit-scrollbar {
 width: 6px;
}

#manufacturerFilterGroup .filter-list-scroll::-webkit-scrollbar-thumb {
 background: rgba(8, 146, 212, 0.45);
 border-radius: 3px;
}

.filter-group {
 background: var(--dark-surface);
 border: 1px solid rgba(8, 146, 212, 0.12);
 border-radius: 8px;
 padding: 20px;
 margin-bottom: 16px;
}

.filter-group h3 {
 font-size: 13px;
 margin-bottom: 14px;
 color: var(--bright-cyan);
 font-style: normal;
 letter-spacing: 1px;
}

.filter-list { list-style: none; }

.filter-list li { margin-bottom: 6px; }

.filter-list label {
 display: flex;
 align-items: center;
 gap: 8px;
 font-size: 14px;
 color: var(--text-muted);
 cursor: pointer;
 padding: 6px 0;
 transition: color 0.2s;
}

.filter-list label:hover { color: var(--text); }

.filter-list input[type="checkbox"] {
 accent-color: var(--brand-blue);
 width: 16px;
 height: 16px;
}

.filter-count {
 margin-left: auto;
 font-size: 12px;
 color: var(--text-muted);
 opacity: 0.7;
}

.filter-search-input {
 width: 100%;
 padding: 8px 10px;
 margin-bottom: 10px;
 background: var(--dark-bg);
 border: 1px solid rgba(8, 146, 212, 0.2);
 border-radius: 4px;
 color: #fff;
 font-size: 13px;
}

.filter-search-input:focus {
 outline: none;
 border-color: var(--brand-blue);
}

.filter-search-input:disabled {
 opacity: 0.45;
 cursor: not-allowed;
}

.filter-list-scroll {
 max-height: 220px;
 overflow-y: auto;
 padding-right: 4px;
 scrollbar-width: thin;
 scrollbar-color: rgba(8, 146, 212, 0.35) transparent;
}

.filter-list-scroll::-webkit-scrollbar {
 width: 6px;
}

.filter-list-scroll::-webkit-scrollbar-thumb {
 background: rgba(8, 146, 212, 0.35);
 border-radius: 3px;
}

.filter-hint {
 font-size: 12px;
 color: var(--text-muted);
 line-height: 1.5;
 padding: 4px 0;
}

.filter-list input[type="radio"] {
 accent-color: var(--brand-blue);
 width: 16px;
 height: 16px;
 flex-shrink: 0;
}

.filter-list li.is-hidden {
 display: none;
}

.price-range {
 display: flex;
 gap: 8px;
 align-items: center;
}

.price-range input {
 width: 100%;
 padding: 8px;
 background: var(--dark-bg);
 border: 1px solid rgba(8, 146, 212, 0.2);
 border-radius: 4px;
 color: #fff;
 font-size: 13px;
}

/* Shop toolbar */
.shop-catalog-notice {
 margin-bottom: 20px;
 padding: 14px 18px;
 background: rgba(77, 184, 224, 0.08);
 border: 1px solid rgba(77, 184, 224, 0.22);
 border-radius: 8px;
 font-size: 14px;
 line-height: 1.55;
 color: var(--text-muted);
}

.shop-catalog-notice strong {
 color: var(--text);
}

.shop-catalog-notice a {
 color: var(--bright-cyan);
 text-decoration: none;
}

.shop-catalog-notice a:hover {
 text-decoration: underline;
}

.shop-toolbar {
 display: flex;
 justify-content: space-between;
 align-items: center;
 margin-bottom: 24px;
 flex-wrap: wrap;
 gap: 16px;
}

.shop-search {
 flex: 1;
 max-width: 360px;
 position: relative;
}

.shop-search input {
 width: 100%;
 padding: 12px 16px 12px 40px;
 background: var(--dark-surface);
 border: 1px solid rgba(8, 146, 212, 0.2);
 border-radius: 6px;
 color: #fff;
 font-size: 14px;
}

.shop-search input:focus {
 outline: none;
 border-color: var(--brand-blue);
}

.shop-search::before {
 content: '⌕';
 position: absolute;
 left: 14px;
 top: 50%;
 transform: translateY(-50%);
 color: var(--text-muted);
 font-size: 18px;
}

.shop-sort select {
 padding: 12px 16px;
 background: var(--dark-surface);
 border: 1px solid rgba(8, 146, 212, 0.2);
 border-radius: 6px;
 color: #fff;
 font-size: 14px;
 cursor: pointer;
}

.results-count {
 font-size: 14px;
 color: var(--text-muted);
 width: 100%;
}

/* Category pills */
.category-pills {
 display: flex;
 flex-wrap: wrap;
 gap: 10px;
 margin-bottom: 24px;
}

.category-pill {
 padding: 8px 18px;
 background: var(--dark-surface);
 border: 1px solid rgba(8, 146, 212, 0.2);
 border-radius: 30px;
 color: var(--text-muted);
 font-size: 12px;
 font-weight: 700;
 text-transform: uppercase;
 letter-spacing: 1px;
 cursor: pointer;
 transition: all 0.2s;
 font-family: var(--font-display);
 font-style: italic;
}

.category-pill:hover,
.category-pill.active {
 background: var(--brand-blue);
 border-color: var(--brand-blue);
 color: #fff;
}

/* Product grid, cards must always be visible (not hidden by .reveal) */
.products-grid {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
 gap: 24px;
}

.products-grid .product-card {
 opacity: 1;
 transform: none;
}

.product-card {
 background: var(--dark-surface);
 border: 1px solid rgba(8, 146, 212, 0.12);
 border-radius: 8px;
 overflow: hidden;
 transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
 display: flex;
 flex-direction: column;
}

.product-card:hover {
 transform: translateY(-4px);
 border-color: var(--brand-blue);
 box-shadow: 0 8px 32px rgba(8, 146, 212, 0.12);
}

.product-card-image {
 height: 200px;
 background-size: cover;
 background-position: center;
 background-color: var(--dark-bg);
 position: relative;
}

.product-card-image--logo {
 background-size: 55% auto;
 background-repeat: no-repeat;
 background-color: #0a0e14;
}

.product-badge {
 position: absolute;
 top: 12px;
 left: 12px;
 background: var(--brand-blue);
 color: #fff;
 font-size: 10px;
 font-weight: 900;
 padding: 4px 10px;
 letter-spacing: 1px;
 border-radius: 3px;
 text-transform: uppercase;
}

.product-badge.sale { background: var(--success); color: var(--dark-bg); }

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

.product-category-tag {
 font-size: 11px;
 color: var(--bright-cyan);
 text-transform: uppercase;
 letter-spacing: 1px;
 margin-bottom: 6px;
 font-weight: 700;
}

.product-card-body h3 {
 font-size: 15px;
 margin-bottom: 8px;
 font-style: normal;
 letter-spacing: 0.5px;
 text-transform: none;
 line-height: 1.3;
}

.product-card-body p {
 font-size: 13px;
 color: var(--text-muted);
 margin-bottom: 16px;
 flex: 1;
 line-height: 1.5;
}

.product-price-row {
 display: flex;
 align-items: baseline;
 gap: 8px;
 margin-bottom: 14px;
}

.product-price {
 font-size: 22px;
 font-weight: 900;
 color: #fff;
}

.product-price .currency { font-size: 14px; color: var(--brand-blue); }

.product-price-compare {
 font-size: 14px;
 color: var(--text-muted);
 text-decoration: line-through;
}

.product-card-actions {
 display: flex;
 gap: 8px;
}

.product-card-actions .btn {
 flex: 1;
 text-align: center;
 padding: 10px 12px;
 font-size: 11px;
}

.btn-add-cart {
 background: var(--brand-blue);
 color: #fff;
 border: none;
}

.btn-view {
 background: transparent;
 color: var(--text);
 border: 1px solid rgba(8, 146, 212, 0.3);
}

.btn-view:hover { border-color: var(--brand-blue); color: var(--brand-blue); background: transparent; }

.no-results {
 grid-column: 1 / -1;
 text-align: center;
 padding: 60px 20px;
 color: var(--text-muted);
}

.no-results h3 { font-size: 20px; margin-bottom: 8px; color: var(--text); }

/* Product detail page */
.product-detail {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 48px;
 padding: 40px 0 70px;
}

.product-gallery {
 background: var(--dark-surface);
 border-radius: 8px;
 overflow: hidden;
 border: 1px solid rgba(8, 146, 212, 0.12);
}

.product-gallery-main {
 height: 400px;
 background-size: cover;
 background-position: center;
}

.product-gallery-main--logo {
 background-size: 45% auto;
 background-repeat: no-repeat;
 background-color: #0a0e14;
}

.product-info h1 {
 font-size: clamp(22px, 3vw, 32px);
 margin-bottom: 8px;
 font-style: normal;
 text-transform: none;
 letter-spacing: 0.5px;
}

.product-info .category { color: var(--bright-cyan); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }

.product-info .price-large {
 font-size: 36px;
 font-weight: 900;
 margin-bottom: 20px;
}

.product-info .price-large span { font-size: 18px; color: var(--brand-blue); }

.product-description {
 color: var(--text-muted);
 font-size: 15px;
 line-height: 1.7;
 margin-bottom: 24px;
 padding-bottom: 24px;
 border-bottom: 1px solid rgba(8, 146, 212, 0.12);
}

.product-features { list-style: none; margin-bottom: 28px; }

.product-features li {
 padding: 8px 0;
 font-size: 14px;
 color: var(--text-muted);
 border-bottom: 1px solid rgba(8, 146, 212, 0.06);
 padding-left: 20px;
 position: relative;
}

.product-features li::before {
 content: '✓';
 position: absolute;
 left: 0;
 color: var(--success);
 font-weight: 700;
}

.product-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.product-actions .btn { padding: 16px 32px; }

/* Vehicle results on product page */
.vehicle-summary {
 background: rgba(8, 146, 212, 0.08);
 border: 1px solid rgba(8, 146, 212, 0.25);
 border-radius: 8px;
 padding: 20px;
 margin-bottom: 24px;
}

.vehicle-summary h3 {
 font-size: 14px;
 color: var(--bright-cyan);
 margin-bottom: 12px;
 font-style: normal;
}

.vehicle-stats {
 display: grid;
 grid-template-columns: repeat(4, 1fr);
 gap: 12px;
 text-align: center;
}

.vehicle-stat .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.vehicle-stat .value { font-size: 18px; font-weight: 900; margin-top: 4px; }
.vehicle-stat .value.gain { color: var(--success); }
.vehicle-stat .value.tuned { color: var(--bright-cyan); }

@media (max-width: 900px) {
 .shop-layout { grid-template-columns: 1fr; }
 .shop-sidebar {
  position: static;
  max-height: none;
 }

 .shop-sidebar-scroll {
  max-height: none;
  overflow: visible;
 }

 .filter-group--manufacturer {
  height: auto !important;
  min-height: 0 !important;
 }

 #manufacturerFilterGroup .filter-list-scroll {
  max-height: 280px;
 }
 .product-detail { grid-template-columns: 1fr; }
 .vehicle-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 749px) {
 .shop-toolbar { flex-direction: column; align-items: stretch; }
 .shop-search { max-width: 100%; }
 .products-grid { grid-template-columns: 1fr; }
}

/* Pagination */
.shop-pagination {
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 8px;
 flex-wrap: wrap;
 margin-top: 32px;
 padding-top: 24px;
 border-top: 1px solid rgba(77, 184, 224, 0.15);
}

.btn-sm {
 padding: 8px 14px;
 font-size: 12px;
}

.shop-page-info {
 font-size: 14px;
 color: var(--text-muted);
}

.shop-loading {
 text-align: center;
 padding: 48px 20px;
 color: var(--text-muted);
}

.shop-loading-spinner {
 width: 40px;
 height: 40px;
 margin: 0 auto 16px;
 border: 3px solid rgba(0, 212, 255, 0.2);
 border-top-color: var(--bright-cyan);
 border-radius: 50%;
 animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.products-grid.is-loading { opacity: 0.4; pointer-events: none; }

.filter-list input[type="radio"] {
 accent-color: var(--bright-cyan);
 width: 16px;
 height: 16px;
}

.shop-quick-links a {
 display: block;
 padding: 6px 0;
 font-size: 14px;
 color: var(--text-muted);
 text-decoration: none;
}

.shop-quick-links a:hover { color: var(--bright-cyan); }

.shop-seo-grid {
 display: grid;
 grid-template-columns: repeat(3, 1fr);
 gap: 20px;
 margin-top: 28px;
}

.shop-seo-grid article {
 background: var(--dark-surface);
 border: 1px solid rgba(0, 212, 255, 0.12);
 border-radius: 8px;
 padding: 20px;
 transition: border-color 0.25s, transform 0.25s;
}

.shop-seo-grid article:hover {
 border-color: rgba(0, 212, 255, 0.35);
 transform: translateY(-2px);
}

.shop-seo-grid h3 { font-size: 16px; margin-bottom: 8px; }
.shop-seo-grid h3 a { color: var(--text); text-decoration: none; }
.shop-seo-grid h3 a:hover { color: var(--bright-cyan); }

.shop-hero-sub { color: var(--text-muted); margin-top: 8px; max-width: 720px; }

@media (max-width: 900px) {
 .shop-seo-grid { grid-template-columns: 1fr; }
}
