/* Museum cart drawer — warm cream glass, deep green + saffron accents. */
.cart-scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 22, 0.42);
  backdrop-filter: blur(2px);
  z-index: 2147483646;
  animation: cart-fade 0.22s ease;
}

@keyframes cart-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 2147483647;
  width: 44rem;
  max-width: 94vw;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 252, 246, 0.9);
  border-left: 1px solid rgba(234, 223, 206, 0.9);
  box-shadow: -20px 0 60px rgba(43, 28, 20, 0.24), -2px 0 0 rgba(255, 255, 255, 0.6) inset;
  backdrop-filter: blur(20px) saturate(115%);
  -webkit-backdrop-filter: blur(20px) saturate(115%);
  transform: translateX(105%);
  transition: transform 0.36s cubic-bezier(0.32, 0.72, 0, 1);
  font-size: 1.4rem;
  color: #2b1c14;
}

.cart-drawer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #c66a0b, #d9a33a 45%, #1f4d3a);
  z-index: 3;
}

.cart-drawer.open { transform: none; }

.cart-drawer__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 2.2rem 1.5rem;
  border-bottom: 1px solid rgba(234, 223, 206, 0.9);
  background: rgba(255, 252, 246, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.cart-drawer__title {
  margin: 0;
  font-family: var(--font-heading-family);
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #2b1c14;
}

.cart-drawer__sub {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.55rem 0 0;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(31, 77, 58, 0.16);
  border-radius: 999px;
  background: rgba(31, 77, 58, 0.07);
  color: #1f4d3a;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.cart-drawer__sub::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1f4d3a;
}

.cart-drawer__close {
  width: 3.6rem;
  height: 3.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(198, 106, 11, 0.2);
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.8);
  cursor: pointer;
  color: #6d5b4c;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.cart-drawer__close:hover {
  background: #fff;
  border-color: rgba(198, 106, 11, 0.4);
  color: #7b1e1e;
  transform: rotate(90deg);
}

.cart-drawer__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 3rem 2.5rem;
  text-align: center;
}

.cart-drawer__empty img {
  margin-bottom: 1rem;
  padding: 0.8rem;
  border: 1px solid #eadfce;
  border-radius: 1.8rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 32px -24px rgba(88, 52, 14, 0.5);
  opacity: 1;
}

.cart-drawer__empty p {
  margin: 0;
  font-size: 1.35rem;
  color: #6d5b4c;
}

.cart-drawer__empty p strong {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-heading-family);
  font-size: 1.8rem;
  font-weight: 600;
  color: #2b1c14;
}

.cart-drawer__list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  margin: 0;
  padding: 1.5rem 2.2rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  scrollbar-width: thin;
  scrollbar-color: #d9c9a6 transparent;
}

.cart-drawer__list::-webkit-scrollbar { width: 6px; }
.cart-drawer__list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #d9c9a6;
}

.cart-drawer__item {
  display: grid;
  grid-template-columns: 7.4rem minmax(0, 1fr) auto;
  gap: 1.2rem;
  align-items: start;
  border: 1px solid rgba(234, 223, 206, 0.95);
  border-radius: 1.4rem;
  padding: 1.1rem;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 26px -28px rgba(88, 52, 14, 0.55);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.cart-drawer__item:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: #ddc9a7;
  transform: translateY(-1px);
}

.cart-drawer__thumb {
  display: block;
  width: 7.4rem;
  height: 9rem;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(180deg, #fffdf8, #f8f1e3);
  border: 1px solid #f0e4cf;
}

.cart-drawer__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.3rem;
}

.cart-drawer__noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.1rem;
  color: #a58d6c;
}

.cart-drawer__name {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.4;
  color: #2b1c14;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.cart-drawer__name:hover { color: #a24f00; }

.cart-drawer__unit {
  margin-top: 0.25rem;
  color: #8a7868;
  font-size: 1.15rem;
}

.cart-drawer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.9rem;
}

.cart-drawer__qty {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #e2d5c2;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.9);
}

.cart-drawer__qty button {
  width: 2.8rem;
  height: 2.8rem;
  border: 0;
  background: transparent;
  color: #1f4d3a;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cart-drawer__qty button:hover { background: #f4ecdd; }

.cart-drawer__qty span {
  min-width: 2.6rem;
  text-align: center;
  color: #2b1c14;
  font-size: 1.25rem;
  font-weight: 700;
}

.cart-drawer__remove {
  border: 0;
  background: none;
  padding: 0;
  color: #a58d6c;
  font-size: 1.15rem;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
  cursor: pointer;
}

.cart-drawer__remove:hover { color: #a52a2a; }

.cart-drawer__line {
  color: #1f4d3a;
  font-size: 1.35rem;
  font-weight: 700;
  white-space: nowrap;
}

.cart-drawer__foot {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 1.6rem 2.2rem 2rem;
  border-top: 1px solid rgba(234, 223, 206, 0.95);
  background: rgba(255, 251, 244, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 -12px 30px -24px rgba(88, 52, 14, 0.45);
}

.cart-drawer__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #6d5b4c;
  font-size: 1.35rem;
}

.cart-drawer__total strong {
  font-family: var(--font-heading-family);
  color: #2b1c14;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cart-drawer__note {
  margin: 0.45rem 0 1.2rem;
  color: #8a7868;
  font-size: 1.1rem;
}

.cart-drawer__primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 4.8rem;
  border: 0;
  border-radius: 1.1rem;
  background: linear-gradient(135deg, #2a6650, #1f4d3a);
  color: #fffaf0 !important;
  font-family: inherit;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 14px 26px -16px rgba(31, 77, 58, 0.8);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.cart-drawer__primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.cart-drawer__ghost {
  width: 100%;
  min-height: 4.3rem;
  margin-top: 0.8rem;
  border: 1px solid #e2d5c2;
  border-radius: 1.1rem;
  background: rgba(255, 253, 249, 0.72);
  color: #6d5b4c;
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cart-drawer__ghost:hover {
  border-color: #cbb28d;
  background: #fff;
  color: #7b1e1e;
}

@media (max-width: 480px) {
  .cart-drawer { width: 100vw; max-width: 100vw; }
  .cart-drawer__head { padding: 1.7rem 1.6rem 1.3rem; }
  .cart-drawer__list { padding: 1.2rem 1.4rem; }
  .cart-drawer__foot { padding: 1.4rem 1.6rem 1.7rem; }
  .cart-drawer__item { grid-template-columns: 6.4rem minmax(0, 1fr) auto; gap: 1rem; }
  .cart-drawer__thumb { width: 6.4rem; height: 7.8rem; }
}

/* Continue shopping is a link inside the drawer */
a.cart-drawer__ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6d5b4c;
  text-decoration: none;
}
