.jl-home-categories {
	width: 100vw;
	max-width: 100vw;
	margin-top: 0;
	margin-bottom: 0;
	margin-right: calc(50% - 50vw);
	margin-left: calc(50% - 50vw);
	padding: clamp(24px, 3.2vw, 42px) clamp(12px, 2vw, 28px);
	background: #f7f5f3;
	overflow: hidden;
}

.jl-home-categories__inner {
	width: 100%;
	max-width: 1760px;
	margin: 0 auto;
}

.jl-home-categories__title {
	margin: 0 0 clamp(18px, 2vw, 30px);
	color: #1f1f23;
	font-size: clamp(26px, 3vw, 42px);
	font-weight: 400;
	line-height: 1.12;
	text-align: center;
	letter-spacing: 0;
}

.jl-home-categories__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(10px, 1.15vw, 18px);
}

.jl-home-category-card {
	position: relative;
	display: block;
	height: clamp(360px, 32vw, 520px);
	min-width: 0;
	overflow: hidden;
	color: #fff;
	background: #ece4d8;
	text-decoration: none;
	isolation: isolate;
}

.jl-home-category-card:hover,
.jl-home-category-card:focus {
	color: #fff;
	text-decoration: none;
}

.jl-home-category-card:focus-visible {
	outline: 2px solid #c9a84c;
	outline-offset: 3px;
}

.jl-home-category-card__media,
.jl-home-category-card__image,
.jl-home-category-card__placeholder {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
}

.jl-home-category-card__image {
	max-width: none;
	object-fit: cover;
	object-position: center;
	transform: scale(1.01);
	transition: transform 0.45s ease, filter 0.45s ease;
}

.jl-home-category-card__placeholder {
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(23, 23, 25, 0.18)),
		linear-gradient(135deg, #f3efe7 0%, #d8c9b2 48%, #8d7650 100%);
}

.jl-home-category-card__shade {
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		linear-gradient(180deg, rgba(17, 17, 18, 0.05) 0%, rgba(17, 17, 18, 0.1) 44%, rgba(17, 17, 18, 0.58) 100%),
		linear-gradient(90deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0));
	transition: opacity 0.35s ease;
}

.jl-home-category-card__content {
	position: absolute;
	right: clamp(18px, 2vw, 30px);
	bottom: clamp(18px, 2vw, 30px);
	left: clamp(18px, 2vw, 30px);
	z-index: 2;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	min-width: 0;
}

.jl-home-category-card__label {
	display: block;
	max-width: 100%;
	color: #fff;
	font-size: clamp(22px, 2.2vw, 34px);
	font-weight: 400;
	line-height: 1.05;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
	letter-spacing: 0;
}

.jl-home-category-card__label::after {
	content: "";
	display: block;
	width: 42px;
	height: 1px;
	margin-top: 12px;
	background: #d9b865;
	transform: scaleX(0.72);
	transform-origin: left center;
	transition: transform 0.3s ease;
}

.jl-home-category-card:hover .jl-home-category-card__image,
.jl-home-category-card:focus .jl-home-category-card__image {
	filter: saturate(1.04) contrast(1.02);
	transform: scale(1.065);
}

.jl-home-category-card:hover .jl-home-category-card__shade,
.jl-home-category-card:focus .jl-home-category-card__shade {
	opacity: 0.92;
}

.jl-home-category-card:hover .jl-home-category-card__label::after,
.jl-home-category-card:focus .jl-home-category-card__label::after {
	transform: scaleX(1);
}

@media (max-width: 991px) {
	.jl-home-categories {
		padding-top: 28px;
		padding-bottom: 32px;
	}

	.jl-home-categories__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.jl-home-category-card {
		height: clamp(250px, 52vw, 390px);
	}
}

@media (max-width: 520px) {
	.jl-home-categories {
		padding-right: 10px;
		padding-left: 10px;
		padding-top: 22px;
		padding-bottom: 24px;
	}

	.jl-home-categories__title {
		max-width: 320px;
		margin-right: auto;
		margin-bottom: 16px;
		margin-left: auto;
		font-size: 25px;
		line-height: 1.18;
		overflow-wrap: break-word;
	}

	.jl-home-categories__grid {
                gap: 8px;
        }

        /* Usar aspect-ratio en lugar de altura fija — proporciones consistentes */
        .jl-home-category-card {
                height: auto;
                aspect-ratio: 3 / 4;
        }

        .jl-home-category-card__content {
                right: 14px;
                bottom: 14px;
                left: 14px;
        }

        .jl-home-category-card__label {
                font-size: clamp(17px, 5.5vw, 22px);
        }
}

/* En pantallas muy pequeñas (375px iPhone SE): reducir gap */
@media (max-width: 390px) {
        .jl-home-categories {
                padding-right: 8px;
                padding-left: 8px;
        }

        .jl-home-categories__grid {
                gap: 6px;
        }

        .jl-home-category-card__label {
                font-size: clamp(15px, 5vw, 19px);
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}
}

body.home .jl-home-flow-row .wpb_wrapper,
body.front-page .jl-home-flow-row .wpb_wrapper {
	background: transparent;
}

body.home .jl-home-flow-row .joyeria-confidence-bar,
body.front-page .jl-home-flow-row .joyeria-confidence-bar {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	background: #f7f5f3 !important;
	border-top: 0 !important;
	box-shadow: 0 -1px 0 #f7f5f3;
}

body.home .joyeria-confidence-bar,
body.front-page .joyeria-confidence-bar {
	background: #f7f5f3 !important;
	border-top-color: #f7f5f3 !important;
}

body.home .jl-home-categories,
body.front-page .jl-home-categories {
	box-shadow: 0 1px 0 #f7f5f3;
}
