/* Frontend — Productos Variables */

:root {
	--pv-primary: #2563eb;
	--pv-primary-dark: #1d4ed8;
	--pv-success: #16a34a;
	--pv-danger: #dc2626;
	--pv-whatsapp: #25d366;
	--pv-whatsapp-dark: #128c7e;
	--pv-text: #1e293b;
	--pv-text-muted: #64748b;
	--pv-border: #e2e8f0;
	--pv-bg: #f8fafc;
	--pv-radius: 12px;
	--pv-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* Shop grid */
.pv-shop {
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 16px;
}

.pv-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 32px;
	padding: 16px 20px;
	background: var(--pv-bg);
	border-radius: var(--pv-radius);
	border: 1px solid var(--pv-border);
}

.pv-filter-group label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--pv-text-muted);
	margin-bottom: 6px;
}

.pv-filter-select {
	padding: 8px 12px;
	border: 1px solid var(--pv-border);
	border-radius: 8px;
	font-size: 14px;
	min-width: 160px;
	background: #fff;
}

.pv-shop-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
}

.pv-no-products {
	grid-column: 1 / -1;
	text-align: center;
	padding: 48px;
	color: var(--pv-text-muted);
}

/* Product card */
.pv-product-card {
	background: #fff;
	border-radius: var(--pv-radius);
	overflow: hidden;
	box-shadow: var(--pv-shadow);
	transition: transform 0.2s, box-shadow 0.2s;
}

.pv-product-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.pv-card-link {
	text-decoration: none;
	color: inherit;
	display: block;
}

.pv-card-image {
	position: relative;
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--pv-bg);
}

.pv-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.pv-product-card:hover .pv-card-image img {
	transform: scale(1.05);
}

.pv-card-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #cbd5e1;
	font-size: 48px;
}

.pv-badge-sale {
	position: absolute;
	top: 12px;
	left: 12px;
	background: var(--pv-danger);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 20px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.pv-card-body {
	padding: 16px 20px 20px;
}

.pv-card-brand {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--pv-text-muted);
}

.pv-card-title {
	font-size: 16px;
	font-weight: 600;
	margin: 4px 0 8px;
	color: var(--pv-text);
	line-height: 1.3;
}

.pv-card-price del {
	color: var(--pv-text-muted);
	font-size: 13px;
	margin-right: 6px;
}

.pv-card-price strong {
	font-size: 18px;
	color: var(--pv-primary);
}

/* Single product */
.pv-main {
	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 16px;
}

.pv-product-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: start;
}

.pv-gallery-main {
	aspect-ratio: 1;
	border-radius: var(--pv-radius);
	overflow: hidden;
	background: var(--pv-bg);
	border: 1px solid var(--pv-border);
}

.pv-gallery-main img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pv-gallery-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #cbd5e1;
	font-size: 64px;
}

.pv-gallery-thumbs {
	display: flex;
	gap: 8px;
	margin-top: 12px;
	flex-wrap: wrap;
}

.pv-thumb {
	width: 72px;
	height: 72px;
	border: 2px solid transparent;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	padding: 0;
	background: none;
	transition: border-color 0.2s;
}

.pv-thumb.is-active,
.pv-thumb:hover {
	border-color: var(--pv-primary);
}

.pv-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pv-product-brand {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--pv-text-muted);
}

.pv-product-title {
	font-size: 28px;
	font-weight: 700;
	margin: 8px 0 12px;
	color: var(--pv-text);
	line-height: 1.2;
}

.pv-product-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 16px;
}

.pv-category-tag {
	font-size: 12px;
	padding: 4px 10px;
	background: var(--pv-bg);
	border-radius: 20px;
	color: var(--pv-text-muted);
	border: 1px solid var(--pv-border);
}

.pv-product-price {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.pv-price-regular {
	color: var(--pv-text-muted);
	font-size: 18px;
}

.pv-price-sale,
.pv-price-current {
	font-size: 28px;
	font-weight: 700;
	color: var(--pv-primary);
}

.pv-stock-status {
	font-size: 14px;
	margin-bottom: 24px;
}

.pv-stock-status.in-stock {
	color: var(--pv-success);
}

.pv-stock-status.out-of-stock {
	color: var(--pv-danger);
	font-weight: 600;
}

/* Options */
.pv-option-group {
	margin-bottom: 20px;
}

.pv-option-group label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 8px;
	color: var(--pv-text);
}

.pv-option-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pv-option-btn {
	padding: 8px 16px;
	border: 2px solid var(--pv-border);
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: all 0.15s;
	color: var(--pv-text);
}

.pv-option-btn:hover {
	border-color: var(--pv-primary);
}

.pv-option-btn.is-selected {
	border-color: var(--pv-primary);
	background: #eff6ff;
	color: var(--pv-primary);
}

.pv-color-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.pv-color-dot {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Actions */
.pv-product-actions {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-top: 28px;
	flex-wrap: wrap;
}

.pv-qty-wrap {
	display: flex;
	align-items: center;
	border: 1px solid var(--pv-border);
	border-radius: 8px;
	overflow: hidden;
}

.pv-qty-btn {
	width: 40px;
	height: 44px;
	border: none;
	background: var(--pv-bg);
	cursor: pointer;
	font-size: 18px;
	color: var(--pv-text);
	transition: background 0.15s;
}

.pv-qty-btn:hover {
	background: var(--pv-border);
}

.pv-qty-wrap input {
	width: 48px;
	height: 44px;
	border: none;
	text-align: center;
	font-size: 16px;
	font-weight: 600;
	-moz-appearance: textfield;
}

.pv-qty-wrap input::-webkit-outer-spin-button,
.pv-qty-wrap input::-webkit-inner-spin-button {
	-webkit-appearance: none;
}

.pv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 28px;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s, transform 0.1s;
	flex: 1;
	min-width: 200px;
}

.pv-btn:active {
	transform: scale(0.98);
}

.pv-btn-cart {
	background: var(--pv-primary);
	color: #fff;
}

.pv-btn-cart:hover:not(:disabled) {
	background: var(--pv-primary-dark);
	color: #fff;
}

.pv-btn-cart:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.pv-btn-whatsapp {
	background: var(--pv-whatsapp);
	color: #fff;
}

.pv-btn-whatsapp:hover {
	background: var(--pv-whatsapp-dark);
	color: #fff;
}

.pv-btn-whatsapp.is-disabled {
	opacity: 0.5;
	pointer-events: none;
}

/* Toast */
.pv-toast {
	position: fixed;
	bottom: 24px;
	right: 24px;
	background: var(--pv-success);
	color: #fff;
	padding: 14px 24px;
	border-radius: 8px;
	font-weight: 600;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	z-index: 9999;
	animation: pv-slide-in 0.3s ease;
}

@keyframes pv-slide-in {
	from { transform: translateY(20px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

/* Cart */
.pv-cart-page h2 {
	font-size: 24px;
	margin-bottom: 24px;
}

.pv-cart-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border-radius: var(--pv-radius);
	overflow: hidden;
	box-shadow: var(--pv-shadow);
}

.pv-cart-table th,
.pv-cart-table td {
	padding: 14px 16px;
	text-align: left;
	border-bottom: 1px solid var(--pv-border);
}

.pv-cart-table th {
	background: var(--pv-bg);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--pv-text-muted);
}

.pv-cart-qty {
	width: 64px;
	padding: 6px 8px;
	border: 1px solid var(--pv-border);
	border-radius: 6px;
	text-align: center;
}

.pv-cart-remove {
	background: none;
	border: none;
	font-size: 20px;
	color: var(--pv-danger);
	cursor: pointer;
	padding: 4px 8px;
}

.pv-cart-empty {
	text-align: center;
	padding: 48px;
	color: var(--pv-text-muted);
	font-size: 16px;
}

.pv-product-description {
	margin-bottom: 32px;
	color: var(--pv-text-muted);
	line-height: 1.7;
}

.pv-archive-header {
	text-align: center;
	margin-bottom: 32px;
}

.pv-archive-header h1 {
	font-size: 32px;
	font-weight: 700;
}

@media (max-width: 768px) {
	.pv-product-layout {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.pv-product-title {
		font-size: 22px;
	}

	.pv-product-actions {
		flex-direction: column;
	}

	.pv-btn {
		width: 100%;
	}

	.pv-cart-table {
		font-size: 14px;
	}

	.pv-cart-table th:nth-child(2),
	.pv-cart-table td:nth-child(2) {
		display: none;
	}
}
