/* On-site cart — floating button + slide-in drawer. Client-side (localStorage);
 * payment hands off to WooCommerce. Loaded site-wide via BaseLayout. */

.wc-cart-btn {
  position: fixed; right: clamp(14px, 3vw, 28px); bottom: clamp(14px, 3vw, 28px); z-index: 9000;
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(160deg, #28415c, #1f3247); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(22, 32, 44, 0.32); transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.wc-cart-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(22, 32, 44, 0.4); }
.wc-cart-btn svg { width: 24px; height: 24px; }
.wc-cart-btn__count {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: linear-gradient(135deg, #e8c87a, #b8923f); color: #1f3247;
  font: 700 0.74rem/22px 'Inter Tight', system-ui, sans-serif; text-align: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.wc-cart-btn[hidden] { display: none; }

.wc-cart-overlay {
  position: fixed; inset: 0; z-index: 9001; background: rgba(15, 22, 31, 0.5);
  opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s ease;
}
.wc-cart-overlay.is-open { opacity: 1; visibility: visible; }

.wc-cart {
  position: fixed; top: 0; right: 0; z-index: 9002; height: 100%;
  width: min(420px, 92vw); background: #fff; box-shadow: -20px 0 60px rgba(22, 32, 44, 0.25);
  transform: translateX(100%); transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column; font-family: 'Inter Tight', system-ui, sans-serif;
}
.wc-cart.is-open { transform: translateX(0); }

.wc-cart__head { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.4rem; border-bottom: 1px solid #e8e4da; }
.wc-cart__title { font-family: 'EB Garamond', Georgia, serif; font-size: 1.4rem; font-weight: 600; color: #1f3247; margin: 0; }
.wc-cart__close { border: 0; background: none; cursor: pointer; font-size: 1.6rem; line-height: 1; color: #5c6672; padding: 0.25rem; }
.wc-cart__close:hover { color: #1f3247; }

.wc-cart__items { flex: 1; overflow-y: auto; padding: 0.5rem 1.4rem; }
.wc-cart__empty { text-align: center; color: #5c6672; padding: 3rem 1rem; }
.wc-cart__empty a { color: #9a7a2c; font-weight: 600; text-decoration: none; }

.wc-cart__item { display: grid; grid-template-columns: 64px 1fr auto; gap: 0.9rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid #f0ede6; }
.wc-cart__thumb { width: 64px; height: 80px; border: 1px solid #e8e4da; border-radius: 8px; overflow: hidden; background: #fff; display: grid; place-items: center; }
.wc-cart__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; box-sizing: border-box; }
.wc-cart__name { font-size: 0.88rem; line-height: 1.35; color: #1f3247; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wc-cart__name:hover { color: #9a7a2c; }
.wc-cart__price { font-size: 0.85rem; color: #9a7a2c; font-weight: 600; margin-top: 0.3rem; }
.wc-cart__qty { display: inline-flex; align-items: center; border: 1px solid #e8e4da; border-radius: 999px; margin-top: 0.45rem; }
.wc-cart__qty button { width: 26px; height: 26px; border: 0; background: none; cursor: pointer; color: #1f3247; font-size: 1rem; line-height: 1; }
.wc-cart__qty span { min-width: 22px; text-align: center; font-size: 0.85rem; font-weight: 600; }
.wc-cart__remove { border: 0; background: none; cursor: pointer; color: #aeb4bc; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.3rem 0; }
.wc-cart__remove:hover { color: #c0392b; }
.wc-cart__line-col { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; }

.wc-cart__foot { border-top: 1px solid #e8e4da; padding: 1.25rem 1.4rem calc(1.25rem + env(safe-area-inset-bottom, 0px)); }
.wc-cart__subtotal { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.4rem; }
.wc-cart__subtotal span { color: #5c6672; font-size: 0.9rem; }
.wc-cart__subtotal strong { font-family: 'EB Garamond', Georgia, serif; font-size: 1.35rem; color: #1f3247; }
.wc-cart__note { font-size: 0.78rem; color: #7a828d; margin: 0 0 1rem; }
.wc-cart__checkout {
  display: block; width: 100%; text-align: center; padding: 0.95rem 1.5rem; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 1rem 'Inter Tight', system-ui, sans-serif; color: #1f3247; text-decoration: none;
  background: linear-gradient(135deg, #e8c87a, #b8923f 60%, #9a7a2c); box-shadow: 0 10px 24px rgba(184, 146, 63, 0.3);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.wc-cart__checkout:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(184, 146, 63, 0.42); }
.wc-cart__checkout[disabled] { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }
.wc-cart__continue { display: block; text-align: center; margin-top: 0.75rem; background: none; border: 0; cursor: pointer; color: #5c6672; font-size: 0.85rem; }
.wc-cart__continue:hover { color: #1f3247; }
