
.icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.cart-link.is-active img {
  background: rgba(17, 19, 24, 0.1);
  border-color: rgba(17, 19, 24, 0.16);
}

.cart-count {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #111318;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.cart-hero .hero-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
}

.cart-panel {
  display: grid;
  gap: 1rem;
  align-content: center;
  min-height: 100%;
}

.cart-stat {
  padding: 1.15rem 1.2rem;
  border-radius: 22px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.cart-stat strong {
  display: block;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  margin-bottom: 0.3rem;
}

.cart-stat span {
  color: rgba(255,255,255,0.72);
}

.cart-section {
  padding: 5rem 0 6rem;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 1.5rem;
  align-items: start;
}

.cart-heading {
  margin-bottom: 1.4rem;
}

.cart-items {
  display: grid;
  gap: 1rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
  border-radius: 28px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(17,19,24,0.08);
  box-shadow: 0 16px 36px rgba(17, 19, 24, 0.08);
}

.cart-item__media {
  border-radius: 22px;
  background: linear-gradient(180deg, #f8f9fb, #eef1f5);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 1rem;
}

.cart-item__media img {
  max-height: 140px;
  object-fit: contain;
}

.cart-item__body {
  display: grid;
  gap: 0.8rem;
  color: #111318;
}

.cart-item__top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.cart-item__top h3 {
  font-size: 1.35rem;
}

.cart-item__category {
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(17,19,24,0.54);
}

.cart-item__desc {
  color: rgba(17,19,24,0.74);
}

.cart-item__actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: #eef1f5;
  border: 1px solid rgba(17,19,24,0.08);
}

.qty-control button,
.remove-link,
.clear-btn,
.checkout-btn {
  cursor: pointer;
}

.qty-control button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 0;
  background: #111318;
  color: #fff;
  font-size: 1rem;
}

.remove-link {
  border: 0;
  background: transparent;
  color: #111318;
  font-weight: 600;
  text-decoration: underline;
}

.summary-card {
  position: sticky;
  top: 100px;
  padding: 1.6rem;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-card);
}

.summary-card h2 {
  margin-bottom: 1.2rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.summary-total {
  padding-top: 1.2rem;
  border-bottom: 0;
  font-size: 1.08rem;
}

.summary-card .btn {
  width: 100%;
  margin-top: 0.9rem;
}

.summary-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.68);
}

.empty-cart {
  padding: 2rem;
  border-radius: 28px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(17,19,24,0.08);
  color: #111318;
}

.empty-cart h3 {
  margin-bottom: 0.5rem;
}

.empty-cart p {
  color: rgba(17,19,24,0.72);
  margin-bottom: 1rem;
}

.cart-toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 9999;
  padding: 0.82rem 1rem;
  border-radius: 0.875rem;
  min-width: 14rem;
  max-width: calc(100% - 2rem);
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(228, 232, 240, 0.96));
  color: #111318;
  border: 1px solid rgba(17, 19, 24, 0.14);
  box-shadow: var(--shadow-card);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.cart-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.cart-toast.is-hiding {
  opacity: 0;
  transform: translateY(12px);
}

@media (max-width: 960px) {
  .cart-layout,
  .cart-hero .hero-layout,
  .cart-item {
    grid-template-columns: 1fr;
  }

  .summary-card {
    position: static;
  }
}
