/* The Community Garden — cart drawer styles. Self-contained; tweak colors to taste.
   Load AFTER rebuild.css so .button styles are available. */

.tcg-cart-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: #1f2a24;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.tcg-cart-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff;
  color: #1f2a24;
  font-size: 13px;
  line-height: 22px;
  text-align: center;
}

.tcg-cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.4);
}

.tcg-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  width: min(400px, 92vw);
  height: 100%;
  background: #fff;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.2);
}
.tcg-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid #eee;
  font-size: 18px;
}
.tcg-cart-close {
  border: none;
  background: none;
  font: inherit;
  color: #666;
  cursor: pointer;
  text-decoration: underline;
}
.tcg-cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 22px;
}
.tcg-cart-empty {
  color: #888;
  padding: 24px 0;
  text-align: center;
}
.tcg-cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #f1f1f1;
}
.tcg-cart-item-main { display: flex; flex-direction: column; gap: 4px; }
.tcg-cart-item-main span { color: #666; font-size: 14px; }
.tcg-cart-qty { display: flex; align-items: center; gap: 10px; }
.tcg-cart-qty button {
  width: 30px;
  height: 30px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.tcg-cart-foot {
  padding: 18px 22px 24px;
  border-top: 1px solid #eee;
}
.tcg-cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 18px;
}
.tcg-cart-note {
  margin: 10px 0 0;
  color: #888;
  font-size: 13px;
  text-align: center;
}

/* FIX: honor the hidden attribute even though the drawer uses display:flex.
   Without this, the class selector beats the UA [hidden] rule and the cart
   is stuck open. Keep this at the end so it wins. */
.tcg-cart-drawer[hidden],
.tcg-cart-overlay[hidden] { display: none !important; }
