/**
 * Paela Product Redesign - Estilos
 * Compatible con Blocksy (usa sus CSS variables donde existen)
 */

/* ─── Reset base ─────────────────────────────────────────────── */
.ppr-wrapper {
	max-width: var(--theme-page-width, 1200px);
	margin: 0 auto;
	padding: 20px var(--theme-sides-spacing, 20px) 60px;
}

/* ─── Layout principal: grilla 2 columnas ─────────────────────── */
.ppr-product {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: start;
}

@media (max-width: 900px) {
	.ppr-product {
		grid-template-columns: 1fr;
		gap: 28px;
	}
}

/* ─── GALERÍA ─────────────────────────────────────────────────── */
.ppr-gallery {
	position: sticky;
	top: 100px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ppr-gallery__main {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	background: #f6f6f6;
	aspect-ratio: 4/5;
}

.ppr-gallery__main-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.ppr-gallery__main:hover .ppr-gallery__main-img {
	transform: scale(1.03);
}

.ppr-gallery__zoom,
.ppr-gallery__wishlist {
	position: absolute;
	top: 14px;
	z-index: 10;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: none;
	background: rgba(255,255,255,0.92);
	backdrop-filter: blur(6px);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, transform 0.2s;
	box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.ppr-gallery__zoom { left: 14px; }
.ppr-gallery__wishlist { right: 14px; }

.ppr-gallery__zoom svg,
.ppr-gallery__wishlist svg {
	width: 18px;
	height: 18px;
	color: #333;
}

.ppr-gallery__zoom:hover,
.ppr-gallery__wishlist:hover {
	background: #fff;
	transform: scale(1.08);
}

/* Thumbnails */
.ppr-gallery__thumbnails {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scrollbar-width: none;
	padding-bottom: 4px;
}

.ppr-gallery__thumbnails::-webkit-scrollbar { display: none; }

.ppr-gallery__thumb {
	flex-shrink: 0;
	width: 72px;
	height: 90px;
	border-radius: 10px;
	border: 2px solid transparent;
	overflow: hidden;
	cursor: pointer;
	background: #f0f0f0;
	padding: 0;
	transition: border-color 0.2s;
}

.ppr-gallery__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ppr-gallery__thumb--active {
	border-color: #7c3aed;
}

.ppr-gallery__thumb:hover {
	border-color: #a78bfa;
}

.ppr-gallery__thumb-next {
	flex-shrink: 0;
	width: 72px;
	height: 90px;
	border-radius: 10px;
	border: 2px solid #e5e7eb;
	background: #fafafa;
	cursor: pointer;
	font-size: 22px;
	color: #555;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color 0.2s;
}

.ppr-gallery__thumb-next:hover {
	border-color: #7c3aed;
	color: #7c3aed;
}

/* ─── INFO ────────────────────────────────────────────────────── */
.ppr-info {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Badges */
.ppr-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ppr-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 20px;
	border: 1.5px solid #d8b4fe;
	color: #7c3aed;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	background: #faf5ff;
}

/* Título */
.ppr-title {
	font-size: clamp(24px, 3vw, 32px);
	font-weight: 700;
	line-height: 1.2;
	color: #111;
	margin: 0;
}

/* Precio */
.ppr-price-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.ppr-price-current {
	font-size: 28px;
	font-weight: 700;
	color: #111;
}

.ppr-price-current .woocommerce-Price-currencySymbol {
	font-size: 22px;
}

.ppr-discount-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 6px;
	background: #fef2f2;
	color: #dc2626;
	font-size: 13px;
	font-weight: 700;
}

.ppr-price-regular {
	font-size: 18px;
	color: #9ca3af;
	text-decoration: line-through;
}

/* Características */
.ppr-features {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	gap: 12px;
}

.ppr-feature {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 12px 8px;
	border: 1.5px solid #f3e8ff;
	border-radius: 12px;
	background: #faf5ff;
	text-align: center;
}

.ppr-feature__icon {
	width: 28px;
	height: 28px;
	color: #7c3aed;
}

.ppr-feature__icon svg {
	width: 28px;
	height: 28px;
}

.ppr-feature__label {
	font-size: 11px;
	font-weight: 600;
	color: #4b5563;
	line-height: 1.3;
}

/* ─── SECCIÓN DE COMPRA (variaciones / simple) ────────────────── */
.ppr-purchase .woocommerce-variation-add-to-cart,
.ppr-purchase form.cart {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Label de atributo (ej: TALLE) */
.ppr-purchase .variations th label,
.ppr-purchase .variations td label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #374151;
}

.ppr-purchase .variations {
	width: 100%;
	border-collapse: collapse;
}

.ppr-purchase .variations td,
.ppr-purchase .variations th {
	padding: 4px 0;
	border: none;
	background: none;
}

/* Swatches de talle: reemplazar <select> con un look custom */
.ppr-purchase select {
	-webkit-appearance: none;
	appearance: none;
	border: 1.5px solid #d1d5db;
	border-radius: 8px;
	padding: 10px 16px;
	font-size: 14px;
	background: #fff;
	color: #111;
	cursor: pointer;
	width: 100%;
	max-width: 220px;
	transition: border-color .2s;
}

.ppr-purchase select:focus {
	outline: none;
	border-color: #7c3aed;
	box-shadow: 0 0 0 3px rgba(124,58,237,0.10);
}

/* Input cantidad */
.ppr-purchase .quantity {
	display: flex;
	align-items: center;
	gap: 0;
}

.ppr-purchase input[type="number"].qty {
	width: 64px;
	text-align: center;
	border: 1.5px solid #d1d5db;
	border-radius: 8px;
	padding: 10px;
	font-size: 16px;
	-moz-appearance: textfield;
}

.ppr-purchase input[type="number"].qty::-webkit-inner-spin-button,
.ppr-purchase input[type="number"].qty::-webkit-outer-spin-button {
	-webkit-appearance: none;
}

/* ─── Botón agregar al carrito ────────────────────────────────── */
.ppr-purchase .single_add_to_cart_button,
.ppr-purchase button[type="submit"].button {
	width: 100% !important;
	padding: 16px 24px !important;
	background: #7c3aed !important;
	color: #fff !important;
	border: none !important;
	border-radius: 12px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	letter-spacing: 0.05em !important;
	text-transform: uppercase !important;
	cursor: pointer !important;
	transition: background 0.2s, transform 0.1s !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
}

.ppr-purchase .single_add_to_cart_button::before {
	content: '';
	display: inline-block;
	width: 18px;
	height: 18px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
	flex-shrink: 0;
}

.ppr-purchase .single_add_to_cart_button:hover {
	background: #6d28d9 !important;
}

.ppr-purchase .single_add_to_cart_button:active {
	transform: scale(0.98) !important;
}

/* ─── Descripción corta ───────────────────────────────────────── */
.ppr-short-desc {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px;
	border: 1.5px solid #f3e8ff;
	border-radius: 12px;
	background: #fdfbff;
}

.ppr-short-desc__item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 14px;
	color: #374151;
	line-height: 1.5;
}

.ppr-check {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	color: #7c3aed;
	margin-top: 2px;
}

/* ─── Trust badges ────────────────────────────────────────────── */
.ppr-trust {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 14px;
	border-top: 1.5px solid #f3f4f6;
	margin-top: 4px;
}

.ppr-trust__item {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	font-size: 12px;
	color: #6b7280;
	line-height: 1.4;
}

.ppr-trust__item svg {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
	color: #7c3aed;
}

.ppr-trust__item strong {
	display: block;
	color: #111;
	font-weight: 600;
}

@media (max-width: 480px) {
	.ppr-trust {
		flex-direction: column;
	}
}

/* ─── Ocultar elementos WooCommerce que no queremos ───────────── */
.ppr-product .woocommerce-product-gallery,
.ppr-product .woocommerce-breadcrumb {
	display: none !important;
}

/* ─── Estilo de "Agregar a favoritos" si tienen plugin de wishlist ─ */
.ppr-gallery__wishlist.active svg {
	fill: #ef4444;
	stroke: #ef4444;
}
