/* Ofertazos Rotativo — Frontend */

.ofr-deals-wrap {
    max-width: 1200px;
    margin: 2em auto;
    padding: 0 15px;
}

.ofr-deals-title {
    text-align: center;
    font-size: 2em;
    margin-bottom: 0.5em;
    color: #333;
}

/* Countdown */
.ofr-countdown-bar {
    text-align: center;
    background: linear-gradient(135deg, #ff4444, #ff6b35);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 1.5em;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ofr-countdown {
    font-weight: bold;
    font-size: 1.3em;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}

.ofr-countdown-unit {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 0 4px;
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 6px;
    min-width: 50px;
}

.ofr-countdown-number {
    font-size: 1.4em;
    font-weight: 800;
    line-height: 1.2;
}

.ofr-countdown-label-text {
    font-size: 0.65em;
    text-transform: uppercase;
    opacity: 0.85;
    letter-spacing: 1px;
}

/* Grid */
.ofr-deals-grid {
    display: grid;
    grid-template-columns: repeat(var(--ofr-columns, 3), 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .ofr-deals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ofr-deals-grid {
        grid-template-columns: 1fr;
    }
}

/* Card */
.ofr-deal-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.ofr-deal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.ofr-deal-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff4444;
    color: #fff;
    font-weight: 800;
    font-size: 1.1em;
    padding: 6px 14px;
    border-radius: 20px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(255,68,68,0.4);
}

.ofr-deal-image {
    display: block;
    overflow: hidden;
}

.ofr-deal-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.ofr-deal-card:hover .ofr-deal-image img {
    transform: scale(1.05);
}

.ofr-deal-info {
    padding: 16px;
}

.ofr-deal-name {
    margin: 0 0 8px;
    font-size: 1em;
    line-height: 1.3;
}

.ofr-deal-name a {
    color: #333;
    text-decoration: none;
}

.ofr-deal-name a:hover {
    color: #ff4444;
}

.ofr-deal-prices {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.ofr-price-old {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9em;
}

.ofr-price-sale {
    color: #ff4444;
    font-weight: 800;
    font-size: 1.3em;
}

.ofr-deal-savings {
    color: #28a745;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 12px;
}

.ofr-deal-btn {
    display: block;
    text-align: center;
    background: #ff4444 !important;
    color: #fff !important;
    padding: 10px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    text-decoration: none;
    transition: background 0.2s;
    border: none !important;
}

.ofr-deal-btn:hover {
    background: #e03030 !important;
    color: #fff !important;
}

/* Badge */
.ofr-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ff4444;
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 700;
    z-index: 5;
    line-height: 1.3;
}

.ofr-badge-single {
    font-size: 0.9em;
    padding: 8px 16px;
}

.ofr-sale-flash {
    border-radius: 4px !important;
    font-size: 0.85em !important;
    padding: 6px 14px !important;
}

/* No deals */
.ofr-no-deals {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.1em;
}

/* Widget */
.ofr-widget-countdown {
    text-align: center;
    background: #ff4444;
    color: #fff;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-weight: bold;
}

.ofr-widget-deals {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ofr-widget-deal {
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}

.ofr-widget-deal:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.ofr-widget-deal a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
}

.ofr-widget-deal img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.ofr-widget-deal-name {
    display: block;
    font-size: 0.9em;
    line-height: 1.3;
}

.ofr-widget-deal-prices {
    display: block;
    font-size: 0.85em;
    margin-top: 2px;
}

.ofr-widget-deal-prices del {
    color: #999;
    margin-right: 6px;
}

.ofr-widget-deal-prices strong {
    color: #ff4444;
}

.ofr-widget-discount {
    background: #ff4444;
    color: #fff;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    font-weight: 700;
    margin-left: 4px;
}

/* Discount badge in admin table */
.ofr-discount-badge {
    background: #ff4444;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 0.9em;
}
