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

/* Large Desktop */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }

    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-inner {
        gap: 30px;
    }
}

/* Desktop / Tablet Landscape */
@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }

    .header-nav {
        display: none;
    }

    .product-nav-bar {
        display: none;
    }

    .header-search {
        flex: 1;
        max-width: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .news-grid.grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .footer-col-3 {
        grid-column: 1 / -1;
    }

    .newsletter-inner {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-form input[type="email"] {
        width: 250px;
    }

    .sidebar-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .hero-slide-title {
        font-size: 36px;
    }

    .hero-slide {
        height: 75vh;
    }

    .hero-slide-content {
        max-width: 450px;
        padding: 25px 35px 25px 30px;
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }

    .top-bar-left {
        display: none;
    }

    .top-bar-right {
        width: 100%;
        justify-content: center;
    }

    .header-inner {
        gap: 15px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-card {
        padding: 15px 10px;
    }

    .category-card-icon i {
        font-size: 36px;
    }

    .section-title {
        font-size: 22px;
    }

    .section-padding {
        padding: 30px 0;
    }

    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .achievement-number {
        font-size: 36px;
    }

    .achievement-icon i {
        font-size: 36px;
    }

    .hero-slide {
        height: 65vh;
    }

    .hero-slide-title {
        font-size: 28px;
    }

    .hero-slide-desc {
        font-size: 15px;
    }

    .hero-slide-content {
        max-width: 400px;
        padding: 20px 30px 20px 25px;
    }

    .hero-swiper .swiper-button-prev,
    .hero-swiper .swiper-button-next {
        width: 40px;
        height: 40px;
    }

    .news-grid.grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom-inner {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .newsletter-form {
        flex-direction: column;
        align-items: center;
    }

    .newsletter-form input[type="email"] {
        width: 100%;
        max-width: 300px;
    }

    /* Grid adjustments */
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 { font-size: 32px; }
    h2 { font-size: 28px; }
    h3 { font-size: 20px; }
}

/* Mobile */
@media (max-width: 576px) {
    .container {
        padding: 0 12px;
    }

    .top-bar {
        font-size: 12px;
        padding: 6px 0;
    }

    .site-branding img,
    .site-logo-img {
        max-height: 45px;
    }

    .site-title {
        font-size: 22px;
    }

    .header-search {
        max-width: none;
        flex: 1;
    }

    .search-field {
        padding: 8px 12px;
        font-size: 13px;
    }

    .search-submit {
        padding: 8px 14px;
        font-size: 14px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .category-card {
        padding: 12px 8px;
    }

    .category-card-title {
        font-size: 13px;
    }

    .category-card-desc {
        display: none;
    }

    .hero-slide {
        height: 55vh;
    }

    .hero-slide-title {
        font-size: 22px;
    }

    .hero-slide-desc {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .hero-btn {
        font-size: 14px;
        padding: 10px 25px;
    }

    .hero-slide-content {
        max-width: 100%;
        padding: 20px 25px;
    }

    .hero-swiper .swiper-button-prev,
    .hero-swiper .swiper-button-next {
        display: none;
    }

    .achievements-section {
        padding: 40px 0;
    }

    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .achievement-number {
        font-size: 32px;
    }

    .achievement-suffix {
        font-size: 24px;
    }

    .achievement-label {
        font-size: 13px;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .section-subtitle {
        font-size: 14px;
        margin-bottom: 25px;
    }

    .section-padding {
        padding: 25px 0;
    }

    .news-grid.grid-4 {
        grid-template-columns: 1fr !important;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .project-card-meta {
        flex-direction: column;
        gap: 5px;
    }

    .newsletter-text h3 {
        font-size: 20px;
    }

    .footer-map iframe {
        height: 150px;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
        font-size: 16px;
    }

    .btn {
        font-size: 14px;
        padding: calc(.5em + 2px) calc(1em + 2px);
    }

    .product-specs-table thead th {
        font-size: 14px;
        padding: 10px 12px;
    }

    .product-specs-table tbody td {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Very small screens */
@media (max-width: 400px) {
    .header-search {
        display: none;
    }

    .header-inner {
        justify-content: space-between;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .hero-slide {
        height: 45vh;
    }

    .hero-slide-title {
        font-size: 18px;
    }
}

/* === CATEGORY PAGE RESPONSIVE === */
@media (max-width: 992px) {
    .cat-hero {
        min-height: 280px;
    }

    .cat-hero-title {
        font-size: 32px;
    }

    .cat-cta-inner {
        flex-direction: column;
        text-align: center;
    }

    .cat-cta-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .cat-hero {
        min-height: 220px;
    }

    .cat-hero-title {
        font-size: 26px;
    }

    .cat-hero-tagline {
        font-size: 15px;
    }

    .cat-hero-icon {
        width: 55px;
        height: 55px;
    }

    .cat-hero-icon i {
        font-size: 24px;
    }

    .subcategories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cat-cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .cat-cta-actions .btn {
        width: 100%;
        text-align: center;
    }

    .cat-products-header {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 576px) {
    .cat-hero {
        min-height: 180px;
    }

    .cat-hero-title {
        font-size: 22px;
    }

    .cat-hero-content {
        padding: 40px 15px;
    }

    .cat-section-title {
        font-size: 20px;
    }

    .cat-cta-text h2 {
        font-size: 22px;
    }
}
