/* ===== RESPONSIVE STYLES ===== */

/* Tablet View - 768px to 1024px */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .deals-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stores-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .search-layout {
        grid-template-columns: 200px 1fr;
        gap: 20px;
    }
}

/* Mobile View - 768px and below */
@media (max-width: 768px) {
    /* Header Responsive */
    .header-top {
        display: none;
    }
    
    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .logo {
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .main-nav {
        order: 3;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: flex;
        gap: 20px;
        padding: 10px 0;
        border-top: 1px solid #E2E8F0;
    }
    
    .main-nav a {
        white-space: nowrap;
        font-size: 14px;
    }
    
    .header-search {
        order: 2;
        width: 100%;
    }
    
    .header-search input {
        width: 100%;
    }
    
    /* Hero Section */
    .hero {
        padding: 40px 0;
    }
    
    .hero h1 {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .hero p {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .hero-stats {
        flex-direction: row;
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-stats .stat {
        flex: 1;
        min-width: 100px;
    }
    
    .hero-stats .stat strong {
        font-size: 24px;
    }
    
    /* Deals and Stores Grid */
    .deals-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stores-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* Store Page */
    .store-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .store-logo {
        margin: 0 auto 20px;
    }
    
    .store-info {
        text-align: center;
    }
    
    .store-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .store-actions {
        justify-content: center;
        margin-top: 20px;
    }
    
    /* Filter and Sort */
    .filter-sort {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-btn {
        flex: 1;
        font-size: 14px;
        padding: 8px 10px;
    }
    
    .sort-dropdown {
        width: 100%;
    }
    
    /* Search Page */
    .search-layout {
        grid-template-columns: 1fr;
    }
    
    .search-filters {
        display: none; /* Hide on mobile, show filter button instead */
    }
    
    .mobile-filter-btn {
        display: block;
        width: 100%;
        margin-bottom: 20px;
        padding: 12px;
        background: #00A99D;
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        cursor: pointer;
    }
    
    .search-filters.mobile-active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        z-index: 1000;
        overflow-y: auto;
        padding: 20px;
    }
    
    /* Blog */
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-content {
        flex-direction: column;
    }
    
    .blog-sidebar {
        width: 100%;
        margin-top: 30px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-section ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .newsletter-form {
        max-width: 300px;
        margin: 0 auto;
    }
    
    /* Utilities */
    .section-header h2 {
        font-size: 24px;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Error Page */
    .error-title {
        font-size: 80px;
    }
    
    .error-subtitle {
        font-size: 28px;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .error-actions .btn-primary,
    .error-actions .btn-secondary {
        width: 200px;
    }
}

/* Small Mobile - 480px and below */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .stores-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .deal-card {
        padding: 20px;
    }
    
    .store-card {
        padding: 20px;
    }
    
    .filter-buttons {
        flex-direction: column;
    }
    
    .filter-btn {
        width: 100%;
    }
    
    /* Single Blog Post */
    .blog-post-content {
        padding: 20px;
    }
    
    .blog-post-content h1 {
        font-size: 24px;
    }
    
    .blog-post-content h2 {
        font-size: 20px;
    }
    
    .blog-post-content h3 {
        font-size: 18px;
    }
}

/* Extra Small Mobile - 360px and below */
@media (max-width: 360px) {
    .logo-text {
        font-size: 20px;
    }
    
    .hero h1 {
        font-size: 20px;
    }
    
    .hero-stats .stat strong {
        font-size: 20px;
    }
    
    .hero-stats .stat span {
        font-size: 12px;
    }
    
    .deal-card h3 {
        font-size: 16px;
    }
    
    .store-card h3 {
        font-size: 16px;
    }
}

/* Desktop First Responsive Utilities */
@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
    
    .mobile-filter-btn {
        display: none;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

/* Print Styles */
@media print {
    .header-top,
    .main-nav,
    .header-search,
    .hero,
    .newsletter-section,
    .footer {
        display: none;
    }
    
    .deal-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .container {
        max-width: 100%;
    }
    
    a {
        text-decoration: none;
        color: inherit;
    }
}