/* =========================================================================
   Onpy Product Grid / Carousel
   Reference: "Herramientas" layout
   ========================================================================= */

.onpy-product-grid-wrap {
	position: relative;
	width: 100%;
}

/* ── Grid Layout ──────────────────────────────────────────────────────── */

.onpy-product-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 30px;
}

@media (max-width: 1024px) {
	.onpy-product-grid {
		grid-template-columns: repeat(var(--onpy-grid-cols-tablet, 2), 1fr);
	}
}

@media (max-width: 767px) {
	.onpy-product-grid {
		grid-template-columns: repeat(var(--onpy-grid-cols-mobile, 1), 1fr);
	}
}

/* ── Card ─────────────────────────────────────────────────────────────── */

.onpy-product-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 12px;
	padding: 28px 0 32px;
	box-shadow: 0 2px 12px -3px rgba(0, 0, 0, 0.1);
	transition: box-shadow 0.25s ease;
	height: 100%;
	box-sizing: border-box;
	overflow: hidden;
	max-width: 240px;
	margin: 0 auto;
	width: 100%;
}

.onpy-product-card:hover {
	box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.18);
}

/* ── Image — contained, proportional, centered ────────────────────────── */

.onpy-product-card__image {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px 20px 24px;
	min-height: 170px;
}

.onpy-product-card__image a {
	display: flex;
	align-items: center;
	justify-content: center;
}

.onpy-product-card__image img {
	max-height: 150px;
	width: auto;
	max-width: 100%;
	height: auto;
	display: block;
	object-fit: contain;
}

/* ── Divider ──────────────────────────────────────────────────────────── */

.onpy-product-card__divider {
	width: 100%;
	height: 1px;
	background: #e8e8e8;
	margin: 0;
}

/* ── Content area ─────────────────────────────────────────────────────── */

.onpy-product-card__content {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 18px 20px 0;
}

/* ── Title ────────────────────────────────────────────────────────────── */

.onpy-product-card__title {
	margin: 0 0 10px;
	font-family: 'Open Sans', sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	color: #000;
	text-transform: uppercase;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.8em;
}

.onpy-product-card__title a {
	color: inherit;
	text-decoration: none;
}

.onpy-product-card__title a:hover {
	text-decoration: underline;
}

/* ── Description ──────────────────────────────────────────────────────── */

.onpy-product-card__description {
	font-family: 'Open Sans', sans-serif;
	font-size: 12px;
	color: #333;
	margin-bottom: 8px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ── Meta row: price + site logo ──────────────────────────────────────── */

.onpy-product-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: auto;
	margin-bottom: 16px;
}

/* Price */
.onpy-product-card__price {
	font-family: 'Open Sans', sans-serif;
	font-size: 14px;
	font-weight: 400;
	font-style: italic;
	color: #000;
	line-height: 1.3;
}

.onpy-product-card__price del {
	font-size: 0.85em;
	opacity: 0.45;
}

.onpy-product-card__price ins {
	text-decoration: none;
}

/* Site logo */
.onpy-product-card__site-logo {
	flex-shrink: 0;
}

.onpy-product-card__site-logo img {
	height: 28px;
	width: auto;
	display: block;
	object-fit: contain;
}

/* ── Add to cart button — WHITE background + shadow ───────────────────── */

.onpy-product-card__add-to-cart {
	margin-top: auto;
	text-align: center;
}

.onpy-product-card__add-to-cart a,
.onpy-product-card__add-to-cart a.button,
.onpy-product-card__add-to-cart a.add_to_cart_button,
.onpy-product-card__add-to-cart button,
.onpy-product-card__add-to-cart .button {
	display: inline-block !important;
	text-align: center !important;
	padding: 9px 24px !important;
	font-family: 'Open Sans', sans-serif !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	border: 1px solid #ccc !important;
	background: #fff !important;
	color: #000 !important;
	border-radius: 6px !important;
	cursor: pointer !important;
	box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.12) !important;
	transition: background 0.2s, box-shadow 0.2s, border-color 0.2s !important;
	text-decoration: none !important;
	box-sizing: border-box !important;
	width: auto !important;
	line-height: 1.4 !important;
}

.onpy-product-card__add-to-cart a:hover,
.onpy-product-card__add-to-cart a.button:hover,
.onpy-product-card__add-to-cart a.add_to_cart_button:hover,
.onpy-product-card__add-to-cart button:hover,
.onpy-product-card__add-to-cart .button:hover {
	background: #f7f7f7 !important;
	box-shadow: 0 3px 10px -2px rgba(0, 0, 0, 0.18) !important;
	border-color: #bbb !important;
	color: #000 !important;
}

/* ── Carousel ─────────────────────────────────────────────────────────── */

.onpy-product-carousel {
	position: relative;
	overflow: hidden;
}

.onpy-product-carousel .swiper-wrapper {
	display: flex;
}

.onpy-product-carousel .swiper-slide {
	height: auto;
	box-sizing: border-box;
}

/* Arrows */
.onpy-carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #fff;
	color: #333;
	border: 1px solid #ddd;
	font-size: 14px;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
	transition: background 0.2s, box-shadow 0.2s;
	padding: 0;
	line-height: 1;
}

.onpy-carousel-arrow:hover {
	background: #f5f5f5;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.onpy-carousel-arrow--prev {
	left: -4px;
}

.onpy-carousel-arrow--next {
	right: -4px;
}

/* Dots */
.onpy-carousel-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	padding: 16px 0 4px;
}

.onpy-carousel-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #ccc;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
	border: none;
	padding: 0;
}

.onpy-carousel-dot--active {
	background: #333;
	transform: scale(1.2);
}
