/* ===== Botones ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border: 2px solid var(--color-text);
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 700;
  font-size: var(--text-sm);
  line-height: 1;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}

.btn:hover { color: var(--color-surface); background: var(--color-text); }

.btn-primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-strong); border-color: var(--color-primary-strong); color: #fff; }

.btn-accent { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-text); }
.btn-accent:hover { background: var(--color-accent-strong); border-color: var(--color-accent-strong); color: #fff; }

.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--color-bg); color: var(--color-text); border-color: var(--color-border); }

.btn-danger { border-color: var(--color-danger); color: var(--color-danger); }
.btn-danger:hover { background: var(--color-danger); color: #fff; }

.btn-block { width: 100%; }
.btn-sm { padding: var(--space-2) var(--space-3); font-size: var(--text-xs); }
.btn-lg { padding: var(--space-4) var(--space-6); font-size: var(--text-base); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: var(--text-sm);
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 2px;
  transition: gap var(--duration) var(--ease);
}

.link-arrow:hover { gap: var(--space-3); color: var(--color-primary); }

.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* ===== Formularios ===== */
.field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.field label { font-size: var(--text-sm); font-weight: 700; }
.field .hint { font-size: var(--text-xs); color: var(--color-text-muted); }
.field .error { font-size: var(--text-xs); font-weight: 600; color: var(--color-danger); }

input, select, textarea {
  width: 100%;
  padding: var(--space-3);
  border: var(--line);
  background: var(--color-surface);
  transition: border-color var(--duration-fast) var(--ease);
}

input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-primary); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--color-danger); }
textarea { resize: vertical; min-height: 120px; }

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 8px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: var(--line);
  background: var(--color-surface);
}

.badge-accent { background: var(--color-accent-soft); border-color: var(--color-accent); color: var(--color-accent-strong); }
.badge-muted { background: var(--color-bg); color: var(--color-text-muted); }
.badge-danger { background: #fdecee; border-color: var(--color-danger); color: var(--color-danger); }

/* ===== Tarjetas de categoría ===== */
.category-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  border: var(--line);
  background: var(--color-surface);
  min-height: 170px;
  transition: border-color var(--duration-fast) var(--ease), background var(--duration-fast) var(--ease);
}

.category-card:hover { border-color: var(--color-primary); background: var(--color-primary-soft); color: var(--color-text); }

.category-card__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: var(--line);
  color: var(--color-primary);
  background: var(--color-surface);
}

.category-card__icon svg { width: 22px; height: 22px; }
.category-card__count { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-muted); }
.category-card h3 { font-size: var(--text-lg); margin: 0; line-height: 1.25; }
.category-card__arrow { margin-top: auto; color: var(--color-primary); font-weight: 800; }

/* ===== Tarjetas de producto ===== */
.product-card {
  display: flex;
  flex-direction: column;
  border: var(--line);
  background: var(--color-surface);
  transition: border-color var(--duration-fast) var(--ease);
  height: 100%;
}

.product-card:hover { border-color: var(--color-text); }

.product-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--color-bg);
  border-bottom: var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--duration) var(--ease); }
[data-motion="bold"] .product-card:hover .product-card__media img { transform: scale(1.05); }

.product-card__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--space-4);
}

.product-card__placeholder svg { width: 42px; height: 42px; opacity: 0.6; }
.product-card__placeholder span { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.12em; }

.product-card__badges { position: absolute; top: var(--space-3); left: var(--space-3); display: flex; gap: var(--space-2); }

.product-card__body { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); flex: 1; }
.product-card__brand { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--color-text-muted); }
.product-card__title { font-size: var(--text-base); font-weight: 700; margin: 0; line-height: 1.3; }
.product-card__title a:hover { color: var(--color-primary); }

.product-card__foot {
  margin-top: auto;
  padding-top: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.price { font-size: var(--text-lg); font-weight: 800; letter-spacing: -0.02em; }
.price-quote { font-size: var(--text-sm); font-weight: 700; color: var(--color-primary); }

/* ===== Marcas ===== */
.brand-chip {
  display: grid;
  place-items: center;
  min-height: 76px;
  padding: var(--space-4);
  border: var(--line);
  background: var(--color-surface);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  text-align: center;
  transition: color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}

.brand-chip:hover { color: var(--color-text); border-color: var(--color-text); }

/* ===== Toolbar / filtros ===== */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-4);
  border: var(--line);
  background: var(--color-surface);
  margin-bottom: var(--space-5);
}

.toolbar .field { margin: 0; flex: 1 1 200px; }
.toolbar .search-field { flex: 2 1 260px; }

.filter-pills { display: flex; flex-wrap: wrap; gap: var(--space-2); width: 100%; }

.pill {
  padding: var(--space-2) var(--space-3);
  border: var(--line);
  background: var(--color-surface);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: background var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}

.pill:hover { border-color: var(--color-text); }
.pill[aria-pressed="true"] { background: var(--color-text); border-color: var(--color-text); color: var(--color-bg); }

/* ===== Breadcrumb ===== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding-block: var(--space-5) var(--space-4);
}

.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb span[aria-hidden] { color: var(--color-border); }

/* ===== Galería de producto ===== */
.gallery { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 640px) { .gallery { grid-template-columns: 84px 1fr; } .gallery-thumbs { display: flex; flex-direction: column; gap: var(--space-3); } }

.gallery-main { aspect-ratio: 4 / 3; border: var(--line); background: var(--color-bg); display: grid; place-items: center; overflow: hidden; }
.gallery-thumbs { display: flex; gap: var(--space-3); }
.gallery-thumb { width: 84px; aspect-ratio: 1; border: var(--line); background: var(--color-bg); padding: 0; overflow: hidden; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb[aria-pressed="true"] { border-color: var(--color-primary); }

.specs { border-top: var(--line); margin: 0; }
.specs div { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: var(--line); font-size: var(--text-sm); }
.specs dt { font-weight: 700; color: var(--color-text-muted); }
.specs dd { margin: 0; }

/* ===== Paneles de datos / tablas ===== */
.data-panel { border: var(--line); background: var(--color-surface); display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
.data-panel__scroll { overflow: auto; min-width: 0; }

.data-table { width: 100%; font-size: var(--text-sm); white-space: nowrap; }
.data-table thead th { position: sticky; top: 0; z-index: 2; background: var(--color-bg); text-align: left; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; padding: var(--space-3); border-bottom: var(--line); }
.data-table td { padding: var(--space-3); border-bottom: var(--line); vertical-align: middle; }
.data-table tbody tr:hover { background: var(--color-bg); }
.data-table td:first-child, .data-table th:first-child { position: sticky; left: 0; z-index: 1; background: var(--color-surface); }
.data-table thead th:first-child { z-index: 3; background: var(--color-bg); }
.th-right, .data-table td.th-right { text-align: right; }

/* ===== Carrito ===== */
.cart-layout { display: grid; gap: var(--space-6); }
@media (min-width: 960px) { .cart-layout { grid-template-columns: 1.6fr 1fr; align-items: start; } }

.summary { border: var(--line); background: var(--color-surface); padding: var(--space-5); }
@media (min-width: 960px) { .summary { position: sticky; top: calc(var(--header-height) + var(--space-4)); } }

.summary-row { display: flex; justify-content: space-between; gap: var(--space-3); padding-block: var(--space-3); border-bottom: var(--line); font-size: var(--text-sm); }
.summary-row:last-of-type { border-bottom: 0; }
.summary-total { font-size: var(--text-lg); font-weight: 800; }
.summary-total span:last-child { color: var(--color-primary); }

.qty { display: inline-flex; border: var(--line); }
.qty button { width: 36px; height: 36px; font-size: var(--text-lg); line-height: 1; transition: background var(--duration-fast) var(--ease); }
.qty button:hover { background: var(--color-bg); }
.qty input { width: 52px; border: 0; border-inline: var(--line); text-align: center; padding: 0; }

/* ===== Pasos / progreso ===== */
.steps { display: flex; flex-wrap: wrap; gap: var(--space-5); margin-bottom: var(--space-6); counter-reset: step; }
.step { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 700; color: var(--color-text-muted); }
.step::before { counter-increment: step; content: counter(step); width: 26px; height: 26px; display: grid; place-items: center; border: var(--line); background: var(--color-surface); color: var(--color-text); font-size: var(--text-xs); }
.step.is-active { color: var(--color-text); }
.step.is-active::before { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ===== Estados / avisos ===== */
.empty-state { text-align: center; padding: var(--space-9) var(--space-5); border: var(--line); background: var(--color-surface); }
.empty-state h3 { margin-bottom: var(--space-3); }
.empty-state p { color: var(--color-text-muted); margin-bottom: var(--space-5); }

.notice { display: flex; gap: var(--space-3); padding: var(--space-4); border-left: 3px solid var(--color-primary); background: var(--color-primary-soft); font-size: var(--text-sm); margin-bottom: var(--space-5); }
.notice-accent { border-color: var(--color-accent); background: var(--color-accent-soft); }
.notice-danger { border-color: var(--color-danger); background: #fdecee; }

.product-meta { font-size: var(--text-sm); color: var(--color-text-muted); }
.hint-muted { font-size: var(--text-sm); color: var(--color-text-muted); }

/* ===== Loader ===== */
.page-loader { position: fixed; inset: 0; z-index: var(--z-loader); background: var(--color-surface); display: grid; place-items: center; transition: opacity var(--duration) var(--ease), visibility var(--duration); }
.page-loader[hidden] { display: none; }
.page-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-mark { display: flex; flex-direction: column; align-items: center; gap: var(--space-5); }
.loader-line { width: min(220px, 60vw); height: 3px; background: var(--color-border); overflow: hidden; }
.loader-line::before { content: ""; display: block; width: 40%; height: 100%; background: var(--color-primary); animation: loader-slide 1.1s var(--ease) infinite; }
@keyframes loader-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }
.loader-text { font-size: var(--text-xs); letter-spacing: 0.24em; text-transform: uppercase; color: var(--color-text-muted); }
.top-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--color-accent); z-index: 950; transition: width var(--duration-fast) var(--ease); }

/* ===== Modal ===== */
.modal-overlay { position: fixed; inset: 0; z-index: var(--z-modal); background: rgba(11, 15, 25, 0.62); display: flex; align-items: center; justify-content: center; padding: var(--space-4); animation: fade-in var(--duration) var(--ease); }
.modal { width: 100%; max-width: 520px; max-height: min(88dvh, 720px); display: flex; flex-direction: column; background: var(--color-surface); border: 2px solid var(--color-text); animation: modal-in var(--duration) var(--ease); }
.modal-lg { max-width: 720px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); padding: var(--space-5); border-bottom: var(--line); }
.modal-header h2 { font-size: var(--text-lg); margin: 0; }
.modal-close { width: 34px; height: 34px; display: grid; place-items: center; border: var(--line); font-size: var(--text-lg); line-height: 1; }
.modal-close:hover { background: var(--color-text); color: #fff; }
.modal-body { padding: var(--space-5); overflow-y: auto; }
.modal-footer { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: flex-end; padding: var(--space-5); border-top: var(--line); }

/* ===== Toast ===== */
.toast-stack { position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: calc(var(--z-modal) + 1); display: flex; flex-direction: column; gap: var(--space-3); width: min(360px, calc(100vw - var(--space-8))); }
.toast { border: 2px solid var(--color-text); background: var(--color-surface); padding: var(--space-4); display: flex; gap: var(--space-3); align-items: flex-start; }
.toast strong { display: block; font-size: var(--text-sm); }
.toast p { margin: 0; font-size: var(--text-xs); color: var(--color-text-muted); }
.toast::before { content: ""; width: 3px; align-self: stretch; background: var(--color-accent); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.confirm-box { display: flex; flex-direction: column; gap: var(--space-4); align-items: flex-start; }
.confirm-folio { font-family: var(--font-mono); font-size: var(--text-xl); font-weight: 700; letter-spacing: 0.04em; padding: var(--space-4); border: 2px dashed var(--color-primary); background: var(--color-primary-soft); width: 100%; text-align: center; }

/* ===== Split layout ===== */
.split { display: grid; gap: var(--space-6); min-width: 0; }
.split > *, .cart-layout > * { min-width: 0; }
@media (min-width: 900px) { .split { grid-template-columns: 1.4fr 1fr; align-items: start; } .split-even { grid-template-columns: 1fr 1fr; } }
/* ===== Stepper en tarjetas de producto ===== */
.card-stepper {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--color-text);
  background: var(--color-surface);
}
.card-stepper button {
  width: 34px;
  height: 32px;
  font-size: 1.1rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background var(--duration-fast) var(--ease);
}
.card-stepper button:hover { background: var(--color-bg); }
.card-stepper button:disabled { opacity: 0.3; cursor: not-allowed; }
.card-stepper__value { min-width: 34px; text-align: center; font-weight: 800; }
.card-stepper.is-disabled { border-color: var(--color-border); }
.card-stepper__out { padding: 0 12px; font-weight: 700; color: var(--color-danger); font-size: var(--text-xs); text-transform: uppercase; }

/* ===== Carrito: filas con espaciado ===== */
.cart-items { display: flex; flex-direction: column; border: var(--line); background: var(--color-surface); }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: var(--space-4); align-items: center; padding: var(--space-4); border-bottom: var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item__media { width: 64px; height: 64px; display: grid; place-items: center; border: var(--line); background: var(--color-bg); color: var(--color-text-muted); }
.cart-item__info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cart-item__name { font-weight: 700; }
.cart-item__name:hover { color: var(--color-primary); }
.cart-item__meta { font-size: var(--text-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.cart-item__unit { font-size: var(--text-sm); color: var(--color-text-muted); }
.cart-item__actions { display: flex; align-items: center; gap: var(--space-4); }
.cart-item__total { font-weight: 800; min-width: 100px; text-align: right; }
.cart-item__remove { font-size: var(--text-xs); font-weight: 700; color: var(--color-danger); border: 0; background: none; cursor: pointer; padding: 4px; }
.cart-item__remove:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .cart-item { grid-template-columns: 56px 1fr; grid-template-areas: "media info" "actions actions"; }
  .cart-item__media { grid-area: media; width: 56px; height: 56px; }
  .cart-item__info { grid-area: info; }
  .cart-item__actions { grid-area: actions; justify-content: space-between; flex-wrap: wrap; }
}

/* ===== Floating labels ===== */
.floating { position: relative; margin-bottom: 20px; }
.floating > label {
  position: absolute;
  left: 12px;
  top: 14px;
  padding: 0 5px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 14px;
  pointer-events: none;
  transition: top 150ms var(--ease), font-size 150ms var(--ease), color 150ms var(--ease);
}
.floating input,
.floating select,
.floating textarea { padding: 20px 12px 8px; }
.floating textarea { min-height: 96px; }
.floating input:focus,
.floating select:focus,
.floating textarea:focus { outline: none; border-color: var(--color-primary); }
.floating input:focus ~ label,
.floating textarea:focus ~ label,
.floating input:not(:placeholder-shown) ~ label,
.floating textarea:not(:placeholder-shown) ~ label,
.floating select:focus ~ label,
.floating select.is-filled ~ label {
  top: -9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-primary-strong);
}
.floating .error { display: block; min-height: 14px; font-size: var(--text-xs); color: var(--color-danger); }

/* ===== Pedido (order) ===== */
.order-layout { display: grid; gap: var(--space-7); }
@media (min-width: 960px) {
  .order-layout { grid-template-columns: 1.5fr 1fr; align-items: start; }
  .order-layout > .summary { position: sticky; top: calc(var(--header-height) + var(--space-4)); }
}
.order-form-wrap { border: var(--line); background: var(--color-surface); padding: var(--space-5); }

.summary-list { display: flex; flex-direction: column; margin-bottom: var(--space-4); }
.summary-item { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-3); align-items: baseline; padding: var(--space-3) 0; border-bottom: var(--line); font-size: var(--text-sm); }
.summary-item:last-child { border-bottom: 0; }
.summary-item__qty { font-weight: 800; color: var(--color-primary); }
.summary-item__name { min-width: 0; }
.summary-item__price { font-weight: 700; white-space: nowrap; }

/* Evitar desborde de tarjetas en móvil */
.product-grid > * { min-width: 0; }
.product-card { min-width: 0; }
.product-card__foot { flex-wrap: wrap; }
.product-card__title a { overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .card-stepper button { width: 30px; height: 30px; }
  .card-stepper__value { min-width: 28px; }
  .product-card__body { padding: var(--space-3); }
}

/* ===== Pie de tarjeta: precio a la izquierda, stepper a la derecha ===== */
.product-card__foot {
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}
.product-card__foot .price,
.product-card__foot .price-quote { min-width: 0; }
.price-quote { font-size: var(--text-xs); white-space: nowrap; }

.card-stepper { flex: none; }
.card-stepper button { width: 30px; height: 30px; font-size: 1rem; }
.card-stepper__value { min-width: 28px; font-size: var(--text-sm); }

@media (max-width: 480px) {
  .product-card__foot { gap: 6px; }
  .price { font-size: var(--text-sm); }
  .price-quote { font-size: 0.66rem; }
}

/* ===== Pie de tarjeta: 2 filas (precio arriba-izq, stepper abajo-der) ===== */
.product-card__foot {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.product-card__foot .price,
.product-card__foot .price-quote { align-self: flex-start; }

.card-stepper {
  align-self: flex-end;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}
.card-stepper button {
  color: var(--color-text-muted);
  background: transparent;
  font-weight: 600;
}
.card-stepper button:hover { background: var(--color-bg); color: var(--color-text); }
.card-stepper__value { color: var(--color-text); font-weight: 700; }

/* ===== Ficha de producto ===== */
.product-detail__grid { display: grid; gap: var(--space-7); }
@media (min-width: 900px) { .product-detail__grid { grid-template-columns: 1.1fr 1fr; align-items: start; } }

.gallery { display: flex; flex-direction: column; gap: var(--space-3); grid-template-columns: none; }
.gallery-main { aspect-ratio: 4 / 3; border: var(--line); background: var(--color-bg); display: grid; place-items: center; overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-placeholder { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); color: var(--color-text-muted); }
.gallery-placeholder svg { width: 64px; height: 64px; opacity: 0.5; }
.gallery-placeholder span { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.12em; }
.gallery-thumbs { display: flex; gap: var(--space-3); }

.buy-box { border: var(--line); background: var(--color-surface); padding: var(--space-5); }
.buy-box__title { font-size: var(--text-2xl); margin-bottom: var(--space-3); }
.buy-box__badges { display: flex; gap: var(--space-2); margin-bottom: var(--space-4); }
.buy-box__meta { margin: 0 0 var(--space-5); border-top: var(--line); }
.buy-box__meta > div { display: grid; grid-template-columns: 130px 1fr; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: var(--line); font-size: var(--text-sm); }
.buy-box__meta dt { color: var(--color-text-muted); font-weight: 600; }
.buy-box__meta dd { margin: 0; }
.buy-box__price { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0 var(--space-4); }
.buy-box__price-label { font-size: var(--text-sm); font-weight: 700; color: var(--color-text-muted); }
.buy-box__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; margin-bottom: var(--space-3); }
.buy-box__actions .btn { flex: 1 1 180px; }
.buy-box__pdf { width: 100%; margin-bottom: var(--space-3); }
.buy-box__note { font-size: var(--text-xs); color: var(--color-text-muted); margin: 0; }

.product-section { margin-top: var(--space-7); padding-top: var(--space-7); border-top: var(--line); }
.product-section h2 { font-size: var(--text-2xl); margin-bottom: var(--space-4); }
[data-description] p { margin-bottom: var(--space-3); }
[data-specs] .specs { max-width: 760px; }

.order-title { font-size: var(--text-2xl); margin-bottom: var(--space-5); }

/* ===== Chat del sitio ===== */
.chat-widget { position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 800; }
@media (max-width: 900px) { .chat-widget { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); } }

.chat-launcher {
  position: relative;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 2px solid var(--color-text);
  background: var(--color-primary);
  color: #fff;
}
.chat-launcher svg { width: 26px; height: 26px; }
.chat-launcher__dot { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; background: var(--color-danger); border: 2px solid var(--color-surface); }

.chat-panel {
  position: absolute;
  bottom: 0;
  right: 0;
  width: min(360px, calc(100vw - 32px));
  height: min(72vh, 520px);
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 2px solid var(--color-text);
}
.chat-panel__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-bottom: var(--line); }
.chat-panel__head strong { display: block; font-size: var(--text-sm); }
.chat-panel__head small { color: var(--color-text-muted); font-size: var(--text-xs); }
.chat-close { width: 30px; height: 30px; border: var(--line); background: none; font-size: 18px; line-height: 1; }
.chat-panel__body { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: var(--space-3); padding: var(--space-3); }
.chat-messages { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.chat-empty { color: var(--color-text-muted); font-size: var(--text-sm); }
.chat-msg { max-width: 85%; padding: 8px 12px; font-size: var(--text-sm); border: var(--line); }
.chat-msg--visitor { align-self: flex-end; background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.chat-msg--admin { align-self: flex-start; background: var(--color-bg); }
.chat-msg__time { display: block; font-size: 10px; opacity: 0.7; margin-top: 2px; }
.chat-form { display: flex; gap: var(--space-2); }
.chat-form input { flex: 1; }

/* ===== Página de contacto ===== */
.contact-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .contact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.contact-card {
  border: var(--line);
  background: var(--color-surface);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}
.contact-card__icon { width: 38px; height: 38px; display: grid; place-items: center; border: var(--line); color: var(--color-primary); margin-bottom: var(--space-2); }
.contact-card__icon svg { width: 20px; height: 20px; }
.contact-card__label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-muted); }
.contact-card__value { font-size: var(--text-base); font-weight: 600; overflow-wrap: anywhere; }
a.contact-card__value:hover { color: var(--color-primary); }
.contact-social { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }

.chat-panel[hidden],
.chat-launcher[hidden] { display: none; }

.chat-head-actions { display: flex; align-items: center; gap: 6px; }
.chat-clear { border: var(--line); background: none; padding: 4px 8px; font-size: 11px; font-weight: 700; cursor: pointer; }
.chat-clear:hover { background: var(--color-bg); }

/* Chat: overlay de enfoque + sin scroll + launcher sin borde negro */
body.chat-open { overflow: hidden; }
.chat-overlay { position: fixed; inset: 0; background: rgba(11, 15, 25, 0.5); z-index: 799; }
.chat-overlay[hidden] { display: none; }
.chat-launcher { border: 0; }
.chat-panel { z-index: 801; }

/* Modales del sitio más compactos */
.modal { max-width: 460px; }
.modal-lg { max-width: 640px; }
