/**
 * GM Product Carousel - Frontend styles.
 * Author: GM Software
 */

.gm-pc-carousel {
	position: relative;
	width: 100%;
}

/*
 * The container border is painted on this overlay (not on the element itself)
 * so it stays ABOVE the cards. Cards lift on hover (translateY) and, being
 * children, would otherwise paint over the parent's border. The overlay sits
 * above the cards (z-index 4) but below the navigation arrows (z-index 5) and
 * never intercepts clicks. The actual border-width/style/color come from the
 * Elementor controls, which target ".gm-pc-carousel::after".
 */
.gm-pc-carousel::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 4;
	pointer-events: none;
	border-radius: inherit;
}

.gm-pc-viewport {
	overflow: hidden;
	width: 100%;
}

.gm-pc-track {
	display: flex;
	will-change: transform;
}

.gm-pc-slide {
	flex: 0 0 auto;
	box-sizing: border-box;
}

/* ---------- Card ---------- */
.gm-pc-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.gm-pc-card:hover {
	transform: translateY(-4px);
}

/* ---------- Image ---------- */
.gm-pc-image {
	position: relative;
	display: block;
	text-align: center;
}

.gm-pc-image img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
}

/* ---------- Label ---------- */
.gm-pc-label {
	position: absolute;
	z-index: 2;
	padding: 4px 10px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
	background: #e02b2b;
	border-radius: 4px;
}

/* Aligned labels (horizontal pill at the top of the image). */
.gm-pc-label-align-left {
	top: 10px;
	left: 10px;
	white-space: nowrap;
}

.gm-pc-label-align-right {
	top: 10px;
	right: 10px;
	white-space: nowrap;
}

.gm-pc-label-align-center {
	top: 10px;
	left: 50%;
	transform: translateX(-50%);
	white-space: nowrap;
}

/*
 * "Cruzada" labels: a diagonal ribbon across a top corner. The card has
 * overflow:hidden, so the ends of the banner are clipped to form the ribbon.
 * Ideal for promos like "Oferta Especial" or "Última unidad".
 */
.gm-pc-label-ribbon-left,
.gm-pc-label-ribbon-right {
	top: 18px;
	width: 170px;
	text-align: center;
	padding: 5px 0;
	border-radius: 0;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.gm-pc-label-ribbon-left {
	left: -45px;
	transform: rotate(-45deg);
}

.gm-pc-label-ribbon-right {
	right: -45px;
	transform: rotate(45deg);
}

/* ---------- Body ---------- */
.gm-pc-body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding-top: 10px;
	flex: 1;
}

.gm-pc-category {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #999;
}

.gm-pc-category a {
	color: inherit;
	text-decoration: none;
}

.gm-pc-title {
	margin: 0;
	font-size: 15px;
	line-height: 1.35;
	font-weight: 600;
}

.gm-pc-title a {
	color: #222;
	text-decoration: none;
}

.gm-pc-title a:hover {
	text-decoration: underline;
}

.gm-pc-rating {
	font-size: 14px;
}

/* ---------- Stock ---------- */
.gm-pc-stock {
	font-size: 13px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.gm-pc-stock::before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
}

.gm-pc-stock.in-stock {
	color: #1a7f37;
}

.gm-pc-stock.out-of-stock {
	color: #e02b2b;
}

/* ---------- Price ----------
 * Uses block children so text-align (the alignment controls) cascades to all
 * lines: prefix text, price and the formula text below it.
 */
.gm-pc-price-wrap {
	display: block;
	margin-top: auto;
	padding-top: 6px;
	text-align: left;
}

.gm-pc-price-text {
	display: block;
	font-size: 12px;
	color: #777;
}

.gm-pc-price {
	display: block;
	font-size: 18px;
	font-weight: 700;
	color: #1a7f37;
}

.gm-pc-price del {
	color: #999;
	font-weight: 400;
	font-size: 14px;
	margin-right: 6px;
}

/* ---------- Formula text (shown below the price) ---------- */
.gm-pc-formula {
	display: block;
	margin-top: 2px;
	font-size: 13px;
	line-height: 1.4;
	color: #555;
	text-align: left;
}

.gm-pc-formula .woocommerce-Price-amount,
.gm-pc-formula .amount {
	font-weight: 600;
}

/*
 * Inline layout: show the price prefix text, the price and the formula text
 * together on a single line. Default (stacked) keeps them on separate lines.
 * In this mode the horizontal position follows the price alignment control.
 */
.gm-pc-formula-layout-inline .gm-pc-price-text,
.gm-pc-formula-layout-inline .gm-pc-price,
.gm-pc-formula-layout-inline .gm-pc-formula {
	display: inline;
}

.gm-pc-formula-layout-inline .gm-pc-price-text {
	margin-right: 6px;
}

.gm-pc-formula-layout-inline .gm-pc-formula {
	margin-top: 0;
	margin-left: 6px;
}

/* ---------- Button ---------- */
.gm-pc-button {
	display: inline-block;
	margin-top: 10px;
	padding: 9px 14px;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	background: #2271b1;
	border: none;
	border-radius: 6px;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s ease;
}

.gm-pc-button:hover {
	background: #185a8d;
	color: #fff;
}

.gm-pc-button.disabled {
	opacity: 0.5;
	pointer-events: none;
}

/* ---------- Arrows ---------- */
.gm-pc-arrow {
	position: absolute;
	top: 40%;
	transform: translateY(-50%);
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 50%;
	background: #fff;
	color: #222;
	font-size: 18px;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: background 0.2s ease, opacity 0.2s ease;
}

.gm-pc-arrow:hover {
	background: #f2f2f2;
}

.gm-pc-arrow-prev {
	left: -8px;
}

.gm-pc-arrow-next {
	right: -8px;
}

.gm-pc-arrow.is-disabled {
	opacity: 0.35;
	cursor: default;
}

/* ---------- Dots ---------- */
.gm-pc-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
}

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

.gm-pc-dot.active {
	background: #2271b1;
	transform: scale(1.25);
}

/* ---------- Notices ---------- */
.gm-pc-notice {
	padding: 16px;
	border: 1px dashed #c3c4c7;
	border-radius: 6px;
	color: #50575e;
	background: #f6f7f7;
	text-align: center;
}
