/* Quantum Catalog — styles follow the Figma layout (Rubik, #3573ef headings, #2a69a2 text). */

.qc-catalog {
	--qc-blue: #3573ef;
	--qc-text: #2a69a2;
	--qc-card: #f3f3f3;
	--qc-radius: 10px;
	--qc-gap: 24px;
	font-family: Rubik, "Helvetica Neue", Arial, sans-serif;
	color: var(--qc-text);
}

.qc-catalog *,
.qc-catalog *::before,
.qc-catalog *::after {
	box-sizing: border-box;
}

.qc-catalog h2,
.qc-catalog h3 {
	font-family: inherit;
	padding: 0;
}

.qc-empty {
	padding: 24px;
	border: 1px dashed #9db4e0;
	border-radius: var(--qc-radius);
	text-align: center;
}

/* "All Products" tiles */

.qc-tiles {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--qc-gap);
	margin-bottom: 64px;
}

.qc-tiles-title {
	margin: 8px 0 0 16px;
	color: var(--qc-blue);
	font-size: 60px;
	font-weight: 700;
	line-height: 1.05;
}

.qc-tile {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--qc-radius);
	background: #1f2f6e;
	text-decoration: none;
	box-shadow: 0 4px 14px rgba(31, 47, 110, 0.12);
}

.qc-tile::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(23, 33, 92, 0) 45%, rgba(23, 33, 92, 0.88) 100%);
	pointer-events: none;
}

.qc-tile-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

a.qc-tile:hover .qc-tile-img,
a.qc-tile:focus-visible .qc-tile-img {
	transform: scale(1.05);
}

.qc-tile-label {
	position: absolute;
	left: 22px;
	right: 22px;
	bottom: 18px;
	z-index: 1;
	color: #fff;
	font-size: 24px;
	font-weight: 500;
	line-height: 1.15;
}

/* Category sections */

.qc-section {
	margin-bottom: 64px;
	scroll-margin-top: 120px;
}

.qc-section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
	margin-bottom: 36px;
}

.qc-section-text {
	flex: 1 1 auto;
	max-width: 900px;
}

.qc-section-title {
	margin: 0 0 24px 16px;
	color: var(--qc-blue);
	font-size: 36px;
	font-weight: 500;
	line-height: 1.2;
}

.qc-section-desc {
	margin-left: 36px;
	font-size: 16px;
	line-height: 1.6;
}

.qc-section-desc p {
	margin: 0;
	padding: 0;
}

.qc-decor {
	--qc-d: 1; /* scale of the squares */
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: calc(26px * var(--qc-d));
}

.qc-decor i {
	display: block;
	border-radius: 2px;
}

.qc-decor i:nth-child(1) { width: calc(26px * var(--qc-d)); height: calc(26px * var(--qc-d)); background: #dfe7f4; }
.qc-decor i:nth-child(2) { width: calc(36px * var(--qc-d)); height: calc(36px * var(--qc-d)); background: #b8c9e6; }
.qc-decor i:nth-child(3) { width: calc(46px * var(--qc-d)); height: calc(46px * var(--qc-d)); background: #8ea8d2; }
.qc-decor i:nth-child(4) { width: calc(56px * var(--qc-d)); height: calc(56px * var(--qc-d)); background: #6185c0; }
.qc-decor i:nth-child(5) { width: calc(66px * var(--qc-d)); height: calc(66px * var(--qc-d)); background: #3c69ac; }

.qc-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--qc-gap);
}

.qc-cols-3 .qc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qc-cols-2 .qc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.qc-card {
	padding: 14px 14px 24px;
	border-radius: var(--qc-radius);
	background: var(--qc-card);
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.16);
}

.qc-card-img {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	margin-bottom: 20px;
	border-radius: 6px;
}

.qc-card-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.qc-card-title {
	margin: 0 0 10px;
	color: var(--qc-blue);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.3;
}

.qc-card-text {
	margin: 0;
	padding: 0;
	font-size: 14px;
	line-height: 1.45;
}

.qc-section-line {
	width: 33%;
	height: 14px;
	margin-top: 26px;
	background: linear-gradient(to right, #9fb2d6, rgba(159, 178, 214, 0));
}

/* Tablet: same layout as desktop, everything proportionally smaller */
@media (max-width: 980px) {
	.qc-catalog { --qc-gap: 16px; }
	.qc-tiles { margin-bottom: 48px; }
	.qc-tiles-title { margin: 4px 0 0 8px; font-size: 44px; }
	.qc-tile-label { left: 16px; right: 16px; bottom: 14px; font-size: 18px; }
	.qc-section { margin-bottom: 52px; }
	.qc-section-head { gap: 24px; margin-bottom: 28px; }
	.qc-section-title { margin: 0 0 16px 8px; font-size: 30px; }
	.qc-section-desc { margin-left: 24px; font-size: 15px; }
	.qc-decor { --qc-d: 0.7; }
	.qc-card { padding: 10px 10px 18px; }
	.qc-card-img { margin-bottom: 14px; }
	.qc-card-title { margin-bottom: 8px; font-size: 15px; }
	.qc-card-text { font-size: 13px; }
	.qc-section-line { height: 12px; margin-top: 22px; }
}

/* Phone: two columns; heading and description of a category take the full width */
@media (max-width: 600px) {
	.qc-catalog { --qc-gap: 12px; }
	.qc-tiles,
	.qc-grid,
	.qc-cols-3 .qc-grid,
	.qc-cols-4 .qc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.qc-tiles { margin-bottom: 40px; }
	.qc-tiles-head { grid-column: 1 / -1; }
	.qc-tiles-title { margin: 0; font-size: 34px; }
	.qc-tile-label { left: 12px; right: 12px; bottom: 10px; font-size: 15px; }
	.qc-section { margin-bottom: 40px; }
	.qc-section-head { display: block; margin-bottom: 20px; }
	.qc-section-text { max-width: none; }
	.qc-decor { display: none; }
	.qc-section-title { margin: 0 0 12px; font-size: 24px; }
	.qc-section-desc { margin-left: 0; font-size: 14px; }
	.qc-card { padding: 8px 8px 14px; }
	.qc-card-img { margin-bottom: 10px; }
	.qc-card-title { margin-bottom: 6px; font-size: 14px; }
	.qc-card-text { font-size: 12.5px; line-height: 1.4; }
	.qc-section-line { width: 60%; height: 10px; margin-top: 18px; }
}

/* ==========================================================================
   Product groups on the home page: [quantum_sections]
   ========================================================================== */

.qc-groups {
	margin-bottom: 64px;
}

.qc-groups-title {
	margin: 0 0 20px;
	color: var(--qc-blue);
	font-size: 60px;
	font-weight: 700;
	line-height: 1.1;
}

.qc-groups .qc-groups-text {
	margin: 0 0 56px;
	padding: 0;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.4;
}

.qc-groups-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px 31px;
}

.qc-group {
	position: relative;
	display: block;
	aspect-ratio: 379 / 320;
	overflow: hidden;
	border-radius: var(--qc-radius);
	background: #1f2f6e;
	color: #fff;
	text-decoration: none;
	box-shadow: 0 4px 14px rgba(31, 47, 110, 0.12);
}

.qc-group::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(23, 33, 92, 0) 37%, rgba(23, 33, 92, 0.9) 100%);
	pointer-events: none;
}

.qc-group-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.qc-group-body {
	position: absolute;
	left: 24px;
	right: 24px;
	bottom: 16px;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.qc-group-name {
	color: #fff;
	font-size: 24px;
	font-weight: 500;
	line-height: 1.15;
}

.qc-group-count {
	color: rgba(255, 255, 255, 0.9);
	font-size: 14px;
	line-height: 1.3;
}

.qc-group-arrow {
	display: inline-block;
	margin-left: 8px;
	transition: transform 0.25s ease;
}

a.qc-group:hover .qc-group-img,
a.qc-group:focus-visible .qc-group-img {
	transform: scale(1.05);
}

a.qc-group:hover .qc-group-arrow,
a.qc-group:focus-visible .qc-group-arrow {
	transform: translateX(5px);
}

/* Tablet: same three columns, smaller */
@media (max-width: 980px) {
	.qc-groups { margin-bottom: 48px; }
	.qc-groups-title { margin-bottom: 14px; font-size: 44px; }
	.qc-groups .qc-groups-text { margin-bottom: 36px; font-size: 16px; }
	.qc-groups-grid { gap: 16px; }
	.qc-group-body { left: 14px; right: 14px; bottom: 12px; gap: 10px; }
	.qc-group-name { font-size: 17px; }
	.qc-group-count { font-size: 12.5px; }
}

/* Phone: two columns, an odd last tile takes the full width */
@media (max-width: 600px) {
	.qc-groups { margin-bottom: 40px; }
	.qc-groups-title { margin-bottom: 10px; font-size: 34px; }
	.qc-groups .qc-groups-text { margin-bottom: 24px; font-size: 15px; }
	.qc-groups-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.qc-group { aspect-ratio: 1 / 1; }
	.qc-group:last-child:nth-child(odd) { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
	.qc-group-body { left: 12px; right: 12px; bottom: 10px; gap: 6px; }
	.qc-group-name { font-size: 15px; }
	.qc-group-count { font-size: 12px; }
}
