@media screen and (min-width:2000px) {
    header, .title-wrapper, section, footer {
        padding-left: 8rem;
        padding-right: 8rem;
    }

    #contact-info {
        grid-row: span 2;
    }

    #business-hours {
        grid-row: span 2;
    }
}

@media screen and (max-width:1300px) {
    #about {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media screen and (max-width:1200px) {
    html{ font-size: 14px; }
}

@media (max-width:980px) {
    #header-logo {
        display: none;
    }
    
    .grid, #featured-section .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    }

    #col-2-image {
        grid-column: 1/2;
        grid-row: 2/4;
    }

    #about-col-2 button {
        grid-column: 1/2;
        grid-row: 4/5;
    }

}

@media screen and (max-width:800px) {
    .contact-wrapper {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media screen and (max-width:700px) {

    header h1 {
        font-size: 2.5rem;
    }

    #tmg .section-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    #col-2-image {
        grid-column: 1/2;
        grid-row: 2/3;
    }

    #about-col-2 p:nth-of-type(2) {
        grid-column: 1/3;
        grid-row: 3/4;
    }

    #about-col-2 p:nth-of-type(3) {
        grid-column: 1/3;
        grid-row: 4/5;
    }

    #about-col-2 button {
        grid-column: 1/3;
        grid-row: 5/6;
    }

}

@media screen and (max-width:600px) {
    html { font-size: 12px; }
    
    /* Scale down cards significantly on mobile */
    :root {
        --card-font-scale: 0.8;
    }
    
    .grid, #featured-section .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    }
    
    header h1 {
        font-size: 2rem;
    }

    header a {
        font-size: 1.2rem;
    }

    /* Contact wrapper - force single column at 600px */
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    #contact-section {
        grid-column: 1;
        grid-row: auto;
    }
    
    .business-hours {
        grid-column: 2/3
    }

    .contact-form {
        grid-template-columns: 1fr; /* Single column layout */
    }
    

    .contact-form .form-group:has(input[name="name"]), .contact-form .form-group:has(input[name="phone"]){
     grid-column: 1 / -1; /
    }
  
    .contact-form .form-group:nth-child(1), /* name */
    .contact-form .form-group:nth-child(2), /* phone */
    .contact-form .form-group:nth-child(3), /* email */
    .contact-form .form-group:nth-child(4) { /* message */
        grid-column: 1 / -1;
    }
    
    .contact-form .submit-btn {
        grid-column: 1 / -1;
    }

    .product-wrapper {
        display: flex;
        flex-direction: column;
    }

    .main-image {
        max-height: 400px;
    }
}

@media screen and (max-width:500px) {
    
    html {
        font-size: 10px;
    }

    header {
        flex-direction: column;
        align-items: baseline;
        gap: 1rem;
        padding: 2rem;
    }

    header nav {
        align-self: center;
        width: 100%;
    }
    

    header h1 {
        font-size: 3rem;
    }


    header ul {
        display: flex;
        justify-content: space-between;
    }

    header a {
        font-size: 1.6rem; 
    }

    section, #hero-section, footer {
        padding: 2rem;
    }
    
    #about-col-2 {
        display: flex;  
        flex-direction: column;
        gap: 1.5rem;
    }

    .tmg-header img {
        width: 100%;
        height: auto;
    }

    #location-map {
        height: 30rem;
    }
}