/* Sidecart (Fase 2) — rediseñado con paleta de marca */

:root.ozc-sidecart-open {
  overflow: hidden;
}

.ozc-sidecart {
  --ozc-sc-accent:      #004674;
  --ozc-sc-accent-dark: #003356;
  --ozc-sc-yellow:      #f7d022;
  --ozc-sc-yellow-dark: #e8c010;
  --ozc-sc-wa:          #25d366;
  --ozc-sc-wa-dark:     #1fbc59;
  --ozc-sc-danger:      #dc2626;
  --ozc-sc-surface:     #ffffff;
  --ozc-sc-bg:          #f5f8fc;
  --ozc-sc-border:      rgba(0, 70, 116, 0.12);
  --ozc-sc-border-soft: rgba(0, 70, 116, 0.06);
  --ozc-sc-text:        #0f172a;
  --ozc-sc-muted:       #64748b;

  position: fixed;
  inset: 0;
  /* Debe ganar a dropdowns/overlays del theme (p. ej. sorting/select2). */
  z-index: 1000000;
  pointer-events: none;
  isolation: isolate;
  overflow: hidden;
}

.ozc-sidecart__overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(15, 23, 42, 0.5);
  opacity: 0;
  transition: opacity 200ms ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.ozc-sidecart__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: var(--ozc-sidecart-width-desktop, 420px);
  max-width: 92vw;
  background: var(--ozc-sc-bg);
  box-shadow: 0 18px 60px rgba(0, 70, 116, 0.28);
  transform: translateX(100%);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  border-radius: 0;
  overflow: hidden;
  color: var(--ozc-sc-text);
  font-family: inherit;
}

.ozc-sidecart--pos-left .ozc-sidecart__panel {
  left: 0;
  transform: translateX(-100%);
}

.ozc-sidecart--pos-right .ozc-sidecart__panel {
  right: 0;
}

.ozc-sidecart--open {
  pointer-events: auto;
}

.ozc-sidecart--open .ozc-sidecart__overlay {
  opacity: 1;
}

.ozc-sidecart--open.ozc-sidecart--pos-right .ozc-sidecart__panel {
  transform: translateX(0);
}

.ozc-sidecart--open.ozc-sidecart--pos-left .ozc-sidecart__panel {
  transform: translateX(0);
}

.ozc-sidecart__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--ozc-sc-accent) 0%, var(--ozc-sc-accent-dark) 100%);
  color: #fff;
  position: relative;
  box-shadow: 0 2px 12px rgba(0, 70, 116, 0.18);
}

.ozc-sidecart__header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--ozc-sc-yellow);
}

.ozc-sidecart__title {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ozc-sidecart__title::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ozc-sc-yellow);
  box-shadow: 0 0 0 3px rgba(247, 208, 34, 0.22);
}

.ozc-sidecart__close {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #fff;
  transition: background 0.15s ease, transform 0.15s ease;
}

.ozc-sidecart__close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(90deg);
}

.ozc-sidecart__body {
  padding: 16px 16px 8px;
  overflow: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--ozc-sc-border) transparent;
}

.ozc-sidecart__body::-webkit-scrollbar {
  width: 6px;
}
.ozc-sidecart__body::-webkit-scrollbar-thumb {
  background: var(--ozc-sc-border);
  border-radius: 6px;
}

.ozc-sidecart__notice {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #7c2d12;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.ozc-sidecart__notice[hidden] {
  display: none;
}

.ozc-sidecart__footer {
  padding: 14px 16px 18px;
  border-top: 1px solid var(--ozc-sc-border);
  background: var(--ozc-sc-surface);
  display: grid;
  gap: 10px;
}

.ozc-sidecart__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.ozc-sidecart__btn:active {
  transform: translateY(1px);
}

.ozc-sidecart__btn--cart {
  background: var(--ozc-sc-yellow);
  border-color: var(--ozc-sc-yellow);
  color: var(--ozc-sc-accent-dark);
  box-shadow: 0 2px 8px rgba(247, 208, 34, 0.35);
}

.ozc-sidecart__btn--cart:hover {
  background: var(--ozc-sc-yellow-dark);
  border-color: var(--ozc-sc-yellow-dark);
  color: var(--ozc-sc-accent-dark);
}

.ozc-sidecart__btn--continue {
  background: transparent;
  border-color: var(--ozc-sc-border);
  color: var(--ozc-sc-accent);
}

.ozc-sidecart__btn--continue:hover {
  background: #eef5fb;
  border-color: var(--ozc-sc-accent);
  color: var(--ozc-sc-accent);
}

.ozc-sidecart__btn--quote {
  background: var(--ozc-sc-wa);
  border-color: var(--ozc-sc-wa);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.ozc-sidecart__btn--quote:hover {
  background: var(--ozc-sc-wa-dark);
  border-color: var(--ozc-sc-wa-dark);
  color: #fff;
}

.ozc-sidecart__empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--ozc-sc-muted);
}

.ozc-sidecart__empty p {
  margin: 0 0 10px;
  font-size: 14px;
}

.ozc-sidecart__empty p:first-child {
  font-size: 15px;
  font-weight: 600;
  color: var(--ozc-sc-text);
}

.ozc-sidecart__empty a {
  color: var(--ozc-sc-accent);
  font-weight: 600;
  text-decoration: none;
}

.ozc-sidecart__empty a:hover {
  text-decoration: underline;
}

.ozc-sidecart-items {
  display: grid;
  gap: 10px;
}

.ozc-sidecart-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--ozc-sc-border-soft);
  border-radius: 12px;
  background: var(--ozc-sc-surface);
  box-shadow: 0 1px 2px rgba(0, 70, 116, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ozc-sidecart-item:hover {
  border-color: var(--ozc-sc-border);
  box-shadow: 0 3px 12px rgba(0, 70, 116, 0.08);
}

.ozc-sidecart-item__thumb img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--ozc-sc-border-soft);
  background: #fff;
}

.ozc-sidecart-item__name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ozc-sc-text);
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ozc-sidecart-item__name a {
  color: inherit;
  text-decoration: none;
}

.ozc-sidecart-item__name a:hover {
  color: var(--ozc-sc-accent);
}

.ozc-sidecart-item__actions {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.ozc-qty {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  overflow: hidden;
  background: #eef5fb;
  padding: 3px;
  border: 1px solid var(--ozc-sc-border-soft);
  gap: 2px;
}

.ozc-qty__btn {
  width: 28px;
  height: 28px;
  border: 0;
  background: var(--ozc-sc-surface);
  color: var(--ozc-sc-accent);
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
  box-shadow: 0 1px 2px rgba(0, 70, 116, 0.08);
}

.ozc-qty__btn:hover {
  background: var(--ozc-sc-accent);
  color: #fff;
}

.ozc-qty__btn:active {
  transform: scale(0.92);
}

.ozc-qty__input {
  width: 36px;
  height: 28px;
  border: 0;
  background: transparent;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--ozc-sc-accent-dark);
  -moz-appearance: textfield;
}

.ozc-qty__input::-webkit-outer-spin-button,
.ozc-qty__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ozc-qty__input:focus {
  outline: none;
}

.ozc-sidecart-item__remove {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--ozc-sc-border-soft);
  background: var(--ozc-sc-surface);
  color: var(--ozc-sc-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.ozc-sidecart-item__remove-ic,
.ozc-sidecart-item__remove-ic * {
  pointer-events: none;
}

.ozc-sidecart-item__remove:hover {
  background: #fef2f2;
  border-color: var(--ozc-sc-danger);
  color: var(--ozc-sc-danger);
}

.ozc-sidecart-item__remove:active {
  transform: scale(0.92);
}

.ozc-sidecart-item__remove-ic {
  display: block;
}

.ozc-sidecart-wa__title {
  font-weight: 700;
  color: var(--ozc-sc-accent-dark);
  font-size: 13px;
  margin-bottom: 6px;
}

.ozc-sidecart-wa__vendors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ozc-sidecart-wa__vendor {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--ozc-sc-wa);
  color: #fff;
  border: 1px solid var(--ozc-sc-wa);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ozc-sidecart-wa__vendor:hover {
  background: var(--ozc-sc-wa-dark);
  border-color: var(--ozc-sc-wa-dark);
  color: #fff;
}

.ozc-sidecart--loading .ozc-sidecart__panel {
  pointer-events: none;
}

.ozc-sidecart--loading .ozc-sidecart__panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
}

/* Floating button (solo ícono; badge fuera del círculo) */
.ozc-sidecart-fab {
  position: fixed;
  bottom: 24px;
  z-index: 9998;
  border: 0;
  cursor: pointer;
  background: #111;
  color: #fff;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: visible;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
  transform: scale(1);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.ozc-sidecart-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.36);
}

.ozc-sidecart-fab:active {
  transform: scale(0.95);
}

.ozc-sidecart-fab::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  z-index: -1;
  animation: ozcSidecartFabPulse 2s ease-out infinite;
}

@keyframes ozcSidecartFabPulse {
  0% {
    transform: scale(1);
    opacity: 0.2;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.ozc-sidecart-fab--pulse {
  animation: ozcSidecartFabZoom 800ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ozc-sidecart-fab--pulse::after {
  animation-duration: 800ms;
}

@keyframes ozcSidecartFabZoom {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

.ozc-sidecart-fab--size-sm {
  width: 60px;
  height: 60px;
}

.ozc-sidecart-fab--size-sm .ozc-sidecart-fab__icon {
  width: 28px;
  height: 28px;
}

.ozc-sidecart-fab--size-md {
  width: 60px;
  height: 60px;
}

.ozc-sidecart-fab--size-md .ozc-sidecart-fab__icon {
  width: 28px;
  height: 28px;
}

.ozc-sidecart-fab--size-lg {
  width: 60px;
  height: 60px;
}

.ozc-sidecart-fab--size-lg .ozc-sidecart-fab__icon {
  width: 28px;
  height: 28px;
}

.ozc-sidecart-fab--right {
  right: 24px;
}

.ozc-sidecart-fab--left {
  left: 24px;
}

.ozc-fab-stack .ozc-sidecart-fab--in-stack,
.ozc-sidecart-fab.ozc-sidecart-fab--in-stack {
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  z-index: auto;
}

.ozc-sidecart-fab__icon {
  display: block;
  flex-shrink: 0;
}

.ozc-sidecart-fab .ozc-sidecart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ozc-fab-badge-bg, #fff);
  color: var(--ozc-fab-badge-color, #111);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.ozc-sidecart-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ozc-sidecart-trigger .ozc-sidecart-count {
  position: static;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f6f7f7;
  color: #111;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid #dcdcde;
  box-shadow: none;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 782px) {
  .ozc-sidecart__panel {
    width: var(--ozc-sidecart-width-mobile, 320px);
  }
}

