/* Contenedor Grid Principal */
.pe-apc-alt-wrapper {
    margin: 40px auto;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.pe-apc-alt-main-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 25px;
    text-align: left;
    text-transform: uppercase;
}

.pe-apc-alt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

/* Tarjeta Individual Estilo Runnea */
.pe-apc-alt-col {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.pe-apc-alt-col:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.pe-apc-alt-col.empty-col {
    justify-content: center;
    align-items: center;
    background: #f8fafc;
    border-style: dashed;
    padding: 30px;
}

.apc-alt-error {
    color: #64748b;
    font-size: 14px;
    text-align: center;
}

/* Imagen y Badge */
.apc-alt-image-box {
    position: relative;
    background: #fff;
    padding: 25px;
    /* Damos MÁS AIRE porque vamos a hacer un zoom agresivo a la foto para que la Adidas no se vea diminuta */
    box-sizing: border-box;
    /* Indispensable para que el padding y el border no sumen a las proporciones */
    aspect-ratio: 1/1;
    /* El cuadrado perfecto estandarizado que pidió el usuario */
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f1f5f9;
    overflow: hidden;
}

.apc-alt-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* COVER: fuerza imagen cuadrada, siempre rellena el contenedor */
    object-position: center;
    mix-blend-mode: multiply;
}

.apc-alt-no-img {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
}

.apc-alt-badge-green {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ef4444;
    /* Rojo oferta en lugar de verde */
    color: white;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 3px;
    z-index: 2;
    /* Por si la imagen escalada se sale */
}

/* Cuerpo de la tarjeta */
.apc-alt-content-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Título */
.apc-alt-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 15px 0;
    line-height: 1.4;
    height: 42px;
    /* Forzamos altitud ocupando siempre 2 líneas de texto */
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Row de Precios y Logo */
.apc-alt-prices-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    /* EMPUJA EL BOTON TOTALMENTE HACIA ABAJO */
    margin-bottom: 20px;
}

.apc-alt-prices-col {
    display: flex;
    flex-direction: column;
    text-align: left;
    flex: 1 1 auto;
    min-width: 0;
}

.apc-alt-old-price {
    font-size: 13px;
    color: #6b7280;
    text-decoration: line-through;
    margin-bottom: 2px;
    height: 18px;
    /* Fija la altura del precio tachado para que NO desalinee a los que no tienen */
    display: block;
}

.apc-alt-old-price-empty {
    height: 18px;
    display: block;
    /* Mismo espacio si no hay descuento, clava la altura */
}

.apc-alt-desde {
    font-size: 10px;
    font-weight: 700;
    color: #ef4444;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.apc-alt-current-price {
    font-size: 24px;
    font-weight: 800;
    color: #ef4444;
    line-height: 1;
}

/* Logo de Afiliado */
.apc-alt-merchant-col {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    flex: 0 0 85px;
    /* Bloque inamovible de 85px de ancho */
    width: 85px;
    margin-left: 15px;
}

.apc-alt-merchant-logo {
    max-height: 35px;
    width: 100%;
    object-fit: contain;
    object-position: bottom right;
    /* Se ancla abajo a la derecha */
}

.apc-alt-merchant-text {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    text-align: right;
}

/* Botón Ver Oferta */
.apc-alt-buy-btn {
    display: block;
    width: 100%;
    background: #106fdf;
    /* Azul Corporativo Planeta Endurance */
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.2s;
    letter-spacing: 0.5px;
}

.apc-alt-buy-btn:hover {
    background: #0056b3;
    /* Azul Hover */
    color: white;
}

/* Modo Responsive (Apilar en Movil) */
@media (max-width: 768px) {
    .pe-apc-alt-grid {
        grid-template-columns: 1fr;
    }
}