/**
 * Koypix Offers Widget - Frontend Styles
 * Compatível com o tema Koypix
 */

/* Offer Card */
.offer-card {
    background: white;
    border: 1px solid var(--border-color, #f0f2f4);
    border-radius: var(--radius-lg, 8px);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* Offer Image Container */
.offer-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 0.75rem;
    border-radius: var(--radius-lg, 8px);
    overflow: hidden;
    background: #f9fafb;
}

.offer-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.offer-image-container a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Placeholder quando não há imagem */
.offer-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #9ca3af;
}

.offer-image-placeholder .dashicons {
    font-size: 48px;
}

/* Discount Badge */
.offer-discount {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #dc2626;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Offer Title */
.offer-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    min-height: 2.8em;
    color: var(--text-main, #111418);
}

.offer-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.offer-title a:hover {
    color: var(--primary, #2b8cee);
}

/* Price Row */
.offer-price-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

/* Old Price */
.old-price {
    font-size: 0.75rem;
    color: var(--gray-text, #6b7280);
    text-decoration: line-through;
}

/* New Price */
.new-price {
    font-size: 1rem;
    font-weight: 700;
    color: #059669;
}

/* Button Override (usa estilos do tema) */
.offer-card .btn {
    width: 100%;
    height: 32px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.offer-card .btn-primary {
    background: var(--primary, #2b8cee);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.offer-card .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(43, 140, 238, 0.25);
}

/* Responsividade */
@media (max-width: 768px) {
    .offer-card {
        padding: 0.875rem;
    }
    
    .offer-title {
        font-size: 0.8125rem;
    }
    
    .new-price {
        font-size: 0.9375rem;
    }
}

/* Widget de Ofertas (múltiplas ofertas) */
.offers-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Compatibilidade com Gutenberg */
.wp-block-koypix-offer-widget {
    margin-bottom: 0;
}

/* Editor específico */
.editor-styles-wrapper .offer-card {
    max-width: 300px;
}
