
/* ==========================================================================
   Krontix Woo — Frontend Styles
   Shortcode: [krontix_woo_parent_categories]
   ========================================================================== */

/* ── Wrapper con scroll horizontal en móvil ── */
.krontix-woo-categories-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: #ddd transparent;
	text-align: center; /* centra el inline-flex cuando cabe en pantalla */
	padding-bottom: 4px;
}

.krontix-woo-categories-wrap::-webkit-scrollbar {
	height: 4px;
}
.krontix-woo-categories-wrap::-webkit-scrollbar-track {
	background: transparent;
}
.krontix-woo-categories-wrap::-webkit-scrollbar-thumb {
	background: #ddd;
	border-radius: 2px;
}

/* ── Fila de categorías ── */
.krontix-woo-categories {
	display: inline-flex;   /* se encoge a su contenido → text-align lo centra */
	flex-wrap: nowrap;
	align-items: flex-start;
	gap: 55px;
	padding: 16px 8px;
}

/* ── Ítem individual ── */
.krontix-woo-category-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: var(--kwoo-size, 154px);
	max-width: var(--kwoo-size, 154px);
}

/* ── Enlace ── */
.krontix-woo-category-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	text-decoration: none !important;
	color: inherit !important;
	transition: transform 0.22s ease;
}

.krontix-woo-category-link:hover {
	transform: translateY(-5px);
	text-decoration: none !important;
}

/* ── Círculo imagen ── */
.krontix-woo-category-circle {
	width: var(--kwoo-size, 154px);
	height: var(--kwoo-size, 154px);
	border-radius: 50%;
	background-color: #ffffff;
	border: 1px solid #ebebeb;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	flex-shrink: 0;
	transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.krontix-woo-category-link:hover .krontix-woo-category-circle {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
	border-color: #d5d5d5;
}

/* ── Imagen de categoría ── */
.krontix-woo-category-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
	transition: transform 0.22s ease;
}

.krontix-woo-category-link:hover .krontix-woo-category-img {
	transform: scale(1.06);
}

/* ── Placeholder (sin imagen) ── */
.krontix-woo-category-placeholder {
	width: 46%;
	height: 46%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #c5c5c5;
}

.krontix-woo-category-placeholder svg {
	width: 100%;
	height: 100%;
}

/* ── Nombre de categoría ── */
.krontix-woo-category-name {
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	color: #333333;
	line-height: 1.3;
	word-break: break-word;
	hyphens: auto;
	max-width: var(--kwoo-size, 154px);
}

/* ── Mensaje cuando no hay categorías ── */
.krontix-no-categories {
	color: #888;
	font-style: italic;
	padding: 12px 0;
}

/* ── Responsive: tablets ── */
@media (max-width: 768px) {
	.krontix-woo-categories {
		gap: 32px;
	}
}

/* ── Responsive: móvil ── */
@media (max-width: 480px) {
	.krontix-woo-categories {
		gap: 22px;
	}

	.krontix-woo-category-name {
		font-size: 12px;
	}
}

/* ==========================================================================
   Krontix Woo — Banner de descuentos  ·  v3
   Shortcode: [krontix_woo_banner_descuentos]
   ========================================================================== */

/* ── Wrapper general ── */
.kwoo-banner-outer {
	-webkit-user-select: none;
	user-select: none;
	border-radius: 5px;
	overflow: hidden;
	width: 100%;
	max-width: 680px;
	background: #fff;
	box-shadow: 0 2px 16px rgba(0, 0, 0, 0.09);
}

/* ── Escenario de altura fija ── */
.kwoo-banner-stage {
	position: relative;
	height: 200px;
	overflow: hidden;
	background: #fff;
}

/* ── Dos slots superpuestos — crossfade sin parpadeo ── */
.kwoo-banner-slide {
	position: absolute;
	inset: 0;
	display: flex;
	opacity: 0;
	transition: opacity 0.45s ease;
	will-change: opacity;
	font-family: 'Poppins', sans-serif;
	pointer-events: none;
}

.kwoo-banner-slide--visible {
	opacity: 1;
	pointer-events: auto;
}

/* ── Panel izquierdo — categoría, nombre, botón ── */
.kwoo-banner-left {
	flex: 1;
	background: #fff;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0 0 0 36px;
	position: relative;
	z-index: 2;
}

/* ── Panel central — precio ── */
.kwoo-banner-center {
	flex: 0 0 20%;
	background: #fff;
	display: flex;
	align-items: flex-end;
	justify-content: flex-start;
	padding-bottom: 38px;
	z-index: 2;
}

/* ── Panel derecho — cuadrado 1:1 (alto = alto del stage) ── */
.kwoo-banner-right {
	flex: 0 0 auto;
	aspect-ratio: 1 / 1;
	align-self: stretch;
	position: relative;
}

/* ── Onda SVG ── */
.kwoo-banner-wave {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

/* ── Etiqueta de categoría ── */
.kwoo-banner-cat {
	font-size: 13px;
	color: #1a1a1a;
	font-weight: 400;
	margin-bottom: 6px;
	line-height: 1;
}

/* ── Nombre del producto ── */
.kwoo-banner-name {
	font-size: 20px;
	font-weight: 900;
	color: #000;
	line-height: 1.15;
	letter-spacing: -0.3px;
	margin: 0 0 14px 0;
}

/* ── Botón ── */
.kwoo-banner-btn {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	background: #003366;
	color: #fff !important;
	font-size: 12px;
	font-weight: 500;
	padding: 8px 18px;
	border-radius: 7px;
	text-decoration: none !important;
	transition: background 0.2s;
	white-space: nowrap;
}

.kwoo-banner-btn:hover {
	background: #00509e;
	text-decoration: none !important;
}

.kwoo-banner-btn--added {
	background: #1a7a3a !important;
	cursor: default;
}

/* ── Precio ── */
.kwoo-banner-price {
	color: #003366;
	font-weight: 900;
	font-size: 25px;
	white-space: nowrap;
	line-height: 1;
}

.kwoo-banner-price .woocommerce-Price-amount,
.kwoo-banner-price bdi {
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
}

.kwoo-banner-price .woocommerce-Price-currencySymbol,
.kwoo-banner-price .kwoo-price-dec {
	font-size: 0.48em;
	font-weight: 700;
	position: relative;
	top: -0.65em;
}

.kwoo-banner-price .woocommerce-Price-currencySymbol {
	margin-right: 1px;
}

/* ── Badge de descuento ── */
.kwoo-banner-badge {
	position: absolute;
	top: 22px;
	left: -26px;
	background-color: #00a2e2;
	color: #fff;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	border: 2px solid #fff;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
	z-index: 3;
	flex-shrink: 0;
}

.kwoo-banner-badge__label {
	font-size: 10px;
	font-weight: 700;
	line-height: 1.1;
}

.kwoo-banner-badge__pct {
	font-size: 17px;
	font-weight: 900;
	line-height: 1;
}

/* ── Imagen — llena el cuadrado 1:1 ── */
.kwoo-banner-img-wrap {
	position: absolute;
	inset: 0;
	z-index: 2;
}

.kwoo-banner-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center center;
}

/* ── Dots de navegación — flotando sobre el banner ── */
.kwoo-banner-dots {
	position: absolute;
	bottom: 8px;
	left: 0;
	right: 0;
	z-index: 10;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	pointer-events: none;
}

.kwoo-banner-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.2);
	border: none;
	cursor: pointer;
	padding: 0;
	pointer-events: auto;
	transition: background 0.3s, transform 0.2s;
}

.kwoo-banner-dot:hover {
	background: rgba(0, 0, 0, 0.35);
}

.kwoo-banner-dot--active {
	background: #00a2e2;
	transform: scale(1.25);
}

/* ── Responsive: tablet (banner ocupa todo el ancho < 680px) ── */
@media (max-width: 600px) {
	.kwoo-banner-stage  { height: 170px; }
	.kwoo-banner-left   { flex: 0 0 48%; padding-left: 20px; }
	.kwoo-banner-center { flex: 0 0 22%; padding-bottom: 28px; }
	.kwoo-banner-badge  { width: 48px; height: 48px; top: 16px; left: -22px; }
	.kwoo-banner-badge__label { font-size: 9px; }
	.kwoo-banner-badge__pct   { font-size: 14px; }
}

/* ── Responsive: móvil ── */
@media (max-width: 480px) {
	.kwoo-banner-stage  { height: auto; }
	.kwoo-banner-slide  { position: relative; flex-direction: column; }
	.kwoo-banner-left   { flex: 0 0 auto; padding: 20px 16px 10px; }
	.kwoo-banner-center {
		flex: 0 0 auto;
		padding: 0 16px 16px;
		justify-content: flex-start;
		align-items: flex-start;
	}
	.kwoo-banner-right  { height: 180px; justify-content: center; }
	.kwoo-banner-wave   { width: 100%; }
	.kwoo-banner-badge  { top: 10px; left: 10px; }
}
