/* =========================================================
   Tienda WhatsApp Catálogo — Estilos públicos
   Los tokens de color/tipografía por preset se inyectan vía
   <style id="alw-theme-vars"> (ver class-settings.php).
   Aquí solo definimos la estructura y cómo cada token se usa.
   ========================================================= */

[data-alw-theme] {
	--alw-bg: #ffffff;
	--alw-surface: #ffffff;
	--alw-text: #222222;
	--alw-text-2: #777777;
	--alw-accent: #333333;
	--alw-accent-2: #666666;
	--alw-radius: 6px;
	--alw-font-display: sans-serif;
	--alw-font-body: sans-serif;
	--alw-image-ratio: 1/1;

	background: var(--alw-bg);
	color: var(--alw-text);
	font-family: var(--alw-font-body);
}

[data-alw-theme] h1,
[data-alw-theme] h2,
[data-alw-theme] h3,
[data-alw-theme] .alw-product-title,
[data-alw-theme] .alw-single-title {
	font-family: var(--alw-font-display);
}

/* ---------- Densidad por preset ---------- */
[data-alw-theme="nova"] .alw-products-grid { gap: 10px; }
[data-alw-theme="linnea"] .alw-products-grid { gap: 40px; }
[data-alw-theme="circuit"] .alw-products-grid { gap: 18px; }
[data-alw-theme="pomelo"] .alw-products-grid { gap: 24px; }

/* ---------- Grid / catálogo ---------- */
/* border-box evita que inputs y botones al 100% se salgan de su contenedor */
.alw-catalog,
.alw-catalog *,
.alw-catalog *::before,
.alw-catalog *::after,
.alw-wishlist-wrap .alw-product-card,
.alw-wishlist-wrap .alw-product-card *,
.alw-wishlist-wrap .alw-product-card *::before,
.alw-wishlist-wrap .alw-product-card *::after { box-sizing: border-box; }

.alw-catalog { max-width: 1200px; margin: 0 auto; padding: 28px 20px 60px; }
.alw-catalog-title { font-size: 26px; margin: 0 0 20px; }
.alw-catalog-body { display: flex; gap: 32px; align-items: flex-start; }
.alw-products-wrap { flex: 1; min-width: 0; }

/* ---------- Barra superior: búsqueda + cambio de vista ---------- */
.alw-catalog-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.alw-search { position: relative; flex: 1 1 auto; max-width: 380px; min-width: 0; display: block; }
.alw-search-icon {
	position: absolute; left: 13px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%);
	color: var(--alw-text-2); pointer-events: none;
}
.alw-catalog .alw-search-input {
	display: block; width: 100%; height: 42px; margin: 0; padding: 0 14px 0 38px; border-radius: var(--alw-radius);
	border: 1px solid color-mix(in srgb, var(--alw-text-2) 40%, transparent);
	background: var(--alw-surface); color: var(--alw-text); font-family: var(--alw-font-body); font-size: 14px;
	box-shadow: none; -webkit-appearance: none; appearance: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.alw-catalog .alw-search-input::placeholder { color: var(--alw-text-2); opacity: 1; }
.alw-catalog .alw-search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.alw-catalog .alw-search-input:focus {
	outline: none; border-color: var(--alw-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--alw-accent) 25%, transparent);
}

/* Los dos cuadritos: control segmentado de tamaño fijo. Solo cambian la vista de las tarjetas,
   nunca el resto de la interfaz. */
.alw-catalog .alw-view-toggle {
	display: inline-flex; gap: 2px; padding: 3px; margin-left: auto; flex: 0 0 auto;
	background: var(--alw-surface); border-radius: var(--alw-radius);
	border: 1px solid color-mix(in srgb, var(--alw-text-2) 40%, transparent);
}
.alw-catalog .alw-view-toggle .alw-view-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 34px; height: 34px; min-width: 0; min-height: 0; margin: 0; padding: 0;
	border: 0; border-radius: calc(var(--alw-radius) * 0.7); box-shadow: none;
	background: transparent; color: var(--alw-text-2);
	font: inherit; line-height: 1; letter-spacing: 0; text-transform: none; cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.alw-catalog .alw-view-toggle .alw-view-btn svg { width: 18px; height: 18px; display: block; pointer-events: none; }
.alw-catalog .alw-view-toggle .alw-view-btn:hover { background: color-mix(in srgb, var(--alw-text-2) 16%, transparent); color: var(--alw-text); }
.alw-catalog .alw-view-toggle .alw-view-btn.is-active,
.alw-catalog .alw-view-toggle .alw-view-btn.is-active:hover { background: var(--alw-accent); color: var(--alw-bg); }
.alw-catalog .alw-view-toggle .alw-view-btn:focus-visible { outline: 2px solid var(--alw-accent); outline-offset: 2px; }

/* ---------- Tarjetas: galería y lista ---------- */
.alw-products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
/* Segundo botón ("vista grande"): una tarjeta por fila, la foto ocupa TODO el ancho de la tarjeta
   y la información queda debajo de la foto (título + precio, datos, botón). */
.alw-products-grid.alw-view-list { grid-template-columns: 1fr; gap: 28px; }
.alw-products-grid.alw-view-list .alw-product-card { display: flex; flex-direction: column; }
.alw-products-grid.alw-view-list .alw-product-card-media { width: 100%; height: auto; min-height: 0; aspect-ratio: 16 / 9; }
.alw-products-grid.alw-view-list .alw-product-card-media .alw-product-image,
.alw-products-grid.alw-view-list .alw-product-card-media .alw-no-image { position: static; width: 100%; height: 100%; object-fit: cover; }
.alw-products-grid.alw-view-list .alw-badges { top: 14px; left: 14px; }
.alw-products-grid.alw-view-list .alw-badge { font-size: 12px; padding: 5px 12px; }
.alw-products-grid.alw-view-list .alw-badge-low-stock { bottom: 14px; left: 14px; }
.alw-products-grid.alw-view-list .alw-product-card .alw-wishlist-btn { top: 14px; right: 14px; width: 40px; height: 40px; font-size: 18px; }

.alw-products-grid.alw-view-list .alw-product-card-body {
	display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; row-gap: 0;
	align-items: center; align-content: start; padding: 20px 24px 22px;
}
.alw-products-grid.alw-view-list .alw-product-title { grid-column: 1; grid-row: 1; font-size: 21px; line-height: 1.25; overflow-wrap: anywhere; }
.alw-products-grid.alw-view-list .alw-price-row { grid-column: 2; grid-row: 1; justify-self: end; flex-wrap: wrap; justify-content: flex-end; }
.alw-products-grid.alw-view-list .alw-price { font-size: 24px; line-height: 1.1; white-space: nowrap; }
.alw-products-grid.alw-view-list .alw-price-regular { font-size: 14px; white-space: nowrap; }
.alw-products-grid.alw-view-list .alw-vehicle-meta { grid-column: 1; grid-row: 2; gap: 8px; margin-top: 12px; }
.alw-products-grid.alw-view-list .alw-vehicle-meta span {
	font-size: 13px; font-weight: 600; color: var(--alw-text); line-height: 1.2; padding: 6px 12px; border-radius: 999px;
	background: color-mix(in srgb, var(--alw-text-2) 16%, transparent);
}
.alw-products-grid.alw-view-list .alw-vehicle-meta span:not(:last-child)::after { content: none; }
.alw-products-grid.alw-view-list .alw-rating-summary { grid-column: 1; grid-row: 3; margin-top: 10px; }
.alw-products-grid.alw-view-list .alw-btn { grid-column: 2; grid-row: 2 / span 2; align-self: end; justify-self: end; width: auto; margin: 12px 0 0; padding: 12px 28px; }

/* Móvil / pantallas angostas: todo apilado (foto, título, precio, datos y botón a lo ancho) */
@media (max-width: 640px) {
	.alw-products-grid.alw-view-list { gap: 20px; }
	.alw-products-grid.alw-view-list .alw-product-card-media { aspect-ratio: 4 / 3; }
	.alw-products-grid.alw-view-list .alw-product-card-body { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 16px 16px 18px; }
	.alw-products-grid.alw-view-list .alw-product-title { order: 1; font-size: 19px; }
	.alw-products-grid.alw-view-list .alw-price-row { order: 2; justify-content: flex-start; align-self: flex-start; }
	.alw-products-grid.alw-view-list .alw-price { font-size: 22px; }
	.alw-products-grid.alw-view-list .alw-vehicle-meta { order: 3; margin-top: 0; }
	.alw-products-grid.alw-view-list .alw-rating-summary { order: 4; margin-top: 0; }
	.alw-products-grid.alw-view-list .alw-btn { order: 5; align-self: stretch; justify-self: auto; width: 100%; margin: 4px 0 0; padding: 13px 20px; font-size: 15px; }
}
.alw-no-results { grid-column: 1 / -1; text-align: center; color: var(--alw-text-2); padding: 40px 0; }

/* ---------- Panel de filtros ---------- */
.alw-filters {
	flex: 0 0 260px; width: 260px; min-width: 0;
	background: var(--alw-surface); border-radius: var(--alw-radius);
	border: 1px solid color-mix(in srgb, var(--alw-text-2) 22%, transparent);
	position: sticky; top: 24px; overflow: hidden;
}
.alw-filters-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 20px; }
.alw-catalog .alw-filters-toggle {
	display: inline-flex; align-items: center; gap: 8px; min-width: 0; min-height: 0; margin: 0; padding: 0;
	border: 0; border-radius: 0; box-shadow: none; background: none; color: var(--alw-text);
	font-family: var(--alw-font-display); font-size: 17px; font-weight: 700; line-height: 1.2; letter-spacing: 0; text-transform: none;
	cursor: default; pointer-events: none;
}
.alw-catalog .alw-filters-toggle:hover { background: none; color: var(--alw-text); }
.alw-filters-chevron { display: none; width: 16px; height: 16px; transition: transform 0.2s ease; }
.alw-filters-count {
	min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--alw-accent); color: var(--alw-bg);
	font-family: var(--alw-font-body); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
}
.alw-filters-count[hidden] { display: none; }
.alw-catalog .alw-clear-filters {
	min-width: 0; min-height: 0; margin: 0; padding: 4px 0; border: 0; border-radius: 0; box-shadow: none; background: none;
	color: var(--alw-text-2); font-family: var(--alw-font-body); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none;
	text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--alw-text-2) 50%, transparent);
	cursor: pointer; transition: color 0.15s ease;
}
.alw-catalog .alw-clear-filters:hover { background: none; color: var(--alw-accent); }
.alw-catalog .alw-clear-filters:focus-visible,
.alw-catalog .alw-filters-toggle:focus-visible { outline: 2px solid var(--alw-accent); outline-offset: 3px; }

.alw-filters-body {
	padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 18px;
	border-top: 1px solid color-mix(in srgb, var(--alw-text-2) 22%, transparent); padding-top: 18px;
}
.alw-filter-group { margin: 0; min-width: 0; }
.alw-filter-group h4 {
	display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
	margin: 0 0 8px; padding: 0; font-family: var(--alw-font-body); font-size: 13px; font-weight: 600; line-height: 1.3;
	letter-spacing: 0; text-transform: none; color: var(--alw-text);
}
.alw-filter-hint { font-size: 12px; font-weight: 500; color: var(--alw-text-2); }

.alw-select { position: relative; display: block; }
.alw-select::after {
	content: ""; position: absolute; right: 15px; top: 50%; width: 7px; height: 7px; pointer-events: none;
	border-right: 2px solid var(--alw-text-2); border-bottom: 2px solid var(--alw-text-2);
	transform: translateY(-70%) rotate(45deg);
}
.alw-catalog .alw-filters select,
.alw-catalog .alw-filters input[type="number"] {
	display: block; width: 100%; height: 40px; margin: 0; padding: 0 12px; border-radius: var(--alw-radius);
	border: 1px solid color-mix(in srgb, var(--alw-text-2) 40%, transparent);
	background: var(--alw-bg); color: var(--alw-text); font-family: var(--alw-font-body); font-size: 14px; line-height: 1.2;
	box-shadow: none; -webkit-appearance: none; appearance: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.alw-catalog .alw-filters select { padding-right: 36px; cursor: pointer; text-overflow: ellipsis; }
.alw-catalog .alw-filters input[type="number"] { -moz-appearance: textfield; }
.alw-catalog .alw-filters input[type="number"]::-webkit-outer-spin-button,
.alw-catalog .alw-filters input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.alw-catalog .alw-filters input[type="number"]::placeholder { color: var(--alw-text-2); opacity: 1; }
.alw-catalog .alw-filters select:hover,
.alw-catalog .alw-filters input[type="number"]:hover { border-color: color-mix(in srgb, var(--alw-text-2) 70%, transparent); }
.alw-catalog .alw-filters select:focus,
.alw-catalog .alw-filters input[type="number"]:focus {
	outline: none; border-color: var(--alw-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--alw-accent) 25%, transparent);
}
.alw-price-range { display: grid; grid-template-columns: minmax(0, 1fr) 10px minmax(0, 1fr); align-items: center; gap: 8px; }
.alw-price-sep { height: 1px; background: color-mix(in srgb, var(--alw-text-2) 60%, transparent); }

/* Interruptor "Solo disponibles" */
.alw-filter-group-switch { padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--alw-text-2) 22%, transparent); }
.alw-catalog .alw-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--alw-text); }
.alw-switch input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.alw-switch-track {
	position: relative; flex-shrink: 0; width: 42px; height: 24px; border-radius: 999px;
	background: color-mix(in srgb, var(--alw-text-2) 40%, transparent); transition: background 0.15s ease;
}
.alw-switch-track::after {
	content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
	background: var(--alw-bg); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.15s ease;
}
.alw-switch input:checked + .alw-switch-track { background: var(--alw-accent); }
.alw-switch input:checked + .alw-switch-track::after { transform: translateX(18px); background: #fff; }
.alw-switch input:focus-visible + .alw-switch-track { outline: 2px solid var(--alw-accent); outline-offset: 2px; }

/* ---------- Tablet y móvil ---------- */
@media (max-width: 900px) {
	.alw-catalog-body { flex-direction: column; align-items: stretch; gap: 16px; }
	.alw-products-wrap { flex: none; width: 100%; }
	.alw-filters { flex: none; width: 100%; position: static; }
	.alw-filters-head { padding: 0; }
	.alw-catalog .alw-filters-toggle {
		flex: 1; justify-content: flex-start; padding: 14px 20px; cursor: pointer; pointer-events: auto; text-align: left;
	}
	.alw-filters-chevron { display: block; color: var(--alw-text-2); }
	.alw-filters.is-open .alw-filters-chevron { transform: rotate(180deg); }
	.alw-catalog .alw-clear-filters { padding: 14px 20px 14px 0; }
	.alw-filters-body { display: none; }
	.alw-filters.is-open .alw-filters-body { display: flex; }
	.alw-filters-body { flex-direction: row; flex-wrap: wrap; gap: 18px 16px; }
	.alw-filters-body .alw-filter-group { flex: 1 1 200px; }
	.alw-filters-body .alw-filter-group-switch { flex: 1 1 100%; }
}
@media (max-width: 520px) {
	.alw-catalog { padding: 20px 14px 48px; }
	.alw-search { max-width: none; }
	.alw-products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
	.alw-products-grid .alw-product-card-body { padding: 12px; }
	.alw-filters-body .alw-filter-group { flex-basis: 100%; }
}

/* ---------- Tarjeta de vehículo ---------- */
.alw-product-card {
	background: var(--alw-surface); border-radius: var(--alw-radius); overflow: hidden;
	position: relative; display: flex; flex-direction: column;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.alw-product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.alw-product-card-media { position: relative; display: block; aspect-ratio: var(--alw-image-ratio); overflow: hidden; background: var(--alw-bg); }
.alw-product-image, .alw-no-image { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.alw-product-card:hover .alw-product-image { transform: scale(1.05); }
.alw-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 5px; z-index: 1; }
.alw-badge {
	font-size: 11px; padding: 4px 9px; border-radius: 20px; background: var(--alw-accent); color: var(--alw-bg);
	font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.4;
}
.alw-badge-oferta { background: var(--alw-accent-2); }
.alw-badge-top,
.alw-badge-nuevo_ingreso { background: var(--alw-text); color: var(--alw-bg); }
.alw-badge-certificado { background: var(--alw-accent-2); }
.alw-badge-ultima { background: #c0392b; color: #fff; }
.alw-badge-reservado { background: #b8860b; color: #fff; }
.alw-badge-vendido { background: #6b6f76; color: #fff; }
.alw-badge-low-stock { position: absolute; bottom: 10px; left: 10px; background: var(--alw-accent-2); text-transform: none; z-index: 1; }
.alw-product-card .alw-wishlist-btn {
	position: absolute; top: 10px; right: 10px; background: var(--alw-surface); color: var(--alw-text); border: none; border-radius: 50%;
	width: 34px; height: 34px; min-width: 0; min-height: 0; margin: 0; padding: 0; cursor: pointer; font-size: 16px; z-index: 1; line-height: 1;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 2px 6px rgba(0,0,0,0.15); transition: transform 0.15s ease;
}
.alw-product-card .alw-wishlist-btn:hover { background: var(--alw-surface); color: var(--alw-text); transform: scale(1.1); }
.alw-product-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.alw-product-title { color: var(--alw-text); text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.35; }
.alw-product-title:hover { text-decoration: underline; }
.alw-price-row { display: flex; align-items: baseline; gap: 8px; }
.alw-price { font-weight: 700; color: var(--alw-accent); font-size: 16px; }
.alw-price-regular { text-decoration: line-through; color: var(--alw-text-2); font-size: 0.85em; }
.alw-rating-summary { font-size: 13px; color: var(--alw-text-2); display: flex; align-items: center; gap: 6px; }
.alw-review-stars { color: var(--alw-accent); letter-spacing: 1px; }

.alw-vehicle-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12.5px; color: var(--alw-text-2); }
.alw-vehicle-meta span:not(:last-child)::after { content: '•'; margin-left: 10px; color: var(--alw-text-2); }

.alw-btn {
	background: var(--alw-accent); color: var(--alw-bg); border: none; border-radius: var(--alw-radius);
	padding: 10px 18px; font-weight: 600; cursor: pointer; text-align: center; text-decoration: none;
	display: inline-block; transition: opacity 0.15s ease, transform 0.1s ease; margin-top: auto;
}
.alw-btn:hover { opacity: 0.88; }
.alw-btn:active { transform: scale(0.98); }
.alw-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.alw-btn-large { padding: 14px 20px; width: 100%; font-size: 16px; }
.alw-btn-block { width: 100%; }

/* ---------- Paginación del catálogo ---------- */
.alw-pagination {
	display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 24px 0 8px;
}
.alw-page-btn {
	min-width: 36px; height: 36px; padding: 0 10px; border-radius: var(--alw-radius);
	border: 1px solid color-mix(in srgb, var(--alw-text-2) 45%, transparent);
	background: var(--alw-bg); color: var(--alw-text); font-weight: 600; cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.alw-page-btn:hover:not(:disabled) { background: var(--alw-surface); }
.alw-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.alw-page-btn.is-active { background: var(--alw-accent); border-color: var(--alw-accent); color: var(--alw-bg); }

/* ---------- Selector de cantidad +/- ---------- */
.alw-qty-stepper {
	display: inline-flex; align-items: stretch; border: 1px solid color-mix(in srgb, var(--alw-text-2) 45%, transparent);
	border-radius: var(--alw-radius); overflow: hidden; background: var(--alw-bg);
}
.alw-qty-btn {
	background: none; border: none; color: var(--alw-text); width: 32px; font-size: 16px; cursor: pointer;
	display: flex; align-items: center; justify-content: center; transition: background 0.15s ease;
}
.alw-qty-btn:hover { background: color-mix(in srgb, var(--alw-accent) 12%, transparent); }
.alw-qty-stepper input,
.alw-qty-input {
	width: 44px; border: none; border-left: 1px solid color-mix(in srgb, var(--alw-text-2) 30%, transparent);
	border-right: 1px solid color-mix(in srgb, var(--alw-text-2) 30%, transparent);
	text-align: center; background: transparent; color: var(--alw-text); font-size: 14px; padding: 6px 0;
	-moz-appearance: textfield;
}
.alw-qty-stepper input::-webkit-outer-spin-button,
.alw-qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Ficha de vehículo ---------- */
.alw-single-product { max-width: 1200px; margin: 0 auto; padding: 28px 20px 60px; }
.alw-single-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; margin-bottom: 48px; }
@media (max-width: 900px) { .alw-single-grid { grid-template-columns: 1fr; gap: 24px; } }
.alw-breadcrumbs { font-size: 13px; color: var(--alw-text-2); margin-bottom: 20px; }
.alw-breadcrumbs a { color: var(--alw-text-2); text-decoration: none; }
.alw-breadcrumbs a:hover { text-decoration: underline; }

.alw-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.alw-gallery-item { border: 2px solid transparent; border-radius: var(--alw-radius); overflow: hidden; padding: 0; background: none; cursor: pointer; aspect-ratio: 1/1; transition: border-color 0.15s ease; }
.alw-gallery-item:first-child { grid-column: 1 / -1; aspect-ratio: var(--alw-image-ratio); border-radius: calc(var(--alw-radius) * 1.3); }
.alw-gallery-item:hover { border-color: color-mix(in srgb, var(--alw-accent) 60%, transparent); }
.alw-gallery-item.is-active { border-color: var(--alw-accent); }
.alw-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.alw-gallery-empty { display: flex; align-items: center; justify-content: center; aspect-ratio: var(--alw-image-ratio); background: var(--alw-surface); color: var(--alw-text-2); border-radius: var(--alw-radius); }
.alw-video-wrap { margin-top: 12px; border-radius: var(--alw-radius); overflow: hidden; aspect-ratio: 16/9; }
.alw-video-wrap iframe, .alw-video-wrap embed { width: 100%; height: 100%; }

.alw-single-info { display: flex; flex-direction: column; }
.alw-single-title { margin: 0 0 6px; font-size: 26px; line-height: 1.25; }
.alw-single-brand { color: var(--alw-text-2); margin: 0 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.03em; }
.alw-price-row-single { font-size: 30px; margin: 12px 0 16px; }
.alw-stock-info { margin-bottom: 16px; }
.alw-stock-info span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 20px; }
.alw-stock-ok { color: var(--alw-accent-2); background: color-mix(in srgb, var(--alw-accent-2) 15%, transparent); }
.alw-stock-low, .alw-stock-bajo-pedido { color: var(--alw-accent-2); background: color-mix(in srgb, var(--alw-accent-2) 15%, transparent); }
.alw-stock-agotado { color: #c0392b; background: #fdecea; }
.alw-excerpt { color: var(--alw-text-2); line-height: 1.6; margin-bottom: 18px; }

.alw-qty-row { display: none; }
.alw-qty-row label { font-size: 14px; font-weight: 600; }

.alw-vehicle-specs-quick { list-style: none; margin: 14px 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 13.5px; }
.alw-vehicle-specs-quick li { color: var(--alw-text); }
.alw-vehicle-specs-quick strong { color: var(--alw-text-2); font-weight: 600; margin-right: 4px; }
.alw-vehicle-location { margin-top: 14px; font-size: 13.5px; color: var(--alw-text-2); }
.alw-vehicle-video { margin-top: 12px; }
.alw-btn-outline { background: none; border: 1px solid color-mix(in srgb, var(--alw-text-2) 45%, transparent); color: var(--alw-text); }
.alw-btn-outline:hover { border-color: var(--alw-accent); color: var(--alw-accent); opacity: 1; }

.alw-checkout-form .alw-btn-large,
.alw-single-info .alw-btn-large { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 10px; }

.alw-wishlist-btn-inline {
	display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: none;
	border: 1px solid color-mix(in srgb, var(--alw-text-2) 45%, transparent); color: var(--alw-text);
	border-radius: var(--alw-radius); padding: 12px; cursor: pointer; font-size: 14px; font-weight: 600;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.alw-wishlist-btn-inline:hover { border-color: var(--alw-accent); background: color-mix(in srgb, var(--alw-accent) 8%, transparent); }

.alw-shipping-note {
	margin-top: 18px; font-size: 13px; color: var(--alw-text-2); background: var(--alw-surface);
	border-radius: var(--alw-radius); padding: 10px 12px; line-height: 1.5;
}
.alw-shipping-note p { margin: 0; }
.alw-shipping-note p + p { margin-top: 4px; }
.alw-sku { color: var(--alw-text-2); font-size: 13px; margin-top: 12px; }

.alw-single-tabs { border-top: 1px solid color-mix(in srgb, var(--alw-text-2) 25%, transparent); padding-top: 32px; margin-bottom: 40px; }
.alw-single-tabs h2 { font-size: 19px; margin: 0 0 14px; }
.alw-single-tabs h2 + h2 { margin-top: 32px; }
.alw-description { line-height: 1.7; color: var(--alw-text); }
.alw-specs-table { width: 100%; border-collapse: collapse; background: var(--alw-surface); border-radius: var(--alw-radius); overflow: hidden; }
.alw-specs-table tr:nth-child(odd) { background: color-mix(in srgb, var(--alw-text-2) 5%, transparent); }
.alw-specs-table th, .alw-specs-table td { text-align: left; padding: 10px 14px; font-size: 14px; }
.alw-specs-table th { color: var(--alw-text-2); font-weight: 600; width: 40%; }

.alw-related-products { margin-top: 48px; }
.alw-related-products h2 { font-size: 20px; margin: 0 0 18px; }

.alw-reviews-section { border-top: 1px solid color-mix(in srgb, var(--alw-text-2) 25%, transparent); padding-top: 32px; }
.alw-reviews-section h2 { font-size: 20px; margin: 0 0 18px; }
.alw-reviews-section .comment-list { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 14px; }
.alw-reviews-section .comment-list .comment-body {
	background: var(--alw-surface); border-radius: var(--alw-radius); padding: 16px 18px; line-height: 1.6;
}
.alw-reviews-section .comment-list .comment-author { font-weight: 600; font-size: 14px; }
.alw-reviews-section .comment-list .comment-metadata { font-size: 12px; color: var(--alw-text-2); margin-bottom: 6px; }
.alw-rating-field { margin-bottom: 14px; }
.alw-rating-field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.alw-rating-field select {
	padding: 9px 12px; border-radius: var(--alw-radius); border: 1px solid color-mix(in srgb, var(--alw-text-2) 45%, transparent);
	background: var(--alw-bg); color: var(--alw-text); font-size: 14px;
}
.alw-reviews-section #commentform input[type="text"],
.alw-reviews-section #commentform input[type="email"],
.alw-reviews-section #commentform textarea {
	width: 100%; padding: 10px 12px; border-radius: var(--alw-radius);
	border: 1px solid color-mix(in srgb, var(--alw-text-2) 45%, transparent);
	background: var(--alw-bg); color: var(--alw-text); font-family: var(--alw-font-body); margin-bottom: 10px;
}
.alw-reviews-section #commentform .form-submit input {
	background: var(--alw-accent); color: var(--alw-bg); border: none; border-radius: var(--alw-radius);
	padding: 10px 20px; font-weight: 600; cursor: pointer;
}

/* ---------- Formulario de consulta: envoltorio tipo "tarjeta flotante" ---------- */
.alw-contact-form-wrap {
	max-width: 640px; margin: 0 auto; padding: 0;
	color: var(--alw-text); font-family: var(--alw-font-body);
}
.alw-form-vehicle-ref { margin: 0 0 14px; font-size: 14px; color: var(--alw-text-2); }

.alw-checkout-note {
	display: flex; align-items: center; gap: 8px;
	color: var(--alw-text-2); font-size: 13px; line-height: 1.5;
	background: color-mix(in srgb, var(--alw-accent) 8%, transparent);
	border: 1px solid color-mix(in srgb, var(--alw-accent) 25%, transparent);
	border-radius: 4px; padding: 10px 12px; margin: 0 0 20px;
}
.alw-note-icon { flex-shrink: 0; line-height: 1.4; }

.alw-checkout-error {
	display: flex; align-items: center; gap: 8px;
	background: #fdecea; color: #c0392b; padding: 12px 14px;
	border-radius: 4px; margin-bottom: 18px; font-size: 14px; font-weight: 600;
}

/* ---------- Formulario, en secciones ---------- */
.alw-checkout-form {
	background: var(--alw-surface); border-radius: 4px;
	padding: 20px; display: flex; flex-direction: column; gap: 20px;
}
.alw-form-section { display: flex; flex-direction: column; gap: 10px; }
.alw-form-section + .alw-form-section { padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--alw-text-2) 25%, transparent); }
.alw-form-section-title { margin: 0 0 10px; font-size: 12px; letter-spacing: 0.02em; text-transform: uppercase; color: var(--alw-text-2); font-weight: 700; }

.alw-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.alw-field:last-child { margin-bottom: 0; }
.alw-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .alw-field-row { grid-template-columns: 1fr; } }

.alw-checkout-form label { font-weight: 600; font-size: 13px; color: var(--alw-text); }
.alw-required { color: var(--alw-accent-2); }
.alw-checkout-form input {
	width: 100%; height: 38px; padding: 0 12px; border-radius: 4px;
	border: 1px solid color-mix(in srgb, var(--alw-text-2) 45%, transparent);
	background: var(--alw-bg); color: var(--alw-text); font-family: var(--alw-font-body); font-size: 14px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.alw-checkout-form textarea {
	width: 100%; padding: 10px 12px; border-radius: 4px;
	border: 1px solid color-mix(in srgb, var(--alw-text-2) 45%, transparent);
	background: var(--alw-bg); color: var(--alw-text); font-family: var(--alw-font-body); font-size: 14px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease; resize: vertical;
}
.alw-checkout-form input:focus,
.alw-checkout-form textarea:focus {
	outline: none; border-color: var(--alw-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--alw-accent) 25%, transparent);
}

/* ---------- Opciones de contacto: tarjetas con selector a la derecha ---------- */
.alw-delivery-options { display: flex; flex-direction: column; gap: 10px; }
.alw-delivery-option {
	display: flex; align-items: center; gap: 14px;
	border: 1px solid color-mix(in srgb, var(--alw-text-2) 45%, transparent);
	border-radius: 4px; padding: 14px 16px;
	cursor: pointer; font-weight: normal; margin: 0;
	background: var(--alw-bg); transition: border-color 0.15s ease, background 0.15s ease;
}
.alw-delivery-option:hover { border-color: var(--alw-accent); }
.alw-delivery-option input[type="radio"] {
	position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
.alw-delivery-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }
.alw-delivery-text { display: flex; flex-direction: column; gap: 2px; }
.alw-delivery-text strong { font-size: 14px; color: var(--alw-text); }
.alw-delivery-text small { color: var(--alw-text-2); font-size: 12px; font-weight: normal; }
.alw-delivery-radio {
	margin-left: auto; flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%;
	border: 2px solid color-mix(in srgb, var(--alw-text-2) 60%, transparent);
	position: relative; transition: border-color 0.15s ease;
}
.alw-delivery-option.is-selected {
	border-color: var(--alw-accent);
	background: color-mix(in srgb, var(--alw-accent) 10%, var(--alw-bg));
}
.alw-delivery-option.is-selected .alw-delivery-radio { border-color: var(--alw-accent); }
.alw-delivery-option.is-selected .alw-delivery-radio::after {
	content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--alw-accent);
}

/* ---------- Botón de envío (dentro de la misma tarjeta del formulario) ---------- */
.alw-checkout-form .alw-btn-large {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	background: #25D366; color: #fff; border: none; border-radius: 4px;
	padding: 14px; font-weight: 600; font-size: 15px; margin: 0;
}
.alw-checkout-form .alw-btn-large:hover { background: #1ebe5a; opacity: 1; }
.alw-btn-icon { font-size: 18px; line-height: 1; }

.alw-order-success {
	text-align: center; max-width: 460px; margin: 50px auto; padding: 36px 30px;
	background: var(--alw-surface); border-radius: var(--alw-radius);
}
.alw-order-success h1, .alw-order-success h3 { margin: 0 0 10px; }
.alw-order-success p { color: var(--alw-text-2); line-height: 1.5; }
.alw-order-success .alw-checkout-note { display: block; text-align: left; margin-top: 18px; }
.alw-success-icon {
	width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%;
	background: #25D366; color: #fff; font-size: 28px; font-weight: 700;
	display: flex; align-items: center; justify-content: center;
}
.alw-btn-whatsapp {
	background: #25D366; color: #fff; margin: 20px 0;
	display: flex; align-items: center; justify-content: center; gap: 8px;
}
.alw-btn-whatsapp:hover { background: #1ebe5a; opacity: 1; }

.alw-wishlist-wrap { max-width: 1200px; margin: 0 auto; padding: 28px 20px 60px; }
.alw-wishlist-wrap > p {
	text-align: center; color: var(--alw-text-2); background: var(--alw-surface); border-radius: var(--alw-radius);
	padding: 40px 20px; max-width: 360px; margin: 40px auto;
}

.alw-lightbox-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 99999; display: flex; align-items: center; justify-content: center; }
.alw-lightbox-overlay img { max-width: 90%; max-height: 90%; }
.alw-lightbox-close { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 30px; background: none; border: none; cursor: pointer; }
.alw-lightbox-prev, .alw-lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,0.15); color: #fff; border: none; font-size: 20px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s ease; }
.alw-lightbox-prev:hover, .alw-lightbox-next:hover { background: rgba(255,255,255,0.3); }
.alw-lightbox-prev { left: 12px; }
.alw-lightbox-next { right: 12px; }
.alw-lightbox-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 13px; background: rgba(0,0,0,0.45); padding: 4px 14px; border-radius: 999px; }
@media (max-width: 600px) {
	.alw-lightbox-prev, .alw-lightbox-next { width: 38px; height: 38px; font-size: 16px; }
	.alw-lightbox-prev { left: 6px; }
	.alw-lightbox-next { right: 6px; }
}

/* ---------- Botón flotante de WhatsApp (ficha de vehículo) ---------- */
.alw-whatsapp-float {
	position: fixed; bottom: 20px; right: 20px; z-index: 9999;
	background: #25D366; color: #fff; border-radius: 50%; width: 56px; height: 56px;
	display: flex; align-items: center; justify-content: center; font-size: 26px; text-decoration: none;
	box-shadow: 0 6px 18px rgba(0,0,0,0.25); transition: transform 0.15s ease;
}
.alw-whatsapp-float:hover { transform: scale(1.08); color: #fff; }
@media (min-width: 901px) {
	/* En escritorio, dentro de la ficha ya hay un botón grande visible; el flotante solo aparece en móvil. */
	.alw-whatsapp-float { display: none; }
}
