/* MACRO – Ficha de Producto */

/* ===== Bloque de compra ===== */
.macro-compra { border: 1px solid #ffd7b5; background: #fffaf6; border-radius: 12px; padding: 14px; margin: 16px 0 6px; }
.macro-compra-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.macro-compra-quien { min-width: 0; }
.macro-compra-quien small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .4px; color: #a07a5c; font-weight: 700; }
.macro-compra-tienda { display: block; font-size: 15px; font-weight: 700; color: #333; line-height: 1.3; margin-top: 1px; }
.macro-compra-stock { display: block; font-size: 12px; color: #108510; font-weight: 600; margin-top: 2px; }
.macro-compra-nota { display: block; font-size: 11px; color: #ff6600; font-weight: 700; margin-top: 1px; }
.macro-compra-precio { font-size: 26px; font-weight: 800; color: #333; line-height: 1.1; white-space: nowrap; margin-left: auto; }
.macro-compra-precio .woocommerce-Price-amount { color: #333; }

.macro-compra-form { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.macro-qty { display: flex; align-items: center; border: 1px solid #ddd; border-radius: 25px; background: #fff; overflow: hidden; flex-shrink: 0; }
.macro-qty button { width: 34px; height: 40px; border: none; background: transparent; color: #666; font-size: 18px; line-height: 1; cursor: pointer; padding: 0; }
.macro-qty button:hover { color: #ff6600; }
.macro-qty input { width: 44px !important; height: 40px !important; border: none !important; background: transparent !important; text-align: center !important; font-weight: 700; padding: 0 !important; margin: 0 !important; box-shadow: none !important; -moz-appearance: textfield; }
.macro-qty input::-webkit-outer-spin-button,
.macro-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.macro-compra-btn { flex-grow: 1; background: #ff6600 !important; color: #fff !important; border: none !important; border-radius: 25px !important; padding: 12px 18px !important; font-weight: 700; font-size: 15px; cursor: pointer; transition: background .25s; }
.macro-compra-btn:hover { background: #e65c00 !important; }
.macro-compra-btn[disabled] { background: #ccc !important; cursor: not-allowed; }

/* ===== Lista compacta de tiendas ===== */
.macro-tiendas-tit { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: #999; font-weight: 700; margin: 18px 0 8px; }
.macro-tiendas { display: flex; flex-direction: column; gap: 6px; margin: 0 0 6px; }
.macro-tienda { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid #eee; border-radius: 9px; background: #fff; cursor: pointer; transition: border-color .2s, background .2s; }
.macro-tienda:hover { border-color: #ffc89e; background: #fffaf6; }
.macro-tienda.is-selected { border-color: #ff6600; background: #fff6ef; }
.macro-tienda.is-off { opacity: .55; cursor: not-allowed; }
.macro-tienda.is-off:hover { border-color: #eee; background: #fff; }

.macro-tienda-radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #ccc; flex-shrink: 0; position: relative; }
.macro-tienda.is-selected .macro-tienda-radio { border-color: #ff6600; }
.macro-tienda.is-selected .macro-tienda-radio::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: #ff6600; }

.macro-tienda-info { flex-grow: 1; min-width: 0; line-height: 1.3; }
.macro-tienda-nom { display: block; font-size: 13.5px; font-weight: 700; color: #333; }
.macro-tienda-sub { display: block; font-size: 11px; color: #888; margin-top: 1px; }
.macro-tienda-sub .ok { color: #108510; font-weight: 600; }
.macro-tienda-sub .no { color: #d0021b; font-weight: 600; }
.macro-tienda-sub .env { color: #ff6600; font-weight: 600; }
.macro-tienda-precio { font-size: 14px; font-weight: 800; color: #333; white-space: nowrap; flex-shrink: 0; }

/* ===== Botón WhatsApp ===== */
.btn-pvt-wa {
	display: flex; align-items: center; justify-content: center;
	background: #33363b !important; color: #fff !important;
	padding: 12px; border-radius: 8px; text-decoration: none !important;
	font-weight: 600; margin-top: 15px; font-size: 15px;
}
.wa-icon-svg { margin-right: 10px; fill: #fff; width: 22px !important; height: 22px !important; flex-shrink: 0; }

/* ===== Bloque de cuotas ===== */
.macro-cuotas { margin: 15px 0 5px; }
.btn-macro-cuotas {
	display: flex; align-items: center; gap: 10px; width: 100%;
	background: #fff6ef; border: 1px solid #ffcda6; color: #d14e00;
	padding: 12px 14px; border-radius: 10px; cursor: pointer;
	font-weight: 700; font-size: 14px; text-align: left; line-height: 1.3;
	transition: background .25s, border-color .25s;
}
.btn-macro-cuotas:hover { background: #ffeede; border-color: #ff9d52; }
.btn-macro-cuotas .macro-card-ico { width: 20px; height: 20px; fill: #ff6600; flex-shrink: 0; }
.btn-macro-cuotas .macro-cuotas-label { flex-grow: 1; }
.btn-macro-cuotas .macro-cuotas-hint { display: block; font-weight: 500; font-size: 11.5px; color: #8a5a3b; margin-top: 2px; }
.macro-cuotas-caret { width: 14px; height: 14px; fill: #d14e00; flex-shrink: 0; transition: transform .25s ease; }
.btn-macro-cuotas[aria-expanded="true"] .macro-cuotas-caret { transform: rotate(180deg); }

.macro-cuotas-panel { display: none; margin-top: 10px; border: 1px solid #eee; border-radius: 10px; overflow: hidden; background: #fff; }
.macro-cuotas-panel.is-open { display: block; }
.macro-cuotas-ctx { padding: 9px 12px; background: #fff8f2; border-bottom: 1px solid #ffe3cc; font-size: 12px; color: #8a5a3b; }
.macro-cuotas-ctx strong { color: #d14e00; }
.macro-cuotas-tabla { width: 100%; border-collapse: collapse; font-size: 13px; margin: 0; }
.macro-cuotas-tabla th { background: #f7f7f7; color: #555; font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; padding: 9px 12px; text-align: left; font-weight: 700; }
.macro-cuotas-tabla th:nth-child(2), .macro-cuotas-tabla td:nth-child(2),
.macro-cuotas-tabla th:nth-child(3), .macro-cuotas-tabla td:nth-child(3) { text-align: right; }
.macro-cuotas-tabla td { padding: 10px 12px; border-top: 1px solid #f0f0f0; vertical-align: middle; }
.macro-cuotas-tabla tr.is-empresarial td { background: #fcfcfc; }
.macro-cuotas-plazo { font-weight: 700; color: #333; }
.macro-cuotas-cuota { font-weight: 800; color: #ff6600; font-size: 14px; white-space: nowrap; }
.macro-cuotas-cuota .woocommerce-Price-amount { color: #ff6600; }
.macro-cuotas-total { color: #666; white-space: nowrap; }
.macro-badge-emp, .macro-badge-sin, .macro-badge-rec { display: inline-block; font-size: 9.5px; font-weight: 700; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; letter-spacing: .3px; white-space: nowrap; }
.macro-badge-emp { background: #eef3ff; color: #2f5bd4; }
.macro-badge-sin { background: #eaf7ea; color: #108510; }
.macro-badge-rec { background: #fff0e6; color: #d14e00; }
.macro-cuotas-tabla tr.is-uno td { background: #fcfaf8; border-top: none; }
.macro-cuotas-tabla tr.is-uno + tr td { border-top: 2px solid #efefef; }
.macro-cuotas-nota { padding: 10px 12px; background: #fafafa; border-top: 1px solid #f0f0f0; font-size: 11px; color: #777; line-height: 1.5; }
.macro-cuotas-nota strong { color: #555; }

/* ===== Sellos de confianza ===== */
.macro-sellos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0 8px; }
.macro-sello { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 9px; padding: 16px 10px; border: 1px solid #eee; border-radius: 10px; background: #fff; }
.macro-sello svg { width: 26px; height: 26px; fill: #ff6600; flex-shrink: 0; }
.macro-sello .macro-sello-txt { display: flex; flex-direction: column; gap: 4px; }
.macro-sello strong { display: block; font-size: 12px; color: #333; line-height: 1.3; font-weight: 700; }
.macro-sello span { display: block; font-size: 10.5px; color: #888; line-height: 1.35; }

@media screen and (max-width: 600px) {
	.macro-compra-precio { font-size: 23px; }
	.macro-compra-form { flex-wrap: wrap; }
	.macro-compra-btn { min-width: 150px; }
	.macro-tienda { padding: 10px; }
	.macro-cuotas-tabla { font-size: 12px; }
	.macro-cuotas-tabla th, .macro-cuotas-tabla td { padding: 8px 9px; }
	.macro-sellos { grid-template-columns: 1fr; gap: 8px; }
	.macro-sello { flex-direction: row; text-align: left; align-items: center; gap: 12px; padding: 12px 14px; }
}
