@charset "UTF-8";

/* ─── Reset mínimo ─────────────────────────────────────────── */
body h1, body h2, body h3 { font-weight: 600; }

/* ─── v-cloak: esconde até Vue montar ──────────────────────── */
[v-cloak] { display: none !important; }
#onepage:not([v-cloak]) ~ #onepage-loading { display: none !important; }

/* ─── Inputs base ───────────────────────────────────────────── */
body input[type=text],
body input[type=number],
body input[type=tel],
body input[type=password],
body input[type=email],
body select {
  padding: 0 0.75rem;
  border-radius: 4px;
  width: 100%;
  height: 38px;
  line-height: normal;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: none;
  font-size: 0.8125rem;
  background: #fff;
  color: #111827;
}
body input::placeholder { color: #d1d5db; font-size: 0.8125rem; }
body input:focus, body select:focus {
  border-color: var(--color-secondary) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-secondary) 15%, transparent);
}
body input[readonly] { pointer-events: none; background: #f9fafb; color: #6b7280; }
body del { color: #9ca3af; }

/* ─── Input group com label estático ────────────────────────── */
body .input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
body .input-group label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  line-height: 1;
  pointer-events: none;
  display: block;
}
body .input-group input,
body .input-group select {
  border: 1px solid #d1d5db;
  border-radius: 4px;
  width: 100%;
  height: 38px;
  padding: 0 0.75rem;
  line-height: normal;
  font-size: 0.8125rem;
  background: #fff;
}
/* estado de erro */
body .input-group.error input,
body .input-group.error select {
  border-color: #f87171;
  background: #fef2f2;
}
body .input-group.error input:focus,
body .input-group.error select:focus {
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
}
body .input-group.error small {
  font-size: 0.6875rem;
  color: #ef4444;
  margin-top: 2px;
}

/* ─── Botões ────────────────────────────────────────────────── */
body .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.875rem;
  height: 38px;
  background-color: var(--button-color);
  color: #fff;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 400;
  border: 1.5px solid transparent;
  transition: opacity 0.15s, transform 0.1s;
  cursor: pointer;
  white-space: nowrap;
}
body .btn:hover { opacity: 0.88; }
body .btn:active { transform: scale(0.98); }
body .btn.btn-disabled { opacity: 0.4 !important; cursor: not-allowed !important; pointer-events: auto !important; }
body .btn.btn-disabled:hover { opacity: 0.4 !important; }
body .btn.btn-disabled:active { transform: none !important; }
body .btn.btn-outline {
  background: transparent;
  border-color: var(--button-color);
  color: var(--button-color);
}
body .btn.finish {
  background: var(--button-color);
  padding: 0 1.5rem;
  height: 44px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 4px;
  width: 100%;
}
body .btn.finish:hover { opacity: 0.9; }

/* ─── Radio visual ──────────────────────────────────────────── */
body .input-radio { width: 18px; height: 18px; }

/* ─── Opções (endereço / entrega / pagamento) ───────────────── */
body .box,
body #onepage .delivery-address-options .options > li,
body #onepage .delivery-options .options > li,
body #onepage .payment-options .options > li {
  border: 1.5px solid #e5e7eb;
  border-radius: 4px;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
  user-select: none;
}
body .box.selected,
body #onepage .delivery-address-options .options > li.selected,
body #onepage .delivery-options .options > li.selected,
body #onepage .payment-options .options > li.selected {
  border-color: var(--color-secondary);
  background: color-mix(in srgb, var(--color-secondary) 5%, transparent);
}
body .box:hover,
body #onepage .delivery-address-options .options > li:hover,
body #onepage .delivery-options .options > li:hover,
body #onepage .payment-options .options > li:hover {
  border-color: #9ca3af;
}

/* ─── Opções agrupadas ──────────────────────────────────────── */
body.options-grouped ul.options:not([data-length="1"]) { gap: 0; }
body.options-grouped ul.options:not([data-length="1"]) > li {
  border-radius: 0 !important;
  border-bottom: none !important;
}
body.options-grouped ul.options:not([data-length="1"]) > li:first-child {
  border-radius: 8px 8px 0 0 !important;
  border-top: 1.5px solid #e5e7eb !important;
}
body.options-grouped ul.options:not([data-length="1"]) > li:last-child {
  border-radius: 0 0 8px 8px !important;
  border-bottom: 1.5px solid #e5e7eb !important;
}
body.options-grouped ul.options:not([data-length="1"]) > li.selected {
  border: 1.5px solid var(--color-secondary) !important;
}
body.options-grouped ul.options:not([data-length="1"]) > li:hover {
  border-bottom: 1.5px solid #9ca3af !important;
}

/* ─── Seções do checkout (layout linear) ────────────────────── */
.checkout-section { display: flex; flex-direction: column; }
.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1.25rem;
}

/* ─── Products list: normaliza PriceDescription do servidor ─── */
.products-list .product-price { font-size: 0.8rem; line-height: 1.3; }
.products-list .product-price strong,
.products-list .product-price .sale-price { font-weight: 600; color: #111827; }
.products-list .product-price .list-price { text-decoration: line-through; color: #9ca3af; font-size: 0.7rem; font-weight: 400; }
.products-list .product-price dfn,
.products-list .product-price .parcels-description { font-size: 0.7rem; color: #6b7280; font-style: normal; }

/* ─── Summary desktop ───────────────────────────────────────── */
body #onepage #order-summary { width: 100%; }
@media screen and (min-width: 1024px) {
  body #onepage #order-summary { position: sticky; top: 4.5rem; align-self: flex-start; }
  body #onepage #summary .summary-slide { display: block !important; max-height: none !important; }
  body #onepage #summary header { display: flex !important; }
  body #onepage #summary #order-summary .show-all { display: none; }
}
body #order #order-summary { background: #fff; }

/* ─── Summary mobile: barra fixa com slide ──────────────────── */
@media screen and (max-width: 1023px) {
  body #onepage { padding-bottom: 180px; }

  body #onepage #summary {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    z-index: 10;
    background: #fff;
    box-shadow: 0 -1px 0 #e5e7eb, 0 -4px 20px rgba(0,0,0,0.06);
  }

  body #onepage #order-summary {
    width: 100%;
    padding: 0 1rem 0.75rem;
  }

  body #onepage #summary .summary-slide {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 0 0;
  }
  body #onepage #summary #order-summary.opened .summary-slide {
    max-height: 65vh;
    overflow-y: auto;
    padding: 1rem 0 0.5rem;
  }

  body #onepage #summary header { display: none; }
  body #onepage #summary #order-summary.opened header { display: flex; }

  body #onepage #checkout #finish { display: none; }
}

@media screen and (min-width: 1024px) {
  body #checkout-wrapper #order .body { padding: 0 1rem; }
}

/* ─── Payment flags ─────────────────────────────────────────── */
body #onepage .payment-options .option img { max-width: 32px; }
body #onepage .payment-options .option input[type=radio]:checked + img { filter: grayscale(0); }
body #onepage .payment-options .credit-card-form .input-card .card-flags {
  transform: translateY(-50%);
  top: 50%; right: 1rem;
  flex-direction: column;
}
body #onepage .payment-options .credit-card-form .input-card .card-flags li {
  opacity: 0; visibility: hidden;
  position: absolute;
  transform: translateY(-50%);
  top: 50%; right: 0;
  transition: opacity 0.15s;
}
body #onepage .payment-options .credit-card-form .input-card .card-flags li.selected {
  opacity: 1; visibility: visible;
}

/* ─── Social login ──────────────────────────────────────────── */
body #onepage .social-login a.btn-facebook,
body #onepage .social-login a.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 0.625rem;
  width: 100%; padding: 0.625rem 1rem;
  border-radius: 4px; border: 1.5px solid; font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.04em; text-decoration: none; cursor: pointer;
  transition: opacity 0.2s ease;
}
body #onepage .social-login a.btn-facebook:hover,
body #onepage .social-login a.btn-google:hover { opacity: 0.85; }

body #onepage .social-login a.btn-facebook {
  background: #1877F2; border-color: #1877F2; color: #fff;
}
body #onepage .social-login a.btn-google {
  background: #fff; border-color: #dadce0; color: #3c4043;
}
body #onepage .social-login .or {
  display: flex; width: 100%; align-items: center;
}
body #onepage .social-login .or::before,
body #onepage .social-login .or::after {
  content: ""; flex: 1; border-bottom: 1px solid #e5e7eb;
}
body #onepage .social-login .or small { padding: 0 0.75rem; color: #9ca3af; font-size: 0.75rem; }

/* ─── Sales representative ──────────────────────────────────── */
body #onepage #sales-representative .result {
  border-radius: 4px;
}
body #onepage #sales-representative .result.populated { background: #fff; }

/* ─── Hint / more-info tooltip ─────────────────────────────── */
body .hint {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 4px;
  padding: 0 0.25rem; font-size: 0.75rem;
  position: relative; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
body .hint .more-info {
  opacity: 0; visibility: hidden;
  position: absolute; bottom: 0; left: 50%;
  transform: translate(-50%, 0) scale(0.9);
  background: #1f2937; color: #fff;
  padding: 0.5rem 0.75rem; border-radius: 6px;
  font-size: 0.75rem; white-space: nowrap;
  min-width: 120px; max-width: 260px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: opacity 0.15s, transform 0.15s;
  z-index: 10;
}
body .hint .more-info::after {
  content: ""; position: absolute;
  bottom: -5px; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1f2937; border-bottom: none;
}
body .hint:hover .more-info {
  opacity: 1; visibility: visible;
  transform: translate(-50%, -110%) scale(1);
}

/* ─── Show-more-options (⋮ endereços) ──────────────────────── */
body #onepage .show-more-options { position: relative; }
body #onepage .show-more-options .more-options {
  opacity: 0; visibility: hidden;
  position: absolute; top: -8px; right: 28px;
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 0.25rem 0; min-width: 110px; z-index: 20;
  transition: opacity 0.15s;
}
body #onepage .show-more-options .more-options ul { display: flex; flex-direction: column; }
body #onepage .show-more-options .more-options ul li a {
  display: block; padding: 0.5rem 0.875rem;
  font-size: 0.8125rem; color: #374151;
  white-space: nowrap;
}
body #onepage .show-more-options .more-options ul li a:hover { background: #f9fafb; }
body #onepage .show-more-options .more-options ul li a.delete { color: #ef4444; }
body #onepage .show-more-options .more-options.show { opacity: 1; visibility: visible; }

/* ─── Discount badge ────────────────────────────────────────── */
body .discount {
  background: #dcfce7; color: #15803d;
  font-size: 0.6875rem; font-style: normal;
  padding: 0.125rem 0.375rem; border-radius: 4px; font-weight: 600;
}

/* ─── Mensagens ─────────────────────────────────────────────── */
body .message {
  border: 1px solid #fbbf24;
  background: #fffbeb;
  border-radius: 4px; font-size: 0.875rem; padding: 0.75rem 1rem;
}
body .message.alert { border-color: #fca5a5; background: #fef2f2; }
body .message.information { border-color: #93c5fd; background: #eff6ff; }
body .message.success { border-color: #86efac; background: #f0fdf4; }

/* ─── Índice numerado (Pix steps) ──────────────────────────── */
body .index {
  display: inline-flex; width: 20px; height: 20px;
  background: #111; border-radius: 50%; color: #fff;
  justify-content: center; align-items: center;
  font-size: 0.6875rem; font-weight: 700; flex-shrink: 0;
}

/* ─── Backdrop / Modal ──────────────────────────────────────── */
body #backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998; opacity: 0; visibility: hidden;
  transition: opacity 0.25s;
}
body.blocked #backdrop { opacity: 1; visibility: visible; }
/* blur também no loading global */
body.loading::before {
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  background: rgba(255,255,255,0.4);
}

body .modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s, transform 0.2s;
  background: #fff; z-index: 9999;
  border-radius: 4px; padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  width: 90vw; max-width: 560px;
  max-height: calc(100vh - 2rem); overflow: auto;
}
body .modal.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
body .modal header strong { font-size: 1rem; }
body .modal .body .actions { padding-top: 1rem; }

/* ─── Loading spinner ───────────────────────────────────────── */
body.loading::after {
  content: "";
  position: fixed; z-index: 10001;
  top: 50%; left: 50%;
  margin: -20px 0 0 -20px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 3px solid #e5e7eb;
  border-top-color: var(--color-secondary);
  animation: rotation 0.7s linear infinite;
}
body.loading::before {
  content: ""; position: fixed; inset: 0;
  background: rgba(255,255,255,0.5); z-index: 10000;
}
body .loading { opacity: 0.5; position: relative; }
body .loading::after {
  content: ""; position: absolute; z-index: 6;
  top: 50%; left: 50%; margin: -12px 0 0 -12px;
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid #e5e7eb; border-top-color: var(--color-secondary);
  animation: rotation 0.7s linear infinite;
}
body .loading-into::after {
  content: ""; position: absolute; z-index: 6;
  top: 50%; left: 50%; margin: -12px 0 0 -12px;
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid #e5e7eb; border-top-color: var(--color-secondary);
  animation: rotation 0.7s linear infinite;
}

/* ─── Sucesso / Order ───────────────────────────────────────── */
body #bg-success {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-success);
  width: 0; height: 0; border-radius: 50%;
  transition: width 0.8s ease, height 0.8s ease;
  z-index: 45;
}
body.success #bg-success { width: 3000px; height: 3000px; z-index: 48; }
body.success.order-generated #order { opacity: 1; visibility: visible; }

body #order {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 50; background: #fff;
  border-radius: 12px; padding: 2rem;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s;
  width: 90vw; max-width: 680px;
  max-height: 90vh; overflow: hidden;
}
body #order header { font-size: 1.25rem; text-align: center; }
body #order .body { overflow: auto; }
body #order .body::-webkit-scrollbar { width: 4px; }
body #order .body::-webkit-scrollbar-track { background: #f3f4f6; border-radius: 4px; }
body #order .body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

/* ─── show-checkout states ──────────────────────────────────── */
body.show-checkout #basket { display: none; }
body.show-checkout #order-summary .basket { display: flex; }

/* ─── Notification toast ────────────────────────────────────── */
body #notification {
  position: fixed; bottom: 20px; right: -250px;
  background: #1f2937; color: #fff;
  padding: 10px 18px; border-radius: 4px;
  font-size: 0.875rem; opacity: 0;
  transition: right 0.3s ease, opacity 0.3s ease;
  z-index: 9999;
}
body #notification.show { opacity: 1; right: 1rem; }

/* ─── Wallet buttons ────────────────────────────────────────── */
body .wallet-button {
  display: inline-flex; align-items: center;
  gap: 0.5rem; padding: 0.5rem 1rem;
  border-radius: 9999px; font-weight: 600;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
}
body .wallet-button img { height: 22px; width: auto; }
body .wallet-button.apple-pay { background: #000; color: #fff; }
body .wallet-button.google-pay { background: #fff; border: 1px solid #d1d5db; color: #202124; }
body .wallet-button:hover { transform: scale(1.02); box-shadow: 0 2px 8px rgba(0,0,0,0.15); }

/* ─── Misc ──────────────────────────────────────────────────── */
body .no-image { display: none; }
body .wd-error-summary-wrapper { display: none; }
body .fade-enter-active, body .fade-leave-active { transition: opacity 0.25s; }
body .fade-enter, body .fade-leave-to { opacity: 0; }

/* ─── Slide-down (card pagamento) ──────────────────────────── */
.slide-down-enter-active { animation: slideDownIn 0.3s cubic-bezier(0.16,1,0.3,1); }
.slide-down-leave-active { animation: slideDownOut 0.2s ease-in forwards; }

/* ─── Cards do stepper ──────────────────────────────────────── */
.checkout-card .step-badge { font-size: 0.6875rem; font-weight: 700; }
.checkout-card .card-header { background: #fafafa; }

/* ─── Scrollbar global ──────────────────────────────────────── */
body::-webkit-scrollbar { width: 4px; }
body::-webkit-scrollbar-track { background: #f3f4f6; border-radius: 4px; }
body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

/* ─── Keyframes ─────────────────────────────────────────────── */
@keyframes slideDownIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideDownOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-6px); }
}
@keyframes rotation {
  to { transform: rotate(360deg); }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-4px); }
  40%,80% { transform: translateX(4px); }
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0,0,0,0.3); transform: scale(0.95); }
  70%  { box-shadow: 0 0 0 8px rgba(0,0,0,0); transform: scale(1.05); }
  100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); transform: scale(1); }
}
