/* ASAPP Store — cart badge, toast, checkout and order confirmation */

/* Header cart button */
.cart-btn { position: relative; display: inline-flex; }
.cart-badge {
  position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: #e31e24; color: #fff; font: 700 11px/18px Poppins, sans-serif; text-align: center;
}
.cart-badge[hidden] { display: none; }

/* "Added to cart" toast */
.store-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 1080; display: flex; align-items: center; gap: 12px;
  max-width: calc(100vw - 32px); padding: 12px 14px 12px 18px; border-radius: 10px;
  background: #23272b; color: #fff; box-shadow: 0 12px 32px rgba(0,0,0,.25);
  transform: translate(-50%, 140%); opacity: 0; transition: transform .3s ease, opacity .3s ease;
}
.store-toast.show { transform: translate(-50%, 0); opacity: 1; }
.store-toast.is-error { background: #b3141a; }
.store-toast i { font-size: 1.25rem; color: #4ade80; }
.store-toast.is-error i { color: #fff; }
.store-toast .btn-a { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .store-toast { transition: none; } }

[data-add].is-loading, #spmBuy.is-loading { opacity: .6; pointer-events: none; }

/* Checkout layout */
.co-sec { padding-top: 40px; }
.co-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; align-items: start; }
@media (max-width: 991px) { .co-grid { grid-template-columns: 1fr; } .co-summary { order: -1; } }

.co-summary {
  position: sticky; top: 96px; padding: 24px; border: 1px solid #e3e3e3; border-radius: 12px; background: #fff;
}
.co-lines { list-style: none; margin: 0; padding: 0; }
.co-line { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid #eee; }
.co-line:has(> .co-line-main:first-child) { grid-template-columns: minmax(0, 1fr) auto; }
.co-line img { width: 54px; height: 73px; object-fit: cover; border-radius: 4px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.co-line-main b { display: block; font-size: .95rem; line-height: 1.3; }
.co-line-main small { display: block; margin-top: 2px; color: #6b6b6b; font-size: .8rem; }
.co-line-total { font-weight: 700; white-space: nowrap; }
.co-line.is-busy { opacity: .55; }

.co-qty { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.co-qty [data-qty] {
  width: 28px; height: 28px; border: 1px solid #d6d6d6; border-radius: 6px; background: #fff; line-height: 1; font-size: 1rem;
}
.co-qty [data-qty]:hover { border-color: #23272b; }
.co-qty [data-qty-val] { min-width: 24px; text-align: center; font-weight: 600; }
.co-remove { margin-left: 8px; border: 0; background: none; padding: 0; color: #e31e24; font-size: .8rem; text-decoration: underline; }

.co-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 16px; font-size: 1.05rem; }
.co-total b { font-size: 1.5rem; }

.co-msg { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: #fdecec; color: #b3141a; font-size: .9rem; }
.co-msg[hidden] { display: none; }

.co-empty { max-width: 460px; margin: 24px auto 40px; text-align: center; }
.co-empty > i { font-size: 3rem; color: #c4c4c4; }
.co-empty[hidden], .co-grid[hidden], #coShipping[hidden], #coDelegates[hidden] { display: none; }

/* Order confirmation */
.co-thanks { max-width: 640px; text-align: center; }
.co-thanks .tick {
  width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center;
  background: #e8f7ee; color: #15803d; font-size: 2rem;
}
.co-thanks .co-summary { position: static; text-align: left; }
.co-qty [data-qty]:disabled { opacity: .35; cursor: not-allowed; }

/* Subtotal / courier lines above the total */
.co-sums { margin: 14px 0 0; }
.co-sums > div { display: flex; justify-content: space-between; padding: 4px 0; color: #444; }
.co-sums > div[hidden] { display: none; }
.co-sums dt { font-weight: 400; }
.co-sums dd { margin: 0; font-weight: 600; }
.co-courier { color: #0f766e !important; }

/* "Added to your cart" pop-up */
.cart-added { position: relative; padding: 28px; border: 0; border-radius: 14px; }
.cart-added .btn-close { position: absolute; top: 16px; right: 16px; }
.ca-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding-right: 28px; }
.ca-tick { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #e8f7ee; color: #15803d; font-size: 1.2rem; }
.ca-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid #ececec; border-radius: 10px; background: #fafafa; }
.ca-item:empty { display: none; }
.ca-item img { width: 64px; height: 87px; object-fit: cover; border-radius: 4px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.ca-item b { display: block; line-height: 1.3; }
.ca-item small { display: block; margin-top: 2px; color: #6b6b6b; }
.ca-price { display: block; margin-top: 6px; font-weight: 700; }
.ca-price em { font-style: normal; font-weight: 500; color: #0f766e; font-size: .85rem; }
.ca-cart { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 2px; }
.ca-cart b { font-size: 1.25rem; }
.ca-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ca-actions .btn-a, .ca-actions .btn-b { justify-content: center; text-align: center; }
@media (max-width: 420px) { .ca-actions { grid-template-columns: 1fr; } }
.ca-note { margin: 14px 0 0; font-size: .8rem; color: #6b6b6b; text-align: center; }