/* For tablets & small laptops */
@media (max-width: 991px) {
  .container {
    width: 100%;
    padding: 0 15px;
  }

  .header-middle,
  .sg-topbar {
    display: none; /* simplify header on mobile */
  }

  .navbar,
  .sg-menu {
    justify-content: space-between;
    width: 100%;
  }

  .sg-adds-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

  .grid-6 > li,
  .grid-5 > li,
  .grid-4 > li,
  .grid-2 > li {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .product-header,
  .profile .d-flex {
    display: block !important;
  }

  .hero-section .carousel-item {
    padding: 60px 0;
    text-align: center;
  }

  .products-section .col-md-3,
  .products-section .col-md-9,
  .category-products .col-md-2,
  .category-products .col-md-10 {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 20px;
  }

  .footer-bottom-content {
    display: block;
    text-align: center;
  }
  .footer-social ul,
  .footer-bottom-content ul {
    justify-content: center;
    margin-top: 10px;
  }
}

/* For small tablets & large phones */
@media (max-width: 767px) {
  .navbar-toggler {
    margin-top: 0;
  }
  .featured-product {
    margin-bottom: 15px;
    width: 100%;
  }
  .sg-product.style-1 .product-thumb {
    height: auto;
    width: 100%;
  }
  .cta-section {
    padding: 40px 15px;
    text-align: center;
  }
  .grid-4 > li {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* For phones ≤575px */
@media (max-width: 575px) {
  .sg-logo img {
    max-height: 35px;
  }
  #hero-slider h1 {
    font-size: 20px;
  }
  #hero-slider h2,
  #hero-slider h3 {
    font-size: 18px;
  }
  .cta-text h1 {
    font-size: 28px;
  }
  .product-header .nav-tabs li {
    width: auto;
    font-size: 12px;
    margin-right: 8px;
  }
  .sg-countdown ul li {
    padding: 3px 6px;
    font-size: 12px;
  }
  .footer-section {
    padding-bottom: 65px; /* keep sticky footer space */
  }
}

/* For extra small phones ≤475px */
@media (max-width: 475px) {
  .sg-adds-content {
    display: block;
  }
  .sg-adds-content .sg-add {
    width: 100%;
    margin-bottom: 15px;
  }
  .header-middle form {
    display: block;
    border: none;
  }
  .header-middle .form-control {
    width: 100%;
    margin-bottom: 10px;
  }
  .header-middle form button {
    width: 100%;
  }
  .pagination li a {
    padding: 5px 10px;
    font-size: 12px;
  }
}
