/**
 * Deals & Offers Styles
 * Espinoza Installation Solutions
 */

/* ===================================
   DEALS SECTION CONTAINER
=================================== */

.deals-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.deals-header {
    text-align: center;
    margin-bottom: 3rem;
}

.deals-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    position: relative;
}

.deals-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #dc2626;
    margin: 1rem auto;
    border-radius: 2px;
}

.deals-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===================================
   DEALS GRID
=================================== */

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===================================
   DEAL CARDS
=================================== */

.deal-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #e5e7eb;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.deal-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #dc2626;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   URGENCY BADGE
=================================== */

.urgency-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ===================================
   DEAL IMAGE
=================================== */

.deal-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.deal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* ===================================
   DEAL CONTENT
=================================== */

.deal-content {
    padding: 1.5rem;
}

.deal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.deal-description {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* ===================================
   DEAL PRICING
=================================== */

.deal-pricing {
    margin-bottom: 1rem;
}

.price-original {
    font-size: 1rem;
    color: #9ca3af;
    text-decoration: line-through;
    display: inline-block;
    margin-right: 0.5rem;
}

.price-discounted {
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
    display: inline-block;
}

.price-savings {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.discount-badge {
    background: #dc2626;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 0.5rem;
}

/* ===================================
   DEAL CATEGORY
=================================== */

.deal-category {
    background: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 1rem;
}

/* ===================================
   DEALS CTA SECTION (CUSTOM QUOTE)
=================================== */

.deals-cta-section {
    margin-top: 30px;
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.deals-cta-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.deals-cta-content p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.deals-cta-content .btn {
    margin-top: 1rem;
}

/* ===================================
   DEAL FOOTER & CTA
=================================== */

.deal-footer {
    padding: 0 1.5rem 1.5rem;
}

.deal-cta {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    text-decoration: none;
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.deal-cta:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(220, 38, 38, 0.3);
}

/* ===================================
   LOADING & ERROR STATES
=================================== */

.deals-loading,
.deals-empty,
.deals-error {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 2rem auto;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.deals-loading p,
.deals-empty p,
.deals-error p {
    color: #6b7280;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.deals-empty i,
.deals-error i {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.deals-empty h3,
.deals-error h3 {
    color: #374151;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* ===================================
   BUTTONS
=================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(220, 38, 38, 0.3);
}

/* ===================================
   RESPONSIVE DESIGN
=================================== */

@media (max-width: 768px) {
    .deals-section {
        padding: 3rem 0;
    }
    
    .deals-title {
        font-size: 2rem;
    }
    
    .deals-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .deal-content {
        padding: 1.25rem;
    }
    
    .deal-footer {
        padding: 0 1.25rem 1.25rem;
    }
    
    .urgency-badge {
        top: 0.75rem;
        right: 0.75rem;
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .deals-title {
        font-size: 1.75rem;
    }
    
    .deals-subtitle {
        font-size: 1rem;
    }
    
    .deal-image {
        height: 180px;
    }
    
    .deal-title {
        font-size: 1.125rem;
    }
    
    .price-discounted {
        font-size: 1.25rem;
    }
}

/* ===================================
   ACCESSIBILITY
=================================== */

@media (prefers-reduced-motion: reduce) {
    .deal-card,
    .deal-cta,
    .deal-image img {
        transition: none;
    }
    
    .deal-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .urgency-badge {
        animation: none;
    }
    
    .loading-spinner {
        animation: none;
    }
}

/* ===================================
   HIGH CONTRAST MODE
=================================== */

@media (prefers-contrast: high) {
    .deal-card {
        border: 2px solid #000;
    }
    
    .deal-cta {
        background: #000;
        border: 2px solid #000;
    }
    
    .discount-badge {
        background: #000;
        border: 1px solid #fff;
    }
}