/* ==========================================================================
   Deegeet Homepage Sections — Jumia-style grid, Jaylines Vogue teal theme

   SCOPING: every rule below lives under .jvhs-* classes, and the custom
   properties are declared on .jvhs-section itself (not :root), so nothing
   here can leak into a theme's header, hero, or any other page content —
   even if the theme happens to reuse a similar class name elsewhere.
   ========================================================================== */

.jvhs-section {
	/* Custom properties scoped here on purpose — never on :root — so they
	   can't override a theme variable of the same name anywhere else. */
	--jvhs-teal:        #0c6b58; /* main brand teal green — adjust to match your exact brand hex */
	--jvhs-teal-dark:   #084d3f;
	--jvhs-teal-light:  #e6f3f0;
	--jvhs-text:        #1a1a1a;
	--jvhs-text-muted:  #6b6b6b;
	--jvhs-border:      #ececec;
	--jvhs-card-bg:     #ffffff;
	--jvhs-price-old:   #9a9a9a;
	--jvhs-stock-low:   #c0392b;
	--jvhs-gap:         14px;

	max-width: 1280px;
	margin: 0 auto;
	padding: 32px 16px;
}

/* ==========================================================================
   Section header — full-width solid teal bar, bold white title, "See All"
   link on the right inside the same bar.
   ========================================================================== */

.jvhs-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 20px;
	margin: 0 0 16px;
	background: linear-gradient(120deg, var(--jvhs-teal-dark), var(--jvhs-teal), var(--jvhs-teal-dark));
	background-size: 220% 100%;
	animation: jvhs-bar-shimmer 8s ease-in-out infinite;
	border-radius: 4px;
}

@keyframes jvhs-bar-shimmer {
	0%   { background-position: 0% 50%; }
	50%  { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
	.jvhs-section-header {
		animation: none;
	}
}

.jvhs-section-title {
	margin: 0;
	font-size: 19px;
	font-weight: 800;
	color: #ffffff;
	letter-spacing: 0.3px;
}

.jvhs-subtitle {
	margin: 0 0 16px;
	font-size: 13px;
	color: var(--jvhs-text-muted);
}

.jvhs-view-all {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	font-weight: 700;
	color: #ffffff;
	text-decoration: none !important;
	white-space: nowrap;
}

.jvhs-view-all:hover {
	color: var(--jvhs-teal-light);
	text-decoration: none !important;
}

/* ==========================================================================
   Grid — fixed 6 columns on desktop, 2 on mobile.
   Left-aligned: a section with fewer than a full row of products is NOT
   centered, it simply starts from the left like every other row. As more
   products get added later they keep filling left-to-right, top-to-bottom.
   ========================================================================== */

.jvhs-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: var(--jvhs-gap);
}

.jvhs-grid > .jvhs-card {
	flex: 0 0 calc((100% - (5 * var(--jvhs-gap))) / 6);
	max-width: calc((100% - (5 * var(--jvhs-gap))) / 6);
}

@media (max-width: 900px) {
	.jvhs-grid > .jvhs-card {
		flex: 0 0 calc((100% - (2 * var(--jvhs-gap))) / 3);
		max-width: calc((100% - (2 * var(--jvhs-gap))) / 3);
	}
}

@media (max-width: 640px) {
	.jvhs-grid > .jvhs-card {
		flex: 0 0 calc((100% - var(--jvhs-gap)) / 2);
		max-width: calc((100% - var(--jvhs-gap)) / 2);
	}
}

/* ---- Card ---- */

.jvhs-card {
	background: var(--jvhs-card-bg);
	border: none;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	position: relative;
}

.jvhs-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.jvhs-card-media {
	position: relative;
	background: #fff;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.jvhs-card-media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

/* Discount badge — top-left on the image, Jumia-style */
.jvhs-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	background: var(--jvhs-teal);
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	padding: 4px 7px;
	border-radius: 3px;
	z-index: 2;
}

/* Action buttons (add to cart / wishlist) — top-right on the image */
.jvhs-card-actions {
	position: absolute;
	top: 8px;
	right: 8px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	z-index: 2;
	opacity: 0;
	transform: translateX(4px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.jvhs-card:hover .jvhs-card-actions,
.jvhs-card:focus-within .jvhs-card-actions {
	opacity: 1;
	transform: translateX(0);
}

.jvhs-action-btn {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #ffffff;
	border: 1px solid var(--jvhs-border);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--jvhs-text);
	font-size: 14px;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
	text-decoration: none;
	padding: 0;
	overflow: hidden; /* keeps any third-party plugin markup from spilling outside the circle */
}

.jvhs-action-btn:hover {
	background: var(--jvhs-teal);
	color: #ffffff;
	text-decoration: none;
}

.jvhs-add-cart.jvhs-disabled {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}

.jvhs-add-cart.jvhs-disabled:hover {
	background: #ffffff;
	color: var(--jvhs-text);
}

/* ==========================================================================
   YITH Wishlist button — icon only, no visible "Add to wishlist" text link.
   YITH's markup varies a little by version, so this is intentionally broad
   and backed up by a small JS pass (homepage-sections.js) that strips any
   leftover visible text nodes as a safety net.
   ========================================================================== */

.jvhs-wishlist-wrap {
	position: relative;
}

.jvhs-wishlist-wrap .yith-wcwl-add-to-wishlist,
.jvhs-wishlist-wrap .yith-wcwl-add-button,
.jvhs-wishlist-wrap .yith-wcwl-wishlistexistsbrowse,
.jvhs-wishlist-wrap .yith-wcwl-wishlistaddedbrowse {
	margin: 0 !important;
	width: 100%;
	height: 100%;
	display: flex !important;
	align-items: center;
	justify-content: center;
}

.jvhs-wishlist-wrap a {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	text-decoration: none !important;
	color: var(--jvhs-text) !important;
	font-size: 0 !important; /* collapses any raw text next to the icon */
	line-height: 0;
}

.jvhs-wishlist-wrap a:hover,
.jvhs-wishlist-wrap a.exists_on_wishlist {
	color: var(--jvhs-teal) !important;
}

/* Any stray text spans YITH wraps its label in — hidden outright */
.jvhs-wishlist-wrap a span:not(.yith-wcwl-icon) {
	display: none !important;
}

.jvhs-wishlist-wrap i,
.jvhs-wishlist-wrap .yith-wcwl-icon {
	font-size: 15px !important;
	line-height: 1;
	margin: 0 !important;
}

.jvhs-wishlist-fallback {
	cursor: not-allowed;
	opacity: 0.6;
}

/* ---- Card info ---- */

.jvhs-card-info {
	padding: 10px 12px 12px;
}

.jvhs-card-title {
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
}

.jvhs-card-title a {
	color: var(--jvhs-text);
	text-decoration: none !important;
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.jvhs-card-title a:hover {
	color: var(--jvhs-teal);
	text-decoration: none !important;
}

.jvhs-card-price {
	font-size: 15px;
	font-weight: 700;
	color: var(--jvhs-teal-dark);
}

.jvhs-card-price ins {
	text-decoration: none;
	color: var(--jvhs-teal-dark);
}

.jvhs-card-price del {
	text-decoration: line-through;
	color: var(--jvhs-price-old);
	font-weight: 400;
	font-size: 12px;
	margin-right: 6px;
}

/* ---- Stock progress bar ---- */

.jvhs-stock-row {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
}

.jvhs-stock-bar {
	flex: 1;
	height: 6px;
	background: #ececec;
	border-radius: 3px;
	overflow: hidden;
}

.jvhs-stock-bar-fill {
	display: block;
	height: 100%;
	border-radius: 3px;
	transition: width 0.3s ease;
}

.jvhs-stock-healthy  { background: var(--jvhs-teal); }
.jvhs-stock-low      { background: #e0a100; }
.jvhs-stock-critical { background: var(--jvhs-stock-low); }

.jvhs-stock-count {
	font-size: 10px;
	color: var(--jvhs-text-muted);
	white-space: nowrap;
	flex-shrink: 0;
}

.jvhs-stock-out {
	font-size: 11px;
	color: var(--jvhs-stock-low);
	font-weight: 600;
}

/* ==========================================================================
   Category grid ("Popular Categories")
   ========================================================================== */

.jvhs-cat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 14px;
}

.jvhs-cat-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none !important;
	color: var(--jvhs-text);
}

.jvhs-cat-image {
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	background-size: cover;
	background-position: center;
	border: 2px solid var(--jvhs-teal-light);
	transition: border-color 0.2s ease;
}

.jvhs-cat-card:hover .jvhs-cat-image {
	border-color: var(--jvhs-teal);
}

.jvhs-cat-label {
	margin-top: 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-align: center;
}

/* ==========================================================================
   Shop In Style banner
   ========================================================================== */

.jvhs-style-banner {
	background: var(--jvhs-teal-light);
	border-radius: 8px;
}

.jvhs-banner-header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin-bottom: 16px;
}

.jvhs-banner-header h2 {
	margin: 0;
	font-size: 20px;
	font-weight: 800;
	color: var(--jvhs-teal-dark);
	letter-spacing: 1px;
}

.jvhs-banner-side {
	font-size: 12px;
	font-weight: 700;
	color: var(--jvhs-teal);
	letter-spacing: 1px;
}

.jvhs-banner-scroll {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding-bottom: 6px;
	scrollbar-width: thin;
}

.jvhs-banner-item {
	flex: 0 0 auto;
	width: 160px;
	aspect-ratio: 1 / 1;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--jvhs-border);
}

.jvhs-banner-item img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* ---- Small screens ---- */

@media (max-width: 480px) {
	.jvhs-card-actions {
		opacity: 1;
		transform: none;
	}
}