html { scrollbar-gutter: stable; }
/* CHANGED: Prevent layout jumps when using slider */
.gcs-product-search { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 32px; max-width: 1152px; margin: 0 auto; color: #17212b; font-family: inherit; }
.gcs-product-search__filters, .gcs-product-card { border: 1px solid #d9e0e5; background: #fff; border-radius: 18px; box-shadow: 0 8px 24px rgba(23, 33, 43, .06); }
.gcs-product-search__filters { padding: 24px; align-self: start; position: sticky; top: 24px; contain: paint; will-change: transform; }
.gcs-product-search__filters h2 { margin: 0 0 24px; font-size: 24px; }
.gcs-product-search__filters label, .gcs-product-search__filters .gcs-product-search__label { display: block; margin: 18px 0 8px; font-weight: 600; }
.gcs-product-search__filters select, .gcs-product-search__filters input[type="range"] { width: 100%; }
.gcs-product-search__filters select { padding: 12px; border: 1px solid #b9c4cd; border-radius: 10px; background: #f5f7f8; font: inherit; }
.gcs-product-search__category-list { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border: 1px solid #b9c4cd; border-radius: 10px; background: #f5f7f8; }
.gcs-product-search__checkbox-item { display: flex; align-items: center; gap: 8px; margin: 0; padding: 3px 4px; font-size: 12px; font-weight: 500; cursor: pointer; user-select: none; border-radius: 6px; transition: background .15s ease; }
.gcs-product-search__checkbox-item:hover { background: #eef2f3; }
.gcs-product-search__checkbox-item input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: #216869; cursor: pointer; }
.gcs-product-search__checkbox-item.is-checked { font-weight: 700; color: #216869; }
.gcs-product-search__checkbox-item input:focus-visible { outline: 2px solid #216869; outline-offset: 2px; }
.gcs-product-search__range-heading { display: flex; justify-content: space-between; gap: 12px; align-items: end; margin-top: 24px; }
.gcs-product-search__range-heading label { margin: 0; }
.gcs-product-search__range-heading span { font-size: 12px; text-align: right; white-space: nowrap; }
.gcs-product-search__range-box { margin-top: 12px; padding: 16px; border-radius: 12px; background: #f5f7f8; contain: layout; min-height: 120px; /* CHANGED: Ensure range box has stable height */ }
.gcs-product-search__range-box label { margin: 0 0 4px; font-size: 13px; }
.gcs-product-search__range-box output { display: block; margin-bottom: 8px; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 18px; /* CHANGED: Prevent output text wrapping */ }
.gcs-product-search__range-box input { accent-color: #216869; }
.gcs-product-search__clear { margin-top: 20px; padding: 10px 14px; border: 0; border-radius: 10px; background: #e7edef; color: #17212b; cursor: pointer; font: inherit; }
.gcs-product-search__count { margin: 0 0 18px; color: #52616d; line-height: 1.3; min-height: 20px; /* CHANGED: Stabilize count label height to prevent wrapping */ }
.gcs-product-search__count strong { color: #17212b; }
.gcs-product-search__results { contain: paint; /* CHANGED: Isolate results section rendering to prevent layout jumps */ }
.gcs-product-search__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; contain: layout; /* CHANGED: Isolate grid layout calculations */ }
.gcs-product-card { padding: 24px; }
.gcs-product-card__image { aspect-ratio: 1; margin: -1px -1px 18px; overflow: hidden; border-radius: 14px; background: #eef2f3; }
.gcs-product-card__image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.gcs-product-card h3 { margin: 0 0 16px; font-size: 19px; }
.gcs-product-card dl { margin: 0; font-size: 14px; }
.gcs-product-card dl div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; margin-top: 8px; }
.gcs-product-card dt { font-weight: 700; }
.gcs-product-card dd { margin: 0; overflow-wrap: anywhere; }
.gcs-product-search__empty { padding: 24px; border: 1px solid #d9e0e5; border-radius: 14px; color: #52616d; }
.gcs-product-sidebar-search { margin-bottom: 24px; }
.gcs-product-sidebar-search .gcs-product-search { display: block; max-width: none; }
.gcs-product-sidebar-search .gcs-product-search__filters { position: static; padding: 18px; border-radius: 10px; box-shadow: none; }
.gcs-product-sidebar-search .gcs-product-search__filters h2 { margin-bottom: 18px; font-size: 20px; }
.gcs-product-sidebar-search .gcs-product-search__filters label { margin-top: 14px; }
.gcs-product-sidebar-search .gcs-product-search__results { margin-top: 18px; }
.gcs-product-sidebar-search .gcs-product-search__grid { grid-template-columns: 1fr; gap: 16px; }
.gcs-product-sidebar-search .gcs-product-card { padding: 16px; border-radius: 10px; box-shadow: none; }
.gcs-product-sidebar-search .gcs-product-search__count { margin-top: 18px; }
.product-block[hidden] { display: none !important; }
/* CHANGED: Stabilize archive mode product list to prevent jumping */
.product-block { contain: paint; }
.gcs-product-search__category-list label { margin-top: 5px !important; }
.gcs-product-search__checkbox-item{display:flex;align-items:center;gap:8px;margin:0;padding:3px 4px;font-size:12px;font-weight:500;cursor:pointer;user-select:none;border-radius:6px;transition}
#gcs-use-type{font-size:12px;}
.cr-cat-static-btn{    background-color: #216869;
    color: #ffffff;
    padding: 5px;
    font-size: 12px;
    border-radius: 10px;
    width: 100% !important;
    display: flex;
    justify-content: center;}

	.cr-cat-static-btn:hover{text-decoration:none; background-color:#359698;}
    .cr-cat-static-btn:active, .cr-cat-static-btn:visited{color: #ffffff;}
@media (max-width: 760px) { .gcs-product-search { grid-template-columns: 1fr; } .gcs-product-search__filters { position: static; } .gcs-product-search__grid { grid-template-columns: 1fr; } }

/* Filter panel: always expanded on desktop; folds into a "Search Category" dropdown on mobile/tablet.
   The panel renders with the `open` attribute by default (so it's expanded even without JS/CSS);
   gcs-product-search.js removes `open` on load when the viewport is mobile/tablet width. */
.gcs-product-search__filters-summary { display: none; }
@media (max-width: 991px) {
	.gcs-product-search__filters-panel { border: 1px solid #d9e0e5; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgba(23, 33, 43, .06); }
	.gcs-product-search__filters-panel .gcs-product-search__filters { border: 0; box-shadow: none; border-radius: 0; padding: 4px 20px 20px; }
	.gcs-product-search__filters-summary {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 16px 20px;
		font-size: 16px;
		font-weight: 700;
		cursor: pointer;
		list-style: none;
	}
	.gcs-product-search__filters-summary::-webkit-details-marker { display: none; }
	.gcs-product-search__filters-summary::after {
		content: '\25BC';
		font-size: 11px;
		color: #52616d;
		transition: transform .2s ease;
	}
	.gcs-product-search__filters-panel[open] .gcs-product-search__filters-summary::after { transform: rotate(180deg); }
}

/* Product listing page (product.php): show the sidebar filter above the product list on mobile/tablet,
   where Bootstrap 3's col-md-9/col-md-3 columns stack in plain DOM order. The video links stay below
   the product list; only the filter widget jumps to the top. */
/* CHANGED: Add containment to prevent layout jumps when filtering products */
#primary.content-area > .row > .col-md-9 { contain: layout; overflow-x: hidden; }
#primary.content-area > .row > .col-md-3 { contain: paint; }
@media (max-width: 991px) {
	#primary.content-area > .row {
		display: flex;
		flex-direction: column;
	}
	#primary.content-area > .row > .col-md-3 {
		display: contents;
	}
	#primary.content-area > .row > .col-md-3 > * {
		padding-left: 15px;
		padding-right: 15px;
	}
	#primary.content-area > .row > .col-md-3 .gcs-product-sidebar-search {
		order: -1;
	}
}