/* Responsive Adjustments */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-bar {
        padding: 0;
        border: none;
        background: transparent;
        height: 0; /* Collapse the nav bar on mobile */
    }

    header nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
    }

    .nav-links {
        display: flex !important;
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        padding-top: 80px;
        transition: var(--transition);
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .header-icons {
        gap: 12px;
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    .menu-toggle {
        display: flex !important;
        z-index: 1001;
        margin-left: 5px;
        background: rgba(0, 86, 179, 0.05);
        border-radius: 50%;
        flex-shrink: 0;
    }

    .search-bar {
        display: none !important;
    }

    .main-header .container {
        padding: 10px 20px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }

    /* Fix images cutting off */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Collapse grids with inline styles and ensure no overflow */
    [style*="display: grid"]:not(.featured-slider) {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        width: 100% !important;
    }

    .featured-slider-container {
        width: 100% !important;
        overflow: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .featured-slider {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        width: 100% !important;
    }

    .featured-slider .product-card {
        width: 100% !important;
        margin: 0 !important;
    }

    body, html {
        overflow-x: hidden !important;
        width: 100% !important;
        position: relative !important;
    }

    .container {
        width: 100% !important;
        max-width: 100vw !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .hero-slider {
        height: 300px;
    }

    .slide-content {
        padding: 20px;
        margin: 0 10px;
        text-align: center;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 8px;
    }

    .slide-content h1 {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }

    .slide-content p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    /* Specific page fixes */
    .about-content [style*="grid-template-columns: 1fr 1fr"] {
        padding-top: 40px !important;
        margin-bottom: 40px !important;
    }

    /* Become a Reseller Page Mobile Refinements */
    main section[style*="padding: 100px 0 140px"] {
        padding: 60px 0 !important;
    }

    h2[style*="font-size: 3.5rem"] {
        font-size: 2.2rem !important;
        letter-spacing: -1px !important;
        margin-bottom: 20px !important;
    }

    p[style*="font-size: 1.2rem"] {
        font-size: 1rem !important;
    }

    .card-premium {
        padding: 30px 20px !important;
        margin: 0 !important;
        width: 100% !important;
        border-radius: 12px !important;
    }

    .card-premium h2 {
        font-size: 1.8rem !important;
        margin-bottom: 15px !important;
    }

    .card-premium p {
        font-size: 1rem !important;
        margin-bottom: 30px !important;
    }

    .form-row[style*="display: grid"] {
        gap: 15px !important;
        margin-bottom: 15px !important;
    }

    .form-group label {
        font-size: 0.9rem !important;
    }

    .form-group input, .form-group select, .form-group textarea {
        padding: 10px !important;
        font-size: 0.95rem !important;
    }

    .reseller-form button {
        width: 100% !important;
        min-width: unset !important;
        padding: 15px !important;
    }

    /* Fix reseller page image height and overflow */
    .reseller-page-image {
        height: 250px !important;
        margin-bottom: 20px !important;
    }

    .reseller-page-image + div {
        position: relative !important;
        bottom: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        padding: 25px !important;
        transform: rotate(0) !important;
        max-width: 100% !important;
        border-radius: var(--radius-md) !important;
        text-align: center !important;
    }

    .reseller-page-image + div div[style*="font-size: 3rem"] {
        font-size: 2.5rem !important;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

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

    .product-grid:not(.featured-slider) {
        grid-template-columns: 1fr;
    }

    .hero-btns {
        width: 100%;
    }

    .btn {
        width: 100%;
    }
}
