/* SAS Catalog – Service Page + Product Page templates */
.sas-catalog {
	--sas-accent: #f05a28;      /* orange: active link, Back button */
	--sas-side-bg: #c6e0e7;     /* light blue sidebar rows */
	--sas-side-line: #4d9bb0;   /* sidebar dividers */
	--sas-btn: #7bb342;         /* green "Send Enquiry" */
	--sas-text: #1d2433;
	--sas-muted: #5b6575;
	--sas-border: #e3e6ea;
	--sas-bg: #f4f5f7;
	color: var(--sas-text);
	background: var(--sas-bg);
}
.sas-catalog *, .sas-catalog *::before, .sas-catalog *::after { box-sizing: border-box; }
.sas-catalog [hidden] { display: none !important; }

/* Banner */
.sas-banner { position: relative; height: 220px; overflow: hidden; background: #0f2a3d; }
.sas-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sas-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,20,35,.75), rgba(5,20,35,.15)); }
.sas-banner__inner { position: relative; z-index: 1; max-width: 1240px; height: 100%; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; }
.sas-banner__title { margin: 0; color: #fff; font-size: clamp(28px, 4vw, 44px); font-weight: 700; }

/* Breadcrumb bar */
.sas-bar { max-width: 1240px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sas-crumbs { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.sas-crumbs a { color: var(--sas-text); text-decoration: none; }
.sas-crumbs a:hover { color: var(--sas-accent); }
.sas-crumbs [aria-current] { color: var(--sas-accent); }
.sas-crumbs__sep { margin: 0 6px; color: var(--sas-muted); }
.sas-back { flex: none; background: var(--sas-accent); color: #fff !important; font-size: 12px; font-weight: 700; text-transform: uppercase; text-decoration: none; padding: 6px 12px; border-radius: 3px; }
.sas-back:hover { filter: brightness(.92); }

/* Layout */
.sas-layout { max-width: 1240px; margin: 0 auto; padding: 0 20px 48px; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }

/* Sidebar */
.sas-sidebar { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; }
.sas-sidebar__mobile { display: none; }
.sas-side, .sas-side ul { list-style: none; margin: 0; padding: 0; }
.sas-side__group { border-bottom: 1px solid var(--sas-side-line); }
.sas-side__head { display: flex; align-items: stretch; background: var(--sas-side-bg); }
.sas-side__cat { flex: 1; padding: 11px 12px; font-size: 13px; font-weight: 700; line-height: 1.35; color: var(--sas-text); text-decoration: none; }
.sas-side__cat:hover, .sas-side__cat.is-active { color: var(--sas-accent); }
.sas-side__toggle { flex: none; width: 36px; border: 0; background: transparent; cursor: pointer; position: relative; padding: 0; }
.sas-side__toggle::before, .sas-side__toggle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 2px; background: var(--sas-text); transform: translate(-50%, -50%); transition: transform .2s; }
.sas-side__toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
.sas-side__group.is-open .sas-side__toggle::after { transform: translate(-50%, -50%) rotate(0deg); }
.sas-side__subs { display: none; background: #fff; }
.sas-side__group.is-open .sas-side__subs { display: block; }
.sas-side__sub { display: block; padding: 9px 12px 9px 16px; font-size: 12.5px; color: var(--sas-text); text-decoration: none; border-top: 1px solid var(--sas-border); }
.sas-side__sub:hover, .sas-side__sub.is-active { color: var(--sas-accent); }

/* Content */
.sas-content__title { margin: 0 0 10px; font-size: 26px; font-weight: 700; }
.sas-content__intro { margin: 0 0 22px; color: var(--sas-muted); font-size: 14px; line-height: 1.6; }
.sas-entry { margin: 22px 0; font-size: 15px; line-height: 1.7; }
.sas-entry--intro { margin: 0 0 22px; font-size: 14px; color: #333b4a; }
.sas-entry--tight { margin: 0 0 20px; }
.sas-entry > :first-child { margin-top: 0; }
.sas-entry > :last-child { margin-bottom: 0; }

/* Card grid */
.sas-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.sas-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--sas-border); border-radius: 4px; text-decoration: none; color: var(--sas-text); transition: box-shadow .2s, transform .2s; }
.sas-card:hover { box-shadow: 0 8px 24px rgba(16, 24, 40, .1); transform: translateY(-2px); }
.sas-card__img { display: block; aspect-ratio: 4 / 3; padding: 14px; }
.sas-card__img img { width: 100%; height: 100%; object-fit: contain; }
.sas-card__name { display: block; padding: 4px 12px 14px; text-align: center; font-size: 13px; font-weight: 700; line-height: 1.35; color: var(--sas-text); text-decoration: none; }
.sas-card:hover .sas-card__name, a.sas-card__name:hover { color: var(--sas-accent); }

/* Product list: one block per sub-category */
.sas-section + .sas-section, .sas-section + .sas-grid { margin-top: 34px; }
.sas-section__title { margin: 0 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--sas-side-line); font-size: 17px; font-weight: 700; }
.sas-section__title a { color: var(--sas-text); text-decoration: none; }
.sas-section__title a:hover { color: var(--sas-accent); }

/* Product detail (shown in place by JS) */
.sas-product__back { display: inline-block; margin-bottom: 16px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--sas-muted); text-decoration: none; }
.sas-product__back:hover { color: var(--sas-accent); }
.sas-product__body { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 28px; align-items: start; }
.sas-product__body:not(:has(.sas-product__img)) { grid-template-columns: 1fr; }
.sas-product__img { display: block; aspect-ratio: 4 / 3; padding: 14px; background: #fff; border: 1px solid var(--sas-border); border-radius: 4px; }
.sas-product__img img { width: 100%; height: 100%; object-fit: contain; }
.sas-product .sas-related__title { margin-top: 48px; }

/* Service detail images */
.sas-media { display: grid; gap: 14px; }
.sas-media--c1 { grid-template-columns: minmax(0, 1fr); }
.sas-media--c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sas-media--c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sas-media__item { display: block; border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; background: #dde3e8; box-shadow: 0 4px 14px rgba(16, 24, 40, .12); }
.sas-media__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.sas-media__item:hover img { transform: scale(1.03); }
.sas-media + .sas-btn { margin-top: 22px; }

.sas-btn { display: inline-block; background: var(--sas-btn); color: #fff !important; font-size: 13px; font-weight: 700; text-transform: uppercase; text-decoration: none; padding: 11px 22px; border-radius: 3px; }
.sas-btn:hover { filter: brightness(.93); }
.sas-related__title { margin: 40px 0 18px; text-align: center; font-size: 24px; font-weight: 700; }

/* Card with image slider (Related Services) */
.sas-card--slider { padding: 8px 8px 0; }
.sas-card--slider:hover { transform: none; }
.sas-slider { position: relative; border-radius: 4px; overflow: hidden; background: #dde3e8; }
.sas-slider__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.sas-slider__track::-webkit-scrollbar { display: none; }
.sas-slider__slide { flex: 0 0 100%; scroll-snap-align: start; display: block; aspect-ratio: 4 / 3; }
.sas-slider__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sas-slider__btn { position: absolute; top: 50%; width: 32px; height: 40px; margin-top: -20px; border: 0; padding: 0; background: rgba(255, 255, 255, .0); cursor: pointer; opacity: .85; }
.sas-slider__btn:hover { opacity: 1; background: rgba(0, 0, 0, .25); }
.sas-slider__btn::before { content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; border: solid #fff; border-width: 0 0 2px 2px; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .6)); }
.sas-slider__btn--prev { left: 0; }
.sas-slider__btn--prev::before { transform: translate(-30%, -50%) rotate(45deg); }
.sas-slider__btn--next { right: 0; }
.sas-slider__btn--next::before { transform: translate(-70%, -50%) rotate(-135deg); }
.sas-card--slider .sas-card__name { padding-top: 12px; }

/* Lightbox */
.sas-lightbox { border: 0; padding: 0; background: transparent; max-width: 92vw; max-height: 90vh; }
.sas-lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.sas-lightbox img { display: block; max-width: 92vw; max-height: 90vh; object-fit: contain; }

/* Loading state during instant navigation */
.sas-content { transition: opacity .15s; }
.sas-catalog.is-loading .sas-content { opacity: .45; pointer-events: none; }

/* Tablet */
@media (max-width: 1024px) {
	.sas-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 20px; }
	.sas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sas-product__body { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); }
}

/* Mobile: sidebar becomes a collapsible block above the content */
@media (max-width: 767px) {
	.sas-banner { height: 150px; }
	.sas-layout { grid-template-columns: 1fr; padding: 0 16px 36px; }
	.sas-bar { padding: 12px 16px; }
	.sas-sidebar { position: static; max-height: none; }
	.sas-sidebar__mobile { display: block; width: 100%; padding: 12px; border: 0; background: var(--sas-side-line); color: #fff; font-weight: 700; text-align: left; cursor: pointer; }
	.sas-sidebar:not(.is-open) .sas-side { display: none; }
	.sas-grid, .sas-media--c2, .sas-media--c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.sas-product__body { grid-template-columns: 1fr; }
	.sas-content__title { font-size: 22px; }
}
@media (max-width: 420px) {
	.sas-media--c2, .sas-media--c3 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.sas-card, .sas-media__item img, .sas-content { transition: none; }
	.sas-slider__track { scroll-behavior: auto; }
}
