/* Carrinho no topbar. Depende dos tokens definidos em style.css. */
.nav-cart-menu {
  position: relative;
  width: auto;
}

.nav-cart-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-cart-summary::-webkit-details-marker {
  display: none;
}

.nav-cart-summary::after {
  display: none;
}

.nav-cart-summary:hover,
.nav-cart-menu[open] > .nav-cart-summary,
.nav-cart-menu.is-active > .nav-cart-summary,
.nav-cart-menu.has-items > .nav-cart-summary {
  color: var(--text);
  background: rgba(61, 207, 142, 0.12);
}

.nav-cart-icon {
  display: inline-flex;
  line-height: 0;
}

.nav-cart-badge {
  position: absolute;
  top: 0.15rem;
  right: 0.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--accent);
  color: #04120c;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 2px rgba(11, 18, 16, 0.95);
}

.nav-cart-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 60;
  width: min(22rem, calc(100vw - 1.5rem));
  padding: 0.85rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(14, 22, 18, 0.98);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.75rem;
  animation: magnet-share-in 0.16s ease;
}

.nav-cart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.nav-cart-title {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.nav-cart-count {
  margin: 0;
  font-size: 0.8rem;
}

.nav-cart-empty {
  display: grid;
  gap: 0.45rem;
  text-align: left;
}

.nav-cart-empty-title {
  margin: 0;
  font-weight: 600;
}

.nav-cart-empty .btn {
  margin-top: 0.35rem;
  justify-self: start;
}

.nav-cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  max-height: min(50vh, 18rem);
  overflow: auto;
}

.nav-cart-item {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.4rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-cart-item-media {
  display: block;
  width: 3.25rem;
  height: 2.35rem;
  border-radius: 8px;
  overflow: hidden;
  background: #070b09;
}

.nav-cart-item-media.is-placeholder {
  background:
    radial-gradient(ellipse 70% 60% at 30% 20%, rgba(61, 207, 142, 0.2), transparent 55%),
    linear-gradient(160deg, #121a16, #0a100e 70%);
}

.nav-cart-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav-cart-item-body {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.nav-cart-item-name {
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nav-cart-item-name:hover,
.nav-cart-item-name:focus-visible {
  color: var(--accent);
}

.nav-cart-item-price {
  margin: 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 650;
}

.nav-cart-remove {
  margin: 0;
}

.nav-cart-remove-btn {
  appearance: none;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-cart-remove-btn:hover,
.nav-cart-remove-btn:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.nav-cart-foot {
  display: grid;
  gap: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.nav-cart-total strong {
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.nav-cart-actions {
  display: grid;
  gap: 0.4rem;
}

.nav-cart-actions .btn {
  width: 100%;
  justify-content: center;
}
