/* 
KNC Ceiling Solutions - Responsive Stylesheet
Author: Trae AI
Version: 1.0
*/

/* ===== RESPONSIVE STYLES ===== */

/* Large Devices (Desktops, less than 1200px) */
@media (max-width: 1199.98px) {
    .container {
        max-width: 960px;
        padding: 0 20px;
    }
    
    .category-grid,
    .product-grid,
    .features-grid,
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .search-box input {
        width: 180px;
    }
    
    .search-box input:focus {
        width: 220px;
    }
}

/* Medium Devices (Tablets, less than 992px) */
@media (max-width: 991.98px) {
    .container {
        max-width: 720px;
        padding: 0 20px;
    }
    
    .main-nav {
        padding: 8px 0;
    }
    
    .logo img {
        max-height: 40px;
    }
    
    .menu-toggle, #hamburger-menu {
        display: flex;
        padding: 10px;
        z-index: 1000;
        position: relative;
        cursor: pointer;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        background-color: rgba(0,0,0,0.05);
        border-radius: 5px;
    }
    
    .menu-toggle.active span:nth-child(1), #hamburger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2), #hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3), #hamburger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #ffffff;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        margin: 0 0 15px 0;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        min-width: auto;
        padding-left: 20px;
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .search-box {
        margin-top: 20px;
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .search-box input:focus {
        width: 100%;
    }
    
    .main-nav .container {
        flex-wrap: wrap;
    }
    
    .slide {
        height: auto;
    }
    
    .slide img {
        max-height: 300px;
    }
    
    .slide-content h1 {
        font-size: 36px;
    }
    
    .slide-content p {
        font-size: 18px;
    }
    
    .category-grid,
    .product-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .footer-widget.branch-office,
    .footer-widget.map-widget {
        grid-column: span 2;
    }
    
    .product-detail-container {
        flex-direction: column;
    }
    
    .product-gallery,
    .product-info-detail {
        width: 100%;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-image,
    .about-text {
        width: 100%;
    }
    
    .products-container {
        flex-direction: column;
    }
    
    .filter-sidebar,
    .products-grid {
        width: 100%;
    }
    
    .filter-sidebar {
        margin-bottom: 30px;
        padding-right: 0;
    }
    
    .products-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Devices (Landscape Phones, less than 768px) */
@media (max-width: 767.98px) {
    .container {
        max-width: 540px;
        padding: 0 20px;
    }
    
    .top-bar {
        padding: 8px 0;
    }
    
    .top-bar .container {
        flex-direction: column;
        gap: 10px;
        align-items: center;
        text-align: center;
    }
    
    .main-nav {
        padding: 6px 0;
    }
    
    .logo img {
        max-height: 35px;
    }
    
    .slide {
        height: auto;
    }
    
    .slide img {
        max-height: 250px;
    }
    
    .slide-content h1 {
        font-size: 28px;
    }
    
    .slide-content p {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .footer-bottom .container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 0 15px;
        position: relative;
        z-index: 1;
    }
    
    .developer-credit {
        order: 3;
        padding: 12px 5px;
        margin: 8px 0;
        border-radius: 8px;
        background: rgba(0, 86, 179, 0.15);
    }
    
    .footer-bottom-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .footer-bottom-links li {
        margin: 0 8px;
    }
    
    .footer-bottom-links li:not(:last-child):after {
        display: none;
    }
    
    .footer-bottom-links a {
        padding: 5px 10px;
        display: inline-block;
    }
    
    .footer-bottom .container > p:first-child {
        margin-bottom: 0;
    }
    
    .footer-bottom-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 5px;
    }
    
    .footer-bottom-links li {
        margin: 0 10px;
    }
    
    .footer-bottom-links li:not(:last-child):after {
        display: none;
    }
    
    .footer-bottom-links a {
        padding: 5px 0;
        display: inline-block;
    }
    
    .main-image img {
        height: 300px;
    }
    
    .thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* Extra Small Devices (Portrait Phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        width: 100%;
        padding: 0 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .footer-widget.branch-office,
    .footer-widget.map-widget {
        grid-column: span 1;
    }
    
    .top-bar {
        padding: 6px 0;
    }
    
    .contact-info,
    .social-links {
        text-align: center;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;

    }
    
    .contact-info a[href^="tel"] {
        font-size: 14px;
    }
    
    .contact-info a,
    .social-links a {
        font-size: 12px;
        display: block;
    }
    
    .contact-info a {
        margin-right: 0;
    }
    
    .social-links a {
        margin-left: 10px;
        margin-right: 10px;
        display: inline-block;
        font-size: 16px;
    }
    
    .social-links {
        display: flex;
        flex-direction: row;
        justify-content: center;
    }
    
    .main-nav {
        padding: 5px 0;
    }
    
    .logo img {
        max-height: 50px;
    }
    
    .slide {
        height: auto;
    }
    
    .slide img {
        max-height: none;
        min-height: 300px;
    }
    
    .slide-content h1 {
        font-size: 24px;
    }
    
    .slide-content p {
        font-size: 14px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .category-grid,
    .product-grid,
    .features-grid,
    .products-list {
        grid-template-columns: 1fr;
    }
    
    .contact-options {
        flex-direction: column;
    }
    
    .contact-option {
        width: 100%;
    }
    
    .pagination a {
        width: 35px;
        height: 35px;
        margin: 0 3px;
    }
}