/**
 * TodoTinta – Catálogo Addons para Elementor
 * Estilos de front-end de los widgets.
 */

/* ---------------------------------------------------------------------------
 * Botones (compartidos)
 * ------------------------------------------------------------------------ */
.ttca-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 18px;
	border: 2px solid transparent;
	border-radius: 8px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}

.ttca-btn:hover {
	text-decoration: none;
}

.ttca-btn__text {
	display: inline-block;
}

.ttca-wa-icon {
	flex: 0 0 auto;
	font-size: 1.15em;
}

.ttca-btn--wa,
.ttca-btn--primary {
	background-color: #25D366;
	border-color: #25D366;
	color: #fff;
}

.ttca-btn--wa:hover,
.ttca-btn--primary:hover {
	background-color: #1da851;
	border-color: #1da851;
	color: #fff;
}

.ttca-btn--secondary {
	background-color: transparent;
	border-color: #128C7E;
	color: #128C7E;
}

.ttca-btn--secondary:hover {
	background-color: #128C7E;
	color: #fff;
}

.ttca-btn.is-disabled {
	opacity: .6;
	pointer-events: none;
}

/* ---------------------------------------------------------------------------
 * Grid de productos
 * ------------------------------------------------------------------------ */
.ttca-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.ttca-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 10px;
	overflow: hidden;
}

.ttca-card__media {
	position: relative;
	overflow: hidden;
}

.ttca-card__media img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform .35s ease;
}

.ttca-card:hover .ttca-card__media img {
	transform: scale(1.04);
}

.ttca-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
	flex: 1 1 auto;
}

.ttca-card__cat {
	font-size: .75em;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #888;
}

.ttca-card__title {
	margin: 0;
	font-size: 1.05em;
	line-height: 1.3;
}

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

.ttca-card__excerpt {
	font-size: .9em;
	color: #666;
}

.ttca-card__body .ttca-btn--wa {
	margin-top: auto;
}

/* ---------------------------------------------------------------------------
 * Etiqueta de stock (escasez honesta)
 * ------------------------------------------------------------------------ */
.ttca-stock {
	display: inline-block;
	font-size: .82em;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 999px;
	border: 1px solid currentColor;
	width: fit-content;
}

.ttca-stock--in {
	color: #1da851;
}

.ttca-stock--low {
	color: #c47f17;
}

.ttca-stock--out {
	color: #c0392b;
}

/* ---------------------------------------------------------------------------
 * Carrusel
 * ------------------------------------------------------------------------ */
.ttca-carousel {
	position: relative;
	--ttca-cols: 4;
	--ttca-gap: 20px;
}

.ttca-carousel__track {
	display: flex;
	gap: var(--ttca-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 8px;
	scrollbar-width: thin;
}

.ttca-carousel__slide {
	flex: 0 0 calc((100% - (var(--ttca-cols) - 1) * var(--ttca-gap)) / var(--ttca-cols));
	scroll-snap-align: start;
	min-width: 0;
}

.ttca-carousel__slide .ttca-card {
	height: 100%;
}

.ttca-carousel__nav {
	position: absolute;
	top: 40%;
	transform: translateY(-50%);
	z-index: 2;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 1px solid #d9d9d9;
	background: #fff;
	color: #333;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity .2s ease;
}

.ttca-carousel__nav--prev {
	left: -8px;
}

.ttca-carousel__nav--next {
	right: -8px;
}

.ttca-carousel__nav[disabled] {
	opacity: .35;
	cursor: default;
}

/* ---------------------------------------------------------------------------
 * Grid de categorías
 * ------------------------------------------------------------------------ */
.ttca-cat-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

.ttca-cat {
	position: relative;
	display: flex;
	min-height: 120px;
	border-radius: 10px;
	overflow: hidden;
	text-decoration: none;
	background: #f3f3f3;
	border: 1px solid #ececec;
}

.ttca-cat__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
}

.ttca-cat__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 4px;
	width: 100%;
	padding: 18px;
	text-align: center;
}

.ttca-cat--has-image .ttca-cat__inner {
	background-color: rgba(0, 0, 0, .35);
	color: #fff;
}

.ttca-cat--has-image .ttca-cat__name,
.ttca-cat--has-image .ttca-cat__count {
	color: #fff;
}

.ttca-cat__name {
	font-weight: 700;
	font-size: 1.05em;
}

.ttca-cat__count {
	font-size: .82em;
	opacity: .85;
}

/* ---------------------------------------------------------------------------
 * CTA WhatsApp (producto)
 * ------------------------------------------------------------------------ */
.ttca-cta {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ttca-cta__heading {
	margin: 0;
	font-weight: 600;
}

.ttca-cta .ttca-btn {
	width: 100%;
}

.ttca-cta[style*="align-items: center"] .ttca-btn,
.ttca-cta[style*="align-items: flex-start"] .ttca-btn,
.ttca-cta[style*="align-items: flex-end"] .ttca-btn {
	width: auto;
}

/* ---------------------------------------------------------------------------
 * Disponibilidad
 * ------------------------------------------------------------------------ */
.ttca-availability {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.ttca-availability__label {
	font-weight: 600;
}

.ttca-availability__cta {
	flex-basis: 100%;
}

/* ---------------------------------------------------------------------------
 * Sellos de confianza
 * ------------------------------------------------------------------------ */
.ttca-badges {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
}

.ttca-badge {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 12px;
}

.ttca-badge__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 34px;
	color: #25D366;
	line-height: 1;
}

.ttca-badge__icon svg {
	width: 34px;
	height: 34px;
	fill: currentColor;
}

.ttca-badge__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ttca-badge__title {
	font-weight: 700;
}

.ttca-badge__sub {
	font-size: .88em;
	color: #777;
}

/* ---------------------------------------------------------------------------
 * FAQ (acordeón <details>)
 * ------------------------------------------------------------------------ */
.ttca-faq__item {
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	margin-bottom: 10px;
	padding: 0 16px;
}

.ttca-faq__q {
	position: relative;
	cursor: pointer;
	list-style: none;
	padding: 14px 30px 14px 0;
	font-weight: 600;
}

.ttca-faq__q::-webkit-details-marker {
	display: none;
}

.ttca-faq__q::after {
	content: "+";
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.4em;
	line-height: 1;
	color: #25D366;
}

.ttca-faq__item[open] .ttca-faq__q::after {
	content: "\2013"; /* – */
}

.ttca-faq__a {
	padding: 0 0 16px;
}

.ttca-faq__a > :last-child {
	margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
 * Reseñas verificadas
 * ------------------------------------------------------------------------ */
.ttca-reviews {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 18px;
}

.ttca-review {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 20px;
	background: #f8f8f8;
	border-radius: 10px;
}

.ttca-review__stars {
	color: #f5a623;
	letter-spacing: 2px;
	font-size: 1.05em;
}

.ttca-review__text {
	margin: 0;
	border: 0;
	padding: 0;
	font-style: italic;
	color: #333;
}

.ttca-review__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: .88em;
}

.ttca-review__author {
	font-weight: 700;
}

.ttca-review__source {
	color: #888;
}

.ttca-review__verified {
	margin-left: auto;
	color: #1da851;
	font-weight: 600;
}

.ttca-reviews__disclosure {
	margin: 16px 0 0;
	font-size: .82em;
	color: #777;
	line-height: 1.5;
}

/* ---------------------------------------------------------------------------
 * Tienda física
 * ------------------------------------------------------------------------ */
.ttca-store {
	border: 1px solid #ececec;
	border-radius: 12px;
	overflow: hidden;
}

.ttca-store__name {
	margin: 0;
	padding: 18px 20px 0;
}

.ttca-store__body {
	padding: 14px 20px 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ttca-store__row {
	display: flex;
	gap: 8px;
	margin: 0;
}

.ttca-store__icon {
	flex: 0 0 auto;
}

.ttca-store__phone a {
	color: inherit;
	text-decoration: none;
}

.ttca-store__hours {
	width: 100%;
	border-collapse: collapse;
	font-size: .92em;
}

.ttca-store__hours th,
.ttca-store__hours td {
	text-align: left;
	padding: 4px 0;
	border-bottom: 1px dashed #e5e5e5;
}

.ttca-store__hours td {
	text-align: right;
}

.ttca-store__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 4px;
}

.ttca-store__map iframe {
	display: block;
	width: 100%;
	height: 260px;
	border: 0;
}

/* ---------------------------------------------------------------------------
 * Botón flotante de WhatsApp
 * ------------------------------------------------------------------------ */
.ttca-float-wa {
	position: fixed;
	bottom: 20px;
	z-index: 9990;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	background: #25D366;
	color: #fff;
	border-radius: 999px;
	font-weight: 600;
	text-decoration: none;
	box-shadow: 0 6px 20px rgba(37, 211, 102, .45);
	transition: transform .2s ease, background-color .2s ease;
}

.ttca-float-wa:hover {
	background: #1da851;
	color: #fff;
	transform: translateY(-2px);
}

.ttca-float-wa--right {
	right: 20px;
}

.ttca-float-wa--left {
	left: 20px;
}

.ttca-float-wa .ttca-wa-icon {
	font-size: 1.4em;
}

@media (max-width: 600px) {
	.ttca-float-wa__label {
		display: none;
	}

	.ttca-float-wa {
		padding: 14px;
	}
}

/* ---------------------------------------------------------------------------
 * Aviso de editor
 * ------------------------------------------------------------------------ */
.ttca-notice {
	padding: 14px 16px;
	background: #fff7e6;
	border: 1px dashed #f0c36d;
	border-radius: 8px;
	color: #8a6d3b;
	font-size: .9em;
}

/* ---------------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------------ */
@media (max-width: 1024px) {
	.ttca-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.ttca-cat-grid,
	.ttca-badges {
		grid-template-columns: repeat(2, 1fr);
	}

	.ttca-reviews {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	.ttca-grid,
	.ttca-cat-grid,
	.ttca-badges {
		grid-template-columns: 1fr;
	}
}
