
#cart-count {
  background: linear-gradient(135deg, #ff5ecb, #8b5cf6);
  box-shadow: 0 0 0 2px var(--bg-header, rgba(14,14,22,0.85)), 0 0 10px rgba(139,92,246,0.75);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
#cart-count.fv-cart-pulse { animation: fvCartPulse 0.55s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes fvCartPulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.55); }
  100% { transform: scale(1); }
}
#cart-toggle.fv-cart-shake { animation: fvCartShake 0.4s ease; }
@keyframes fvCartShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.fv-cart__panel {
  position: fixed;
  top: 72px;
  right: 16px;
  z-index: 9999;
  width: min(380px, calc(100vw - 24px));
  max-height: min(560px, calc(100vh - 96px));
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(139, 92, 246, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(20, 20, 32, 0.98), rgba(11, 11, 18, 0.99));
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 30px 60px -18px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.03) inset;
  transform-origin: top right;
  transform: perspective(900px) rotateX(-10deg) translateY(-8px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.34,1.56,0.64,1), opacity 0.24s ease;
}
.fv-cart__panel.is-open {
  transform: perspective(900px) rotateX(0deg) translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.fv-cart__glow {
  position: absolute; inset: -40% -40% auto auto;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,94,203,0.35), transparent 70%);
  pointer-events: none;
  filter: blur(10px);
}

.fv-cart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex: 0 0 auto;
}
.fv-cart__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display, inherit);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: #fff;
}
.fv-cart__title svg {
  width: 17px; height: 17px;
  color: #8b5cf6;
  filter: drop-shadow(0 0 5px rgba(139,92,246,0.7));
}
.fv-cart__close {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.75);
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), background 0.25s ease, color 0.25s ease;
}
.fv-cart__close:hover { background: rgba(255,59,92,0.16); color: #ff8aa3; transform: rotate(90deg); }
.fv-cart__close svg { width: 14px; height: 14px; }

.fv-cart__list {
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}
.fv-cart__list::-webkit-scrollbar { width: 5px; }
.fv-cart__list::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.4); border-radius: 999px; }

.fv-cart__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  animation: fvCartItemIn 0.3s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes fvCartItemIn {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.fv-cart__thumb {
  width: 46px; height: 46px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #15151f center/cover no-repeat;
  box-shadow: 0 4px 10px -2px rgba(0,0,0,0.55);
}
.fv-cart__info { flex: 1 1 auto; min-width: 0; }
.fv-cart__name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fv-cart__price {
  font-size: 0.75rem;
  color: #ffcc33;
  font-weight: 700;
  margin-top: 2px;
}
.fv-cart__stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.fv-cart__step-btn {
  width: 22px; height: 22px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.fv-cart__step-btn:hover { background: rgba(139,92,246,0.28); transform: translateY(-1px); }
.fv-cart__qty {
  min-width: 16px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}
.fv-cart__remove {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.45);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.fv-cart__remove:hover { background: rgba(255,59,92,0.16); color: #ff8aa3; }
.fv-cart__remove svg { width: 14px; height: 14px; }

.fv-cart__empty {
  display: none;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 36px 20px;
  text-align: center;
  color: rgba(255,255,255,0.55);
}
.fv-cart__empty svg { width: 40px; height: 40px; color: rgba(255,255,255,0.25); }
.fv-cart__empty p { font-weight: 700; color: rgba(255,255,255,0.8); font-size: 0.88rem; }
.fv-cart__empty span { font-size: 0.76rem; }

.fv-cart__foot {
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 10px;
  flex: 0 0 auto;
}
.fv-cart__subtotal {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
}
.fv-cart__subtotal strong { color: #fff; font-size: 1rem; }
.fv-cart__clear {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.75);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.fv-cart__clear:hover { background: rgba(255,59,92,0.14); color: #ff8aa3; }
.fv-cart__checkout {
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #0e0e16;
  cursor: pointer;
  background: linear-gradient(90deg, #ffcc33, #ff9d3d);
  box-shadow: 0 8px 20px -6px rgba(255, 204, 51, 0.55);
  transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.22s ease;
}
.fv-cart__checkout:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -6px rgba(255, 204, 51, 0.7); }
.fv-cart__checkout:active { transform: translateY(0); }
.fv-cart__checkout:disabled,
.fv-cart__clear:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.fv-cart__toast-host {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
}
.fv-cart__toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 300px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, rgba(24,24,36,0.97), rgba(14,14,22,0.99));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 14px 30px -10px rgba(0,0,0,0.6);
  animation: fvToastIn 0.32s cubic-bezier(0.22,1,0.36,1) both;
}
.fv-cart__toast.is-leaving { animation: fvToastOut 0.28s ease both; }
.fv-cart__toast svg { width: 15px; height: 15px; flex-shrink: 0; }
.fv-cart__toast--success svg { color: #39ff88; }
.fv-cart__toast--info svg { color: #28c7ff; }
.fv-cart__toast--warn svg { color: #ffcc33; }
@keyframes fvToastIn {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fvToastOut {
  to { opacity: 0; transform: translateY(6px) scale(0.96); }
}

@media (max-width: 480px) {
  .fv-cart__panel { right: 8px; left: 8px; width: auto; top: 68px; }
  .fv-cart__toast-host { right: 8px; left: 8px; }
  .fv-cart__toast { max-width: none; }
}
