/*
 * ML Product Page — Estilo Fiel ao Mercado Livre
 * Versão: 1.1.0
 */

:root {
  --ml-bg: #ededed;
  --ml-white: #ffffff;
  --ml-blue: #3483fa;
  --ml-blue-dark: #2968c8;
  --ml-blue-light: #e3edfb;
  --ml-green: #00a650;
  --ml-green-light: #e6f7ee;
  --ml-orange: #ff7733;
  --ml-text-dark: #333333;
  --ml-text-gray: #666666;
  --ml-text-light: #999999;
  --ml-border: #e6e6e6;
  --ml-shadow: 0 1px 2px 0 rgba(0,0,0,.1);
  --ml-radius: 8px;
  --ml-font: "Proxima Nova",-apple-system,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;
}

body.single-product {
  background-color: var(--ml-bg) !important;
}

.mlpp-product {
  font-family: var(--ml-font);
  color: var(--ml-text-dark);
  padding: 40px 0;
}

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

/* Card Principal */
.mlpp-product__card {
  background: var(--ml-white);
  border-radius: var(--ml-radius);
  box-shadow: var(--ml-shadow);
  overflow: hidden;
  margin-bottom: 24px;
}

.mlpp-product__main-layout {
  display: grid;
  grid-template-columns: 1fr 380px 350px;
  gap: 0;
  min-height: 600px;
}

/* Coluna 1: Galeria */
.mlpp-product__col-gallery {
  padding: 24px;
  border-right: 1px solid var(--ml-border);
}

.mlpp-gallery__main {
  width: 100%;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.mlpp-gallery__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.mlpp-gallery__thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: absolute;
  left: 24px;
  top: 24px;
  z-index: 5;
}

.mlpp-gallery__thumb {
  width: 50px;
  height: 50px;
  border: 1px solid var(--ml-border);
  border-radius: 4px;
  cursor: pointer;
  padding: 2px;
  background: #fff;
}

.mlpp-gallery__thumb--active {
  border: 2px solid var(--ml-blue);
}

/* Coluna 2: Info Central */
.mlpp-product__col-center {
  padding: 24px 32px;
  border-right: 1px solid var(--ml-border);
}

.mlpp-product__condition-sku {
  font-size: 14px;
  color: var(--ml-text-light);
  margin-bottom: 8px;
}

.mlpp-product__title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.18;
  margin-bottom: 12px;
  color: var(--ml-text-dark);
}

.mlpp-product__short-desc {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--ml-border);
}

.mlpp-subtitle {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Coluna 3: Buy Box */
.mlpp-product__col-buybox {
  padding: 24px;
  background: var(--ml-white);
}

.mlpp-buybox {
  border: 1px solid var(--ml-border);
  border-radius: var(--ml-radius);
  padding: 24px;
  margin-bottom: 16px;
}

/* Preço Estilo ML */
.mlpp-price-section {
  margin-bottom: 24px;
}

.mlpp-price-section .price {
  font-size: 36px;
  font-weight: 300;
  color: var(--ml-text-dark);
  display: block;
}

.mlpp-price-section .price ins {
  text-decoration: none;
}

.mlpp-price-section .price del {
  font-size: 16px;
  color: var(--ml-text-light);
  display: block;
  margin-bottom: -4px;
}

.mlpp-highlight {
  color: var(--ml-green);
  font-weight: 400;
}

.mlpp-installments {
  font-size: 16px;
  margin-top: 4px;
}

/* Frete */
.mlpp-shipping-info {
  margin-bottom: 24px;
}

.mlpp-shipping-info__header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ml-green);
  font-weight: 400;
  font-size: 16px;
}

.mlpp-icon-truck {
  width: 20px;
  height: 20px;
  fill: var(--ml-green);
}

.mlpp-shipping-date {
  font-size: 14px;
  color: var(--ml-text-gray);
  margin: 4px 0 2px 28px;
}

.mlpp-link {
  font-size: 14px;
  color: var(--ml-blue);
  text-decoration: none;
  margin-left: 28px;
}

/* Estoque e Qty */
.mlpp-stock-info {
  margin-bottom: 24px;
}

.mlpp-stock-status {
  font-size: 16px;
  margin-bottom: 12px;
}

.mlpp-qty-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

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

.mlpp-stock-count {
  color: var(--ml-text-light);
  font-size: 13px;
}

/* Botões */
.mlpp-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.mlpp-btn {
  width: 100%;
  height: 48px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}

.mlpp-btn--primary {
  background: var(--ml-blue);
  color: #fff;
}

.mlpp-btn--primary:hover {
  background: var(--ml-blue-dark);
}

.mlpp-btn--secondary {
  background: var(--ml-blue-light);
  color: var(--ml-blue);
}

.mlpp-btn--secondary:hover {
  background: #d1e3fa;
}

/* Trust Badges */
.mlpp-trust-badges {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mlpp-trust-item {
  display: flex;
  gap: 12px;
}

.mlpp-trust-item .mlpp-icon {
  width: 16px;
  height: 16px;
  fill: var(--ml-text-light);
  flex-shrink: 0;
  margin-top: 2px;
}

.mlpp-trust-item p {
  font-size: 14px;
  color: var(--ml-text-light);
  line-height: 1.3;
  margin: 0;
}

.mlpp-trust-item p span {
  color: var(--ml-blue);
}

/* Seller Card */
.mlpp-seller-card {
  border: 1px solid var(--ml-border);
  border-radius: var(--ml-radius);
  padding: 24px;
}

.mlpp-seller-card__title {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 24px;
}

.mlpp-seller-card__header {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.mlpp-icon-location {
  width: 20px;
  height: 20px;
  fill: var(--ml-text-dark);
}

.mlpp-location {
  font-size: 16px;
  margin: 0;
}

.mlpp-city {
  font-size: 14px;
  color: var(--ml-text-light);
  margin: 0;
}

/* Reputação Termômetro */
.mlpp-reputation {
  margin-bottom: 24px;
}

.mlpp-reputation-label {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
}

.mlpp-reputation-bar {
  display: flex;
  gap: 4px;
  height: 8px;
}

.mlpp-bar-item {
  flex: 1;
  background: #fff5e8;
}

.mlpp-bar-item.level-1 { background: #fff0f0; }
.mlpp-bar-item.level-2 { background: #fff5e8; }
.mlpp-bar-item.level-3 { background: #fffbe8; }
.mlpp-bar-item.level-4 { background: #f1f9eb; }
.mlpp-bar-item.level-5 { background: #e6f7ee; }

.mlpp-bar-item.active.level-5 {
  background: var(--ml-green);
  height: 12px;
  margin-top: -2px;
}

.mlpp-seller-stats {
  display: flex;
  justify-content: space-between;
  text-align: center;
  gap: 8px;
  margin-bottom: 24px;
}

.mlpp-stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mlpp-stat-item strong {
  font-size: 18px;
}

.mlpp-stat-item span {
  font-size: 10px;
  color: var(--ml-text-gray);
  line-height: 1.2;
}

.mlpp-stat-item svg {
  width: 24px;
  height: 24px;
  fill: var(--ml-text-dark);
  margin-bottom: 4px;
}

/* Conteúdo Inferior */
.mlpp-product__content-section {
  background: var(--ml-white);
  border-radius: var(--ml-radius);
  padding: 40px;
  box-shadow: var(--ml-shadow);
  margin-bottom: 24px;
}

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

/* Responsividade */
@media (max-width: 1100px) {
  .mlpp-product__main-layout {
    grid-template-columns: 1fr 1fr;
  }
  .mlpp-product__col-buybox {
    grid-column: span 2;
    border-top: 1px solid var(--ml-border);
  }
}

@media (max-width: 768px) {
  .mlpp-product__main-layout {
    grid-template-columns: 1fr;
  }
  .mlpp-product__col-center, .mlpp-product__col-gallery, .mlpp-product__col-buybox {
    grid-column: span 1;
    border-right: none;
  }
}
