/**
 * Estilos de los popups promocionales y modal de producto
 *
 * @package Tenndi_Menu
 */

/* ============================================
   POPUP CARRUSEL
   ============================================ */

.tenndi-popup-carousel {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9998;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tenndi-popup-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.85);
	backdrop-filter: blur(5px);
}

.tenndi-popup-content {
	position: relative;
	z-index: 9999;
	max-width: 90%;
	max-height: 90vh;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.tenndi-popup-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	border-radius: 50%;
	color: #000;
	font-size: 20px;
	font-weight: 600;
	cursor: pointer;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	line-height: 1;
	backdrop-filter: blur(10px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tenndi-popup-close:hover {
	background: rgba(255, 59, 48, 0.95);
	color: #fff;
	transform: scale(1.1) rotate(90deg);
	box-shadow: 0 4px 12px rgba(255, 59, 48, 0.4);
}

.tenndi-popup-slides {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.tenndi-popup-slide {
	display: none;
	width: 100%;
	height: 100%;
	cursor: pointer;
	transition: opacity 0.5s ease;
}

.tenndi-popup-slide.active {
	display: block;
}

.tenndi-popup-slide img {
	width: 100%;
	height: auto;
	max-height: 80vh;
	object-fit: contain;
	display: block;
}

/* Flechas de navegación */
.tenndi-popup-prev,
.tenndi-popup-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	border-radius: 50%;
	color: #000;
	font-size: 20px;
	font-weight: 700;
	cursor: pointer;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	line-height: 1;
	backdrop-filter: blur(10px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tenndi-popup-prev {
	left: 15px;
}

.tenndi-popup-next {
	right: 15px;
}

.tenndi-popup-prev:hover,
.tenndi-popup-next:hover {
	background: rgba(255, 255, 255, 1);
	transform: translateY(-50%) scale(1.15);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.tenndi-popup-prev:active,
.tenndi-popup-next:active {
	transform: translateY(-50%) scale(0.95);
}

/* Dots de navegación */
.tenndi-popup-dots {
	position: absolute;
	bottom: 15px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 10px;
	z-index: 10000;
}

.tenndi-popup-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.5);
	border: 2px solid rgba(255, 255, 255, 0.8);
	cursor: pointer;
	transition: all 0.3s ease;
}

.tenndi-popup-dot.active {
	background: #fff;
	border-color: #fff;
	transform: scale(1.2);
}

/* Animaciones */
.tenndi-popup-carousel.fade-in {
	animation: tenndiFadeIn 0.3s ease;
}

.tenndi-popup-carousel.fade-out {
	animation: tenndiFadeOut 0.3s ease;
}

@keyframes tenndiFadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes tenndiFadeOut {
	from {
		opacity: 1;
	}
	to {
		opacity: 0;
	}
}

/* ============================================
   MODAL DE PRODUCTO
   ============================================ */

.tenndi-product-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
}

.tenndi-product-modal.active {
	display: flex;
	animation: tenndiFadeIn 0.3s ease;
}

.tenndi-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(5px);
}

.tenndi-modal-content {
	position: relative;
	z-index: 10000;
	max-width: 600px;
	width: 90%;
	max-height: 90vh;
	background: #fff;
	border-radius: 12px;
	overflow-y: auto;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
	padding: 30px;
	animation: tenndiModalSlideIn 0.3s ease;
}

@keyframes tenndiModalSlideIn {
	from {
		transform: translateY(-50px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.tenndi-modal-close {
	position: absolute;
	top: 15px;
	right: 15px;
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	border-radius: 50%;
	color: #000;
	font-size: 20px;
	font-weight: 600;
	cursor: pointer;
	z-index: 10001;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	line-height: 1;
	backdrop-filter: blur(10px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tenndi-modal-close:hover {
	background: rgba(255, 59, 48, 0.95);
	color: #fff;
	transform: scale(1.1) rotate(90deg);
	box-shadow: 0 4px 12px rgba(255, 59, 48, 0.4);
}

.tenndi-modal-image {
	width: 100%;
	height: auto;
	max-height: 400px;
	object-fit: contain;
	border-radius: 8px;
	margin-bottom: 20px;
	display: block;
}

/* Galería de imágenes en modal */
.tenndi-modal-gallery {
	position: relative;
	width: 100%;
	margin-bottom: 20px;
}

.tenndi-modal-slider {
	position: relative;
	width: 100%;
	height: auto;
	overflow: hidden;
}

.tenndi-modal-slider .tenndi-modal-image {
	display: none;
}

.tenndi-modal-slider .tenndi-modal-image.active {
	display: block;
}

/* Flechas de navegación del slider */
.tenndi-modal-prev-img,
.tenndi-modal-next-img {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	background: rgba(255, 255, 255, 0.95);
	border: none;
	border-radius: 50%;
	color: #000;
	font-size: 18px;
	font-weight: 700;
	cursor: pointer;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	line-height: 1;
	backdrop-filter: blur(10px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tenndi-modal-prev-img {
	left: 10px;
}

.tenndi-modal-next-img {
	right: 10px;
}

.tenndi-modal-prev-img:hover,
.tenndi-modal-next-img:hover {
	background: rgba(255, 255, 255, 1);
	transform: translateY(-50%) scale(1.15);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.tenndi-modal-prev-img:active,
.tenndi-modal-next-img:active {
	transform: translateY(-50%) scale(0.95);
}

/* Dots indicadores */
.tenndi-modal-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 15px;
}

.tenndi-modal-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.3);
	cursor: pointer;
	transition: all 0.3s ease;
}

.tenndi-modal-dot.active {
	background: var(--tenndi-primary, #E6BD59);
	transform: scale(1.2);
}

.tenndi-modal-dot:hover {
	background: rgba(0, 0, 0, 0.5);
}

/* Responsive para móvil */
@media (max-width: 768px) {
	.tenndi-modal-prev-img,
	.tenndi-modal-next-img {
		width: 35px;
		height: 35px;
		font-size: 18px;
	}
	
	.tenndi-modal-prev-img {
		left: 5px;
	}
	
	.tenndi-modal-next-img {
		right: 5px;
	}
	
	.tenndi-modal-dots {
		gap: 6px;
		margin-top: 10px;
	}
	
	.tenndi-modal-dot {
		width: 8px;
		height: 8px;
	}
}

.tenndi-modal-title {
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 15px 0;
	color: #1d1d1d;
	line-height: 1.3;
}

.tenndi-modal-description {
	font-size: 16px;
	line-height: 1.6;
	color: #555;
	margin-bottom: 20px;
}

.tenndi-modal-description p {
	margin-bottom: 15px;
}

.tenndi-modal-price {
	font-size: 28px;
	font-weight: 700;
	color: var(--tenndi-primary, #E6BD59);
	margin-top: 20px;
	padding-top: 20px;
	border-top: 2px solid #eee;
}

.tenndi-modal-price .woocommerce-Price-amount {
	color: var(--tenndi-primary, #E6BD59);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
	.tenndi-popup-content {
		max-width: 95%;
		max-height: 95vh;
		border-radius: 8px;
	}

	.tenndi-popup-close {
		width: 35px;
		height: 35px;
		font-size: 20px;
		top: 8px;
		right: 8px;
	}

	.tenndi-popup-prev,
	.tenndi-popup-next {
		width: 40px;
		height: 40px;
		font-size: 20px;
	}

	.tenndi-popup-prev {
		left: 10px;
	}

	.tenndi-popup-next {
		right: 10px;
	}

	.tenndi-popup-dots {
		bottom: 10px;
	}

	.tenndi-modal-content {
		width: 95%;
		max-height: 95vh;
		padding: 20px;
		border-radius: 8px;
	}

	.tenndi-modal-close {
		width: 35px;
		height: 35px;
		font-size: 20px;
		top: 10px;
		right: 10px;
	}

	.tenndi-modal-share {
		top: 10px;
		right: 50px;
		width: 32px;
		height: 32px;
		padding: 6px;
	}

	.tenndi-modal-share svg {
		width: 18px;
		height: 18px;
	}

	.tenndi-modal-image {
		max-height: 250px;
	}

	.tenndi-modal-title {
		font-size: 20px;
	}

	.tenndi-modal-description {
		font-size: 14px;
	}

	.tenndi-modal-price {
		font-size: 24px;
	}
}

/* Touch swipe support */
.tenndi-popup-slides {
	touch-action: pan-y;
}

.tenndi-popup-slide {
	touch-action: pan-y;
}

/* ============================================
   BOTÓN DE COMPARTIR EN MODAL
   ============================================ */

.tenndi-modal-share {
	position: absolute;
	top: 15px;
	right: 60px; /* A la izquierda de la X */
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	border-radius: 50%;
	color: #000;
	cursor: pointer;
	z-index: 10001;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	backdrop-filter: blur(10px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	padding: 8px;
}

.tenndi-modal-share svg {
	width: 20px;
	height: 20px;
}

.tenndi-modal-share:hover {
	background: rgba(0, 122, 255, 0.95);
	color: #fff;
	transform: scale(1.1);
	box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

.tenndi-modal-share:active {
	transform: scale(0.95);
}

/* Notificación de compartir */
.tenndi-share-notification {
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%) translateY(100px);
	background: rgba(0, 0, 0, 0.9);
	color: #fff;
	padding: 12px 24px;
	border-radius: 25px;
	font-size: 14px;
	font-weight: 600;
	z-index: 99999;
	backdrop-filter: blur(10px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	opacity: 0;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tenndi-share-notification.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

