/* ===== Yohersa Cotizador — layout tipo metalsdelivered ===== */
.yoh-catalogo {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 28px;
	align-items: start;
}

/* ---- Barra lateral de filtros ---- */
.yoh-sidebar {
	position: sticky;
	top: 20px;
	font-size: 14px;
}
.yoh-facet { margin-bottom: 22px; }
.yoh-facet-title {
	display: block;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .03em;
	font-size: 12px;
	color: #1a1a1a;
	margin-bottom: 8px;
	border-bottom: 1px solid #e5e5e5;
	padding-bottom: 6px;
}
.yoh-facet-options {
	max-height: 220px;
	overflow-y: auto;
}
.yoh-opt {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 3px 0;
	cursor: pointer;
	color: #333;
}
.yoh-opt .yoh-c { color: #999; font-size: 12px; margin-left: auto; }

/* ---- Árbol de familias (plegable) ---- */
.yoh-tree-parent { display: flex; align-items: center; gap: 4px; }
.yoh-tree-toggle {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 12px;
	line-height: 1;
	color: #666;
	padding: 4px 2px;
	width: 18px;
	flex: 0 0 18px;
}
.yoh-tree-parent .yoh-opt { font-weight: 600; }
.yoh-tree-children { padding-left: 22px; }
.yoh-tree-leaf { padding-left: 0; }
.yoh-search,
.yoh-range input {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-sizing: border-box;
}
.yoh-range {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}
.yoh-range input { width: 70px; }
.yoh-range small { width: 100%; color: #999; font-size: 11px; }
.yoh-clear {
	background: none;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 8px 12px;
	cursor: pointer;
	width: 100%;
}
.yoh-clear:hover { background: #f5f5f5; }

/* ---- Resultados ---- */
.yoh-toolbar {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 14px;
	color: #666;
	font-size: 13px;
}
/* ---- Vista en LISTA ---- */
.yoh-grid {
	display: flex;
	flex-direction: column;
	transition: opacity .15s;
}
.yoh-grid.yoh-loading { opacity: .45; pointer-events: none; }

.yoh-row {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 14px;
	border-bottom: 1px solid #ececec;
	background: #fff;
}
.yoh-row:hover { background: #fafafa; }
.yoh-row:first-child { border-top: 1px solid #ececec; }

.yoh-row-img { flex: 0 0 64px; width: 64px; height: 64px; background: #f7f7f7; border-radius: 4px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.yoh-row-img img { width: 100%; height: 100%; object-fit: contain; display: block; }

.yoh-row-info { flex: 1 1 auto; min-width: 0; }
.yoh-row-title { font-weight: 600; color: #1a1a1a; text-decoration: none; font-size: 14px; line-height: 1.35; }
.yoh-row-title:hover { color: #c8102e; }
.yoh-row-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 3px; }
.yoh-row-sku { font-size: 12px; color: #999; }
.yoh-row-weight { font-size: 12px; color: #999; }

.yoh-row-action { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 180px; }
.yoh-row-price { font-size: 16px; font-weight: 700; color: #1a1a1a; }
.yoh-login-price { font-size: 13px; color: #c8102e; text-decoration: none; font-weight: 600; }
.yoh-login-price:hover { text-decoration: underline; }

.yoh-row-buy { display: flex; align-items: center; gap: 8px; }

/* Stepper de cantidad compacto (input + flechas ▲▼) */
.yoh-qty-wrap {
	display: inline-flex !important;
	align-items: stretch;
	border: 1px solid #ccc;
	border-radius: 4px;
	overflow: hidden;
	height: 38px;
	width: 64px !important;
	background: #fff;
}
.yoh-qty {
	width: 40px !important;
	min-width: 0 !important;
	height: 36px !important;
	line-height: 36px !important;
	border: none !important;
	padding: 0 4px !important;
	margin: 0 !important;
	text-align: center;
	font-size: 14px;
	box-shadow: none !important;
	background: transparent !important;
	-moz-appearance: textfield;
}
.yoh-qty::-webkit-outer-spin-button,
.yoh-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.yoh-qty-btns {
	display: flex;
	flex-direction: column;
	width: 22px;
	border-left: 1px solid #ddd;
}
.yoh-qty-btns button {
	flex: 1;
	border: none;
	background: #f3f3f3;
	cursor: pointer;
	font-size: 8px;
	line-height: 1;
	color: #555;
	padding: 0;
}
.yoh-qty-btns button:hover { background: #e6e6e6; }
.yoh-qty-up { border-bottom: 1px solid #ddd; }

.yoh-add {
	background: #c8102e;
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 8px 18px;
	cursor: pointer;
	font-weight: 600;
	white-space: nowrap;
}
.yoh-add:hover { background: #a50d26; }

.yoh-empty { color: #888; padding: 40px; text-align: center; }

/* ---- Paginación ---- */
.yoh-pagination { display: flex; gap: 6px; margin-top: 26px; flex-wrap: wrap; }
.yoh-page {
	min-width: 36px;
	padding: 8px;
	border: 1px solid #ccc;
	background: #fff;
	border-radius: 4px;
	cursor: pointer;
}
.yoh-page.is-active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }

/* ---- Responsive ---- */
@media ( max-width: 782px ) {
	.yoh-catalogo { grid-template-columns: 1fr; }
	.yoh-sidebar { position: static; }
}

/* ===================== CARRITO DE COTIZACIÓN ===================== */

/* Botón "Añadir" en estado confirmado */
.yoh-add.yoh-added { background: #2e7d32; }

/* Contador / enlace "Mi cotización" (header) */
.yoh-quote-link { position: relative; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.yoh-quote-count {
	background: #c8102e;
	color: #fff;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

/* Página "Mi cotización" */
.yoh-quote-page { max-width: 900px; }
.yoh-quote-table { width: 100%; border-collapse: collapse; }
.yoh-quote-table th, .yoh-quote-table td { padding: 12px 10px; border-bottom: 1px solid #ececec; text-align: left; vertical-align: middle; }
.yoh-quote-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: #666; }
.yoh-quote-table tfoot th { font-size: 16px; border-top: 2px solid #ddd; border-bottom: none; }
.yoh-quote-qty {
	width: 56px !important; min-width: 0 !important; max-width: 56px;
	height: 34px !important; min-height: 0 !important;
	padding: 4px 6px !important; line-height: 1.2 !important;
	border: 1px solid #ccc; border-radius: 4px; text-align: center;
	box-sizing: border-box !important; font-size: 14px !important;
}
.yoh-quote-qty::-webkit-outer-spin-button,
.yoh-quote-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Enlace volver al cotizador */
.yoh-quote-back { margin-bottom: 14px; }
.yoh-quote-back a { color: #c8102e; text-decoration: none; font-weight: 600; }
.yoh-quote-back a:hover { text-decoration: underline; }

/* Formulario de datos del cliente */
.yoh-quote-form { max-width: 600px; margin-top: 28px; }
.yoh-quote-form h3 { margin: 0 0 14px; }
.yoh-field { margin-bottom: 14px; }
.yoh-field > label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.yoh-field .req { color: #c8102e; }
.yoh-f, .yoh-quote-message {
	width: 100%; padding: 9px 10px; border: 1px solid #ccc; border-radius: 6px;
	box-sizing: border-box; font-size: 14px;
}
.yoh-field-row { display: flex; gap: 14px; }
.yoh-field-row .yoh-field { flex: 1; }
.yoh-radios { display: flex; gap: 20px; }
.yoh-radios label { display: flex; align-items: center; gap: 6px; font-weight: 400; cursor: pointer; }
@media ( max-width: 600px ) {
	.yoh-field-row { flex-direction: column; gap: 0; }
}
.yoh-quote-remove {
	background: none; border: none; color: #999; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 6px;
}
.yoh-quote-remove:hover { color: #c8102e; }

.yoh-quote-actions { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.yoh-quote-message { width: 100%; max-width: 520px; padding: 10px; border: 1px solid #ccc; border-radius: 6px; box-sizing: border-box; }
.yoh-quote-submit {
	background: #c8102e; color: #fff; border: none; border-radius: 6px;
	padding: 13px 26px; font-weight: 700; font-size: 15px; cursor: pointer;
}
.yoh-quote-submit:hover { background: #a50d26; }
.yoh-quote-submit:disabled { opacity: .6; cursor: default; }
.yoh-quote-feedback { font-weight: 600; padding: 12px 0; }
.yoh-quote-feedback.ok { color: #2e7d32; }
.yoh-quote-feedback.err { color: #c8102e; }
.yoh-quote-note { color: #999; font-size: 13px; margin-top: 14px; }

/* Responsive: tabla en tarjetas */
@media ( max-width: 600px ) {
	.yoh-quote-table thead { display: none; }
	.yoh-quote-table tr { display: block; border-bottom: 2px solid #ececec; padding: 8px 0; }
	.yoh-quote-table td { display: flex; justify-content: space-between; border: none; padding: 6px 10px; }
	.yoh-quote-table td::before { content: attr(data-label); font-weight: 600; color: #666; }
}

/* ===================== MINI-CARRITO FLOTANTE ===================== */
.yoh-minicart {
	position: fixed;
	right: 90px;          /* deja libre la esquina para el botón de WhatsApp */
	bottom: 20px;
	width: 270px;
	max-height: 70vh;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	box-shadow: 0 8px 30px rgba(0,0,0,.15);
	z-index: 9999;
	overflow: hidden;
	font-size: 14px;
}
.yoh-minicart-head {
	background: #1a1a1a;
	color: #fff;
	padding: 11px 14px;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	border: none;
	cursor: pointer;
	text-align: left;
	font-size: 14px;
}
.yoh-minicart-chevron { transition: transform .15s; display: inline-block; font-size: 11px; }
.yoh-minicart.is-open .yoh-minicart-chevron { transform: rotate(90deg); }
.yoh-minicart-head .yoh-quote-count {
	background: #c8102e; color: #fff; border-radius: 999px;
	min-width: 20px; height: 20px; padding: 0 6px;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 12px; margin-left: auto;
}
/* Cuerpo plegable: oculto por defecto, visible al abrir */
.yoh-minicart-body { display: none; flex-direction: column; overflow: hidden; }
.yoh-minicart.is-open .yoh-minicart-body { display: flex; }
.yoh-minicart-empty { padding: 18px 14px; color: #999; }
.yoh-minicart-items { overflow-y: auto; padding: 6px 0; max-height: 40vh; }
.yoh-minicart-item {
	display: flex; align-items: center; gap: 8px;
	padding: 8px 14px; border-bottom: 1px solid #f0f0f0;
}
.yoh-minicart-qty { font-weight: 700; color: #c8102e; flex: 0 0 auto; }
.yoh-minicart-name { flex: 1 1 auto; font-size: 13px; line-height: 1.3; }
.yoh-mini-remove { background: none; border: none; color: #bbb; font-size: 18px; line-height: 1; cursor: pointer; flex: 0 0 auto; }
.yoh-mini-remove:hover { color: #c8102e; }
.yoh-minicart-foot { padding: 12px 14px; border-top: 1px solid #eee; }
.yoh-minicart-total { margin-bottom: 10px; font-size: 14px; }
.yoh-minicart-btn {
	display: block; text-align: center; background: #c8102e; color: #fff !important;
	padding: 11px; border-radius: 6px; font-weight: 700; text-decoration: none;
}
.yoh-minicart-btn:hover { background: #a50d26; }

/* En móvil ocupa el ancho disponible */
@media ( max-width: 600px ) {
	.yoh-minicart { right: 10px; left: 10px; width: auto; bottom: 10px; }
}

/* ===================== TILES DESTACADOS ===================== */
.yoh-tiles {
	display: flex;
	gap: 18px;
	overflow-x: auto;
	padding: 4px 2px 14px;
	margin-bottom: 18px;
	border-bottom: 1px solid #eee;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}
.yoh-tile {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	width: 92px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
}
.yoh-tile-img {
	width: 76px;
	height: 76px;
	border-radius: 50%;
	overflow: hidden;
	background: #f3f3f3;
	border: 2px solid #eee;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color .15s, transform .15s;
}
.yoh-tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yoh-tile:hover .yoh-tile-img { transform: translateY(-2px); border-color: #c8102e; }
.yoh-tile.is-active .yoh-tile-img { border-color: #c8102e; box-shadow: 0 0 0 3px rgba(200,16,46,.15); }
.yoh-tile-label { font-size: 13px; font-weight: 600; color: #1a1a1a; text-align: center; line-height: 1.2; }

/* Tile de Ofertas: ícono en vez de foto */
.yoh-tile-icon { font-size: 30px; font-weight: 700; color: #fff; background: #c8102e; border-color: #c8102e; }
.yoh-tile-ofertas .yoh-tile-label { color: #c8102e; }

/* Tiles con subcategorías */
.yoh-tile-caret { font-size: 10px; color: #999; }
.yoh-tile.is-open .yoh-tile-img { border-color: #1a1a1a; }
.yoh-tile.is-open .yoh-tile-caret { color: #c8102e; }

/* Fila de sub-tiles (se despliega al hacer clic en un tile padre) */
.yoh-subtiles[hidden] { display: none !important; }
.yoh-subtiles {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	padding: 14px;
	margin: -8px 0 18px;
	background: #faf7f2;
	border: 1px solid #eee;
	border-radius: 10px;
	-webkit-overflow-scrolling: touch;
}
.yoh-subtiles .yoh-tile-img { width: 60px; height: 60px; }
.yoh-subtiles .yoh-tile { width: 80px; }
.yoh-tile-all .yoh-tile-icon { background: #1a1a1a; border-color: #1a1a1a; font-size: 24px; }
