/* ============================================
   DEAL FINDER - OPTIMIZED COMPACT DESIGN
   Mobile-First Approach for Indian Market
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #2874f0;
    --primary-hover: #1e5fc7;
    --secondary-color: #ff6b35;
    --success: #10b981;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --surface: #f8fafc;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Main Container */
.deal-finder-main {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 1rem 0;
}

/* ==================== HERO SECTION ==================== */
.deal-finder-hero {
    position: relative;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(40, 116, 240, 0.85) 0%, rgba(30, 95, 199, 0.75) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    padding: 2rem 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-title i {
    color: #FFD700;
    font-size: 1.8rem;
    animation: pulse 2s ease-in-out infinite;
}

.hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* Festival Banner (Editable) */
.festival-banner {
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid rgba(255, 215, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    animation: festivalGlow 2s ease-in-out infinite;
}

.festival-banner i {
    color: #FFD700;
}

@keyframes festivalGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }
}

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

/* ==================== QUICK FILTERS ==================== */
.quick-filters {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.quick-filters-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem;
}

.quick-filters-header i {
    color: var(--secondary-color);
}

.quick-filters-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.quick-filter-btn {
    background: var(--surface);
    border: 2px solid var(--border);
    padding: 0.75rem 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-filter-btn i {
    color: var(--primary-color);
    font-size: 1rem;
}

.quick-filter-btn:hover,
.quick-filter-btn:active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.quick-filter-btn:hover i {
    color: white;
}

/* ==================== FORM CONTAINER ==================== */
.form-container {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

/* Filter Sections */
.filter-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-light);
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-title i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* ==================== CATEGORIES - COMPACT ==================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.category-option {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 0.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.category-option.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.category-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.4rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.category-option.selected .category-icon {
    background: white;
    color: var(--primary-color);
}

.category-name {
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--text-primary);
    display: block;
}

.category-option.selected .category-name {
    color: white;
}

/* ==================== PRICE RANGE - COMPACT ==================== */
.price-range-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.price-inputs {
    display: flex;
    align-items: end;
    gap: 0.5rem;
}

.price-input-group {
    flex: 1;
}

.price-input-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.price-input-group input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    background: var(--surface);
}

.price-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.price-divider {
    padding: 0 0.25rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
}

.price-quick-select {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.price-quick-btn {
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text-secondary);
    padding: 0.45rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.price-quick-btn:hover,
.price-quick-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ==================== DISCOUNT - HORIZONTAL PILLS ==================== */
.discount-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.discount-option {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 70px;
}

.discount-option:hover {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.discount-option.selected {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.discount-percentage {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.15rem;
}

.discount-label {
    display: block;
    font-size: 0.65rem;
    opacity: 0.8;
}

/* ==================== PLATFORMS - COMPACT CARDS ==================== */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.platform-option {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.platform-option.priority-platform {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.02) 100%);
}

.platform-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.platform-option.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.platform-logo {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.platform-option.selected .platform-logo {
    background: white;
    color: var(--primary-color);
}

.platform-info {
    flex: 1;
}

.platform-name {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.platform-badge {
    background: var(--success);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.platform-tag {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
}

.platform-option.selected .platform-tag {
    color: rgba(255, 255, 255, 0.8);
}

/* ==================== ALERT OPTIONS ==================== */
.alert-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.alert-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    background: var(--surface);
    border-radius: 8px;
    border: 2px solid var(--border);
    transition: border-color 0.3s ease;
}

.alert-checkbox:hover {
    border-color: var(--primary-color);
}

.alert-checkbox input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.alert-checkbox input:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.alert-checkbox input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.75rem;
}

.alert-text {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.alert-email-group {
    padding: 0.75rem;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.alert-email-group input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}

.alert-note {
    color: var(--text-secondary);
    font-size: 0.7rem;
    line-height: 1.4;
}

/* ==================== FORM ACTIONS ==================== */
.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.find-deals-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 4px 15px rgba(40, 116, 240, 0.3);
    flex: 1;
    min-width: 180px;
    justify-content: center;
}

.find-deals-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 116, 240, 0.4);
}

.find-deals-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.reset-filters-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border);
    padding: 0.9rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reset-filters-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ==================== MODAL ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.deal-modal {
    background: white;
    border-radius: 16px;
    max-width: 450px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease-out;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.4rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--border-light);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.modal-btn {
    flex: 1;
    min-width: 140px;
    padding: 0.7rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.modal-btn.primary {
    background: var(--primary-color);
    color: white;
}

.modal-btn.primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.modal-btn.secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.modal-btn.secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

/* Small Mobile (320px - 480px) */
@media (max-width: 480px) {
    .deal-finder-hero {
        min-height: 320px;
        border-radius: 12px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-title i {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
    }
    
    .festival-banner {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
    
    .quick-filters-grid {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }
    
    .quick-filter-btn {
        padding: 0.65rem;
    }
    
    .form-container {
        padding: 1rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }
    
    .category-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .category-name {
        font-size: 0.65rem;
    }
    
    .discount-options {
        gap: 0.4rem;
    }
    
    .discount-option {
        min-width: 60px;
        padding: 0.5rem 0.6rem;
    }
    
    .discount-percentage {
        font-size: 1rem;
    }
    
    .discount-label {
        font-size: 0.6rem;
    }
    
    .platforms-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .find-deals-btn,
    .reset-filters-btn {
        width: 100%;
    }
}

/* Medium Mobile to Small Tablet (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .deal-finder-hero {
        min-height: 380px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .quick-filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet to Desktop (769px - 1024px) */
@media (min-width: 769px) {
    .deal-finder-main {
        padding: 2rem 0;
    }
    
    .deal-finder-hero {
        min-height: 450px;
        margin-bottom: 2rem;
        border-radius: 20px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-title i {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .festival-banner {
        font-size: 0.95rem;
    }
    
    .quick-filters {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .quick-filters-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
    
    .quick-filter-btn {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .form-container {
        padding: 2rem;
    }
    
    .filter-section {
        margin-bottom: 2rem;
        padding-bottom: 1.75rem;
    }
    
    .filter-title {
        font-size: 1.15rem;
        margin-bottom: 1rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.75rem;
    }
    
    .category-option {
        padding: 1rem 0.5rem;
    }
    
    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: 0.6rem;
    }
    
    .category-name {
        font-size: 0.8rem;
    }
    
    .discount-options {
        gap: 0.75rem;
    }
    
    .discount-option {
        padding: 0.9rem 1.2rem;
    }
    
    .discount-percentage {
        font-size: 1.4rem;
    }
    
    .discount-label {
        font-size: 0.75rem;
    }
    
    .platforms-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .platform-option {
        padding: 1rem;
    }
    
    .platform-logo {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .platform-name {
        font-size: 1rem;
    }
    
    .find-deals-btn {
        padding: 1rem 2.5rem;
        font-size: 1.1rem;
        min-width: 220px;
        flex: 0 1 auto;
    }
    
    .reset-filters-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* Large Desktop (1025px+) */
@media (min-width: 1025px) {
    .deal-finder-hero {
        min-height: 500px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1rem;
    }
    
    .platforms-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Print Styles */
@media print {
    .deal-finder-hero {
        min-height: 200px;
    }
    
    .hero-bg-image,
    .quick-filters,
    .festival-banner,
    .form-actions {
        display: none;
    }
}
