/* ==========================================================
   Home page redesign - banner, news, category & product cards
   Loaded last on index.php so it overrides custom.css
   ========================================================== */
:root {
	--hr-brand: #7C3AED;
	--hr-brand-dark: #5B21B6;
	--hr-brand-soft: #F1EBFF;
	--hr-ink: #1F2937;
	--hr-muted: #6B7280;
	--hr-line: #ECE9F6;
	--hr-card: #FFFFFF;
	--hr-radius: 16px;
	--hr-shadow: 0 1px 2px rgba(17, 12, 46, .06), 0 6px 20px rgba(17, 12, 46, .06);
	--hr-shadow-hover: 0 12px 32px rgba(91, 33, 182, .16);
}

/* ---------- HERO BANNER: whole image, never cropped ---------- */
.banner-hero { width: 92%; max-width: 1500px; }
.banner-with-news { display: flex; flex-wrap: wrap; align-items: stretch; }
.banner-with-news > [class*="col-"] { float: none; }

#carousel-example-generic.modern-banner-slider {
	margin: 0;
	border-radius: var(--hr-radius);
	box-shadow: var(--hr-shadow);
	background: #0f0a1f;
}
#carousel-example-generic .carousel-inner,
#carousel-example-generic .carousel-inner > .item {
	height: auto;
	border-radius: var(--hr-radius);
	background: transparent;
}
#carousel-example-generic .carousel-inner > .item > a {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	max-height: 560px;
	width: 100%;
	overflow: hidden;
}
/* soft blurred copy of the slide fills the empty sides */
#carousel-example-generic .hero-slide-bg {
	position: absolute;
	inset: -30px;
	background-size: cover;
	background-position: center;
	filter: blur(28px) saturate(1.2) brightness(.85);
	transform: scale(1.1);
}
#carousel-example-generic .carousel-inner > .item > a > img,
#carousel-example-generic .modern-banner-image,
#carousel-example-generic .img-responsive {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: contain;
	border-radius: 0;
	transform: none !important;
}
#carousel-example-generic .carousel-control {
	z-index: 3;
	width: 44px;
	height: 44px;
	top: 50%;
	margin-top: -22px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	opacity: .85;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
#carousel-example-generic .carousel-control.left { left: 14px; }
#carousel-example-generic .carousel-control.right { right: 14px; }
#carousel-example-generic .carousel-control:hover { opacity: 1; }
#carousel-example-generic .carousel-control::before {
	font-family: "Font Awesome 6 Free", FontAwesome;
	font-weight: 900;
	font-size: 16px;
	line-height: 44px;
	color: var(--hr-brand);
	text-shadow: none;
}
#carousel-example-generic .carousel-control.left::before { content: "\f053"; }
#carousel-example-generic .carousel-control.right::before { content: "\f054"; }
#carousel-example-generic .carousel-indicators { z-index: 3; bottom: 12px; }

/* ---------- RIGHT NEWS COLUMN ---------- */
.banner-right-news { display: flex; }
.banner-right-news .sidebar-news-wrapper {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	height: 100%;
	padding: 12px;
	margin: 0;
	background: var(--hr-card);
	border-radius: var(--hr-radius);
	box-shadow: var(--hr-shadow);
}
.banner-right-news .news-full-card {
	flex: 1 1 0;
	margin: 0;
	border: 1px solid var(--hr-line);
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	box-shadow: none;
	transition: border-color .2s, box-shadow .2s;
}
.banner-right-news .news-full-card:hover { border-color: #d9ccfb; box-shadow: var(--hr-shadow-hover); }
.banner-right-news .news-full-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.banner-right-news .news-full-image {
	aspect-ratio: 16 / 9;
	background: #F7F5FD;
	overflow: hidden;
}
.banner-right-news .news-full-image img,
.banner-right-news .news-full-card:hover .news-full-image img {
	width: 100%;
	height: 100% !important;
	object-fit: contain;
	transform: none;
}
.banner-right-news .news-full-title {
	padding: 8px 10px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--hr-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.banner-right-news .news-full-card:hover .news-full-title { color: var(--hr-brand); }

/* ---------- SECTION HEADERS ---------- */
.modern-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 22px;
	padding: 0 0 12px;
	background: none;
	border: 0;
	border-bottom: 1px solid var(--hr-line);
	box-shadow: none;
	border-radius: 0;
}
.modern-section-header h1,
.modern-section-header h2 {
	position: relative;
	margin: 0;
	padding-left: 14px;
	font-size: 24px;
	font-weight: 700;
	color: var(--hr-ink);
	border: 0;
}
.modern-section-header h1::before,
.modern-section-header h2::before {
	content: "";
	position: absolute;
	left: 0;
	top: 4px;
	bottom: 4px;
	width: 4px;
	border-radius: 4px;
	background: linear-gradient(180deg, #8B5CF6, #5B21B6);
}
.modern-section-header .view-all-link {
	padding: 7px 16px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	border-radius: 999px;
	border: 1px solid #d9ccfb;
	background: #fff;
	color: var(--hr-brand);
	white-space: nowrap;
}
.modern-section-header .view-all-link::after { content: " \2192"; }
.modern-section-header .view-all-link:hover { background: var(--hr-brand); color: #fff; border-color: var(--hr-brand); text-decoration: none; }

/* equal-height card grid */
.section-main-content > .row {
	display: flex;
	flex-wrap: wrap;
}
.section-main-content > .row::before,
.section-main-content > .row::after { display: none; }
.home-card-col { float: none; display: flex; margin-bottom: 24px; }

/* ---------- CATEGORY CARDS ---------- */
.modern-category-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	padding: 18px 16px 16px;
	margin: 0;
	text-align: center;
	text-decoration: none !important;
	background: var(--hr-card);
	border: 1px solid var(--hr-line);
	border-radius: var(--hr-radius);
	box-shadow: var(--hr-shadow);
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.modern-category-card::before { display: none; }
.modern-category-card:hover { transform: translateY(-4px); box-shadow: var(--hr-shadow-hover); border-color: #d9ccfb; }
.modern-category-card .category-image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 4 / 3;
	height: auto;
	margin: 0 0 14px;
	padding: 12px;
	border-radius: 12px;
	background: radial-gradient(circle at 50% 40%, #fff 0%, #F4F0FF 100%);
	transform: none !important;
}
.modern-category-card .category-image img,
.modern-category-card:hover .category-image img {
	width: 100%;
	height: 100%;
	max-height: none;
	object-fit: contain;
	transform: none;
	transition: transform .3s ease;
}
.modern-category-card:hover .category-image img { transform: scale(1.04); }
.modern-category-card .category-title {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 700;
	color: var(--hr-ink);
}
.modern-category-card:hover .category-title { color: var(--hr-brand); }
.modern-category-card .category-explore {
	margin-top: auto;
	font-size: 12px;
	font-weight: 600;
	color: var(--hr-brand);
	opacity: .8;
}
.modern-category-card .category-explore i { font-size: 10px; transition: transform .2s; }
.modern-category-card:hover .category-explore i { transform: translateX(3px); }

/* ---------- PRODUCT CARDS ---------- */
.modern-product-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	margin: 0;
	overflow: hidden;
	background: var(--hr-card);
	border: 1px solid var(--hr-line);
	border-radius: var(--hr-radius);
	box-shadow: var(--hr-shadow);
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.modern-product-card:hover { transform: translateY(-4px); box-shadow: var(--hr-shadow-hover); border-color: #d9ccfb; }
.modern-product-card .card-image-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	height: auto;
	margin: 10px 10px 0;
	padding: 16px;
	border-radius: 12px;
	background: radial-gradient(circle at 50% 40%, #fff 0%, #F6F3FE 100%);
	overflow: hidden;
}
.modern-product-card .card-image-wrapper img,
.modern-product-card:hover .card-image-wrapper img {
	width: 100%;
	height: 100%;
	max-height: none;
	object-fit: contain;
	transition: transform .35s ease;
	transform: none;
}
.modern-product-card:hover .card-image-wrapper img { transform: scale(1.05); }
.modern-product-card .card-body {
	flex: 1 1 auto;
	padding: 12px 14px 4px;
	text-align: left;
}
.modern-product-card .card-cat {
	display: inline-block;
	margin-bottom: 6px;
	padding: 2px 8px;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--hr-brand-dark);
	background: var(--hr-brand-soft);
	border-radius: 999px;
	max-width: 100%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.modern-product-card .card-title {
	margin: 0;
	min-height: 2.7em;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
}
.modern-product-card .card-title a {
	color: var(--hr-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.modern-product-card .card-title a:hover { color: var(--hr-brand); text-decoration: none; }
.modern-product-card .card-footer {
	display: flex;
	gap: 8px;
	padding: 10px 14px 14px;
	border: 0;
	background: none;
}
.modern-product-card .card-action,
.modern-product-card .card-quote {
	flex: 1;
	padding: 8px 6px;
	font-size: 12.5px;
	font-weight: 600;
	text-align: center;
	border-radius: 10px;
	white-space: nowrap;
	transition: background .2s, color .2s, border-color .2s;
	text-decoration: none !important;
}
.modern-product-card .card-action {
	color: #fff;
	background: linear-gradient(135deg, #8B5CF6, #6D28D9);
	border: 1px solid transparent;
	box-shadow: none;
}
.modern-product-card .card-action:hover { background: var(--hr-brand-dark); color: #fff; transform: none; }
.modern-product-card .card-quote {
	color: var(--hr-brand);
	background: #fff;
	border: 1px solid #d9ccfb;
}
.modern-product-card .card-quote:hover { background: var(--hr-brand-soft); color: var(--hr-brand-dark); }

/* ---------- LATEST NEWS CARDS ---------- */
.news-blog-card {
	height: 100%;
	border: 1px solid var(--hr-line);
	border-radius: var(--hr-radius);
	box-shadow: var(--hr-shadow);
	overflow: hidden;
}
.news-blog-card:hover { transform: translateY(-4px); box-shadow: var(--hr-shadow-hover); }
.news-blog-card .news-card-image-wrapper {
	aspect-ratio: 16 / 9;
	height: auto;
	background: #F7F5FD;
}
.news-blog-card .news-card-image,
.news-blog-card:hover .news-card-image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transform: none;
}
.news-blog-card .news-card-overlay-gradient { display: none; }
.news-blog-card .news-card-title {
	min-height: 2.8em;
	font-size: 16px;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.news-blog-card .news-card-meta { display: flex; justify-content: space-between; align-items: center; }
.news-blog-card .news-readmore { font-weight: 600; color: var(--hr-brand); }
.news-blog-card .news-readmore i { font-size: 11px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991px) {
	.banner-hero { width: auto; padding: 0 12px; }
	.banner-right-news { margin-top: 16px; }
	.banner-right-news .sidebar-news-wrapper { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; }
	.banner-right-news .news-full-card { flex: 0 0 72%; max-width: 280px; scroll-snap-align: start; }
	#carousel-example-generic .carousel-inner > .item > a { aspect-ratio: 4 / 3; }
}
@media (max-width: 767px) {
	.modern-section-header h1,
	.modern-section-header h2 { font-size: 19px; }
	.home-card-col { padding-left: 7px; padding-right: 7px; margin-bottom: 14px; }
	.section-main-content > .row { margin-left: -7px; margin-right: -7px; }
	.modern-product-card .card-image-wrapper { margin: 8px 8px 0; padding: 10px; }
	.modern-product-card .card-body { padding: 10px 10px 2px; }
	.modern-product-card .card-title { font-size: 13px; }
	.modern-product-card .card-footer { flex-direction: column; gap: 6px; padding: 8px 10px 10px; }
	.modern-category-card { padding: 12px 10px; }
	.modern-category-card .category-title { font-size: 13.5px; }
	#carousel-example-generic .carousel-inner > .item > a { aspect-ratio: 1 / 1; }
	#carousel-example-generic .carousel-control { width: 36px; height: 36px; margin-top: -18px; }
	#carousel-example-generic .carousel-control::before { line-height: 36px; font-size: 13px; }
}

/* ---------- TRUST STRIP ---------- */
.home-trust {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	list-style: none;
	padding: 0;
	margin: 22px 0 6px;
}
.home-trust li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: var(--hr-card);
	border: 1px solid var(--hr-line);
	border-radius: 14px;
	box-shadow: var(--hr-shadow);
}
.home-trust i {
	flex: 0 0 42px;
	height: 42px;
	line-height: 42px;
	text-align: center;
	border-radius: 12px;
	font-size: 18px;
	color: var(--hr-brand);
	background: var(--hr-brand-soft);
}
.home-trust span { font-size: 12.5px; line-height: 1.35; color: var(--hr-muted); }
.home-trust b { display: block; font-size: 15px; color: var(--hr-ink); }

/* ---------- GS1 BARCODE REGISTRATION PROMO ---------- */
.home-gs1 {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 28px;
	align-items: center;
	margin: 10px 0 30px;
	padding: 30px 34px;
	color: #fff;
	border-radius: 20px;
	background:
		repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 2px, transparent 2px 7px, rgba(255,255,255,.08) 7px 8px, transparent 8px 14px),
		linear-gradient(135deg, #4C1D95 0%, #7C3AED 60%, #A855F7 100%);
	box-shadow: 0 18px 40px rgba(76, 29, 149, .25);
}
.home-gs1-kicker {
	display: inline-block;
	margin-bottom: 10px;
	padding: 4px 12px;
	font-size: 12px;
	font-weight: 700;
	border-radius: 999px;
	background: rgba(255,255,255,.15);
	border: 1px solid rgba(255,255,255,.3);
}
.home-gs1 h2 { margin: 0 0 8px; font-size: 26px; font-weight: 800; color: #fff; }
.home-gs1 p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.6; opacity: .95; }
.home-gs1-link { color: #fff !important; font-weight: 700; text-decoration: underline; }
.home-gs1-check {
	padding: 20px;
	color: var(--hr-ink);
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.home-gs1-check label { display: block; margin-bottom: 8px; font-size: 16px; font-weight: 800; }
.home-gs1-row { display: flex; gap: 8px; }
.home-gs1-row input {
	flex: 1;
	min-width: 0;
	padding: 11px 13px;
	font: 18px/1.2 Consolas, Menlo, monospace;
	letter-spacing: .05em;
	border: 2px solid var(--hr-line);
	border-radius: 12px;
	outline: none;
}
.home-gs1-row input:focus { border-color: var(--hr-brand); }
.home-gs1-row button {
	padding: 0 20px;
	font-weight: 700;
	color: #fff;
	border: 0;
	border-radius: 12px;
	background: var(--hr-brand);
}
.home-gs1-row button:hover { background: var(--hr-brand-dark); }
.home-gs1-check small { display: block; margin-top: 8px; color: var(--hr-muted); }

@media (max-width: 991px) {
	.home-trust { grid-template-columns: repeat(2, 1fr); }
	.home-gs1 { grid-template-columns: 1fr; padding: 24px 20px; }
}
@media (max-width: 480px) {
	.home-trust { grid-template-columns: 1fr 1fr; gap: 8px; }
	.home-trust li { padding: 10px; gap: 8px; }
	.home-trust i { flex-basis: 34px; height: 34px; line-height: 34px; font-size: 15px; }
	.home-gs1 h2 { font-size: 21px; }
}

/* ---------- LATEST NEWS (magazine layout) ---------- */
.home-news-wrap { margin-top: 30px; margin-bottom: 30px; }
.home-news { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; }
.home-news a { text-decoration: none !important; }
.home-news-feature {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--hr-card);
	border: 1px solid var(--hr-line);
	border-radius: var(--hr-radius);
	box-shadow: var(--hr-shadow);
	transition: transform .25s ease, box-shadow .25s ease;
}
.home-news-feature:hover { transform: translateY(-4px); box-shadow: var(--hr-shadow-hover); }
.home-news-img { display: block; aspect-ratio: 16 / 9; background: #F7F5FD; overflow: hidden; }
.home-news-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s ease; }
.home-news-feature:hover .home-news-img img { transform: scale(1.03); }
.home-news-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; }
.home-news-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--hr-muted); }
.home-news-tag {
	padding: 3px 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #fff;
	border-radius: 999px;
	background: linear-gradient(135deg, #8B5CF6, #6D28D9);
}
.home-news-title { font-size: 21px; font-weight: 800; line-height: 1.3; color: var(--hr-ink); }
.home-news-feature:hover .home-news-title { color: var(--hr-brand); }
.home-news-excerpt { font-size: 14.5px; line-height: 1.6; color: var(--hr-muted); }
.home-news-more { margin-top: 4px; font-weight: 700; color: var(--hr-brand); }
.home-news-more i { font-size: 12px; transition: transform .2s; }
.home-news-feature:hover .home-news-more i { transform: translateX(4px); }

.home-news-list { display: flex; flex-direction: column; gap: 12px; }
.home-news-item {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px;
	background: var(--hr-card);
	border: 1px solid var(--hr-line);
	border-radius: 14px;
	box-shadow: var(--hr-shadow);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.home-news-item:hover { transform: translateX(4px); box-shadow: var(--hr-shadow-hover); border-color: #d9ccfb; }
.home-news-thumb { flex: 0 0 132px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #F7F5FD; }
.home-news-thumb img { width: 100%; height: 100%; object-fit: contain; }
.home-news-item-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.home-news-date { font-size: 12px; font-weight: 600; color: var(--hr-brand); }
.home-news-item-title {
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.38;
	color: var(--hr-ink);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.home-news-item:hover .home-news-item-title { color: var(--hr-brand); }

/* ---------- HOME FAQ ---------- */
.home-faq-wrap { margin-bottom: 30px; }
.home-faq { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.home-faq details {
	padding: 0 18px;
	background: var(--hr-card);
	border: 1px solid var(--hr-line);
	border-radius: 14px;
	box-shadow: var(--hr-shadow);
}
.home-faq details[open] { border-color: #d9ccfb; }
.home-faq summary {
	position: relative;
	padding: 15px 28px 15px 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--hr-ink);
	cursor: pointer;
	list-style: none;
}
.home-faq summary::-webkit-details-marker { display: none; }
.home-faq summary::after {
	content: "+";
	position: absolute;
	right: 0;
	top: 12px;
	width: 24px;
	height: 24px;
	line-height: 22px;
	text-align: center;
	font-size: 18px;
	color: var(--hr-brand);
	border-radius: 50%;
	background: var(--hr-brand-soft);
}
.home-faq details[open] summary::after { content: "\2212"; }
.home-faq details p { margin: 0 0 16px; font-size: 14px; line-height: 1.65; color: var(--hr-muted); }

@media (max-width: 991px) {
	.home-news, .home-faq { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
	.home-news-thumb { flex-basis: 96px; }
	.home-news-title { font-size: 18px; }
}

/* ---------- HOME INTRO (H1) ---------- */
.home-intro {
	display: grid;
	grid-template-columns: 1.7fr 1fr;
	gap: 24px;
	align-items: center;
	margin: 24px 0 4px;
	padding: 22px 26px;
	background: var(--hr-card);
	border: 1px solid var(--hr-line);
	border-radius: 18px;
	box-shadow: var(--hr-shadow);
}
.home-intro h1 { margin: 0 0 10px; font-size: 26px; font-weight: 800; line-height: 1.25; color: var(--hr-ink); }
.home-intro p { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--hr-muted); }
.home-intro p a { color: var(--hr-brand); font-weight: 600; }
.home-intro-links { display: grid; gap: 8px; }
.home-intro-links a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	font-size: 14px;
	font-weight: 700;
	color: var(--hr-brand-dark);
	background: var(--hr-brand-soft);
	border-radius: 12px;
	text-decoration: none !important;
	transition: background .2s, transform .2s;
}
.home-intro-links a:hover { background: #E4D8FE; transform: translateX(3px); }
.home-intro-links i { width: 18px; text-align: center; color: var(--hr-brand); }
@media (max-width: 991px) { .home-intro { grid-template-columns: 1fr; padding: 18px; } .home-intro h1 { font-size: 21px; } }

/* tighten space between banner and intro */
.banner-hero { margin-bottom: 0 !important; }
.banner-with-news { margin-bottom: 0; }
.home-intro { margin-top: 22px; }
