/* Cart drawer (snippets/cart-drawer.liquid) and line items rendered by NE.renderLineItems.
   .line-item styles are shared by the drawer (.line-item--drawer) and the cart page (.line-item--page). */

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 300;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear .42s;
}
.cart-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.cart-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 32, 22, .5);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.cart-drawer.is-open .cart-drawer__overlay { opacity: 1; }

.cart-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(94vw, 460px);
  background-color: var(--c-ivory);
  background-image: radial-gradient(ellipse 90% 30% at 100% 0%, var(--c-glow), rgba(255, 244, 220, 0) 70%);
  border-left: 1px solid var(--c-gold-light);
  box-shadow: -24px 0 48px -24px rgba(42, 33, 28, .45);
  transform: translateX(104%);
  transition: transform .42s var(--ease);
}
.cart-drawer.is-open .cart-drawer__panel { transform: none; }
.cart-drawer__panel:focus { outline: none; }

.cart-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--c-gold-light);
}
.cart-drawer__eyebrow { font-size: .72rem; }
.cart-drawer__title {
  margin: 2px 0 0;
  font-size: 2rem;
  line-height: 1.1;
}
.cart-drawer__close { margin: -4px -12px 0 0; }

.cart-drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 24px 16px;
}

.cart-drawer__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 8px 24px;
  text-align: center;
}
.cart-drawer__empty-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin-bottom: 6px;
  border: 1px solid var(--c-gold-light);
  border-radius: 50%;
  background: var(--c-cream);
  color: var(--c-red);
  box-shadow: inset 0 0 0 4px var(--c-cream), inset 0 0 0 5px rgba(230, 207, 148, .9);
}
.cart-drawer__empty-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.7rem;
  line-height: 1.15;
  color: var(--c-green);
}
.cart-drawer__empty-text { margin: 0; color: var(--c-ink-soft); }
.cart-drawer__empty .ornament-rule { margin-block: 6px 10px; }

.cart-drawer__footer {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 24px 22px;
  border-top: 1px solid var(--c-gold-light);
  background: var(--c-cream);
}
/* Short viewports (400% zoom is 320x256): the footer alone can be taller than the panel, so the
   whole panel scrolls instead of pinning the footer (WCAG 1.4.10). */
@media (max-height: 520px) {
  .cart-drawer__panel { overflow-y: auto; overscroll-behavior: contain; }
  .cart-drawer__body { flex: none; overflow: visible; }
  .cart-drawer__footer { flex: none; }
}
.cart-drawer__subtotal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.cart-drawer__subtotal-label {
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.cart-drawer__subtotal-value {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--c-green);
  font-variant-numeric: lining-nums;
}
.cart-drawer__note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px dashed var(--c-gold-light);
  border-radius: 12px;
  background: var(--c-ivory);
  font-size: .92rem;
  line-height: 1.45;
  color: var(--c-ink-soft);
}
.cart-drawer__note .icon { color: var(--c-red); margin-top: 1px; }
.cart-drawer__checkout { margin: 0; }
.cart-drawer__view { align-self: center; }

.cart-error {
  margin: 0;
  padding: 10px 14px;
  border: 1px solid rgba(179, 20, 31, .3);
  border-radius: 12px;
  background: rgba(179, 20, 31, .06);
  color: var(--c-red-deep);
  font-size: .92rem;
  line-height: 1.45;
}

/* Line items */
.line-items {
  margin: 0;
  padding: 0;
  list-style: none;
}
.line-items[aria-busy="true"] { cursor: progress; }

.line-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(230, 207, 148, .8);
  transition: opacity .2s var(--ease);
}
.line-item:last-child { border-bottom: 0; }
.line-item.is-busy { opacity: .55; pointer-events: none; }

.line-item__media {
  position: relative;
  display: block;
  width: 84px;
  height: 84px;
  overflow: hidden;
  border: 1px solid var(--c-gold-light);
  border-radius: 14px;
  background: var(--c-parchment);
}
.line-item__media img { width: 100%; height: 100%; object-fit: cover; }
.line-item__media.is-missing::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 34px;
  height: 34px;
  background-color: var(--c-gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='8.5' width='17' height='4' rx='.8'/%3E%3Cpath d='M5 12.5v7a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-7M12 8.5v12'/%3E%3Cpath d='M12 8.5c-1.8 0-4.6-.6-4.6-2.6 0-1.3 1-2 2-2 1.9 0 2.6 3 2.6 4.6zM12 8.5c1.8 0 4.6-.6 4.6-2.6 0-1.3-1-2-2-2-1.9 0-2.6 3-2.6 4.6z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='8.5' width='17' height='4' rx='.8'/%3E%3Cpath d='M5 12.5v7a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-7M12 8.5v12'/%3E%3Cpath d='M12 8.5c-1.8 0-4.6-.6-4.6-2.6 0-1.3 1-2 2-2 1.9 0 2.6 3 2.6 4.6zM12 8.5c1.8 0 4.6-.6 4.6-2.6 0-1.3-1-2-2-2-1.9 0-2.6 3-2.6 4.6z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.line-item__body { min-width: 0; }
.line-item__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.line-item__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--c-green);
  text-decoration: none;
}
.line-item__title:hover { color: var(--c-red); }
.line-item__price {
  flex: 0 0 auto;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
  color: var(--c-ink);
  font-variant-numeric: lining-nums;
}
.line-item__price s { margin-right: 6px; font-weight: 500; font-size: .85em; color: var(--c-ink-soft); }
.line-item__variant,
.line-item__unit { margin: 2px 0 0; font-size: .9rem; color: var(--c-ink-soft); }

.line-item__props {
  display: grid;
  gap: 2px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: .9rem;
  line-height: 1.45;
  color: var(--c-ink-soft);
}
.line-item__prop-key { font-weight: 700; color: var(--c-ink); }
.line-item__prop-value { overflow-wrap: anywhere; }

.line-item__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 12px;
}

.qty {
  display: inline-flex;
  align-items: center;
  height: 44px;
  border: 1px solid var(--c-field-border);
  border-radius: var(--radius-btn);
  background: var(--c-ivory);
}
.qty__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--c-green);
  cursor: pointer;
}
.qty__btn:hover:not([disabled]) { color: var(--c-red); background: rgba(230, 207, 148, .3); }
.qty__btn[disabled] { color: #B5A99A; cursor: not-allowed; }
.qty__btn svg { width: 16px; height: 16px; }
.qty__input {
  width: 38px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  color: var(--c-ink);
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty__input::-webkit-outer-spin-button,
.qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty__input:focus-visible { outline-offset: 0; border-radius: 6px; }

.line-item__remove {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--c-gold-light);
  text-underline-offset: .4em;
  cursor: pointer;
}
.line-item__remove:hover { color: var(--c-red); text-decoration-color: currentColor; }

/* Cart page variant */
.line-item--page {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  padding: 24px 0;
}
.line-item--page .line-item__media { width: 96px; height: 96px; }
@media (min-width: 750px) {
  .line-item--page { grid-template-columns: 140px minmax(0, 1fr); gap: 28px; }
  .line-item--page .line-item__media { width: 140px; height: 105px; border-radius: 16px; }
  .line-item--page .line-item__title { font-size: 1.55rem; }
  .line-item--page .line-item__price { font-size: 1.45rem; }
}
