/* Basaltic Farms — Shopify Overrides (compat) — v1.1
   Purpose: cart host sizing + button/qty polish (works in all WP editors) */

/* --- 1) Cart host (Shopify UI iframes) --- */

/* When hidden, collapse so it never blocks taps/clicks */
.shopify-buy-frame--cart[aria-hidden="true"],
.shopify-buy-frame--cart[hidden],
.shopify-buy-frame--cart[style*="display: none"] {
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

/* Default visible state: right drawer (desktop) */
.shopify-buy-frame--cart {
  position: fixed !important;
  right: 0 !important;
  left: auto !important;
  top: 0 !important;
  bottom: 0 !important;
  width: min(50vw, 720px) !important; /* change to min(25vw, 720px) for a tighter drawer */
  min-width: 360px !important;
  height: 100vh !important;
  z-index: 2147483647 !important;
  border: 0 !important;
  background: transparent !important;
  pointer-events: auto !important;
}
.shopify-buy-frame--cart iframe {
  height: 100% !important;
}

/* Mobile: make the cart a bottom sheet */
@media (max-width: 768px) {
  .shopify-buy-frame--cart {
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    height: 80vh !important;
    top: auto !important;
    bottom: 0 !important;
  }
}

/* Floating cart toggle should stay above content and clickable */
.shopify-buy-frame--toggle {
  position: fixed !important;
  right: 20px !important;
  bottom: 20px !important;
  z-index: 2147483646 !important;
  display: block !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  height: fit-content;
}
@media (max-width: 768px) {
  .shopify-buy-frame--toggle { right: 16px !important; bottom: 16px !important; }
}

/* --- 2) Buttons + quantity (only affects Buy Button/cart UI, not checkout) --- */

.shopify-buy__btn,
.shopify-buy__btn--cart-checkout {
  background-color: #1c406e !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: none !important;
}
.shopify-buy__btn:hover,
.shopify-buy__btn:focus,
.shopify-buy__btn--cart-checkout:hover,
.shopify-buy__btn--cart-checkout:focus {
  background-color: #193a63 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Keep +/- perfectly centered and inputs readable */
.shopify-buy__quantity-container {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.shopify-buy__quantity-increment,
.shopify-buy__quantity-decrement {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  font-size: 18px !important;
  line-height: 1 !important;
  border: 1px solid #dddddd !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  color: #1c406e !important;
  cursor: pointer !important;
}
.shopify-buy__quantity-increment:hover,
.shopify-buy__quantity-decrement:hover { background: #f1f1f1 !important; }

.shopify-buy__quantity-input {
  width: 64px !important;
  text-align: center !important;
  border: 1px solid #dddddd !important;
  border-radius: 6px !important;
  padding: 6px 8px !important;
}
@media (max-width: 600px) {
  .shopify-buy__quantity-container { gap: 4px !important; }
  .shopify-buy__quantity-input { width: 50px !important; }
}

/* --- 3) Cart scroll polish (long carts) --- */

.shopify-buy__cart {
  max-height: 85vh !important;
  height: auto !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
}
.shopify-buy__cart__content {
  max-height: calc(75vh - 150px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 10px !important;
  flex: 1 1 auto !important;
}
.shopify-buy__cart__footer {
  position: sticky !important;
  bottom: 0 !important;
  background: #ffffff !important;
  padding-top: 15px !important;
  border-top: 1px solid #e5e5e5 !important;
  margin-top: auto !important;
}

/* Subtle scrollbars */
.shopify-buy__cart__content::-webkit-scrollbar { width: 8px; }
.shopify-buy__cart__content::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.shopify-buy__cart__content::-webkit-scrollbar-thumb { background: #888888; border-radius: 4px; }
.shopify-buy__cart__content::-webkit-scrollbar-thumb:hover { background: #555555; }
.shopify-buy__cart__content { scrollbar-width: thin; scrollbar-color: #888888 #f1f1f1; }

/* --- 4) Intentionally no checkout styling (separate domain) --- */
.shopify-buy__cart-toggle{
	background-color: #193a63;
}