/* =========================================================
   A BOA PARTE STORE — Estilos da loja (sacola, produto,
   checkout e botão WhatsApp). Complementa o CSS existente.
   ========================================================= */

/* ── BOTÃO WHATSAPP FLUTUANTE (identidade da loja) ── */
.whatsapp-btn {
  width: 58px;
  height: 58px;
  background: linear-gradient(145deg, #C9AC6E 0%, #B89B5E 45%, #6E5533 100%) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.28), 0 2px 8px rgba(184, 155, 94, 0.35) !important;
}
.whatsapp-btn:hover {
  transform: translateY(-3px) scale(1.05) !important;
  box-shadow: 0 16px 38px rgba(17, 17, 17, 0.34), 0 4px 14px rgba(184, 155, 94, 0.45) !important;
}
.whatsapp-pulse {
  border-color: rgba(184, 155, 94, 0.38) !important;
  pointer-events: none; /* nunca bloqueia o clique no botão */
}
@media (max-width: 640px) {
  .whatsapp-btn { width: 54px; height: 54px; }
}

/* ── UTIL ── */
.abp-hidden { display: none !important; }
.abp-overlay {
  position: fixed; inset: 0; z-index: 1400;
  background: rgba(17, 17, 17, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .35s var(--ease-out);
}
.abp-overlay.open { opacity: 1; }
.abp-error {
  display: block; color: #B23A3A; font-size: .68rem;
  letter-spacing: .04em; margin-top: 6px; min-height: 0;
}
.abp-note { font-size: .68rem; color: var(--gray-text); line-height: 1.6; }

.abp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 14px 22px; width: 100%;
  font-family: var(--font-body); font-size: .68rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  border: none; cursor: pointer; transition: all .3s var(--ease-out);
}
.abp-btn-gold { background: var(--gold); color: #fff; }
.abp-btn-gold:hover { background: #A2884E; }
.abp-btn-dark { background: var(--black); color: #fff; }
.abp-btn-dark:hover { background: #000; }
.abp-btn-ghost { background: transparent; color: var(--black); border: 1px solid rgba(17,17,17,.18); }
.abp-btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.abp-btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ── DRAWER (sacola / checkout) ── */
.abp-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1500;
  width: 100%; max-width: 440px;
  background: var(--white);
  display: flex; flex-direction: column;
  transform: translateX(102%);
  transition: transform .45s var(--ease-out);
  box-shadow: -20px 0 60px rgba(0,0,0,.14);
}
.abp-drawer.open { transform: translateX(0); }
.abp-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px; border-bottom: 1px solid rgba(17,17,17,.08);
  flex-shrink: 0;
}
.abp-drawer-title {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 400;
  letter-spacing: .04em;
}
.abp-close {
  background: none; border: none; cursor: pointer; color: var(--gray-text);
  width: 40px; height: 40px; font-size: 1rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.abp-close:hover { color: var(--black); }
.abp-drawer-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 20px 24px; }
.abp-drawer-foot {
  border-top: 1px solid rgba(17,17,17,.08);
  padding: 18px 24px calc(18px + env(safe-area-inset-bottom));
  flex-shrink: 0; background: var(--white);
}

/* ── ITENS DA SACOLA ── */
.abp-empty { text-align: center; padding: 60px 10px; color: var(--gray-text); font-size: .82rem; }
.abp-line {
  display: grid; grid-template-columns: 72px 1fr; gap: 14px;
  padding: 16px 0; border-bottom: 1px solid rgba(17,17,17,.07);
}
.abp-line-img {
  width: 72px; aspect-ratio: 3/4; background: var(--gray-light);
  background-size: cover; background-position: center;
}
.abp-line-name { font-family: var(--font-display); font-size: .95rem; margin-bottom: 4px; }
.abp-line-meta { font-size: .66rem; color: var(--gray-text); letter-spacing: .06em; line-height: 1.7; }
.abp-line-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 10px; }
.abp-qty { display: inline-flex; align-items: center; border: 1px solid rgba(17,17,17,.15); }
.abp-qty button {
  width: 34px; height: 34px; background: none; border: none; cursor: pointer;
  font-size: .95rem; color: var(--black);
}
.abp-qty button:hover { color: var(--gold); }
.abp-qty span { min-width: 30px; text-align: center; font-size: .78rem; }
.abp-line-sub { font-size: .82rem; font-weight: 500; }
.abp-line-remove {
  background: none; border: none; cursor: pointer; padding: 6px 0;
  font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gray-text);
}
.abp-line-remove:hover { color: #B23A3A; }

.abp-summary { margin-top: 18px; font-size: .78rem; }
.abp-summary div { display: flex; justify-content: space-between; padding: 7px 0; color: var(--gray-text); }
.abp-summary div.total {
  color: var(--black); font-weight: 600; font-size: .95rem;
  border-top: 1px solid rgba(17,17,17,.1); margin-top: 6px; padding-top: 14px;
}

/* ── MODAL DE PRODUTO ── */
.abp-modal {
  position: fixed; inset: 0; z-index: 1500;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  pointer-events: none;
}
.abp-modal.open { pointer-events: auto; }
.abp-modal-card {
  background: var(--white); width: 100%; max-width: 940px;
  max-height: 90vh; overflow-y: auto; position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  transform: translateY(24px); opacity: 0;
  transition: all .4s var(--ease-out);
}
.abp-modal.open .abp-modal-card { transform: translateY(0); opacity: 1; }
.abp-modal-close { position: absolute; top: 10px; right: 10px; z-index: 3; background: rgba(255,255,255,.9); }
.abp-gallery { background: var(--gray-light); }
.abp-gallery-main { width: 100%; aspect-ratio: 3/4; background-size: cover; background-position: center; }
.abp-thumbs { display: flex; gap: 8px; padding: 10px; flex-wrap: wrap; }
.abp-thumb {
  width: 54px; aspect-ratio: 3/4; background-size: cover; background-position: center;
  border: 1px solid transparent; cursor: pointer;
}
.abp-thumb.active { border-color: var(--gold); }
.abp-detail { padding: 34px 32px; }
.abp-detail h3 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 400; line-height: 1.2; }
.abp-detail .abp-price-row { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 16px; }
.abp-detail .abp-price { font-size: 1.15rem; font-weight: 500; }
.abp-detail .abp-price-old { font-size: .82rem; color: var(--gray-mid); text-decoration: line-through; }
.abp-detail p.abp-desc { font-size: .82rem; color: var(--gray-text); line-height: 1.8; }
.abp-field { margin-top: 20px; }
.abp-label {
  font-size: .62rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--black); display: block; margin-bottom: 10px;
}
.abp-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.abp-size {
  min-width: 46px; min-height: 44px; padding: 0 14px;
  background: none; border: 1px solid rgba(17,17,17,.18); cursor: pointer;
  font-size: .75rem; letter-spacing: .08em; transition: all .25s;
}
.abp-size:hover { border-color: var(--gold); }
.abp-size.selected { background: var(--black); color: #fff; border-color: var(--black); }
.abp-color {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(0,0,0,.12); position: relative; background-clip: padding-box;
}
.abp-color.selected { box-shadow: 0 0 0 2px var(--white), 0 0 0 3px var(--gold); }
.abp-specs { margin-top: 22px; border-top: 1px solid rgba(17,17,17,.08); padding-top: 16px; }
.abp-specs p { font-size: .72rem; color: var(--gray-text); line-height: 1.8; }
.abp-specs strong { color: var(--black); font-weight: 600; }

/* ── FORMULÁRIO ── */
.abp-form-group { margin-bottom: 16px; }
.abp-input, .abp-select, .abp-textarea {
  width: 100%; max-width: 100%; padding: 13px 14px;
  font-family: var(--font-body); font-size: .82rem; color: var(--black);
  background: var(--off-white); border: 1px solid rgba(17,17,17,.12);
  border-radius: 0; transition: border-color .25s;
}
.abp-input:focus, .abp-select:focus, .abp-textarea:focus { outline: none; border-color: var(--gold); }
.abp-input.invalid, .abp-select.invalid, .abp-textarea.invalid { border-color: #B23A3A; }
.abp-textarea { min-height: 84px; resize: vertical; }
.abp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.abp-radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
.abp-radio {
  flex: 1; min-width: 130px; min-height: 48px; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid rgba(17,17,17,.15); cursor: pointer; font-size: .78rem;
}
.abp-radio.selected { border-color: var(--gold); background: rgba(184,155,94,.07); }
.abp-check { display: flex; gap: 10px; align-items: flex-start; font-size: .74rem; line-height: 1.6; cursor: pointer; }
.abp-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--gold); flex-shrink: 0; }
.abp-review { background: var(--off-white); padding: 16px; margin-bottom: 22px; }
.abp-review-line { display: flex; justify-content: space-between; font-size: .74rem; padding: 5px 0; color: var(--gray-text); gap: 12px; }
.abp-review-line strong { color: var(--black); font-weight: 500; }

/* ── TOAST ── */
.abp-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  z-index: 2000; background: var(--black); color: #fff;
  padding: 14px 22px; font-size: .76rem; letter-spacing: .04em; max-width: 90vw;
  opacity: 0; pointer-events: none; transition: all .35s var(--ease-out);
  border-left: 3px solid var(--gold);
}
.abp-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .abp-modal-card { grid-template-columns: 1fr; max-height: 92vh; }
  .abp-detail { padding: 24px 20px 30px; }
  .abp-gallery-main { aspect-ratio: 4/3; }
}
@media (max-width: 640px) {
  .abp-drawer { max-width: 100%; }
  .abp-drawer-body { padding: 16px; }
  .abp-drawer-head, .abp-drawer-foot { padding-left: 16px; padding-right: 16px; }
  .abp-modal { padding: 0; }
  .abp-modal-card { max-height: 100vh; height: 100%; }
  .abp-row { grid-template-columns: 1fr; }
}
