/* Carrito de cotización — widget flotante compartido en todas las páginas de catálogo */

.ic-cart-fab {
  position: fixed; left: 1.1rem; bottom: 1.1rem; z-index: 1500;
  display: inline-flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; border-radius: 999px;
  background: var(--accent); color: #1a1206;
  box-shadow: 0 14px 34px -10px rgba(239,125,29,.6);
  transition: transform .3s var(--ease-bounce);
}
.ic-cart-fab:hover { transform: scale(1.06); }
.ic-cart-fab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-cart-fab.ic-bump { animation: icCartBump .4s var(--ease-bounce); }
@keyframes icCartBump { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }

.ic-cart-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px;
  background: var(--wa); color: #fff; font-size: .74rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}

.ic-cart-overlay {
  position: fixed; inset: 0; z-index: 1490;
  background: rgba(8,12,20,.55); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .3s var(--ease-out);
}
.ic-cart-overlay.is-open { opacity: 1; }

.ic-cart-panel {
  position: fixed; left: 1.1rem; bottom: 5.6rem; z-index: 1500;
  width: min(380px, calc(100vw - 2.2rem)); max-height: min(70vh, 560px);
  background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.55);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(16px) scale(.97); opacity: 0; pointer-events: none;
  transition: transform .3s var(--ease-out), opacity .25s var(--ease-out);
}
.ic-cart-panel.is-open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }

.ic-cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.2rem; border-bottom: 1px solid var(--line);
}
.ic-cart-head h3 { font-family: var(--serif); font-size: 1.2rem; color: var(--cream); font-weight: 600; }
.ic-cart-close { font-size: 1.6rem; line-height: 1; color: var(--muted); padding: .2rem .4rem; }
.ic-cart-close:hover { color: var(--cream); }

.ic-cart-list { overflow-y: auto; padding: .4rem 1.2rem; flex: 1; }
.ic-cart-item {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  padding: .85rem 0; border-bottom: 1px solid var(--line);
}
.ic-cart-item:last-child { border-bottom: 0; }
.ic-cart-item-info { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.ic-cart-item-name { font-size: .92rem; font-weight: 600; color: var(--cream); line-height: 1.3; }
.ic-cart-item-model { font-size: .76rem; color: var(--muted); font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.ic-cart-item-actions { display: flex; align-items: center; gap: .4rem; flex: none; }
.ic-cart-item-actions button {
  width: 26px; height: 26px; border-radius: 8px; background: var(--bg-4);
  color: var(--cream); font-size: 1rem; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.ic-cart-item-actions button:hover { background: var(--line-2); }
.ic-cart-item-qty { min-width: 1.4rem; text-align: center; font-weight: 700; color: var(--cream); font-size: .9rem; }
.ic-cart-item-remove { margin-left: .3rem; color: var(--muted); font-size: 1.1rem !important; background: transparent !important; }
.ic-cart-item-remove:hover { color: var(--accent) !important; }

.ic-cart-empty { padding: 1.4rem 1.2rem 1.6rem; color: var(--muted); font-size: .88rem; line-height: 1.5; }

.ic-cart-footer { padding: 1rem 1.2rem 1.2rem; border-top: 1px solid var(--line); }
.ic-cart-footer-row { display: flex; flex-direction: column; gap: .6rem; }
.ic-cart-clear { font-size: .82rem; color: var(--muted); align-self: flex-start; }
.ic-cart-clear:hover { color: var(--cream); }
.ic-cart-send {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1rem; background: var(--wa); color: #fff; font-weight: 700;
  border-radius: 12px; font-size: .95rem; text-align: center;
  transition: background .2s;
}
.ic-cart-send:hover { background: var(--wa-dark); }

/* Botón "Agregar a cotización" reutilizable dentro de las tarjetas/fichas de producto */
.ic-add-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .7rem 1rem; border: 1px solid var(--line-2); border-radius: 12px;
  color: var(--cream); font-weight: 600; font-size: .86rem;
  transition: border-color .2s, color .2s, background .2s;
}
.ic-add-btn:hover { border-color: var(--accent); color: var(--accent); }
.ic-add-btn.is-added { border-color: var(--wa); color: var(--wa); background: rgba(37,211,102,.08); }
.ic-add-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }

@media (max-width: 480px) {
  .ic-cart-panel {
    left: .6rem; right: .6rem; bottom: 5.2rem; width: auto;
  }
}
