.gw-products-block { position: relative; margin-bottom: 30px; }

.gw-products-carousel {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 85%;
	overflow-x: auto;
	gap: 16px;
	scroll-snap-type: x mandatory;
	padding: 8px 4px 12px;
}

@media (min-width: 768px) {
	/* 3 columnas en desktop */
	.gw-products-carousel { grid-auto-columns: calc((100% - 2 * 16px) / 3); }
}

.gw-products-carousel::-webkit-scrollbar { height: 10px; }
.gw-products-carousel::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,.2); border-radius: 4px; }

.gw-card {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0,0,0,.06);
	min-height: 100%;
	display: flex;
	flex-direction: column;
	scroll-snap-align: start;
	overflow: hidden;
    position: relative;
}

.gw-card__image { position: relative; display: block; aspect-ratio: 16/9; overflow: hidden; }
/* Solo la foto principal debe ocupar todo el contenedor */
.gw-card__image > img:first-of-type { width: 100%; height: 100%; object-fit: cover; display: block; }
.gw-card__image .gw-flags { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 6px; z-index: 3; }
.gw-flag { font-size: 18px; filter: drop-shadow(0 1px 2px rgba(255,255,255,.9)); }
.gw-card__image .gw-flag-img {
	width: 22px;
	height: 16px;
	border-radius: 2px;
	/* Borde fino (top/left) como hairline y más grueso (right/bottom) */
	border-top: 0;
	border-left: 0;
	border-right: 2px solid #fff;
	border-bottom: 2px solid #fff;
	/* Hairlines subpíxel en top y left */
	box-shadow:
		0 2px 6px rgba(0,0,0,.25),
		0 -0.5px 0 0 #fff,
		-0.5px 0 0 0 #fff;
	display: block;
	object-fit: contain;
}

.gw-card__body { padding: 12px 14px 16px; display: grid; gap: 10px; grid-template-rows: auto 1fr auto; min-height: 180px; }
.gw-card__title { margin: 0; font-size: 1.05rem; line-height: 1.25; color: #0f172a; }
.gw-card__title a { text-decoration: none; color: #0f172a; }
.gw-card__title a:hover { color: #0f172a; }
.gw-card__footer { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

.gw-rating { display: flex; align-items: center; gap: 6px; color: #f59e0b; }
.gw-star { font-size: .95rem; line-height: 1; }
.gw-rating__count { color: #475569; font-size: .85rem; }
.gw-card__price { margin-top: 4px; font-weight: 600; color: #0f766e; }

.gw-products-error, .gw-products-empty { background: #fff3f3; color: #8a0411; padding: 12px; border-radius: 8px; }

/* Enlace overlay para que toda la tarjeta sea clicable */
.gw-card__link { position: absolute; inset: 0; z-index: 5; }

/* Flechas laterales */
.gw-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; width: 40px; height: 40px; border-radius: 9999px; border: 1px solid rgba(0,0,0,.08); background: #ffffff; box-shadow: 0 4px 16px rgba(0,0,0,.18); cursor: pointer; display: grid; place-items: center; color: #0f172a; transition: box-shadow .15s ease, transform .15s ease; }
.gw-nav:hover { box-shadow: 0 6px 20px rgba(0,0,0,.22); transform: translateY(-50%) scale(1.03); }
.gw-nav--prev { left: -10px; display: none; }
.gw-nav--next { right: -10px; }
.gw-products-block.scrolled-left .gw-nav--prev { display: grid; }


