/* ===== AFANLY Website - Responsive Styles ===== */
/* Author: AFANLY Team */
/* Description: Mobile-first responsive design breakpoints covering all screen sizes */

/* ===== Ultra-Wide & 4K Displays (Min 1441px) ===== */
@media (min-width: 1441px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-content {
        max-width: 860px;
    }
    
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== Standard Desktops & Laptops (1025px - 1440px) ===== */
@media (min-width: 1025px) and (max-width: 1440px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== Tablets Landscape & Small Laptops (769px - 1024px) ===== */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .about-image {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
    
    .modal-content {
        max-width: 720px;
        padding: 1.5rem;
    }
}

/* ===== Tablets Portrait & Large Phones (481px - 768px) ===== */
@media (max-width: 768px) {
    /* Header & Mobile Nav Drawer */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 65px;
        width: 100%;
        height: calc(100vh - 65px);
        background-color: var(--card-bg);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 1.25rem;
        padding: 2.5rem 1.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        font-size: 1.15rem;
        padding: 0.6rem 1rem;
        width: 100%;
        text-align: center;
        border-radius: var(--border-radius);
    }
    
    .nav-link:hover,
    .nav-link.active {
        background-color: var(--bg-secondary);
    }
    
    .nav-link::after {
        display: none;
    }
    
    /* Hero */
    .hero {
        padding: 4rem 0;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 380px;
        margin: 0 auto;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    /* Services & Products */
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-image {
        height: 190px;
    }
    
    /* Shop Controls */
    .shop-controls {
        top: 60px;
        padding: 1rem 0;
    }
    
    .controls-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .search-box {
        width: 100%;
        min-width: 0;
    }
    
    .filter-box {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .filter-box select:last-child {
        grid-column: 1 / -1;
    }
    
    /* Modals */
    .modal.active {
        padding: 0.75rem;
    }
    
    .modal-content {
        padding: 1.25rem;
        max-height: 94vh;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .main-image {
        height: 240px;
    }
    
    .modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 32px;
        height: 32px;
        font-size: 1.25rem;
    }
    
    /* Floating Buttons */
    .notification-bell {
        bottom: 15px;
        right: 15px;
    }
    
    .bell-button {
        width: 48px;
        height: 48px;
    }
    
    .bell-icon {
        width: 22px;
        height: 22px;
    }
    
    .scroll-top-btn {
        bottom: 72px;
        right: 17px;
        width: 44px;
        height: 44px;
    }
    
    .notification-panel {
        width: calc(100vw - 30px);
        max-width: 360px;
        bottom: 64px;
        right: 0;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* ===== Standard Mobile Phones (361px - 480px) ===== */
@media (max-width: 480px) {
    html {
        font-size: 15px;
    }
    
    section {
        padding: 3.5rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-image {
        height: 210px;
    }
    
    .filter-box {
        grid-template-columns: 1fr;
    }
    
    .filter-box select:last-child {
        grid-column: auto;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .form-buttons .btn {
        width: 100%;
    }
    
    .contact-item {
        padding: 0.85rem;
    }
    
    .contact-method-btn {
        padding: 1rem;
        gap: 1rem;
    }
    
    .method-icon {
        width: 42px;
        height: 42px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.75rem;
    }
}

/* ===== Extra Small Screens & Foldables (<= 360px) ===== */
@media (max-width: 360px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .logo span {
        font-size: 1.2rem;
    }
    
    .logo img {
        width: 32px;
        height: 32px;
    }
    
    .main-image {
        height: 190px;
    }
    
    .thumbnail {
        width: 54px;
        height: 54px;
    }
    
    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .notification-panel {
        width: calc(100vw - 20px);
        right: -5px;
    }
    
    .contact-form,
    .order-form {
        padding: 1rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    #header,
    .mobile-menu-toggle,
    .dark-mode-toggle,
    .hero-buttons,
    .shop-controls,
    .notification-bell,
    .scroll-top-btn,
    .modal,
    .form-buttons {
        display: none !important;
    }
    
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    
    .hero,
    .shop-header {
        background: none !important;
        color: #000000 !important;
        padding: 1rem 0 !important;
    }
}
