/* Shared cart button + drawer — used on every public page */

.cart-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(200, 148, 42, 0.42);
  background: rgba(14, 40, 24, 0.55);
  color: #f5e4b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  z-index: 1201;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.cart-btn:hover,
.cart-btn[aria-expanded="true"] {
  background: var(--gold, #c8942a);
  color: #fff;
  border-color: var(--gold, #c8942a);
  transform: translateY(-1px);
}
.cart-btn svg {
  width: 20px;
  height: 20px;
}
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #c8942a;
  color: #0e2818;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  display: none;
}
.cart-badge.is-on { display: block; }

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 18, 12, 0.45);
  z-index: 1300;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.cart-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 92vw);
  z-index: 1301;
  background: linear-gradient(180deg, #faf6ed 0%, #fff 40%);
  color: #1e2e22;
  box-shadow: -18px 0 50px rgba(14, 40, 24, 0.22);
  transform: translateX(104%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 22px 16px;
  border-bottom: 1px solid rgba(200, 148, 42, 0.22);
}
.cart-head h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  color: #0e2818;
  margin: 0;
}
.cart-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(14, 40, 24, 0.12);
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #0e2818;
}
.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 18px 20px;
}
.cart-empty {
  text-align: center;
  padding: 48px 16px;
  color: #5a7060;
  font-size: 0.95rem;
  line-height: 1.7;
}
.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(14, 40, 24, 0.08);
  align-items: center;
}
.cart-item img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(200, 148, 42, 0.18);
}
.cart-item-name {
  font-weight: 600;
  color: #0e2818;
  font-size: 0.95rem;
}
.cart-item-meta {
  font-size: 12px;
  color: #5a7060;
  margin-top: 4px;
}
.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.cart-qty button {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(14, 40, 24, 0.15);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}
.cart-remove {
  border: none;
  background: none;
  color: #8a3b2a;
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.4px;
}
.cart-foot {
  padding: 16px 22px 22px;
  border-top: 1px solid rgba(200, 148, 42, 0.22);
  background: #fff;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 600;
  color: #0e2818;
}
.cart-note {
  font-size: 12px;
  color: #5a7060;
  margin: 0 0 14px;
  line-height: 1.5;
}
.cart-checkout {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 14px 18px;
  border: none;
  border-radius: 8px;
  background: #c8942a;
  color: #fff;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-size: 12px;
  cursor: pointer;
}
.cart-checkout:hover { background: #e4b84a; }
.cart-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1400;
  background: #0e2818;
  color: #faf6ed;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(200, 148, 42, 0.4);
  font-size: 13px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.cart-toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 960px) {
  .cart-btn { width: 38px; height: 38px; }
}
