/* ==========================================================
   ESTILOS MERCADO LIVRE - TEMA PROFISSIONAL AUTÔNOMO
   ========================================================== */

:root {
  --ml-yellow: #fff159;
  --ml-yellow-dark: #f0e24f;
  --ml-blue: #3483fa;
  --ml-blue-hover: #2968c8;
  --ml-blue-light: #f5f8ff;
  --ml-green: #00a650;
  --ml-green-bg: #e6f7ee;
  --ml-bg: #ebebeb;
  --ml-white: #ffffff;
  --ml-text: #333333;
  --ml-text-muted: #666666;
  --ml-text-light: #999999;
  --ml-border: #e6e6e6;
  --ml-border-dark: #cccccc;
  --ml-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --ml-radius: 6px;
  --ml-font: "Proxima Nova", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  box-sizing: border-box;
}

body.checkout-open {
  overflow: hidden !important;
  height: 100vh !important;
}

body {
  font-family: var(--ml-font);
  background-color: var(--ml-bg);
  color: var(--ml-text);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ==========================================================
   HEADER
   ========================================================== */
.header-ml {
  background-color: var(--ml-yellow);
  box-shadow: 0 1px 0 rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 16px;
}

/* Header Mobile (Padrão para telas menores que 992px) */
.header-mobile {
  display: flex;
  flex-direction: column;
}

.header-mobile-top {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
}

.logo-mobile {
  height: 32px;
  width: auto;
}

.search-box-mobile {
  flex: 1;
  position: relative;
}

.search-box-mobile input {
  width: 100%;
  height: 32px;
  border-radius: 4px;
  border: none;
  padding: 0 12px 0 34px;
  font-size: 14px;
  outline: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.search-box-mobile svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #777;
}

.header-mobile-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-mobile-actions button {
  padding: 6px;
  color: #333;
  position: relative;
}

.cep-mobile {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  font-size: 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 0 4px;
  color: #333;
}

/* Header Desktop (Oculto em telas menores, visível apenas em telas >= 992px) */
.header-desktop {
  display: none;
}

@media (min-width: 992px) {
  .header-mobile {
    display: none !important;
  }

  .header-desktop {
    display: block !important;
  }
  
  .header-desktop-top {
    display: flex;
    align-items: center;
    gap: 30px;
    height: 56px;
  }
  
  .logo-desktop {
    width: 134px;
    height: auto;
  }
  
  .search-box-desktop {
    flex: 1;
    position: relative;
    max-width: 600px;
  }
  
  .search-box-desktop input {
    width: 100%;
    height: 40px;
    border-radius: 2px;
    border: none;
    padding: 0 45px 0 15px;
    font-size: 16px;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.2);
    outline: none;
  }
  
  .search-box-desktop button {
    position: absolute;
    right: 0;
    top: 0;
    height: 40px;
    width: 45px;
    display: grid;
    place-items: center;
    color: #666;
  }
  
  .search-box-desktop button svg {
    width: 20px;
    height: 20px;
  }

  .banner-meli-plus {
    margin-left: auto;
    height: 38px;
  }
  
  .header-desktop-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    padding-top: 8px;
    padding-bottom: 4px;
  }
  
  .cep-desktop {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
  }
  
  .nav-desktop, .user-nav-desktop {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
    color: #333333;
  }
  
  .user-nav-desktop .cart-btn {
    position: relative;
    display: flex;
    align-items: center;
  }
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: var(--ml-blue);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

/* ==========================================================
   CONTEÚDO PRINCIPAL (LAYOUT DO PRODUTO)
   ========================================================== */
.main-wrapper {
  max-width: 1200px;
  margin: 16px auto 40px;
  padding: 0 12px;
}

.product-card {
  background: var(--ml-white);
  border-radius: var(--ml-radius);
  box-shadow: var(--ml-shadow);
  overflow: hidden;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--ml-blue);
  padding: 14px 20px;
  border-bottom: 1px solid var(--ml-border);
}

.breadcrumbs span.separator {
  color: var(--ml-text-light);
}

/* Grid do Produto Desktop */
.product-grid {
  display: flex;
  flex-direction: column;
}

@media (min-width: 992px) {
  .product-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 0;
  }
}

/* ==========================================================
   COLUNA ESQUERDA: GALERIA E DETALHES
   ========================================================== */
.product-showcase {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .product-showcase {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr) 300px;
    gap: 20px;
  }
}

/* Miniaturas */
.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  order: 2;
  padding-top: 10px;
}

@media (min-width: 768px) {
  .gallery-thumbs {
    flex-direction: column;
    order: 1;
    overflow-y: auto;
    max-height: 450px;
    padding-top: 0;
  }
}

.thumb-item {
  width: 64px;
  height: 64px;
  border: 1px solid var(--ml-border);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  background: #fdfdfd;
}

.thumb-item.active {
  border-color: var(--ml-blue);
  box-shadow: 0 0 0 1px var(--ml-blue);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-item .play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
}

/* Palco Principal da Imagem / Vídeo */
.gallery-stage {
  order: 1;
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .gallery-stage {
    order: 2;
    min-height: 450px;
  }
}

.gallery-stage img,
.gallery-stage video {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.gallery-counter {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.06);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ml-text-muted);
}

.btn-fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
  color: var(--ml-blue);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.btn-fav.active svg {
  fill: var(--ml-blue);
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  display: grid;
  place-items: center;
  color: var(--ml-blue);
}

.gallery-nav-btn.prev { left: 8px; }
.gallery-nav-btn.next { right: 8px; }

/* Informações Básicas do Produto (Coluna 3 ou Mobile) */
.product-core-info {
  order: 3;
}

.product-condition {
  font-size: 12px;
  color: var(--ml-text-muted);
  margin-bottom: 6px;
}

.product-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 8px;
}

.rating-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ml-blue);
  margin-bottom: 12px;
}

.stars-icon {
  display: inline-flex;
  gap: 3px;
  color: #f5a623;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.badge-offer {
  display: inline-block;
  background: #111;
  color: #ffe600;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 8px;
}

/* Bloco de Preço */
.price-box {
  margin: 12px 0;
}

.price-original {
  font-size: 15px;
  color: var(--ml-text-light);
  text-decoration: line-through;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.price-current {
  font-size: 34px;
  font-weight: 500;
  color: var(--ml-text);
}

.price-discount {
  color: var(--ml-green);
  font-size: 18px;
  font-weight: 600;
}

.price-installments {
  color: var(--ml-green);
  font-size: 15px;
  margin-top: 2px;
}

.payment-methods-link {
  color: var(--ml-blue);
  font-size: 14px;
  display: inline-block;
  margin-top: 4px;
}

/* ==========================================================
   SELETOR DE VEÍCULO (BOTÃO PRINCIPAL)
   ========================================================== */
.vehicle-selector-box {
  margin: 18px 0;
  padding: 12px;
  border: 1px solid var(--ml-border);
  border-radius: var(--ml-radius);
  background: #fafafa;
}

.vehicle-selector-box p {
  font-size: 14px;
  color: var(--ml-text-muted);
  margin-bottom: 8px;
}

.btn-select-vehicle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--ml-border);
  border-radius: 6px;
  text-align: left;
}

.btn-select-vehicle img {
  width: 60px;
  height: 45px;
  object-fit: contain;
  flex-shrink: 0;
}

.btn-select-vehicle .vehicle-name {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
}

.btn-select-vehicle .change-hint {
  color: var(--ml-blue);
  font-size: 13px;
}

/* ==========================================================
   COLUNA LATERAL: OFERTA, COMPRA E VENDEDOR
   ========================================================== */
.product-sidebar {
  border-left: 1px solid var(--ml-border);
  padding: 24px;
  background: var(--ml-white);
}

@media (max-width: 991px) {
  .product-sidebar {
    border-left: none;
    border-top: 1px solid var(--ml-border);
  }
}

.shipping-box {
  margin-bottom: 20px;
}

.shipping-badge {
  background: var(--ml-green-bg);
  color: var(--ml-green);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 6px;
}

.shipping-delivery-text {
  font-size: 16px;
  line-height: 1.35;
  color: var(--ml-text);
  margin: 6px 0;
}

.shipping-delivery-text strong {
  color: var(--ml-green);
}

/* Quantidade */
.stock-box {
  margin: 18px 0;
}

.stock-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.qty-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f5f5f5;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
}

.qty-select select {
  background: transparent;
  border: none;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

/* Botões de Ação Principal */
.btn-buy-now {
  width: 100%;
  height: 48px;
  background-color: var(--ml-blue);
  color: #fff;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  display: grid;
  place-items: center;
  transition: background 0.2s;
  margin-bottom: 8px;
}

.btn-buy-now:hover {
  background-color: var(--ml-blue-hover);
}

.btn-add-cart {
  width: 100%;
  height: 48px;
  background-color: var(--ml-blue-light);
  color: var(--ml-blue);
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}

.btn-add-cart:hover {
  background-color: #e5efff;
}

/* Informações da Loja Oficial */
.store-info-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--ml-border);
}

.store-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.store-details {
  font-size: 14px;
}

.store-details .store-tag {
  color: var(--ml-text-muted);
  font-size: 12px;
}

.store-details .store-name {
  color: var(--ml-blue);
  font-weight: 600;
}

.store-details .store-sales {
  font-size: 13px;
  font-weight: 700;
  margin-top: 2px;
}

/* Garantias ML */
.guarantees-list {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--ml-border);
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 13px;
  color: var(--ml-text-muted);
}

.guarantee-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.guarantee-item svg {
  width: 20px;
  height: 20px;
  color: var(--ml-text-muted);
  flex-shrink: 0;
  margin-top: 2px;
}

.guarantee-item span strong {
  color: var(--ml-blue);
  font-weight: normal;
}

/* ==========================================================
   DESCRIÇÃO DO PRODUTO
   ========================================================== */
.description-section {
  padding: 30px 24px;
  border-top: 1px solid var(--ml-border);
}

.questions-section {
  padding: 30px 24px;
  border-top: 1px solid var(--ml-border);
}

.questions-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 12px;
}

.question-field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.question-input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--ml-border);
  border-radius: 10px;
  padding: 0 16px;
  font-size: 16px;
  background: #fff;
  color: var(--ml-text);
}

.question-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 20;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--ml-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.question-suggestions[hidden],
.question-response[hidden] {
  display: none;
}

.question-suggestions-heading,
.question-suggestions-empty {
  padding: 11px 14px;
  color: var(--ml-text-muted);
  font-size: 13px;
}

.question-suggestion {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-top: 1px solid #f1f1f1;
  color: #222;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
}

.question-suggestion:hover,
.question-suggestion:focus-visible {
  background: #fffbe0;
  outline: none;
}

.question-answer-card {
  padding: 16px;
  border: 1px solid var(--ml-border);
  border-left: 4px solid var(--ml-yellow-dark);
  border-radius: 8px;
  background: #fff;
  color: #333;
}

.question-answer-card h3 {
  margin-bottom: 8px;
  color: #111;
  font-size: 16px;
}

.question-answer-card p {
  font-size: 15px;
  line-height: 1.6;
}

.question-button {
  height: 52px;
  min-width: 150px;
  padding: 0 28px;
  border-radius: 10px;
  background: var(--ml-blue);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.section-title {
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 20px;
}

.description-content {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ml-text-muted);
  max-height: 380px;
  overflow: hidden;
  position: relative;
  transition: max-height 0.3s ease;
}

.description-content.expanded {
  max-height: 5000px;
}

.description-content:not(.expanded)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: linear-gradient(to top, #ffffff, transparent);
  pointer-events: none;
}

.description-content p {
  margin-bottom: 14px;
}

.btn-toggle-description {
  color: var(--ml-blue);
  font-size: 15px;
  font-weight: 600;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================
   OPINIÕES / AVALIAÇÕES (REVIEWS)
   ========================================================== */
.reviews-section {
  padding: 30px 24px;
  border-top: 1px solid var(--ml-border);
}

.reviews-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

@media (min-width: 992px) {
  .reviews-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 50px;
  }
}

.reviews-score {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.big-rating {
  font-size: 52px;
  font-weight: 600;
  color: var(--ml-blue);
  line-height: 1;
}

.rating-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 240px;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ml-text-muted);
}

.rating-progress-bg {
  flex: 1;
  height: 5px;
  background: var(--ml-border);
  border-radius: 4px;
  overflow: hidden;
}

.rating-progress-bar {
  height: 100%;
  background: var(--ml-text-muted);
}

/* Lista de Comentários */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.review-item {
  border-bottom: 1px solid var(--ml-border);
  padding-bottom: 20px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ml-text-light);
  margin-bottom: 8px;
}

.review-photos {
  display: flex;
  gap: 8px;
  margin: 10px 0;
  overflow-x: auto;
}

.review-photo-btn {
  width: 90px;
  height: 90px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--ml-border);
  flex-shrink: 0;
  position: relative;
}

.review-photo-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-text {
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-line;
}

.store-media-box {
  margin-top: 12px;
  padding: 10px;
  background: #f9f9f9;
  border-radius: 6px;
}

.store-media-box p {
  font-size: 11px;
  color: var(--ml-text-light);
  margin-bottom: 6px;
}

/* ==========================================================
   MODAL DE SELEÇÃO DE VEÍCULO
   ========================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 768px) {
  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }
}

.modal-content {
  background: #fff;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  border-radius: 12px 12px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  overflow: hidden;
}

@media (min-width: 768px) {
  .modal-content {
    border-radius: 8px;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ml-border);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.modal-search-bar {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--ml-border);
  background: #fbfbfb;
}

@media (max-width: 500px) {
  .modal-search-bar {
    grid-template-columns: 1fr;
  }
}

.modal-search-bar select,
.modal-search-bar input {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--ml-border-dark);
  border-radius: 6px;
  outline: none;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.cars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 500px) {
  .cars-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .cars-grid { grid-template-columns: repeat(4, 1fr); }
}

.car-card-btn {
  border: 1px solid var(--ml-border);
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fff;
  transition: all 0.15s;
}

.car-card-btn:hover {
  border-color: var(--ml-blue);
}

.car-card-btn.active {
  border-color: var(--ml-blue);
  box-shadow: 0 0 0 1px var(--ml-blue);
  background: var(--ml-blue-light);
}

.car-card-btn img {
  height: 80px;
  width: 100%;
  object-fit: contain;
  margin-bottom: 8px;
}

.car-card-btn .car-brand-label {
  font-size: 11px;
  color: var(--ml-text-muted);
}

.car-card-btn .car-name-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ml-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* ==========================================================
   GAVETA DO CARRINHO (DRAWER)
   ========================================================== */
.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.cart-drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  background: #fff;
  width: 100%;
  max-width: 420px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -2px 0 10px rgba(0,0,0,0.15);
}

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ml-border);
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-drawer-footer {
  padding: 20px;
  border-top: 1px solid var(--ml-border);
  background: #fafafa;
}

/* ==========================================================
   TELA DE CHECKOUT PROFISSIONAL E MODERNA (ESTILO MERCADO LIVRE)
   ========================================================== */
.checkout-view {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100% !important;
  max-height: 100vh !important;
  background: #ededed;
  z-index: 200;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: none;
  font-family: inherit;
  color: #333;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.checkout-view.active {
  display: block;
}

#checkoutContainer {
  width: 100%;
  max-width: 100vw;
  min-width: 0;
  overflow-x: hidden !important;
  box-sizing: border-box;
}

.checkout-header-bar {
  background: var(--ml-yellow);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  overflow: hidden;
}

.checkout-header-inner {
  position: relative;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-sizing: border-box;
  min-width: 0;
}

.btn-back-checkout {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.15s;
  flex-shrink: 0;
}

.btn-back-checkout:hover {
  background: rgba(0,0,0,0.06);
}

.checkout-stepper {
  display: flex;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  min-width: 0;
}

.checkout-stepper .step-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.checkout-stepper .step-item.active {
  color: #111;
  font-weight: 700;
}

.checkout-stepper .step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #bbb;
  color: #fff;
  font-size: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.checkout-stepper .step-item.active .step-badge {
  background: var(--ml-blue);
  color: #fff;
}

.checkout-security-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #007936;
  font-weight: 600;
  background: rgba(255,255,255,0.7);
  padding: 5px 10px;
  border-radius: 20px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Layout 2 Colunas */
.checkout-grid {
  max-width: 1180px;
  width: 100%;
  margin: 20px auto 60px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  box-sizing: border-box;
  min-width: 0;
}

@media (min-width: 992px) {
  .checkout-grid {
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: start;
  }
}

.checkout-main-col,
.checkout-sidebar-col {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.checkout-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding: 22px;
  margin-bottom: 16px;
  border: 1px solid #e5e5e5;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.checkout-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.checkout-card-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f0f5ff;
  color: var(--ml-blue);
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.checkout-card-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #222;
  margin: 0;
}

/* Card Produto Preview */
.checkout-product-preview-top {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
  width: 100%;
}

.checkout-product-img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fff;
  padding: 4px;
  flex-shrink: 0;
}

.checkout-product-info {
  flex: 1;
  min-width: 0;
}

.checkout-product-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.checkout-full-badge {
  background: #00a650;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.checkout-full-text {
  font-size: 12px;
  color: #00a650;
  font-weight: 600;
}

.checkout-product-title {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  margin: 0 0 4px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.checkout-product-meta {
  font-size: 13px;
  color: #666;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.checkout-delivery-banner {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f2f2f2;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #00a650;
  font-weight: 600;
  line-height: 1.3;
}

.checkout-delivery-banner svg {
  flex-shrink: 0;
}

/* Campos de Formulário */
.checkout-field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
}

.checkout-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 46px;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 16px !important; /* Impede zoom no iOS Safari */
  color: #333;
  outline: none;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.checkout-input:focus {
  border-color: var(--ml-blue);
  box-shadow: 0 0 0 3px rgba(52, 131, 250, 0.15);
}

.checkout-input.valid {
  border-color: #00a650;
}

/* Opção de Pagamento */
.checkout-payment-option {
  border: 2px solid var(--ml-blue);
  border-radius: 8px;
  padding: 14px;
  background: #f8fbff;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.checkout-payment-radio {
  accent-color: var(--ml-blue);
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
}

.checkout-payment-info {
  flex: 1;
  min-width: 0;
}

.checkout-payment-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.checkout-pix-tag {
  background: #32bcad;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.checkout-payment-desc {
  font-size: 13px;
  color: #555;
  margin: 6px 0 0;
  line-height: 1.4;
}

.checkout-payment-note {
  margin-top: 14px;
  padding: 12px;
  background: #fafafa;
  border-radius: 6px;
  font-size: 12px;
  color: #777;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
  box-sizing: border-box;
  width: 100%;
}

.checkout-payment-note svg {
  flex-shrink: 0;
}

/* Coluna Direita (Sticky Resumo) */
.checkout-summary-box {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding: 22px;
  border: 1px solid #e5e5e5;
  position: sticky;
  top: 80px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.checkout-summary-title {
  font-size: 16px;
  font-weight: 700;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
  margin-bottom: 16px;
}

.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin-bottom: 12px;
  color: #555;
  width: 100%;
  box-sizing: border-box;
}

.checkout-summary-row.total-row {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid #eee;
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

.checkout-badge-discount {
  background: #e6f7ee;
  color: #00a650;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Caixa de Cupom */
.checkout-coupon-box {
  margin: 14px 0;
  padding: 12px;
  background: #f9f9f9;
  border-radius: 6px;
  border: 1px dashed #ccc;
  width: 100%;
  box-sizing: border-box;
}

.checkout-coupon-input-wrap {
  display: flex;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.checkout-coupon-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  font-weight: 600;
  box-sizing: border-box;
  background: #fff;
}

.btn-apply-coupon {
  background: #e6e6e6;
  border: none;
  padding: 0 14px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  height: 40px;
  transition: background 0.15s;
}

.btn-apply-coupon:hover {
  background: #d8d8d8;
}

.checkout-coupon-feedback {
  font-size: 12px;
  margin: 6px 0 0;
  color: #00a650;
  font-weight: 600;
  line-height: 1.3;
}

.btn-checkout-finish {
  width: 100%;
  max-width: 100%;
  height: 52px;
  background: var(--ml-blue);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(52,131,250,0.3);
  transition: background 0.15s, transform 0.1s;
  box-sizing: border-box;
}

.btn-checkout-finish:hover {
  background: #2968c8;
}

.btn-checkout-finish:active {
  transform: scale(0.99);
}

.checkout-trust-seals {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  font-size: 12px;
  color: #777;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.checkout-trust-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
  width: 100%;
  box-sizing: border-box;
}

.checkout-trust-item svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================================
   TELA DE SUCESSO E PAGAMENTO PIX
   ========================================================== */
.pix-screen {
  background: #ededed;
  min-height: 100vh;
  padding-bottom: 60px;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  box-sizing: border-box;
}

.pix-green-strip {
  min-height: 50px;
  height: auto;
  padding: 10px 14px;
  background: #00a650;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  gap: 8px;
  text-align: center;
  line-height: 1.3;
  width: 100%;
  box-sizing: border-box;
}

.pix-green-strip svg {
  flex-shrink: 0;
}

.pix-card {
  max-width: 600px;
  width: calc(100% - 24px);
  margin: 16px auto 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  border: 1px solid #e0e0e0;
  box-sizing: border-box;
}

.pix-card-header {
  padding: 20px 16px 14px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}

.pix-icon-badge {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #e6f7ee;
  color: #00a650;
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
}

.pix-amount-badge {
  font-size: 30px;
  font-weight: 800;
  color: #111;
  margin: 6px 0;
}

.pix-timer-box {
  background: #fff8e5;
  border: 1px solid #ffe199;
  padding: 10px 14px;
  border-radius: 6px;
  margin: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: #855b00;
  font-weight: 600;
  box-sizing: border-box;
}

.pix-qr-wrapper {
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 16px;
  margin: 0 16px 14px;
  text-align: center;
  box-sizing: border-box;
}

.pix-qr-img {
  width: 180px;
  height: 180px;
  margin: 0 auto;
  display: block;
  border-radius: 6px;
  background: #fff;
  padding: 6px;
  border: 1px solid #ddd;
}

.pix-copy-label {
  padding: 0 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
  display: block;
}

.pix-copy-box {
  background: #f7f7f7;
  border: 1px dashed #bbb;
  border-radius: 6px;
  padding: 12px;
  margin: 0 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  box-sizing: border-box;
  width: calc(100% - 32px);
  max-width: 100%;
}

.pix-copy-text {
  font-family: monospace;
  font-size: 11px;
  color: #444;
  word-break: break-all;
  white-space: normal;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  text-align: center;
  background: #fff;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  line-height: 1.35;
  user-select: all;
  -webkit-user-select: all;
}

.btn-pix-copy {
  background: var(--ml-blue);
  color: #fff;
  border: none;
  height: 44px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  transition: background 0.15s;
}

.btn-pix-copy:hover {
  background: #2968c8;
}

.pix-steps-list {
  padding: 0 16px 16px;
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  text-align: left;
  box-sizing: border-box;
}

.pix-steps-list ol {
  padding-left: 18px;
  margin-top: 6px;
}

.pix-steps-list li {
  margin-bottom: 6px;
}

.pix-return-box {
  padding: 0 16px 20px;
}

.btn-pix-return {
  width: 100%;
  height: 46px;
  background: #f0f0f0;
  color: #444;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-pix-return:hover {
  background: #e2e2e2;
}

/* ==========================================================
   UTILITÁRIOS E TOASTS
   ========================================================== */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  z-index: 300;
  display: none;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================================
   MODAL DE MÍDIA DAS PROVAS SOCIAIS (FOTOS E VÍDEOS)
   ========================================================== */
.modal-media-backdrop {
  background: rgba(0, 0, 0, 0.9) !important;
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-modal-container {
  background: #111;
  border-radius: 12px;
  max-width: 900px;
  width: 95vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.7);
}

.media-modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(22, 22, 22, 0.98);
  border-bottom: 1px solid #2a2a2a;
  color: #fff;
}

.media-modal-counter {
  font-size: 13px;
  font-weight: 600;
  color: #bbb;
}

.media-modal-tag {
  font-size: 12px;
  background: rgba(255,255,255,0.15);
  padding: 3px 10px;
  border-radius: 4px;
  color: #eee;
}

.media-modal-close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  transition: transform 0.15s, color 0.15s;
}

.media-modal-close-btn:hover {
  color: #ff4d4f;
  transform: scale(1.15);
}

.media-modal-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 360px;
  background: #000;
  overflow: hidden;
}

.media-modal-content-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-height: 65vh;
}

.media-modal-content-box img,
.media-modal-content-box video {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  display: block;
  outline: none;
}

.media-stage-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 20;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  transition: background 0.15s, transform 0.15s;
}

.media-stage-nav-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
}

.media-stage-nav-prev {
  left: 14px;
}

.media-stage-nav-next {
  right: 14px;
}

@media (max-width: 540px) {
  .media-stage-nav-btn {
    width: 40px;
    height: 40px;
  }
  .media-stage-nav-prev {
    left: 8px;
  }
  .media-stage-nav-next {
    right: 8px;
  }
}

.media-modal-caption {
  padding: 12px 18px;
  background: rgba(22, 22, 22, 0.98);
  border-top: 1px solid #2a2a2a;
  color: #ddd;
  font-size: 13px;
  line-height: 1.4;
  max-height: 80px;
  overflow-y: auto;
}

/* Faixa de Fotos e Vídeos dos Compradores na Seção de Reviews */
.reviews-media-strip-card {
  margin-bottom: 20px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 16px;
}

.reviews-media-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.reviews-media-strip-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.reviews-strip-arrows {
  display: flex;
  gap: 8px;
}

.reviews-strip-arrow-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #ddd;
  color: #333;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.15s;
}

.reviews-strip-arrow-btn:hover {
  background: #f5f5f5;
  border-color: #bbb;
}

.reviews-media-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.reviews-strip-item-btn {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #ddd;
  background: #f0f0f0;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: transform 0.15s, border-color 0.15s;
}

.reviews-strip-item-btn:hover {
  transform: scale(1.05);
  border-color: var(--ml-blue);
}

.reviews-strip-item-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reviews-strip-play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0,0,0,0.35);
  font-size: 20px;
}

/* ==========================================================
   OTIMIZAÇÕES RESPONSIVAS MOBILE (CHECKOUT & LOJA COMPLETA)
   ========================================================== */

/* Grid do Formulário de Checkout */
.checkout-form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.form-col-full { grid-column: span 12; }
.form-col-half { grid-column: span 6; }
.form-col-city { grid-column: span 8; }
.form-col-uf { grid-column: span 4; }

/* Evitar rolagem horizontal no mobile */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-tap-highlight-color: transparent;
}

/* Barra Fixa de Compra no Rodapé do Mobile */
.mobile-bottom-bar {
  display: none;
}

@media (max-width: 768px) {
  /* Barra de Ação Mobile no Rodapé */
  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 8px 14px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
  }
  
  .mobile-bottom-bar-price {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  
  .mobile-bottom-bar-price .val {
    font-size: 19px;
    font-weight: 700;
    color: #111;
    line-height: 1.1;
  }
  
  .mobile-bottom-bar-price .cond {
    font-size: 11px;
    color: var(--ml-green);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .mobile-bottom-bar .btn-buy-now {
    margin: 0;
    flex: 1;
    max-width: 190px;
    height: 44px;
    font-size: 15px;
    border-radius: 6px;
  }

  body.has-mobile-bar {
    padding-bottom: 70px;
  }

  /* Ocultar barra móvel quando o checkout estiver aberto */
  .checkout-view.active ~ .mobile-bottom-bar {
    display: none !important;
  }

  /* Ajustes Gerais do Produto no Mobile */
  .main-wrapper {
    margin: 8px auto 24px;
    padding: 0 8px;
  }

  .product-card {
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  }

  .breadcrumbs {
    padding: 8px 6px;
    gap: 2px;
    font-size: 9px;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .breadcrumbs::-webkit-scrollbar { display: none; }

  .product-showcase {
    padding: 12px;
  }

  .gallery-stage {
    min-height: 250px;
    max-height: 330px;
  }

  .gallery-stage img,
  .gallery-stage video {
    max-height: 300px;
  }

  .gallery-thumbs {
    gap: 6px;
    padding-top: 8px;
  }

  .thumb-item {
    width: 46px;
    height: 46px;
  }

  .product-title {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 6px;
  }

  .price-current {
    font-size: 28px;
  }

  .price-discount {
    font-size: 16px;
  }

  .product-sidebar {
    padding: 16px 12px;
  }

  .btn-buy-now,
  .btn-add-cart {
    height: 48px;
    font-size: 15px;
  }

  .vehicle-selector-box {
    margin: 12px 0;
    padding: 10px;
  }

  .btn-select-vehicle {
    padding: 8px;
    gap: 10px;
  }

  .btn-select-vehicle img {
    width: 50px;
    height: 38px;
  }

  .btn-select-vehicle .vehicle-name {
    font-size: 14px;
  }

  .description-section,
  .reviews-section {
    padding: 20px 14px;
  }

  .questions-section {
    padding: 20px 14px;
  }

  .questions-box {
    gap: 8px;
  }

  .question-button {
    min-width: 96px;
    padding: 0 14px;
  }

  .section-title {
    font-size: 18px;
  }

  /* Ajustes do Checkout no Mobile */
  .checkout-view {
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  #checkoutContainer {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .checkout-header-bar {
    width: 100% !important;
    max-width: 100vw !important;
    overflow: hidden !important;
  }

  .checkout-header-inner {
    height: 52px;
    padding: 0 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .btn-back-checkout {
    position: absolute;
    left: 0;
    padding: 6px 5px;
    font-size: 13px;
    flex-shrink: 0;
  }

  .btn-back-checkout span {
    display: none !important;
  }

  .checkout-security-tag {
    display: none !important;
  }

  /* Stepper mobile: compacto, limpo, nunca quebra */
  .checkout-stepper {
    font-size: 10px;
    gap: 4px;
    flex-shrink: 0;
    min-width: 0;
  }

  .checkout-stepper .step-item {
    gap: 3px;
  }

  .checkout-stepper .step-arrow {
    width: 10px;
    height: 10px;
  }

  .checkout-stepper .step-badge {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .checkout-grid {
    margin: 8px auto 24px;
    padding: 0 8px;
    gap: 10px;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  .checkout-main-col,
  .checkout-sidebar-col {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .checkout-card {
    padding: 14px 12px !important;
    border-radius: 8px;
    margin-bottom: 10px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .checkout-card-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    gap: 8px;
  }

  .checkout-card-header h3 {
    font-size: 15px;
  }

  .checkout-card-number {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }

  /* FORMULÁRIO 100% MOBILE-FIRST (EM COLUNA ÚNICA VERTICAL) */
  .checkout-form-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .form-col-full,
  .form-col-half,
  .form-col-city,
  .form-col-uf {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    grid-column: auto !important;
    box-sizing: border-box !important;
  }

  .checkout-input {
    height: 48px;
    font-size: 16px !important; /* Impede zoom no Safari */
    border-radius: 6px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .checkout-field-label {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .checkout-summary-box {
    padding: 16px 12px !important;
    border-radius: 8px;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .btn-checkout-finish {
    height: 50px;
    font-size: 15px;
  }

  /* Card do Produto no Checkout Mobile */
  .checkout-product-img {
    width: 58px;
    height: 58px;
  }

  .checkout-product-title {
    font-size: 13px;
    line-height: 1.3;
  }

  .checkout-product-meta {
    font-size: 12px;
    gap: 8px;
  }

  .checkout-delivery-banner {
    font-size: 12px;
  }

  /* Card de Opção de Pagamento Mobile */
  .checkout-payment-option {
    padding: 12px 10px;
    gap: 10px;
  }

  .checkout-payment-desc {
    font-size: 12px;
  }
}

@media (max-width: 600px) {
  /* Modais em Bottom Sheet no Celular */
  .modal-content {
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
  }

  .modal-header {
    padding: 12px 16px;
  }

  .modal-header h3 {
    font-size: 16px;
  }

  .modal-search-bar {
    padding: 10px 14px;
    gap: 8px;
  }

  .cars-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .car-card-btn {
    padding: 8px 6px;
  }

  .car-card-btn img {
    height: 65px;
  }

  .car-card-btn .car-name-label {
    font-size: 12px;
  }

  #cepModal .modal-content {
    border-radius: 16px 16px 0 0;
  }

  #cepModal input {
    font-size: 16px !important;
  }

  .cart-drawer {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Avaliações e Provas Sociais no Mobile */
  .reviews-score {
    gap: 12px;
  }

  .big-rating {
    font-size: 44px;
  }

  .rating-breakdown {
    max-width: 100%;
    width: 100%;
  }

  .reviews-media-strip-card {
    padding: 12px;
    margin-bottom: 16px;
  }

  .reviews-strip-item-btn {
    width: 72px;
    height: 72px;
  }

  .review-photo-btn {
    width: 76px;
    height: 76px;
  }

  /* Modal de Zoom de Mídia */
  .media-modal-container {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .media-stage-nav-btn {
    width: 38px;
    height: 38px;
  }

  .media-stage-nav-prev { left: 6px; }
  .media-stage-nav-next { right: 6px; }

  /* Tela Pix no Mobile */
  .pix-screen {
    padding-bottom: 40px;
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .pix-green-strip {
    height: auto;
    min-height: 44px;
    padding: 8px 12px;
    font-size: 12px;
    text-align: center;
  }

  .pix-card {
    margin: 10px 8px 24px !important;
    width: calc(100% - 16px) !important;
    max-width: 100% !important;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    box-sizing: border-box !important;
  }

  .pix-card-header {
    padding: 18px 14px 12px;
  }

  .pix-amount-badge {
    font-size: 26px;
  }

  .pix-timer-box {
    margin: 10px 12px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .pix-qr-wrapper {
    margin: 0 12px 12px;
    padding: 14px;
  }

  .pix-qr-img {
    width: 160px;
    height: 160px;
  }

  .pix-copy-box {
    margin: 0 12px 12px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 10px !important;
    width: calc(100% - 24px) !important;
    box-sizing: border-box !important;
  }

  .pix-copy-text {
    width: 100% !important;
    font-size: 11px !important;
    text-align: center !important;
    word-break: break-all !important;
    white-space: normal !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .btn-pix-copy {
    width: 100%;
    height: 44px;
    font-size: 14px;
  }

  .pix-steps-list {
    padding: 0 14px 14px;
    font-size: 13px;
  }
}

/* ==========================================================
   MODAL DE LOGIN E CADASTRO MERCADO LIVRE
   ========================================================== */
#authModal, #purchasesModal {
  z-index: 500;
}

.auth-modal-content {
  max-width: 460px;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.auth-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: #fff159;
  border-bottom: 1px solid #e6d950;
}

.auth-modal-logo {
  height: 30px;
  object-fit: contain;
}

.auth-close-btn {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #333;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.auth-close-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

.auth-tabs {
  display: flex;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.auth-tab-btn {
  flex: 1;
  padding: 13px 10px;
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.auth-tab-btn:hover {
  color: #1e293b;
  background: #f1f5f9;
}

.auth-tab-btn.active {
  color: #3483fa;
  border-bottom-color: #3483fa;
  background: #ffffff;
}

.auth-modal-body {
  padding: 24px 22px;
  max-height: 80vh;
  overflow-y: auto;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-header-text h4 {
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 5px;
}

.auth-header-text p {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 18px;
  line-height: 1.4;
}

.auth-field {
  margin-bottom: 15px;
}

.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 14px;
  color: #0f172a;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-field input:focus {
  border-color: #3483fa;
  box-shadow: 0 0 0 3px rgba(52, 131, 250, 0.15);
}

.auth-input-pwd-box {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-pwd-box input {
  padding-right: 42px;
}

.btn-eye-toggle {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 6px;
  color: #64748b;
  user-select: none;
}

.btn-eye-toggle:hover {
  opacity: 0.8;
}

.auth-link-forgot {
  font-size: 12px;
  color: #3483fa;
  text-decoration: none;
}

.auth-link-forgot:hover {
  text-decoration: underline;
}

.auth-hint {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

.auth-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .auth-row-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.auth-error-msg {
  font-size: 13px;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 14px;
}

.auth-submit-btn {
  width: 100%;
  height: 48px;
  background: #3483fa;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-submit-btn:hover {
  background: #2968c8;
}

.auth-submit-btn:disabled {
  background: #93c5fd;
  cursor: not-allowed;
}

.auth-terms-text {
  font-size: 11px;
  color: #64748b;
  text-align: center;
  margin-top: 12px;
  line-height: 1.4;
}

.auth-terms-text a {
  color: #3483fa;
  text-decoration: none;
}

.auth-switch-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  text-align: center;
  font-size: 13px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-switch-link {
  background: none;
  border: none;
  color: #3483fa;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}

.auth-switch-link:hover {
  text-decoration: underline;
}

.user-logged-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #333333;
}

.btn-user-logout {
  font-size: 11px;
  color: #ef4444;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* ==========================================================
   SELETOR DE ANO DO VEÍCULO E PASSO 2 DO MODAL
   ========================================================== */
.vehicle-year-selector-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--ml-border);
}

.year-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.year-selector-header label {
  font-size: 13px;
  font-weight: 700;
  color: #333333;
  display: flex;
  align-items: center;
  gap: 5px;
}

.year-selector-header strong {
  color: var(--ml-blue);
}

.year-hint-badge {
  font-size: 11px;
  color: #00a650;
  font-weight: 600;
}

.car-year-dropdown {
  width: 100%;
  height: 42px;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  background: #ffffff;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.car-year-dropdown:focus {
  border-color: var(--ml-blue);
  box-shadow: 0 0 0 3px rgba(52, 131, 250, 0.15);
}

.year-pills-container {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.year-pill-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 16px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}

.year-pill-btn:hover {
  border-color: var(--ml-blue);
  color: var(--ml-blue);
  background: #f0f7ff;
}

.year-pill-btn.active {
  background: var(--ml-blue);
  color: #ffffff;
  border-color: var(--ml-blue);
}

/* Modal Step 2: Anos */
.year-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.btn-back-to-models {
  background: none;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}

.btn-back-to-models:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.selected-car-badge-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.modal-years-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 4px;
}

.modal-year-card-btn {
  padding: 10px 8px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.modal-year-card-btn:hover {
  border-color: var(--ml-blue);
  color: var(--ml-blue);
  background: #eff6ff;
  transform: translateY(-1px);
}

.modal-year-card-btn.active {
  background: var(--ml-blue);
  color: #ffffff;
  border-color: var(--ml-blue);
}

/* Aviso de checkout no Modal de Autenticação */
.auth-checkout-notice {
  background: #eff6ff;
  border-bottom: 1px solid #bfdbfe;
  padding: 12px 18px;
  font-size: 13px;
  color: #1d4ed8;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}




