/* AMM Cart — (C) 2026 AMM Designs, LLC */
:root { --ammcart-accent: #6b2d8c; }

.ammcart-add[hidden] { display: none !important; }
.ammcart-add { margin: 1.25rem 0; display: flex; flex-direction: column; gap: .6rem; max-width: 380px; }
.ammcart-add .ammcart-option { padding: .55rem .7rem; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; background: #fff; }
.ammcart-row { display: flex; gap: .6rem; align-items: center; }
.ammcart-qty-label { display: flex; align-items: center; gap: .4rem; margin: 0; font-weight: 600; }
.ammcart-qty { width: 4.2rem; padding: .5rem; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; }
.ammcart-btn, .ammcart-checkout, .ammcart-thanks button {
  background: var(--ammcart-accent); color: #fff; border: 0; border-radius: 6px; padding: .7rem 1.4rem;
  font-size: 1rem; font-weight: 700; cursor: pointer; letter-spacing: .02em; transition: filter .15s;
}
.ammcart-btn:hover, .ammcart-checkout:hover { filter: brightness(1.12); }
.ammcart-checkout:disabled { opacity: .7; cursor: wait; }

.ammcart-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 9998; width: 58px; height: 58px; border-radius: 50%;
  border: 0; background: var(--ammcart-accent); color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.25);
  display: none; align-items: center; justify-content: center; cursor: pointer;
}
.ammcart-fab.has-items { display: flex; }
.ammcart-count {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; border-radius: 11px; padding: 0 5px;
  background: #e2a72e; color: #2b1a00; font: 700 12px/22px system-ui, sans-serif;
}

.ammcart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 9998; opacity: 0; pointer-events: none; transition: opacity .2s; }
.ammcart-overlay.open { opacity: 1; pointer-events: auto; }
.ammcart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 100vw); background: #fff; z-index: 9999;
  transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; padding: 1.1rem 1.2rem 2rem;
  box-shadow: -6px 0 24px rgba(0,0,0,.18); color: #222; font-size: 15px; line-height: 1.4;
}
.ammcart-drawer.open { transform: none; }
.ammcart-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--ammcart-accent); padding-bottom: .5rem; }
.ammcart-head h2 { margin: 0; font-size: 1.35rem; color: #222; }
.ammcart-close { background: none; border: 0; font-size: 2rem; line-height: 1; cursor: pointer; color: #555; }
.ammcart-test { background: #fff3cd; color: #6b5100; font-size: .8rem; padding: .3rem .6rem; border-radius: 4px; margin-top: .6rem; }
.ammcart-empty { margin: 2rem 0; color: #666; }
.ammcart-items { list-style: none; margin: .8rem 0; padding: 0; }
.ammcart-items li { display: flex; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid #eee; }
.ammcart-items img, .ammcart-noimg { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; background: #f4eef7; flex-shrink: 0; }
.ammcart-info { flex: 1; min-width: 0; }
.ammcart-name { font-weight: 600; }
.ammcart-name span { font-weight: 400; color: #555; }
.ammcart-line { display: flex; justify-content: space-between; align-items: center; margin-top: .35rem; }
.ammcart-stepper { display: inline-flex; align-items: center; border: 1px solid #ccc; border-radius: 6px; }
.ammcart-stepper button { background: none; border: 0; width: 30px; height: 30px; font-size: 1.1rem; cursor: pointer; }
.ammcart-stepper span { min-width: 24px; text-align: center; }
.ammcart-remove { background: none; border: 0; padding: 0; margin-top: .3rem; color: #888; font-size: .8rem; text-decoration: underline; cursor: pointer; }
.ammcart-delivery { margin: 1rem 0; padding: .8rem; background: #faf7fc; border-radius: 8px; }
.ammcart-label { font-weight: 600; margin-bottom: .4rem; }
.ammcart-delivery label { display: flex; align-items: center; gap: .45rem; margin: .3rem 0; cursor: pointer; font-weight: 400; }
.ammcart-delivery em { margin-left: auto; font-style: normal; color: #444; }
.ammcart-note { font-size: .85rem; color: #555; margin: .5rem 0 0; }
.ammcart-totals { display: grid; grid-template-columns: 1fr auto; gap: .25rem .5rem; margin: .5rem 0 0; }
.ammcart-totals dt, .ammcart-totals dd { margin: 0; }
.ammcart-totals .ammcart-total { font-weight: 700; font-size: 1.1rem; border-top: 1px solid #ddd; padding-top: .35rem; }
.ammcart-gift { font-size: .85rem; color: #666; margin: .7rem 0; }
.ammcart-error { color: #b00020; font-size: .9rem; min-height: 1em; margin-bottom: .4rem; }
.ammcart-checkout { width: 100%; padding: .9rem; font-size: 1.05rem; }
.ammcart-secure { text-align: center; font-size: .78rem; color: #777; margin-top: .5rem; }

.ammcart-thanks { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.ammcart-thanks > div { background: #fff; border-radius: 10px; padding: 1.6rem 1.8rem; max-width: 420px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.ammcart-thanks h2 { margin: 0 0 .5rem; color: var(--ammcart-accent); }
