/* ============================================================
   WooBot Vendedor — Estilos del Widget
   Diseño: Minimalista · Claro · Flotante
   ============================================================ */

:root {
  --wb-accent:     #25D366;
  --wb-accent-dk:  #128C7E;
  --wb-bg:         #ffffff;
  --wb-surface:    #f4f6f8;
  --wb-surface2:   #eef0f3;
  --wb-border:     rgba(0,0,0,.08);
  --wb-text:       #1a1a1a;
  --wb-muted:      #8a929e;
  --wb-radius:     20px;
  --wb-shadow:     0 20px 60px rgba(0,0,0,.14);
  --wb-font:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --wb-w:          370px;
  --wb-h:          510px;
}

/* ─── Reset base ──────────────────────────────────────────── */
#woobot-root * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--wb-font);
  -webkit-font-smoothing: antialiased;
}

/* ─── Botón flotante ─────────────────────────────────────── */
#woobot-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99998;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

#woobot-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wb-accent), var(--wb-accent-dk));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(37,211,102,.45);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease;
  position: relative;
  animation: wb-float 3s ease-in-out infinite;
}

#woobot-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 32px rgba(37,211,102,.6);
}

#woobot-btn svg {
  width: 30px;
  height: 30px;
  fill: #fff;
  transition: transform .3s ease;
}

#woobot-btn.wb-open svg {
  transform: rotate(90deg) scale(.85);
}

/* Anillo pulsante */
#woobot-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--wb-accent);
  opacity: 0;
  animation: wb-pulse 2.5s ease-out infinite;
}

@keyframes wb-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

@keyframes wb-pulse {
  0%   { opacity: .7; transform: scale(1); }
  100% { opacity: 0;  transform: scale(1.55); }
}

/* ─── Popup tooltip — lateral izquierdo al botón, con latido ─ */
#woobot-tooltip {
  background: #fff;
  color: #111;
  font-size: 13px;
  font-weight: 700;
  padding: 11px 18px 11px 14px;
  border-radius: 30px;
  box-shadow: 0 4px 24px rgba(0,0,0,.15);
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: wb-tooltip-in .4s cubic-bezier(.34,1.56,.64,1) both,
             wb-heartbeat 2.4s ease-in-out 1s infinite;
  border-left: 3px solid var(--wb-accent);
  position: relative;
}

/* Flecha apuntando al botón (derecha) */
#woobot-tooltip::after {
  content: '';
  position: absolute;
  right: -7px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 7px solid #fff;
}

/* Punto verde pulsante */
.wb-tip-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wb-accent);
  flex-shrink: 0;
  animation: wb-blink 1.5s ease-in-out infinite;
}

.wb-tip-text {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
}

/* Animación de latido sutil */
@keyframes wb-heartbeat {
  0%, 100% { transform: scale(1);    box-shadow: 0 4px 24px rgba(0,0,0,.15); }
  14%       { transform: scale(1.04); box-shadow: 0 6px 28px rgba(37,211,102,.25); }
  28%       { transform: scale(1);    box-shadow: 0 4px 24px rgba(0,0,0,.15); }
  42%       { transform: scale(1.03); box-shadow: 0 6px 28px rgba(37,211,102,.2); }
  56%       { transform: scale(1);    box-shadow: 0 4px 24px rgba(0,0,0,.15); }
}

#woobot-tooltip.wb-hide {
  animation: wb-tooltip-out .25s ease forwards;
}

@keyframes wb-tooltip-in {
  from { opacity: 0; transform: translateY(8px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wb-tooltip-out {
  to { opacity: 0; transform: translateY(6px) scale(.95); }
}

/* ─── Ventana del chat ───────────────────────────────────── */
#woobot-window {
  position: fixed;
  bottom: 104px;
  right: 28px;
  width: var(--wb-w);
  height: var(--wb-h);
  background: var(--wb-bg);
  border-radius: var(--wb-radius);
  box-shadow: var(--wb-shadow);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.1);
  transform-origin: bottom right;
  animation: wb-open-window .35s cubic-bezier(.34,1.56,.64,1) both;
}

#woobot-window.wb-closing {
  animation: wb-close-window .25s ease forwards;
}

@keyframes wb-open-window {
  from { opacity: 0; transform: scale(.85) translateY(20px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

@keyframes wb-close-window {
  to { opacity: 0; transform: scale(.85) translateY(20px); }
}

/* ─── Header ─────────────────────────────────────────────── */
#woobot-header {
  background: linear-gradient(135deg, var(--wb-accent-dk), #0a5c52);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

/* Fila superior: logo + nombre + X */
.wb-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
}

.wb-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.3);
  overflow: hidden;
}

.wb-header-info { flex: 1; min-width: 0; }

.wb-header-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-header-status {
  font-size: 10px;
  color: rgba(255,255,255,.7);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.wb-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4ade80;
  animation: wb-blink 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes wb-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

.wb-close-btn {
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background .2s;
  flex-shrink: 0;
}

.wb-close-btn:hover { background: rgba(255,255,255,.25); }

/* ─── Botón reiniciar ────────────────────────────────────── */
.wb-restart-btn {
  background: rgba(255,255,255,.08);
  border: none;
  color: rgba(255,255,255,.7);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: background .2s, transform .3s, color .2s;
  flex-shrink: 0;
}

.wb-restart-btn:hover {
  background: rgba(255,255,255,.2);
  color: #fff;
  transform: rotate(-180deg);
}

/* ─── Mensajes ───────────────────────────────────────────── */
#woobot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

#woobot-messages::-webkit-scrollbar { width: 4px; }
#woobot-messages::-webkit-scrollbar-track { background: transparent; }
#woobot-messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,.12); border-radius: 4px; }

/* Burbuja bot */
.wb-msg {
  display: flex;
  gap: 8px;
  animation: wb-msg-in .3s ease both;
}

@keyframes wb-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wb-msg-bot { align-items: flex-start; }
.wb-msg-user { justify-content: flex-end; }

.wb-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15.5px;
  line-height: 1.55;
}

.wb-bubble-bot {
  background: var(--wb-surface);
  color: var(--wb-text);
  border-radius: 4px 16px 16px 16px;
  border: 1px solid rgba(0,0,0,.07);
}

.wb-bubble-user {
  background: linear-gradient(135deg, var(--wb-accent), var(--wb-accent-dk));
  color: #fff;
  border-radius: 16px 4px 16px 16px;
}

.wb-time {
  font-size: 10px;
  color: var(--wb-muted);
  margin-top: 4px;
  display: block;
}

/* Typing indicator */
.wb-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 14px;
}

.wb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c0c8d4;
  animation: wb-bounce .8s ease-in-out infinite;
}

.wb-dot:nth-child(2) { animation-delay: .15s; }
.wb-dot:nth-child(3) { animation-delay: .3s; }

@keyframes wb-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); background: var(--wb-accent); }
}

/* ─── Cards de producto ──────────────────────────────────── */
.wb-products-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.wb-product-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.09);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  gap: 0;
  cursor: pointer;
  transition: border-color .2s, transform .2s;
}

.wb-product-card:hover {
  border-color: var(--wb-accent);
  transform: translateX(2px);
}

.wb-product-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--wb-surface2);
}

.wb-product-info {
  padding: 10px 12px;
  flex: 1;
  min-width: 0;
}

.wb-product-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--wb-text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-product-desc {
  font-size: 13px;
  color: var(--wb-muted);
  margin-top: 2px;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.wb-product-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--wb-accent);
  margin-top: 4px;
}

/* Stock badge */
.wb-stock-out {
  font-size: 10px;
  color: #f87171;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ─── Detalle de producto ────────────────────────────────── */
.wb-product-detail {
  width: 100%;
}

.wb-detail-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

.wb-detail-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--wb-text);
  line-height: 1.3;
}

.wb-detail-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--wb-accent);
  margin: 4px 0;
}

.wb-detail-desc {
  font-size: 14px;
  color: var(--wb-muted);
  line-height: 1.5;
  margin-top: 6px;
}

.wb-detail-attrs {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.wb-attr-chip {
  background: var(--wb-surface2);
  border: 1px solid var(--wb-border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  color: var(--wb-muted);
}

/* Variaciones */
.wb-variations {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.wb-variation-btn {
  background: #fff;
  border: 1px solid rgba(0,0,0,.09);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color .2s;
  color: var(--wb-text);
  font-size: 12px;
  text-align: left;
}

.wb-variation-btn:hover,
.wb-variation-btn.selected {
  border-color: var(--wb-accent);
  background: rgba(37,211,102,.08);
}

.wb-variation-price { font-weight: 700; color: var(--wb-accent); font-size: 13px; }

/* ─── Quick replies / botones ────────────────────────────── */
.wb-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  padding: 0 14px 10px;
}

.wb-qr {
  background: transparent;
  border: 1.5px solid var(--wb-accent);
  color: var(--wb-accent);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s, transform .15s;
  white-space: nowrap;
}

.wb-qr:hover {
  background: var(--wb-accent);
  color: #fff;
  transform: translateY(-1px);
}

.wb-qr.primary {
  background: var(--wb-accent);
  color: #fff;
}

.wb-qr.primary:hover {
  background: var(--wb-accent-dk);
}

.wb-qr.danger {
  border-color: #f87171;
  color: #f87171;
}

.wb-qr.danger:hover {
  background: #f87171;
  color: #fff;
}

/* ─── Input area ─────────────────────────────────────────── */
#woobot-input-area {
  padding: 12px 14px;
  border-top: 1px solid rgba(0,0,0,.08);
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
  background: #fff;
}

#woobot-input {
  flex: 1;
  background: var(--wb-surface);
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 20px;
  padding: 10px 16px;
  color: var(--wb-text);
  font-size: 15.5px;
  outline: none;
  resize: none;
  min-height: 40px;
  max-height: 100px;
  transition: border-color .2s;
  line-height: 1.4;
  font-family: var(--wb-font);
}

#woobot-input::placeholder { color: #c8cfd8; }

/* Placeholders de los campos del checkout — bien claros */
.wb-field input::placeholder,
.wb-field select::placeholder,
.wb-field textarea::placeholder { color: #c8cfd8; opacity: 1; }
#woobot-input:focus { border-color: var(--wb-accent); }

#woobot-send {
  height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--wb-accent), var(--wb-accent-dk));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform .2s, box-shadow .2s, opacity .2s;
  flex-shrink: 0;
  white-space: nowrap;
}

#woobot-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37,211,102,.4);
}

#woobot-send:active { transform: scale(.96); }

#woobot-send svg {
  width: 16px;
  height: 16px;
  fill: #fff;
  flex-shrink: 0;
}

.wb-send-label {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
}

/* ─── Botón asesor — icono WhatsApp con sonda + label ───── */
#woobot-advisor-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  border-radius: 20px;
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}

#woobot-advisor-btn:hover {
  background: rgba(255,255,255,.1);
}

/* Icono WhatsApp con sonda */
.wb-advisor-icon {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wb-advisor-icon svg {
  width: 18px;
  height: 18px;
  fill: rgba(255,255,255,.75);
  transition: fill .2s;
  position: relative;
  z-index: 1;
}

#woobot-advisor-btn:hover .wb-advisor-icon svg {
  fill: #fff;
}

/* Anillo de sonda */
.wb-advisor-icon::before,
.wb-advisor-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.45);
  animation: wb-sonar 2s ease-out infinite;
}

.wb-advisor-icon::after {
  animation-delay: 1s;
}

@keyframes wb-sonar {
  0%   { transform: scale(.7);  opacity: .8; }
  100% { transform: scale(1.9); opacity: 0;  }
}

/* Label de texto */
.wb-advisor-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  white-space: nowrap;
  letter-spacing: .01em;
  transition: color .2s;
  line-height: 1;
}

#woobot-advisor-btn:hover .wb-advisor-label {
  color: #fff;
}

/* ─── Paginación de productos ────────────────────────────── */
.wb-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.wb-page-btn {
  background: var(--wb-surface2);
  border: 1px solid var(--wb-border);
  color: var(--wb-muted);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}

.wb-page-btn:hover { border-color: var(--wb-accent); color: var(--wb-accent); }

/* ─── Checkout form ──────────────────────────────────────── */
.wb-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

.wb-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wb-field label {
  font-size: 11px;
  color: var(--wb-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.wb-field input,
.wb-field select {
  background: #fff;
  border: 1.5px solid rgba(0,0,0,.1);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--wb-text);
  caret-color: var(--wb-accent);
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
  font-family: var(--wb-font);
}

.wb-field input:focus,
.wb-field select:focus { border-color: var(--wb-accent); }

.wb-field select { cursor: pointer; }

.wb-field select option { background: #fff; color: var(--wb-text); }

/* ─── Shipping & Gateway options ─────────────────────────── */
.wb-option-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  margin-top: 4px;
}

.wb-option {
  background: #fff;
  border: 1.5px solid rgba(0,0,0,.09);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color .2s, background .2s;
  gap: 8px;
}

.wb-option:hover, .wb-option.selected {
  border-color: var(--wb-accent);
  background: rgba(37,211,102,.06);
}

.wb-option-label { font-size: 13px; font-weight: 600; color: var(--wb-text); }
.wb-option-desc  { font-size: 11px; color: var(--wb-muted); margin-top: 2px; }
.wb-option-cost  { font-size: 13px; font-weight: 700; color: var(--wb-accent); flex-shrink: 0; }

/* ─── Resumen del pedido ─────────────────────────────────── */
.wb-order-summary {
  background: var(--wb-surface);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 12px 14px;
  width: 100%;
}

.wb-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(0,0,0,.07);
  color: var(--wb-text);
}

.wb-summary-row:last-child { border: none; }

.wb-summary-total {
  font-weight: 800;
  font-size: 14px;
  color: var(--wb-accent);
}

/* ─── Success state ──────────────────────────────────────── */
.wb-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 8px 0;
  width: 100%;
}

.wb-success-icon {
  font-size: 40px;
  animation: wb-pop .5s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes wb-pop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

.wb-success-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--wb-text);
}

.wb-success-sub {
  font-size: 12.5px;
  color: var(--wb-muted);
  line-height: 1.5;
}

/* ─── Responsive ─────────────────────────────────────────── */

/* Tablet / móvil grande: chat más alto pero sin ocupar toda la pantalla */
@media (max-width: 768px) and (min-width: 421px) {
  #woobot-window {
    --wb-h: 680px;
    width: 360px;
  }
}

/* Móvil pequeño: pantalla completa */
@media (max-width: 420px) {
  #woobot-window {
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100dvh;
    height: 100svh; /* safe area en iOS */
    border-radius: 0;
    border: none;
  }

  #woobot-fab {
    bottom: 18px;
    right: 18px;
  }
}

/* ─── Selección de variaciones por eje ──────────────────── */
.wb-variation-axes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.wb-var-axis {}

.wb-var-axis-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--wb-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.wb-var-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wb-var-opt {
  background: #fff;
  border: 1.5px solid rgba(0,0,0,.1);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--wb-text);
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .15s;
  font-family: var(--wb-font);
  line-height: 1;
}

.wb-var-opt:hover:not(:disabled) {
  border-color: var(--wb-accent);
  background: rgba(37,211,102,.07);
}

.wb-var-opt.selected {
  border-color: var(--wb-accent);
  background: rgba(37,211,102,.12);
  color: var(--wb-accent);
  font-weight: 700;
}

/* Resumen de combinación elegida */
.wb-var-summary {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--wb-surface);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  animation: wb-msg-in .25s ease both;
}

.wb-var-chosen {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--wb-text);
  gap: 8px;
}


/* ─── Selector de cantidad ───────────────────────────────── */
.wb-qty-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: 2px;
}

.wb-qty-label {
  font-size: 14px;
  color: var(--wb-text);
  font-weight: 500;
}

.wb-qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid rgba(0,0,0,.12);
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.wb-qty-btn {
  background: var(--wb-surface);
  border: none;
  width: 36px;
  height: 36px;
  font-size: 20px;
  font-weight: 300;
  color: var(--wb-accent-dk);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  line-height: 1;
}

.wb-qty-btn:hover { background: var(--wb-surface2); }
.wb-qty-btn:active { transform: scale(.92); }

.wb-qty-val {
  min-width: 40px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--wb-text);
  background: #fff;
  padding: 0 4px;
  line-height: 36px;
  border-left: 1px solid rgba(0,0,0,.08);
  border-right: 1px solid rgba(0,0,0,.08);
}

/* ─── Total en tiempo real bajo el selector de cantidad ───── */
.wb-qty-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(37,211,102,.08), rgba(18,140,126,.06));
  border: 1px solid rgba(37,211,102,.25);
  border-radius: 10px;
  animation: wb-msg-in .2s ease both;
}

.wb-qty-total-label {
  font-size: 12px;
  color: var(--wb-muted);
  font-weight: 500;
}

.wb-qty-total-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--wb-accent-dk);
}

/* ─── Resumen de confirmación cantidad ───────────────────── */
.wb-confirm-summary {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
  background: var(--wb-surface);
}

.wb-confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--wb-text);
  border-bottom: 1px solid rgba(0,0,0,.06);
  gap: 8px;
}

.wb-confirm-row:last-child { border-bottom: none; }

.wb-confirm-row span:first-child {
  color: var(--wb-muted);
  font-size: 12px;
  white-space: nowrap;
}

.wb-confirm-row span:last-child {
  text-align: right;
  font-weight: 600;
}

.wb-confirm-total {
  background: rgba(37,211,102,.07);
}

.wb-confirm-total span:last-child {
  font-size: 16px;
  font-weight: 800;
  color: var(--wb-accent-dk);
}

/* ─── Imagen con botón zoom ──────────────────────────────── */
.wb-img-wrap {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
}

.wb-img-wrap .wb-detail-img {
  border-radius: 10px;
  transition: transform .3s ease;
  display: block;
  width: 100%;
}

.wb-img-wrap:hover .wb-detail-img { transform: scale(1.02); }

.wb-zoom-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,.55);
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s;
  backdrop-filter: blur(4px);
}

.wb-zoom-btn:hover { background: rgba(0,0,0,.8); }

.wb-zoom-btn svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
}

/* ─── Thumbnails de galería ──────────────────────────────── */
.wb-gallery-thumbs {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.wb-gallery-thumbs::-webkit-scrollbar { display: none; }

.wb-thumb {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color .2s, transform .2s;
  opacity: .7;
}

.wb-thumb:hover { opacity: 1; transform: translateY(-2px); }
.wb-thumb.active { border-color: var(--wb-accent); opacity: 1; }

/* ─── Lightbox fullscreen ────────────────────────────────── */
#wb-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  align-items: center;
  justify-content: center;
}

#wb-lightbox.open { display: flex; }

.wb-lb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
}

.wb-lb-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 24px;
}

.wb-lb-img {
  max-width: min(90vw, 600px);
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 32px 80px rgba(0,0,0,.6);
  transition: opacity .15s ease;
  user-select: none;
}

.wb-lb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  backdrop-filter: blur(4px);
}

.wb-lb-close:hover { background: rgba(255,255,255,.3); }

.wb-lb-prev,
.wb-lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  backdrop-filter: blur(4px);
  line-height: 1;
}

.wb-lb-prev { left: 12px; }
.wb-lb-next { right: 12px; }
.wb-lb-prev:hover,
.wb-lb-next:hover { background: rgba(255,255,255,.28); }

.wb-lb-counter {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.7);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .05em;
}

.wb-lb-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.wb-lb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.wb-lb-dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* Mobile: swipe hint */
@media (max-width: 480px) {
  .wb-lb-prev { left: 6px; }
  .wb-lb-next { right: 6px; }
  .wb-lb-img  { border-radius: 8px; }
}

/* ─── Categorías — chips (≤8) ────────────────────────────── */
.wb-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.wb-cat-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1.5px solid rgba(0,0,0,.1);
  border-radius: 20px;
  padding: 6px 12px 6px 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--wb-text);
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .15s;
  font-family: var(--wb-font);
}

.wb-cat-chip:hover {
  border-color: var(--wb-accent);
  background: rgba(37,211,102,.06);
  transform: translateY(-1px);
}

.wb-cat-chip-img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.wb-cat-count {
  font-size: 10px;
  color: var(--wb-muted);
  background: var(--wb-surface2);
  border-radius: 10px;
  padding: 1px 6px;
  margin-left: 2px;
}

/* ─── Categorías — lista compacta (>8) ──────────────────── */
.wb-cat-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.12) transparent;
}

.wb-cat-list::-webkit-scrollbar { width: 3px; }
.wb-cat-list::-webkit-scrollbar-thumb { background: rgba(0,0,0,.12); border-radius: 4px; }

.wb-cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color .18s, background .18s;
  font-family: var(--wb-font);
  color: var(--wb-text);
  font-size: 13px;
  font-weight: 500;
}

.wb-cat-item:hover {
  border-color: var(--wb-accent);
  background: rgba(37,211,102,.05);
}

.wb-cat-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.wb-cat-emoji { font-size: 18px; flex-shrink: 0; }

.wb-cat-item small {
  margin-left: auto;
  font-size: 10px;
  color: var(--wb-muted);
  flex-shrink: 0;
}

/* ─── Botón buscar por nombre ────────────────────────────── */
.wb-cat-search-btn {
  width: 100%;
  background: transparent;
  border: 1px dashed rgba(0,0,0,.15);
  border-radius: 10px;
  padding: 8px;
  font-size: 12px;
  color: var(--wb-muted);
  cursor: pointer;
  transition: border-color .18s, color .18s;
  font-family: var(--wb-font);
}

.wb-cat-search-btn:hover {
  border-color: var(--wb-accent);
  color: var(--wb-accent-dk);
}

/* ─── CTA en tarjeta de producto ─────────────────────────── */
.wb-product-cta {
  display: inline-block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--wb-accent-dk);
  letter-spacing: .02em;
}

.wb-product-card:hover .wb-product-cta {
  text-decoration: underline;
}
