/* Obelisk cart+checkout — centered modal, multi-step form, responsive. */

#ob-cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.55);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease-out;
}
#ob-cart-backdrop.is-open { opacity: 1; pointer-events: auto; }

#ob-cart {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 60vw;
  max-height: calc(100vh - 40px);
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24), 0 8px 24px rgba(0, 0, 0, 0.10);
  border-radius: 14px;
  z-index: 9999;
  transform: translate(-50%, calc(-50% + 20px));
  opacity: 0;
  pointer-events: none;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease-out;
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 15px;
}
#ob-cart.is-open {
  transform: translate(-50%, -50%);
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 767px) {
  #ob-cart { width: 98vw; font-size: 13px; max-height: calc(100vh - 16px); border-radius: 10px; }
}

.ob-head {
  padding: 20px 26px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 1.1em;
}
.ob-close {
  background: none; border: 0; cursor: pointer;
  font-size: 1.6em; line-height: 1;
  color: #555;
  padding: 4px 8px;
}
.ob-close:hover { color: #000; }

.ob-body {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 60px;
}

/* -- cart list -- */
.ob-items { list-style: none; margin: 0; padding: 6px 0; }
.ob-empty { padding: 36px 26px; color: #777; font-size: 1em; text-align: center; }
.ob-item {
  display: flex; gap: 16px;
  padding: 16px 26px;
  border-bottom: 1px solid #f2f2f2;
}
.ob-item:last-child { border-bottom: 0; }
.ob-item img {
  width: 64px; height: 84px;
  object-fit: cover;
  border-radius: 4px;
  background: #f5f5f5;
  flex-shrink: 0;
}
.ob-item-body { flex: 1; min-width: 0; }
.ob-item-name {
  font-size: 0.95em; font-weight: 500; line-height: 1.3;
  margin: 0 0 4px; color: #1a1a1a; text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.ob-item-name:hover { color: #000; }
.ob-qty { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.ob-qty button {
  width: 28px; height: 28px;
  border: 1px solid #ddd; background: #fff;
  border-radius: 4px; cursor: pointer;
  font-size: 1em; line-height: 1; color: #333;
}
.ob-qty button:hover { background: #f5f5f5; }
.ob-qty-num { min-width: 24px; text-align: center; font-size: 0.9em; }
.ob-item-price { font-size: 0.95em; font-weight: 600; white-space: nowrap; }
.ob-item-remove {
  font-size: 0.75em; color: #999;
  background: none; border: 0; padding: 0; margin-top: 4px;
  cursor: pointer; text-decoration: underline;
}
.ob-item-remove:hover { color: #c00; }
@media (max-width: 767px) {
  .ob-item { padding: 12px 14px; gap: 10px; }
  .ob-item img { width: 46px; height: 60px; }
  .ob-qty button { width: 24px; height: 24px; }
}

/* -- coupon input (cart mode) -- */
.ob-coupon {
  display: flex; gap: 8px;
  padding: 12px 26px 0;
}
.ob-coupon input {
  flex: 1; padding: 10px 12px;
  border: 1px solid #ddd; border-radius: 6px;
  font-size: 0.95em; font-family: inherit;
  background: #fff;
}
.ob-coupon input:focus {
  outline: none; border-color: #1a1a1a; box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}
.ob-coupon-msg {
  padding: 6px 26px 0;
  font-size: 0.8em; min-height: 16px;
}
.ob-coupon-msg.is-ok  { color: #2a8a3d; }
.ob-coupon-msg.is-err { color: #c00; }
@media (max-width: 767px) {
  .ob-coupon { padding: 8px 14px 0; }
  .ob-coupon-msg { padding: 4px 14px 0; }
}

/* -- summary + primary CTA -- */
.ob-foot {
  padding: 14px 26px 20px;
  border-top: 1px solid #eee;
  background: #fafafa;
}
.ob-summary { font-size: 0.9em; }
.ob-summary-row {
  display: flex; justify-content: space-between; margin-bottom: 4px;
}
.ob-summary .ob-summary-total {
  font-weight: 600; font-size: 1em; margin-top: 8px;
  padding-top: 8px; border-top: 1px solid #e5e5e5;
}
.ob-summary-discount { color: #2a8a3d; }
.ob-btn {
  display: inline-block; padding: 14px 22px;
  background: #1a1a1a; color: #fff; border: 0;
  border-radius: 8px; cursor: pointer; font-weight: 500;
  font-size: 0.95em; text-align: center;
  transition: background 150ms;
}
.ob-btn:hover:not(:disabled) { background: #000; }
.ob-btn:disabled { background: #999; cursor: not-allowed; }
.ob-btn-block { display: block; width: 100%; margin-top: 12px; }
.ob-btn-ghost { background: #fff; color: #1a1a1a; border: 1px solid #ddd; }
.ob-btn-ghost:hover:not(:disabled) { background: #f5f5f5; }
.ob-btn-sm { padding: 10px 14px; font-size: 0.9em; }
@media (max-width: 767px) {
  .ob-btn { padding: 10px 16px; }
  .ob-foot { padding: 12px 14px 16px; }
}

.ob-error { color: #c00; font-size: 0.8em; margin-top: 8px; text-align: center; }

/* -- checkout multi-step -- */
.ob-steps {
  list-style: none;
  display: flex; gap: 8px;
  padding: 16px 26px 4px;
  margin: 0;
  align-items: stretch;
}
.ob-steps li { flex: 1; }
.ob-step-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent; border: 1px solid #eee;
  border-radius: 10px; cursor: pointer; text-align: left;
  color: #666; font-family: inherit;
  transition: border-color 120ms, background 120ms, color 120ms;
}
.ob-step-btn:hover:not(:disabled) { background: #fafafa; border-color: #ddd; color: #1a1a1a; }
.ob-step-btn:disabled { cursor: not-allowed; opacity: 0.55; }
.ob-steps li.is-current .ob-step-btn { border-color: #1a1a1a; background: #fafafa; color: #1a1a1a; }
.ob-steps li.is-done    .ob-step-btn { color: #2a8a3d; border-color: #cde5cf; background: #f4faf5; }
.ob-step-icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  color: inherit;
}
.ob-step-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.ob-step-labels { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.ob-step-title { font-weight: 600; font-size: 0.9em; }
.ob-step-sub   { font-size: 0.75em; color: #888; margin-top: 2px; }
.ob-steps li.is-current .ob-step-sub { color: #666; }
@media (max-width: 767px) {
  .ob-steps { padding: 10px 12px 2px; gap: 6px; }
  .ob-step-btn { padding: 8px 8px; justify-content: center; }
  .ob-step-labels { display: none; }
  .ob-step-icon { width: 24px; height: 24px; }
  .ob-step-icon svg { width: 20px; height: 20px; }
}

.ob-step { padding: 20px 26px 8px; display: none; }
.ob-step.is-current { display: block; }
.ob-step h3 { font-size: 1em; margin: 0 0 14px; font-weight: 600; }
.ob-step .ob-optional {
  font-size: 0.75em; color: #888; font-weight: normal; margin-left: 6px;
}
.ob-step p.ob-hint { font-size: 0.8em; color: #777; margin: -6px 0 12px; }
@media (max-width: 767px) {
  .ob-step { padding: 14px 14px 6px; }
}

.ob-field { margin-bottom: 14px; }
.ob-field label {
  display: block; font-size: 0.78em; color: #555; margin-bottom: 4px; font-weight: 500;
}
.ob-field input, .ob-field select {
  width: 100%; padding: 11px 13px;
  border: 1px solid #ddd; border-radius: 6px;
  font-size: 0.95em; font-family: inherit;
  background: #fff;
}
.ob-field input:focus, .ob-field select:focus {
  outline: none; border-color: #1a1a1a; box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}
.ob-field .ob-field-err { color: #c00; font-size: 0.72em; margin-top: 4px; min-height: 14px; }
.ob-row { display: flex; gap: 10px; }
.ob-row .ob-field { flex: 1; }
@media (max-width: 767px) {
  .ob-field input, .ob-field select { padding: 9px 11px; }
}

.ob-methods { display: grid; gap: 8px; }
.ob-methods label {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid #ddd; border-radius: 8px;
  cursor: pointer; font-size: 0.95em;
  transition: border-color 120ms, background 120ms;
}
.ob-methods label:hover { background: #fafafa; }
.ob-methods input[type=radio] { margin: 0; }
.ob-methods label:has(input:checked) { border-color: #1a1a1a; background: #fafafa; }
.ob-methods img { width: 34px; height: 22px; object-fit: contain; }

.ob-review dl {
  margin: 0; display: grid;
  grid-template-columns: 1fr 2fr; gap: 6px 14px; font-size: 0.9em;
}
.ob-review dt { color: #666; }
.ob-review dd { margin: 0; }
.ob-review .ob-review-sep { grid-column: 1 / -1; height: 1px; background: #eee; margin: 8px 0; }

.ob-nav {
  display: flex; gap: 10px;
  padding: 12px 26px 20px;
  border-top: 1px solid #eee; background: #fafafa;
}
.ob-nav .ob-btn { flex: 1; }
@media (max-width: 767px) {
  .ob-nav { padding: 10px 14px 14px; }
}

/* count badge */
.snipcart-total-items,
[data-ob-cart-count] {
  display: inline-block;
  min-width: 18px;
  text-align: center;
}
