/* Cybersalt extension catalog + product pages (html/com_content/cs_catalog.php) */

.cs-catalog,
.cs-product {
	--cs-navy: #020c7f;
	--cs-navy-deep: #010850;
	--cs-orange: #fa6400;
	--cs-orange-dark: #c24d00;
	--cs-ink: #1d2433;
	--cs-muted: #545b6b;
	--cs-line: #d6dae3;
	--cs-soft: #f3f5fa;
	--cs-card: #ffffff;
	--cs-green: #0d6b3a;
	color: var(--cs-ink);
	/* The template centres text on small screens; these pages read better left-aligned. */
	text-align: left;
}

/* ---------- Hero ---------- */

.cs-hero {
	text-align: left;
	background: var(--cs-navy);
	color: #fff;
	border-radius: 14px;
	padding: 40px 40px 32px;
	margin: 0 0 28px;
}
.cs-hero__kicker {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #fff;
}
.cs-hero__kicker::before {
	content: "";
	width: 22px;
	height: 8px;
	background: var(--cs-orange);
}
.cs-hero__title {
	color: #fff;
	font-size: clamp(32px, 5vw, 56px);
	line-height: 1.05;
	font-weight: 700;
	letter-spacing: -.02em;
	margin: 14px 0 12px;
}
.cs-hero__lead {
	color: #e6e9ff;
	font-size: 18px;
	line-height: 1.5;
	max-width: 46em;
	margin: 0 0 26px;
}

/* Tabs (All / Extensions / Add-ons) */
.cs-tabs {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	border: 1px solid rgba(255,255,255,.55);
	border-radius: 8px;
	overflow: hidden;
}
.cs-tab {
	background: transparent;
	color: #fff;
	border: 0;
	border-left: 1px solid rgba(255,255,255,.35);
	padding: 16px 18px;
	text-align: left;
	cursor: pointer;
	font: inherit;
}
.cs-tab:first-child { border-left: 0; }
.cs-tab:hover { background: rgba(255,255,255,.08); }
.cs-tab.is-active { background: #fff; color: var(--cs-navy); }
.cs-tab__name { display: block; font-size: 22px; font-weight: 700; line-height: 1.2; }
.cs-tab__count { display: block; font-size: 13px; margin-top: 4px; opacity: .85; }
.cs-tab.is-active .cs-tab__count { opacity: 1; color: var(--cs-muted); }

.cs-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	margin-top: 16px;
}
.cs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-chip {
	background: #fff;
	color: var(--cs-navy);
	border: 2px solid #fff;
	border-radius: 6px;
	padding: 7px 14px;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}
.cs-chip:hover { border-color: #facc15; }
/* Selected filter = highlighter yellow; orange is kept for action buttons on all three sites */
.cs-chip.is-active { background: #facc15; border-color: #facc15; color: #1f2937; }
.cs-topics { margin-top: 16px; }
.cs-topics .cs-chip { font-weight: 600; }
/* Topic pages: the chips are real links to the other topic pages */
a.cs-chip { display: inline-block; text-decoration: none; line-height: 1.3; }
a.cs-chip:hover { color: var(--cs-navy); }
.cs-topic .cs-crumbs { margin-bottom: 12px; }
.cs-hero__lead p { margin: 0 0 .7em; color: inherit; }
.cs-hero__lead p:last-child { margin-bottom: 0; }
.cs-hero__lead a { color: #fff; }
.cs-search input {
	width: 260px;
	max-width: 100%;
	border: 2px solid #fff;
	border-radius: 6px;
	padding: 8px 12px;
	font: inherit;
	font-size: 15px;
	color: var(--cs-ink);
	background: #fff;
}
.cs-search input:focus { outline: 3px solid var(--cs-orange); outline-offset: 1px; }
.cs-tab:focus-visible,
.cs-chip:focus-visible,
.cs-card a:focus-visible,
.cs-btn:focus-visible { outline: 3px solid var(--cs-orange); outline-offset: 2px; }

/* ---------- Card grid ---------- */

.cs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 22px;
}
/* The four related cards always fill the row */
.cs-grid--four { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.cs-card {
	display: flex;
	flex-direction: column;
	background: var(--cs-card);
	border: 1px solid var(--cs-line);
	border-radius: 10px;
	overflow: hidden;
	transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.cs-card[hidden] { display: none; }
/* Cards in a row share row heights (panel, kind, name, pitch, tags, price), so every part lines up */
@supports (grid-template-rows: subgrid) {
	.cs-card { display: grid; grid-template-rows: subgrid; grid-row: span 6; row-gap: 0; }
	.cs-card .cs-card__body { display: grid; grid-template-rows: subgrid; grid-row: span 5; row-gap: 0; align-content: start; }
	.cs-card .cs-card__name { min-height: 0; }
	.cs-card .cs-card__badges { margin-top: 0; align-self: end; }
	.cs-card .cs-card__foot { align-self: end; }
}
.cs-card:hover { border-color: var(--cs-navy); box-shadow: 0 10px 24px rgba(2,12,127,.12); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .cs-card { transition: none; } .cs-card:hover { transform: none; } }

.cs-card__link { display: block; text-decoration: none; }
/* Every card's top panel looks the same: navy, name bottom-left, logo tile top-right */
.cs-card__art {
	position: relative;
	aspect-ratio: 16 / 10;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	padding: 18px 20px;
	text-align: left;
	background: linear-gradient(135deg, var(--cs-navy) 0%, #1b2aa6 100%);
}
.cs-card__for {
	color: #ffd2b3;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}
.cs-card__target {
	color: #fff;
	font-size: 25px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.01em;
	overflow-wrap: anywhere;
	max-width: calc(100% - 50px);
}
.cs-card__art .cs-card__badgeimg {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 44px;
	height: 44px;
	max-width: none;
	background: #fff;
	border-radius: 10px;
	padding: 5px;
}

.cs-card__body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 16px; }
.cs-card__kind {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--cs-muted);
}
/* Name always takes two lines' room, tags + price sit at the bottom: every row lines up */
.cs-card__name { font-size: 20px; line-height: 1.25; margin: 6px 0 6px; font-weight: 700; min-height: 2.5em; }
.cs-card__name a { color: var(--cs-navy); text-decoration: none; }
.cs-card__name a:hover { text-decoration: underline; }
.cs-card__pitch { font-size: 15px; line-height: 1.45; color: var(--cs-muted); margin: 0 0 12px; }
.cs-card__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.cs-card .cs-card__badges { margin-top: auto; }
.cs-card__foot {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	align-items: baseline;
	justify-content: space-between;
	border-top: 1px solid var(--cs-line);
	padding-top: 12px;
}
.cs-card__price { font-size: 22px; font-weight: 700; color: var(--cs-ink); }
.cs-card__price small { font-size: 14px; font-weight: 400; color: var(--cs-muted); }
.cs-card__more {
	white-space: nowrap;
	font-weight: 700;
	color: var(--cs-navy);
	text-decoration: none;
	border-bottom: 2px solid var(--cs-orange);
}
.cs-card__more:hover { color: var(--cs-orange-dark); }

/* ---------- Labels ----------
   Shared across cybersalt.com, energizethemes.com and virtuemarttemplates.net:
   one solid colour per kind, square corners (never pills), monospace caps.
   Orange is kept for Buy, so no label is orange. Set "A", chosen by Tim 2026-11-11.
     Free     #15803D green      Pro        #6D28D9 purple
     Joomla 5 #2563EB blue       Joomla 6   #123A6B navy (newest darkest)
     Joomla 4/3 #4B5563 grey     VirtueMart #14B8A6 bright teal, dark text
     Version  #DB2777 raspberry  New        #FACC15 yellow, dark text
   (12 Nov: version and VirtueMart brightened, Tim found charcoal and dark teal too stark) */
.cs-tag {
	display: inline-block;
	font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, Menlo, monospace;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .03em;
	text-transform: uppercase;
	white-space: nowrap;
	padding: 6px 8px;
	border: 1px solid transparent;
	border-radius: 3px;
	background: #1f2937;
	color: #fff;
}
.cs-tag--free { background: #15803d; }
.cs-tag--pro  { background: #6d28d9; }
.cs-tag--j5   { background: #2563eb; }
.cs-tag--j6   { background: #123a6b; }
.cs-tag--old  { background: #4b5563; }
.cs-tag--shop { background: #14b8a6; color: #042f2e; }
.cs-tag--ver  { background: #db2777; text-transform: none; }
.cs-tag--new  { background: #facc15; color: #1f2937; }
/* On a navy background every label gets a light rule so the dark ones don't disappear */
.cs-tags--on-dark .cs-tag { border-color: rgba(255,255,255,.7); }

.cs-empty { font-size: 17px; padding: 24px 0; }

/* ---------- Band (All Access) ---------- */

.cs-band {
	display: grid;
	grid-template-columns: 1fr 1.2fr;
	gap: 28px;
	align-items: center;
	background: var(--cs-orange);
	color: #fff;
	border-radius: 14px;
	padding: 32px 36px;
	margin: 36px 0;
}
.cs-band__title { color: var(--cs-navy-deep); font-size: 28px; line-height: 1.15; margin: 0; font-weight: 700; }
.cs-band__text p { color: #1a1000; font-size: 17px; line-height: 1.5; margin: 0 0 14px; }
.cs-band__text p small { color: inherit; font-size: inherit; }

/* ---------- Buttons ---------- */

.cs-btn {
	display: inline-block;
	font-weight: 700;
	font-size: 16px;
	padding: 12px 20px;
	border-radius: 7px;
	text-decoration: none;
	text-align: center;
}
.cs-btn--light { background: var(--cs-navy); color: #fff; }
.cs-btn--light:hover { background: var(--cs-navy-deep); color: #fff; }
.cs-btn--buy { display: block; background: var(--cs-orange); color: #fff; }
.cs-btn--buy:hover { background: var(--cs-orange-dark); color: #fff; }

/* ---------- Product page ---------- */

.cs-crumbs { font-size: 14px; margin: 0 0 12px; color: var(--cs-muted); }
.cs-crumbs a { color: var(--cs-navy); }

.cs-hero--product {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 32px;
	align-items: start;
}
.cs-hero__titlerow { display: flex; align-items: center; gap: 18px; margin: 14px 0 12px; }
.cs-hero__titlerow .cs-hero__title { margin: 0; font-size: clamp(30px, 4.2vw, 46px); }
.cs-hero__logo { width: 88px; height: 88px; flex: none; background: #fff; border-radius: 16px; padding: 8px; }
.cs-hero--product .cs-hero__lead { margin-bottom: 18px; }

.cs-buy {
	background: #fff;
	color: var(--cs-ink);
	border-radius: 10px;
	padding: 22px;
}
.cs-buy__price { font-size: 40px; font-weight: 700; line-height: 1.1; color: var(--cs-navy); }
.cs-buy__price small { font-size: 16px; font-weight: 400; color: var(--cs-muted); }
.cs-buy__note { font-size: 14px; line-height: 1.45; color: var(--cs-muted); margin: 8px 0 14px; }
.cs-buy__login { font-size: 14px; margin: 12px 0 0; color: var(--cs-muted); }
.cs-buy__login a { color: var(--cs-navy); font-weight: 700; }
/* The {cs-download} plugin's own markup, restyled for the price box */
.cs-buy__action .btn {
	display: block;
	width: 100%;
	white-space: normal;
	background: var(--cs-orange);
	border-color: var(--cs-orange);
	color: #fff;
	font-weight: 700;
	font-size: 16px;
	padding: 12px 16px;
	border-radius: 7px;
}
.cs-buy__action .btn:hover { background: var(--cs-orange-dark); border-color: var(--cs-orange-dark); }
.cs-buy__action .csrm-embed-meta { display: none; }
.cs-buy__action .csrm-embed-notice { margin: 0; font-size: 14px; }

.cs-product__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	gap: 36px;
	align-items: start;
}
.cs-product__body { font-size: 16px; line-height: 1.6; }
.cs-product__body h2 { font-size: 26px; margin: 34px 0 12px; color: var(--cs-navy); }
.cs-product__body > :first-child,
.cs-product__body > p:first-child + h2 { margin-top: 0; }
.cs-product__body table { width: 100%; }

.cs-spec {
	position: sticky;
	top: 16px;
	border: 1px solid var(--cs-line);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 6px 18px rgba(2,12,127,.07);
}
.cs-spec__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 14px 20px;
	background: var(--cs-navy);
	color: #fff;
	font-size: 18px;
	font-weight: 700;
}
.cs-spec__title::before { content: ""; width: 16px; height: 6px; background: var(--cs-orange); }
.cs-spec dl { margin: 0; font-size: 15px; }
/* Label on the left, value on the right of the same row */
.cs-spec__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	padding: 12px 20px;
	border-top: 1px solid var(--cs-line);
}
.cs-spec__row:first-child { border-top: 0; }
.cs-spec__row:nth-child(even) { background: var(--cs-soft); }
.cs-spec dt,
.cs-spec dd { margin: 0; }
.cs-spec dt {
	flex: none;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--cs-muted);
}
.cs-spec dd { text-align: right; font-weight: 700; color: var(--cs-ink); }
.cs-spec dd a { color: var(--cs-navy); }
.cs-spec dd small { font-size: 13px; font-weight: 400; color: var(--cs-muted); }
.cs-spec .fields-container {
	list-style: none;
	margin: 0;
	padding: 12px 20px;
	border-top: 1px solid var(--cs-line);
	font-size: 13px;
	color: var(--cs-muted);
}
.cs-spec .fields-container .field-label { font-weight: 700; color: var(--cs-ink); }

.cs-changes { margin: 40px 0 0; }
.cs-changes h2,
.cs-related h2 { font-size: 28px; color: var(--cs-navy); margin: 0 0 14px; }
.cs-change { border: 1px solid var(--cs-line); border-radius: 10px; margin-bottom: 10px; background: #fff; }
.cs-change summary { cursor: pointer; padding: 14px 18px; font-weight: 700; }
.cs-change__ver { color: var(--cs-navy); }
.cs-change__date { color: var(--cs-muted); font-weight: 400; margin-left: 8px; }
.cs-change__notes { padding: 0 18px 14px; font-size: 15px; line-height: 1.55; }
.cs-change__notes h3 { font-size: 17px; margin: 14px 0 6px; }

.cs-related { margin: 44px 0 20px; }
.cs-related__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cs-related__head a { color: var(--cs-navy); font-weight: 700; }
.cs-related .cs-card__target { font-size: 21px; }

/* ---------- Narrow columns ----------
   Sized by the space the page gets, not the screen: the template's side
   column can leave the article well under 800px on a wide screen. */

.cs-catalog,
.cs-product { container-type: inline-size; }

@container (max-width: 880px) {
	.cs-product__layout,
	.cs-band { grid-template-columns: 1fr; }
	.cs-product__layout { gap: 24px; }
	.cs-spec { position: static; order: -1; }
	.cs-grid--four { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
@container (max-width: 700px) {
	.cs-hero--product { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.cs-hero { padding: 26px 18px 22px; border-radius: 10px; }
	.cs-tabs { grid-template-columns: 1fr; }
	.cs-tab { border-left: 0; border-top: 1px solid rgba(255,255,255,.35); padding: 12px 14px; }
	.cs-tab:first-child { border-top: 0; }
	.cs-tab__name { font-size: 18px; }
	.cs-tab__count { display: none; }
	/* Topics: one row to swipe sideways instead of eight stacked lines */
	.cs-topics { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-right: -18px; padding-right: 18px; scrollbar-width: thin; }
	.cs-topics .cs-chip { flex: none; white-space: nowrap; }
	.cs-hero__lead { font-size: 16px; }
	.cs-search, .cs-search input { width: 100%; }
	.cs-band { padding: 24px 20px; }
	.cs-hero__titlerow { gap: 12px; }
	.cs-hero__logo { width: 60px; height: 60px; }
	.cs-product__body table { display: block; overflow-x: auto; }
}
