/* --- Inline cart buttons --- */

.inline-cart-wrap {
  padding-top: 8px;
}

.inline-add-btn {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 8px 14px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sand-deep), var(--accent));
  box-shadow: none;
  cursor: pointer;
  transition: transform 160ms ease;
}

.inline-add-btn:hover {
  transform: scale(1.04);
}

.inline-added-btn {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 8px 14px;
  color: var(--accent-deep);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: background 160ms ease;
}

.inline-added-btn:hover {
  background: rgb(141 111 167 / 8%);
}

.inline-cart-wrap--detail {
  justify-self: center;
}

.inline-cart-wrap--detail .inline-add-btn,
.inline-cart-wrap--detail .inline-added-btn {
  min-width: min(100%, 260px);
  min-height: 58px;
  padding: 16px 28px;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.inline-cart-wrap--detail .inline-add-btn {
  box-shadow: none;
}

/* --- Cart FAB & Panel --- */

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgb(0 0 0 / 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}

.cart-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cart-fab {
  position: fixed;
  z-index: 1000;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  padding: 0;
  color: #fff;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sand-deep), var(--accent));
  box-shadow: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.cart-fab:hover {
  transform: scale(1.08);
  box-shadow: none;
}

.cart-fab:focus-visible {
  outline: 3px solid rgb(141 111 167 / 34%);
  outline-offset: 4px;
}

.cart-fab--flash {
  animation: cart-pop 350ms ease;
}

@keyframes cart-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.22); }
  100% { transform: scale(1); }
}

.cart-fab-icon-default {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-fab-icon-close {
  display: none;
  font-size: 30px;
  line-height: 1;
}

.cart-fab--open .cart-fab-icon-default {
  display: none;
}

.cart-fab--open .cart-fab-icon-close {
  display: block;
}

.cart-fab-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
  border-radius: 99px;
  background: #e25555;
}

.cart-panel {
  position: fixed;
  z-index: 950;
  top: 0;
  right: 0;
  width: min(400px, 92vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  background: var(--page-bg);
  box-shadow: none;
  transform: translateX(100%);
  transition: transform 300ms ease;
  overflow-y: auto;
}

.cart-panel.is-open {
  transform: translateX(0);
}

.cart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.cart-panel-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
}

.cart-panel-close {
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.cart-panel-close:hover {
  color: var(--ink);
  background: rgb(0 0 0 / 0.06);
}

.cart-empty {
  padding: 48px 22px;
  color: var(--muted);
  font-size: 18px;
  text-align: center;
}

.cart-items {
  flex: 1;
  padding: 12px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-item-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.cart-item-unit-price {
  font-size: 13px;
  color: var(--muted);
}

.cart-item-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--accent-deep);
  white-space: nowrap;
}

.cart-item-remove {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.cart-item-remove:hover {
  color: #e25555;
  background: rgb(226 85 85 / 0.1);
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  font-size: 18px;
  border-top: 1px solid var(--line);
}

.cart-total strong {
  font-size: 22px;
  color: var(--accent-deep);
}

.cart-checkout-btn {
  margin: 8px 22px 22px;
  min-height: 52px;
  padding: 14px 24px;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sand-deep), var(--accent));
  box-shadow: none;
  cursor: pointer;
  transition: transform 180ms ease;
}

.cart-checkout-btn:hover {
  transform: scale(1.03);
}

/* --- Back button in checkout header --- */

.cart-back-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--accent-deep);
  font-size: 22px;
  line-height: 1;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.cart-back-btn:hover {
  background: rgb(0 0 0 / 0.06);
}

/* --- Checkout form --- */

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 22px 22px;
}

.checkout-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.checkout-summary strong {
  font-size: 20px;
  color: var(--accent-deep);
}

.checkout-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.checkout-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.checkout-input {
  min-height: 44px;
  padding: 10px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-strong);
  outline: none;
  transition: border-color 180ms ease;
}

.checkout-input:focus {
  border-color: var(--accent);
  box-shadow: none;
}

.checkout-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.checkout-receipt-option {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.checkout-receipt-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.checkout-error {
  font-size: 13px;
  color: #d44;
  min-height: 0;
}

.checkout-error--global {
  text-align: center;
}

.checkout-turnstile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.checkout-turnstile-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.checkout-pay-btn {
  min-height: 52px;
  padding: 14px 24px;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sand-deep), var(--accent));
  box-shadow: none;
  cursor: pointer;
  transition: transform 180ms ease;
}

.checkout-pay-btn:hover {
  transform: scale(1.03);
}
