/* ==========================================================================
   PRODUTO.CSS - PDP ESTILO MERCADO LIVRE COM CORES ELLIS MODA ÍNTIMA
   ========================================================================== */

:root {
  --primary: #89646E;
  --primary-hover: #68434F;
  --accent: #C8AEC5;
  --dark-slate: #352A30;
  --whatsapp-green: #25D366;
  
  --texto-1: rgba(0, 0, 0, 0.9);
  --texto-2: rgba(0, 0, 0, 0.55);
  --texto-3: #999999;
  --ok: #00a650;
  --divisor: #ededed;
  --fundo-body: #ebebeb;
  --fundo-card: #ffffff;
  --raio: 6px;
  --sombra-card: 0 1px 2px 0 rgba(0, 0, 0, 0.12);
}

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

body.ml-body {
  background-color: var(--fundo-body);
  font-family: Roboto, -apple-system, Arial, sans-serif;
  color: var(--texto-1);
  line-height: 1.29;
}

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

/* Header */
.ml-header {
  background-color: var(--primary);
  padding: 14px 0;
  box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.1);
}

.ml-header-inner {
  max-width: 1184px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
}

.ml-voltar {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.15s;
}

.ml-voltar:hover {
  opacity: 0.85;
}

.ml-brand {
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
}

/* Breadcrumb */
.pdp-breadcrumb {
  max-width: 1184px;
  margin: 16px auto 0;
  padding: 0 16px;
  font-size: 13px;
  color: var(--texto-2);
}

.pdp-breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.pdp-breadcrumb a:hover {
  text-decoration: underline;
}

.pdp-breadcrumb .bc-sep {
  margin: 0 6px;
  color: var(--texto-3);
}

/* Main Container */
.ml-main {
  padding: 24px 16px 48px;
  display: flex;
  justify-content: center;
}

.pdp-container {
  width: 100%;
  max-width: 1184px;
  background-color: var(--fundo-card);
  border-radius: 8px;
  box-shadow: var(--sombra-card);
  padding: 24px;
}

.pdp-row {
  display: flex;
  flex-direction: row;
  gap: 40px;
}

/* Coluna Esquerda (Galeria e Descrição) */
.pdp-col-left {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
}

.pdp-gallery {
  display: flex;
  flex-direction: row;
  gap: 16px;
  height: 500px;
}

.gallery-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 52px;
}

.gallery-thumbnails img {
  width: 50px;
  height: 50px;
  border: 1px solid var(--divisor);
  border-radius: 4px;
  cursor: pointer;
  object-fit: contain;
  background: #ffffff;
  padding: 2px;
  transition: border-color 0.15s;
}

.gallery-thumbnails img:hover {
  border-color: var(--primary);
}

.gallery-thumbnails img.thumb-active {
  border: 2px solid var(--primary);
}

.gallery-main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  border-radius: 6px;
  padding: 16px;
  border: 1px solid var(--divisor);
}

.gallery-main img {
  max-width: 100%;
  max-height: 460px;
  object-fit: contain;
}

.sem-foto {
  width: 100%;
  height: 100%;
  background-color: #fafafa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--texto-3);
  border-radius: 6px;
  gap: 8px;
  font-size: 14px;
}

.pdp-divider {
  height: 1px;
  background-color: var(--divisor);
  margin: 32px 0;
}

.pdp-description {
  margin-bottom: 32px;
}

.pdp-description h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--texto-1);
  margin-bottom: 16px;
}

.pdp-description p {
  font-size: 15px;
  color: var(--texto-2);
  line-height: 1.6;
}

.ml-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.ml-table th {
  background-color: #f8f8f8;
  text-align: left;
  padding: 12px 16px;
  width: 30%;
  border: 1px solid var(--divisor);
  font-weight: 600;
  color: var(--texto-1);
  font-size: 14px;
}

.ml-table td {
  padding: 12px 16px;
  border: 1px solid var(--divisor);
  color: var(--texto-2);
  font-size: 14px;
}

/* Coluna Direita (Buy Box) */
.pdp-col-right {
  width: 360px;
  padding: 24px;
  border: 1px solid var(--divisor);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #ffffff;
  align-self: flex-start;
}

.product-condition {
  font-size: 12px;
  color: var(--texto-2);
}

.product-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--texto-1);
  margin-top: 6px;
  line-height: 1.25;
}

.product-selo {
  display: inline-block;
  background-color: #ff7733;
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  width: fit-content;
}

.pdp-pricing {
  margin-top: 4px;
}

.price-old {
  text-decoration: line-through;
  color: var(--texto-3);
  font-size: 14px;
  margin-bottom: 2px;
}

.pdp-price-block {
  font-size: 36px;
  font-weight: 400;
  display: flex;
  align-items: baseline;
  color: var(--texto-1);
  line-height: 1;
}

.price-symbol {
  font-size: 18px;
  margin-right: 4px;
  font-weight: 400;
}

.price-fraction {
  font-size: 36px;
  font-weight: 400;
}

.price-cents {
  font-size: 16px;
  vertical-align: super;
  margin-left: 1px;
  font-weight: 400;
}

.pdp-discount-tag {
  font-size: 16px;
  font-weight: 500;
  color: var(--ok);
  margin-left: 10px;
}

.price-installments {
  color: var(--ok);
  font-size: 14px;
  margin-top: 6px;
}

/* Variações */
.pdp-variations {
  border-top: 1px solid var(--divisor);
  padding-top: 16px;
}

.var-title {
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--texto-1);
}

.var-cores {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.var-cor-item {
  min-width: 48px;
  height: 48px;
  border: 1px solid var(--divisor);
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  background: #ffffff;
  transition: all 0.15s ease;
}

.var-cor-item:hover {
  border-color: var(--primary);
}

.var-cor-item.active {
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.var-cor-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}

.var-cor-nome {
  font-size: 11px;
  font-weight: 500;
  color: var(--texto-1);
  padding: 0 6px;
  text-align: center;
  white-space: nowrap;
}

.var-tamanhos {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.var-tam-pill {
  padding: 6px 14px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  color: var(--texto-1);
  background: #ffffff;
  transition: all 0.15s ease;
}

.var-tam-pill:hover {
  border-color: var(--primary);
}

.var-tam-pill.active {
  border: 2px solid var(--primary);
  color: var(--primary);
  font-weight: 600;
  background-color: rgba(137, 100, 110, 0.08);
}

/* Frete e Estoque */
.pdp-shipping {
  color: var(--ok);
  font-size: 14px;
  font-weight: 600;
  border-top: 1px solid var(--divisor);
  padding-top: 16px;
}

.ship-details {
  color: var(--texto-2);
  font-weight: 400;
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.pdp-stock {
  font-size: 14px;
  font-weight: 600;
  color: var(--texto-1);
}

.stock-selector-interactive {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.stock-label {
  font-size: 13px;
  color: var(--texto-2);
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.qty-btn {
  width: 36px;
  height: 34px;
  border: none;
  background: #f8f8f8;
  color: var(--texto-1);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  user-select: none;
}

.qty-btn:hover {
  background: #ebebeb;
}

.qty-btn:active {
  background: #dedede;
}

.qty-stepper input {
  width: 46px;
  height: 34px;
  border: none;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--texto-1);
  background: transparent;
  outline: none;
}

.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stock-max {
  color: var(--texto-3);
  font-size: 12px;
  font-weight: 400;
}

.var-destaque {
  font-weight: 600;
  color: var(--primary);
}

.tam-vazio-aviso {
  font-size: 12px;
  color: var(--texto-2);
  font-style: italic;
}

/* Botões de Ação da PDP (Fluxo 1) */
.pdp-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.btn-adicionar-sacola {
  background-color: #ffffff;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--raio);
  height: 48px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-adicionar-sacola:hover {
  background-color: rgba(137, 100, 110, 0.08);
  border-color: var(--primary-hover);
  color: var(--primary-hover);
}

.btn-adicionar-sacola:active {
  transform: scale(0.99);
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--raio);
  height: 48px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-comprar-agora {
  background-color: #25D366 !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.25);
}

.btn-comprar-agora:hover {
  background-color: #1eb954 !important;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

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

.ml-header-brand-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Responsivo Mobile */
@media (max-width: 768px) {
  .ml-main {
    padding: 12px 10px 32px;
  }
  
  .pdp-container {
    padding: 14px;
    border-radius: 6px;
  }

  .pdp-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .pdp-col-left {
    display: contents;
  }

  .pdp-col-right {
    display: contents;
  }

  /* 1. Título e cabeçalho do produto no topo */
  .pdp-header-info {
    order: 1;
    margin-bottom: 2px;
  }

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

  /* 2. Galeria de fotos: Imagem Grande em Cima, Miniaturas Embaixo */
  .pdp-gallery {
    order: 2;
    display: flex;
    flex-direction: column;
    height: auto;
    gap: 8px;
    margin-bottom: 4px;
  }

  .gallery-main {
    order: 1;
    width: 100%;
    height: 320px;
    background: #ffffff;
    border: 1px solid var(--divisor);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .gallery-main img {
    max-height: 300px;
    width: 100%;
    object-fit: contain;
  }

  .gallery-thumbnails {
    order: 2;
    display: flex;
    flex-direction: row;
    width: 100%;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .gallery-thumbnails::-webkit-scrollbar {
    display: none;
  }

  .gallery-thumbnails img {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 4px;
  }

  /* 3. Preço e Bloco de Compra */
  .pdp-pricing {
    order: 3;
  }

  .pdp-variations {
    order: 4;
  }

  .pdp-shipping {
    order: 5;
    padding-top: 10px;
  }

  .pdp-stock {
    order: 6;
  }

  .pdp-actions {
    order: 7;
    margin-top: 8px;
  }

  /* 4. Descrição e Características na parte inferior */
  .pdp-divider {
    order: 8;
    margin: 16px 0 8px 0;
    border-top: 1px solid var(--divisor);
  }

  .pdp-description {
    order: 9;
    padding-top: 8px;
  }

  .pdp-description h2 {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .pdp-description p {
    font-size: 14px;
    line-height: 1.5;
  }
}
