/* Mobile First Responsive Design */

/* Extra Small Devices (Phones) */
@media (max-width: 575.98px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-padding {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .product-card {
        margin-bottom: 20px;
    }
    
    .navbar-nav {
        text-align: center;
        padding: 10px 0;
    }
    
    .search-box {
        margin: 10px 0;
    }
}

/* Small Devices (Tablets) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section {
        padding: 80px 0;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* Medium Devices (Laptops) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 100%;
    }
}

/* Large Devices (Desktops) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
}

/* Extra Large Devices */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Navigation Responsive */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: white;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        margin-top: 10px;
    }
}

/* Product Grid Responsive */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

@media (max-width: 767.98px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
    }
}

/* Cart Table Responsive */
@media (max-width: 767.98px) {
    .cart-table {
        display: block;
        overflow-x: auto;
    }
    
    .table-responsive {
        border: 0;
    }
}

/* Form Responsive */
@media (max-width: 575.98px) {
    .form-row {
        margin-right: -5px;
        margin-left: -5px;
    }
    
    .form-row > .col,
    .form-row > [class*="col-"] {
        padding-right: 5px;
        padding-left: 5px;
    }
}

/* Footer Responsive */
@media (max-width: 767.98px) {
    .footer-section {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Button Group Responsive */
.btn-group-responsive {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 575.98px) {
    .btn-group-responsive {
        flex-direction: column;
    }
    
    .btn-group-responsive .btn {
        margin-bottom: 8px;
    }
}

/* Modal Responsive */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 10px;
    }
    
    .modal-content {
        border-radius: 8px;
    }
}

/* Search Box Responsive */
@media (max-width: 767.98px) {
    .search-box {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .search-box .form-control {
        width: 100%;
    }
}

/* Image Responsive */
.responsive-image {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Text Responsive */
.responsive-text {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    line-height: 1.4;
}

.responsive-heading {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.2;
}

/* Spacing Utilities for Mobile */
.mobile-mb-3 {
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .mobile-mb-3 {
        margin-bottom: 0;
    }
}

/* Hide/Show elements based on screen size */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 767.98px) {
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }
}