/*
 * Auria Storefront Addons — visual premium
 * v2.45.6 — repaginado pra parecer app, não fieldset HTML cru.
 *
 * 100% namespaced dentro de .auria-addons-v2 — nada vaza pro tema.
 * Reset agressivo no root + override do que tema possa ter aplicado.
 */

.auria-addons-v2,
.auria-addons-v2 * {
  box-sizing: border-box;
}

.auria-addons-v2 {
  all: revert;
  display: block !important;
  position: relative !important;
  width: 100%;
  max-width: 100%;
  margin: 18px 0 22px;
  padding: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  color: #1f2937;
  overflow: visible;
  clear: both;
  bottom: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  z-index: auto;
}

/* ───────────────────────────────────────────────────────── */
/* GRUPO (fieldset → card visual premium)                    */
/* ───────────────────────────────────────────────────────── */
.auria-addons-v2 .aa-group {
  border: none;
  margin: 0 0 16px;
  padding: 16px;
  min-width: 0;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  border: 1px solid #f1f5f9;
}

.auria-addons-v2 .aa-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  padding: 0;
  margin: 0 0 4px;
  line-height: 1.3;
  /* legend HTML pode herdar tamanho de fonte estranho do navegador */
  float: none;
  width: 100%;
}

.auria-addons-v2 .aa-group-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 16px;
  line-height: 1;
  background: linear-gradient(135deg, #fce7f3, #fff);
  border-radius: 10px;
  border: 1px solid #fbcfe8;
}

.auria-addons-v2 .aa-required-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid #fde68a;
}

.auria-addons-v2 .aa-group-sub {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 14px;
  padding: 0;
  padding-left: 42px; /* alinha com texto do título depois do ícone */
}

/* ───────────────────────────────────────────────────────── */
/* OPÇÕES (cards selecionáveis)                              */
/* ───────────────────────────────────────────────────────── */
.auria-addons-v2 .aa-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auria-addons-v2 .aa-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.08s ease;
  position: relative;
  min-height: 60px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.auria-addons-v2 .aa-option:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.auria-addons-v2 .aa-option:active {
  transform: scale(0.99);
}

.auria-addons-v2 .aa-option.is-selected {
  border-color: #e91e63;
  background: linear-gradient(135deg, rgba(233, 30, 99, 0.06), rgba(255, 64, 129, 0.04));
  box-shadow: 0 2px 12px rgba(233, 30, 99, 0.15);
}

/* Esconde input nativo - check visual gerado por CSS */
.auria-addons-v2 .aa-option-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
  /* Override pra qualquer estilo que o tema tenha aplicado */
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  border: none !important;
  background: none !important;
}

/* Check visual (quando opção não tem imagem) */
.auria-addons-v2 .aa-option-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 2px solid #cbd5e1;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  background: #ffffff;
}

.auria-addons-v2 .aa-group[data-mode="single"] .aa-option-check {
  border-radius: 50%;
}

.auria-addons-v2 .aa-option:hover .aa-option-check {
  border-color: #94a3b8;
}

.auria-addons-v2 .aa-option.is-selected .aa-option-check {
  background: #e91e63;
  border-color: #e91e63;
  box-shadow: 0 2px 8px rgba(233, 30, 99, 0.3);
}

.auria-addons-v2 .aa-option-check-mark {
  width: 14px;
  height: 14px;
  opacity: 0;
  transform: scale(0.4);
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: transparent;
}

.auria-addons-v2 .aa-option.is-selected .aa-option-check-mark {
  opacity: 1;
  transform: scale(1);
}

.auria-addons-v2 .aa-group[data-mode="multiple"] .aa-option.is-selected .aa-option-check-mark {
  background: #fff;
  -webkit-mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cpath d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" fill="%23fff"/%3E%3C/svg%3E') center/contain no-repeat;
          mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cpath d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" fill="%23fff"/%3E%3C/svg%3E') center/contain no-repeat;
}

.auria-addons-v2 .aa-group[data-mode="single"] .aa-option.is-selected .aa-option-check-mark {
  background: #fff;
  border-radius: 50%;
}

/* Thumb (produto linkado com imagem) */
.auria-addons-v2 .aa-option-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
}

.auria-addons-v2 .aa-option-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Texto principal (label + descrição + preço) */
.auria-addons-v2 .aa-option-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.auria-addons-v2 .aa-option-label {
  font-weight: 600;
  font-size: 15px;
  color: #0f172a;
  line-height: 1.35;
}

.auria-addons-v2 .aa-option-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

.auria-addons-v2 .aa-option-price {
  font-size: 13px;
  font-weight: 700;
  color: #059669;
  margin-top: 2px;
  letter-spacing: 0.01em;
}

.auria-addons-v2 .aa-option-price:empty {
  display: none;
}

/* "Grátis" em cinza neutro pra não destacar tanto */
.auria-addons-v2 .aa-option-price:not([class*="paid"]):where(:not(:empty)) {
  /* nada — mantém verde */
}

/* ───────────────────────────────────────────────────────── */
/* STEPPER de quantidade (modo multiple)                    */
/* ───────────────────────────────────────────────────────── */
.auria-addons-v2 .aa-option-qty {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
  overflow: hidden;
  height: 38px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.auria-addons-v2 .aa-qty-btn {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  font-size: 18px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, color 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}

.auria-addons-v2 .aa-qty-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.auria-addons-v2 .aa-qty-btn:active {
  background: #e2e8f0;
}

.auria-addons-v2 .aa-qty-btn:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

.auria-addons-v2 .aa-qty-input {
  width: 38px;
  height: 38px;
  border: none;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  background: transparent;
  padding: 0;
  -moz-appearance: textfield;
  appearance: textfield;
  outline: none;
}

.auria-addons-v2 .aa-qty-input::-webkit-outer-spin-button,
.auria-addons-v2 .aa-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ───────────────────────────────────────────────────────── */
/* SUMMARY (aparece quando algo é selecionado)              */
/* ───────────────────────────────────────────────────────── */
.auria-addons-v2 .aa-summary {
  background: linear-gradient(135deg, #fafbff, #ffffff);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 12px;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.auria-addons-v2 .aa-summary[hidden] {
  display: none;
}

.auria-addons-v2 .aa-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  color: #475569;
}

.auria-addons-v2 .aa-summary-total-row {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
  color: #0f172a;
  font-size: 17px;
}

.auria-addons-v2 .aa-summary-addons,
.auria-addons-v2 .aa-summary-base,
.auria-addons-v2 .aa-summary-total {
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  font-weight: 600;
}

.auria-addons-v2 .aa-summary-total {
  color: #e91e63;
  font-weight: 800;
}

/* ───────────────────────────────────────────────────────── */
/* ERROS                                                     */
/* ───────────────────────────────────────────────────────── */
.auria-addons-v2 .aa-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 14px;
  color: #991b1b;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.08);
  animation: aaShake 0.4s ease;
}

@keyframes aaShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-3px); }
  40%, 80% { transform: translateX(3px); }
}

.auria-addons-v2 .aa-error[hidden] {
  display: none;
}

/* ───────────────────────────────────────────────────────── */
/* MOBILE                                                    */
/* ───────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .auria-addons-v2 .aa-group {
    padding: 14px;
    margin-bottom: 12px;
  }

  .auria-addons-v2 .aa-group-title {
    font-size: 16px;
  }

  .auria-addons-v2 .aa-group-sub {
    padding-left: 0;
    margin-bottom: 10px;
  }

  .auria-addons-v2 .aa-option {
    padding: 14px 12px;
    min-height: 64px;
    gap: 10px;
  }

  .auria-addons-v2 .aa-option-label {
    font-size: 15px;
  }

  .auria-addons-v2 .aa-option-check {
    width: 26px;
    height: 26px;
  }

  .auria-addons-v2 .aa-qty-btn {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .auria-addons-v2 .aa-qty-input {
    width: 44px;
    height: 44px;
  }

  .auria-addons-v2 .aa-option-qty {
    height: 44px;
  }

  .auria-addons-v2 .aa-option-thumb {
    width: 52px;
    height: 52px;
  }

  .auria-addons-v2 .aa-summary {
    padding: 14px;
  }
}

/* ───────────────────────────────────────────────────────── */
/* CART/CHECKOUT (preço dos addons no carrinho)             */
/* ───────────────────────────────────────────────────────── */
.aa-cart-price {
  color: #059669;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
