/**
 * Vitrine e detalhe de ofertas — layout inspirado no Mercado Livre.
 * Fundo cinza claro, cards brancos; CTAs e destaques na paleta TopSpin Club.
 */

.tsc-ml-store,
.tsc-ml-product-page {
    --ml-bg: #ebebeb;
    --ml-card: #ffffff;
    --ml-text: rgba(0, 0, 0, 0.9);
    --ml-muted: rgba(0, 0, 0, 0.55);
    --ml-border: rgba(0, 0, 0, 0.12);
    --ml-brand: #0b4a36;
    --ml-brand-hover: #0f5e44;
    --ml-brand-soft: #e8f5e0;
    --ml-accent: #18c978;
    --ml-accent-dark: #0d7a4a;
    --ml-cta: #0b4a36;
    --ml-cta-hover: #083d2d;
    --ml-cta-text: #ffffff;
    --ml-green: #18c978;
    --ml-red: #f23d4f;
    --ml-radius: 6px;
    /* Evita links neon do topspin-global.css em fundo claro */
    --ts-spin: var(--ml-brand);
    background: var(--ml-bg);
    color: var(--ml-text);
    min-height: calc(100vh - 4rem);
}

.tsc-ml-store-inner,
.tsc-ml-product-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 16px 48px;
}

/* ── Busca ── */
.tsc-ml-search {
    display: flex;
    align-items: stretch;
    background: var(--ml-card);
    border-radius: var(--ml-radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 12px;
}

.tsc-ml-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 14px 16px;
    font: inherit;
    font-size: 16px;
    color: var(--ml-text);
    background: transparent;
}

.tsc-ml-search input::placeholder {
    color: var(--ml-muted);
}

.tsc-ml-search button {
    border: 0;
    background: var(--ml-bg);
    color: var(--ml-muted);
    padding: 0 16px;
    cursor: pointer;
}

.tsc-ml-search button:hover {
    color: var(--ml-text);
}

/* ── Navegação categorias (pills) ── */
.tsc-ml-cat-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.tsc-ml-cat-nav::-webkit-scrollbar {
    display: none;
}

.tsc-ml-cat-nav a {
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--ml-card);
    color: var(--ml-text);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    white-space: nowrap;
}

.tsc-ml-cat-nav a.is-active,
.tsc-ml-cat-nav a:hover {
    background: var(--ml-brand);
    color: #fff !important;
}

/* ── Chips marcas ── */
.tsc-ml-brands {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
    scrollbar-width: none;
}

.tsc-ml-brands a {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: var(--ml-radius);
    background: var(--ml-card);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: var(--ml-text);
    border: 1px solid var(--ml-border);
}

.tsc-ml-brands a.is-active {
    border-color: var(--ml-brand);
    color: var(--ml-brand) !important;
    background: var(--ml-brand-soft);
}

/* ── Cabeçalho resultados ── */
.tsc-ml-results-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.tsc-ml-results-head h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 400;
    color: var(--ml-text);
}

.tsc-ml-results-count {
    font-size: 14px;
    color: var(--ml-muted);
}

/* ── Grid produtos (card ML) ── */
.tsc-ml-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 640px) {
    .tsc-ml-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .tsc-ml-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }
}

.tsc-ml-card {
    background: var(--ml-card);
    border-radius: var(--ml-radius);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.15s ease;
}

.tsc-ml-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.tsc-ml-card.is-hidden {
    display: none;
}

.tsc-ml-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.tsc-ml-card-media {
    position: relative;
    aspect-ratio: 1;
    background: #fff;
    overflow: hidden;
}

.tsc-ml-card-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    box-sizing: border-box;
}

.tsc-ml-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--ml-green);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.tsc-ml-card-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ml-muted);
}

.tsc-ml-card-body {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tsc-ml-card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    color: var(--ml-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.tsc-ml-card-price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    margin-top: auto;
    padding-top: 4px;
}

.tsc-ml-card-list {
    font-size: 12px;
    color: var(--ml-muted);
}

.tsc-ml-card-install {
    margin: 0;
    font-size: 13px;
    color: var(--ml-green);
}

.tsc-ml-card-shipping {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ml-green);
}

/* ── Preço fracionado (ML) ── */
.tsc-ml-price {
    display: inline-flex;
    align-items: flex-start;
    color: var(--ml-text);
    line-height: 1;
}

.tsc-ml-price--lg .tsc-ml-price-currency,
.tsc-ml-price--lg .tsc-ml-price-dec {
    font-size: 18px;
    margin-top: 6px;
}

.tsc-ml-price--lg .tsc-ml-price-int {
    font-size: 36px;
    font-weight: 300;
    letter-spacing: -0.02em;
}

.tsc-ml-price-currency {
    font-size: 12px;
    margin-top: 4px;
    margin-right: 2px;
}

.tsc-ml-price-int {
    font-size: 22px;
    font-weight: 300;
}

.tsc-ml-price-dec {
    font-size: 11px;
    margin-top: 3px;
}

.tsc-ml-price--na {
    font-size: 16px;
    font-weight: 600;
}

.tsc-ml-disclaimer {
    margin-top: 24px;
    font-size: 12px;
    color: var(--ml-muted);
    line-height: 1.5;
}

.tsc-ml-profile-cta {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--ml-card);
    border-left: 3px solid var(--ml-accent);
    padding: 14px 16px;
    border-radius: var(--ml-radius);
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.tsc-ml-profile-cta p {
    margin: 0 0 4px;
    font-weight: 600;
    font-size: 14px;
}

.tsc-ml-profile-cta span {
    display: block;
    font-size: 13px;
    color: var(--ml-muted);
    line-height: 1.45;
}

.tsc-ml-profile-cta a {
    color: var(--ml-brand) !important;
    font-size: 13px;
    font-weight: 700;
}

.tsc-ml-profile-cta button {
    border: 0;
    background: transparent;
    color: var(--ml-muted);
    cursor: pointer;
    margin-left: auto;
}

/* ── Detalhe produto ── */
.tsc-ml-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 13px;
    color: var(--ml-muted);
    margin-bottom: 16px;
}

.tsc-ml-breadcrumb a {
    color: var(--ml-brand) !important;
    text-decoration: none;
}

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

.tsc-ml-product-shell {
    background: var(--ml-card);
    border-radius: var(--ml-radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.tsc-ml-product-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 900px) {
    .tsc-ml-product-layout {
        grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    }
}

.tsc-ml-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--ml-border);
}

@media (min-width: 900px) {
    .tsc-ml-gallery {
        flex-direction: row;
        border-bottom: 0;
        border-right: 1px solid var(--ml-border);
        padding: 24px;
    }
}

.tsc-ml-gallery-thumbs {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    order: 2;
}

@media (min-width: 900px) {
    .tsc-ml-gallery-thumbs {
        flex-direction: column;
        order: 0;
        width: 56px;
        flex-shrink: 0;
        overflow: visible;
    }
}

.tsc-ml-gallery-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    padding: 4px;
    border: 2px solid transparent;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.tsc-ml-gallery-thumb.is-active {
    border-color: var(--ml-brand);
}

.tsc-ml-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tsc-ml-gallery-main {
    position: relative;
    flex: 1;
    aspect-ratio: 1;
    max-height: min(72vw, 420px);
    background: #fff;
    order: 1;
    overflow: hidden;
}

@media (min-width: 900px) {
    .tsc-ml-gallery-main {
        max-height: 420px;
    }
}

.tsc-ml-gallery-main img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    box-sizing: border-box;
}

.tsc-ml-buybox {
    padding: 20px 20px 24px;
}

@media (min-width: 900px) {
    .tsc-ml-buybox {
        padding: 24px 28px;
        position: sticky;
        top: 72px;
        align-self: start;
    }
}

.tsc-ml-buybox-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--ml-muted);
}

.tsc-ml-condition {
    font-weight: 600;
    color: var(--ml-text);
}

.tsc-ml-sold {
    color: var(--ml-muted);
}

.tsc-ml-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ml-brand);
    font-size: 13px;
}

.tsc-ml-rating-stars {
    color: var(--ml-accent);
    letter-spacing: -1px;
}

.tsc-ml-product-title {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.25;
    color: var(--ml-text);
}

@media (min-width: 900px) {
    .tsc-ml-product-title {
        font-size: 26px;
    }
}

.tsc-ml-price-block {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ml-border);
}

.tsc-ml-price-list-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 14px;
    color: var(--ml-muted);
}

.tsc-ml-price-list-row s {
    font-size: 16px;
}

.tsc-ml-discount-pill {
    background: var(--ml-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.tsc-ml-price-breakdown {
    display: grid;
    gap: 6px;
    margin: 10px 0 0;
    padding: 10px 12px;
    background: var(--ml-brand-soft);
    border-radius: var(--ml-radius);
}

.tsc-ml-price-breakdown-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}

.tsc-ml-price-breakdown-row dt {
    margin: 0;
    font-weight: 600;
    color: var(--ml-muted);
}

.tsc-ml-price-breakdown-row dd {
    margin: 0;
    font-weight: 700;
    color: var(--ml-text);
}

.tsc-ml-price-breakdown-row.is-highlight dd {
    color: var(--ml-brand);
    font-size: 15px;
}

.tsc-ml-trust-list {
    list-style: none;
    margin: 12px 0 14px;
    padding: 0;
    display: grid;
    gap: 0;
}

.tsc-ml-trust-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 0;
    border: 0;
    border-radius: 0;
    background: none;
}

.tsc-ml-trust-item--brand .tsc-ml-trust-icon {
    color: var(--ml-brand);
}

.tsc-ml-trust-item--success .tsc-ml-trust-icon {
    color: var(--ml-green);
}

.tsc-ml-trust-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 1px;
    border-radius: 0;
    background: none;
    color: var(--ml-muted);
    box-shadow: none;
}

.tsc-ml-trust-line {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ml-text);
    overflow-wrap: anywhere;
}

.tsc-ml-trust-line strong {
    font-weight: 600;
}

.tsc-ml-trust-detail {
    color: var(--ml-muted);
}

.tsc-ml-trust-detail::before {
    content: ' — ';
}

.tsc-ml-trust-buy {
    list-style: none;
    padding: 10px 0 4px;
}

.tsc-ml-trust-buy .tsc-ml-btn-buy {
    margin: 0;
}

.tsc-ml-installments {
    margin: 8px 0 0;
    font-size: 16px;
    color: var(--ml-green);
}

.tsc-ml-shipping-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ml-green);
}

.tsc-ml-btn-buy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    border: 0;
    border-radius: var(--ml-radius);
    background: var(--ml-cta);
    color: var(--ml-cta-text);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
    box-shadow: 0 2px 8px rgba(11, 74, 54, 0.22);
}

.tsc-ml-btn-buy:hover {
    background: var(--ml-cta-hover);
    color: #fff;
}

.tsc-ml-btn-secondary {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    text-align: center;
    border: 1px solid var(--ml-brand);
    border-radius: var(--ml-radius);
    background: transparent;
    color: var(--ml-brand);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.tsc-ml-btn-secondary:hover {
    background: var(--ml-brand-soft);
    color: var(--ml-brand);
}

.tsc-ml-seller {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--ml-border);
    font-size: 14px;
}

.tsc-ml-seller strong {
    display: block;
    margin-bottom: 4px;
}

.tsc-ml-seller-official {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--ml-green);
    margin-left: 6px;
}

.tsc-ml-affiliate-note {
    margin-top: 12px;
    font-size: 12px;
    color: var(--ml-muted);
    line-height: 1.45;
}

.tsc-ml-product-details {
    margin-top: 16px;
    background: var(--ml-card);
    border-radius: var(--ml-radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.tsc-ml-product-details section {
    padding: 20px;
    border-top: 1px solid var(--ml-border);
}

.tsc-ml-product-details section:first-child {
    border-top: 0;
}

.tsc-ml-product-details h2 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--ml-text);
}

.tsc-ml-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

@media (min-width: 640px) {
    .tsc-ml-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.tsc-ml-summary-item {
    margin: 0;
    padding: 12px;
    border: 1px solid var(--ml-border);
    border-radius: var(--ml-radius);
    background: rgba(11, 74, 54, 0.03);
}

.tsc-ml-summary-item dt {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ml-muted);
}

.tsc-ml-summary-item dd {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--ml-text);
    line-height: 1.35;
}

.tsc-ml-description {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: var(--ml-text);
    white-space: pre-wrap;
}

.tsc-ml-specs-wrap {
    border: 1px solid var(--ml-border);
    border-radius: var(--ml-radius);
    overflow: hidden;
}

.tsc-ml-specs {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tsc-ml-specs tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.03);
}

.tsc-ml-specs th,
.tsc-ml-specs td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.tsc-ml-specs th {
    width: 38%;
    font-weight: 700;
    color: var(--ml-brand);
    background: rgba(11, 74, 54, 0.04);
}

.tsc-ml-specs td {
    color: var(--ml-text);
    word-break: break-word;
}

.tsc-ml-related {
    margin-top: 24px;
}

.tsc-ml-related h2 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
}

.tsc-ml-empty {
    padding: 32px;
    text-align: center;
    color: var(--ml-muted);
    background: var(--ml-card);
    border-radius: var(--ml-radius);
}
