/* ============================================================
   FICHA DE PRODUCTO — Repuestos de Autos
   Diseño basado en Relojes Argentina
   ============================================================ */

/* ---- CONTENEDOR PRINCIPAL: imagen izq | texto+CTA der ---- */
.producto-afiliado-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    max-width: 960px;
    margin: 24px auto 0;
    padding: 0;
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
    overflow: hidden;
    align-items: stretch;
}

/* ---- COLUMNA IMAGEN (izquierda) ---- */
.producto-imagen {
    flex: 1 1 380px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 36px 28px;
    background: #fff;
}

.producto-imagen a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    transition: transform 0.3s ease;
}

.producto-imagen a:hover {
    transform: scale(1.03);
}

.producto-imagen img {
    max-width: 100%;
    max-height: 360px;
    height: auto;
    border-radius: 6px;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.08));
}

/* ---- COLUMNA INFO (derecha): descripción + CTA ---- */
.producto-info {
    flex: 1 1 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 36px;
    box-sizing: border-box;
}

/* Texto descriptivo */
.producto-descripcion {
    font-size: 15.5px;
    color: #333;
    line-height: 1.75;
    margin: 0 0 20px 0;
}

.producto-descripcion p {
    font-size: 15.5px;
    color: #333;
    line-height: 1.75;
    margin: 0 0 12px 0;
}

.producto-descripcion strong { color: #222; }

/* ---- PRECIO ---- */
.producto-precio-badge {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 16px;
    background: #f0f7ff;
    border-radius: 8px;
    border-left: 4px solid #3483fa;
}

.precio-label {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
}

.precio-valor {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.5px;
    line-height: 1;
}

/* ---- VENDIDOS (prueba social) ---- */
.producto-vendidos {
    font-size: 13px;
    color: #00a650;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 12px;
    font-weight: 600;
}

.vendidos-icon {
    font-weight: 900;
    font-size: 14px;
}

/* ---- CTA BLOCK (caja amarilla) ---- */
.producto-cta-block {
    margin: 0;
    padding: 20px 24px;
    background: #fffef0;
    border-radius: 12px;
    border: 2px solid #ffe600;
}

/* ---- BOTÓN MERCADOLIBRE ---- */
.btn-comprar-meli {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: #fff159;
    color: #333333 !important;
    font-weight: 700;
    font-size: 17px;
    text-align: center;
    text-decoration: none !important;
    padding: 16px 24px;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-user-drag: none;
    user-select: none;
    touch-action: manipulation;
}

.btn-comprar-meli::before {
    content: "🛒";
    font-size: 18px;
}

.btn-comprar-meli:hover {
    background: #ffe600;
    color: #333333 !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.btn-comprar-meli:active {
    transform: translateY(0) scale(0.99);
}

/* Trust signals inline (debajo del botón) */
.producto-trust-inline {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.producto-trust-inline span {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

/* ---- CTA MOBILE (oculto en desktop, visible en mobile) ---- */
.producto-cta-mobile {
    display: none;
}

/* ---- WRAPPER SECCIONES + CTA FINAL (debajo del contenedor) ---- */
.producto-secciones-wrapper {
    max-width: 960px;
    margin: 0 auto 24px;
    padding: 24px 28px 28px;
    background: #ffffff;
    box-sizing: border-box;
    border-top: 1px solid #eee;
}

/* ---- GRID DE SECCIONES 2x2 ---- */
.producto-secciones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.producto-seccion {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    border-left: 3px solid;
}

.producto-seccion:nth-of-type(1) { border-left-color: #3483fa; }
.producto-seccion:nth-of-type(2) { border-left-color: #1a1a2e; }
.producto-seccion:nth-of-type(3) { border-left-color: #ff9800; }
.producto-seccion:nth-of-type(4) { border-left-color: #4caf50; }

.producto-seccion:hover {
    border-color: #d0d0d0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.producto-seccion h2 {
    font-size: 13px;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.producto-seccion:nth-of-type(1) h2::before { content: "🔩"; font-size: 14px; }
.producto-seccion:nth-of-type(2) h2::before { content: "🚗"; font-size: 14px; }
.producto-seccion:nth-of-type(3) h2::before { content: "⚙️"; font-size: 14px; }
.producto-seccion:nth-of-type(4) h2::before { content: "✅"; font-size: 14px; }

.producto-seccion p,
.producto-seccion ul {
    font-size: 13.5px;
    color: #555;
    line-height: 1.65;
    margin: 0;
    padding-left: 0;
}

.producto-seccion ul {
    padding-left: 18px;
}

.producto-seccion strong { color: #333; }

/* ---- CTA FINAL (debajo de las secciones) ---- */
.producto-cta-final .btn-comprar-meli {
    font-size: 16px;
    padding: 15px 24px;
}

/* ---- STICKY BAR MOBILE ---- */
.sticky-comprar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #ffffff;
    padding: 10px 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #eee;
}

.sticky-comprar .btn-comprar-meli {
    margin: 0;
    padding: 14px;
    font-size: 16px;
}

/* ---- TEXTO DEL ARTICULO (debajo del contenedor) ---- */
.producto-texto {
    max-width: 960px;
    margin: 28px auto 0;
    padding: 24px 28px;
    font-size: 15px;
    color: #444;
    line-height: 1.75;
    border-top: 1px solid #eee;
}
.producto-texto p  { margin-bottom: 14px; }
.producto-texto h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 24px 0 10px;
}
.producto-texto strong { color: #222; }

/* ---- CTA FINAL (debajo del texto) ---- */
.producto-cta-final {
    max-width: 960px;
    margin: 0 auto 32px;
    padding: 0 28px 28px;
    text-align: center;
}
.producto-cta-final .btn-oferta {
    max-width: 440px;
    margin: 0 auto;
    font-size: 16px;
}

/* ---- OCULTAR ELEMENTOS INNECESARIOS ---- */
/* Imagen featured que GeneratePress inyecta automáticamente */
.single-post .post-image,
.single-post figure.post-image,
.single-post .featured-image { display: none !important; }
.entry-meta    { display: none !important; }
.copyright-bar { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .producto-afiliado-container {
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        flex-direction: column;
    }

    .producto-imagen {
        padding: 20px;
        flex: 1 1 100%;
    }

    .producto-imagen img {
        max-height: 260px;
    }

    .producto-info {
        padding: 0 18px 20px;
        flex: 1 1 100%;
    }

    /* Ocultar CTA block en mobile, mostrar CTA mobile debajo del contenedor */
    .producto-cta-block {
        display: none;
    }

    .producto-cta-mobile {
        display: block;
        padding: 0 18px 16px;
    }

    .producto-trust-inline {
        gap: 8px;
    }

    .producto-secciones-wrapper {
        margin: 0;
        padding: 16px;
        border-radius: 0;
        box-shadow: none;
    }

    .producto-secciones {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .producto-seccion {
        padding: 14px 16px;
    }

    .producto-cta-final .btn-comprar-meli {
        display: none;
    }

    /* Mostrar sticky bar */
    .sticky-comprar {
        display: block;
    }

    body.single-post {
        padding-bottom: 74px;
    }

    .precio-valor {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .producto-precio-badge {
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
    }
}

/* ---- TITULO H1 PRODUCTO ---- */
body.single-post .entry-title,
body.single-post .entry-header .entry-title {
    text-align: center !important;
    font-size: 42px !important;
    font-weight: 700 !important;
    margin-bottom: 24px !important;
    line-height: 1.2 !important;
}
