/* ===== WALMART FRONTEND RESPONSIVE CSS ===== */

/* ===== MOBILE FIRST APPROACH ===== */

/* Extra Small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
  /* Header */
  .header.shop .logo {
    text-align: center;
    margin-bottom: 1rem;
  }
  
  .header.shop .search-form {
    margin: 1rem 0;
    border-radius: 6px;
  }
  
  .header.shop .right-bar {
    justify-content: center;
    gap: 1rem;
  }
  
  .header.shop .right-bar .sinlge-bar {
    margin-right: 0;
  }
  
  /* Navigation */
  .mainmenu .nav {
    flex-direction: column;
  }
  
  .mainmenu .nav li {
    width: 100%;
  }
  
  .mainmenu .nav li a {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
  }
  
  /* Hero Section */
  .hero-slider .single-slider {
    padding: 2rem 1rem;
    text-align: center;
  }
  
  .hero-slider .single-slider h1 {
    font-size: var(--text-2xl);
    margin-bottom: 0.75rem;
  }
  
  .hero-slider .single-slider p {
    font-size: var(--text-base);
    margin-bottom: 1.5rem;
  }
  
  .hero-slider .single-slider .btn {
    padding: 0.75rem 1.5rem;
    font-size: var(--text-sm);
  }
  
  /* Products */
  .single-product {
    margin-bottom: 1.5rem;
  }
  
  .single-product .product-img img {
    height: 200px;
  }
  
  .single-product .product-content {
    padding: 1rem;
  }
  
  .single-product .product-content .product-title a {
    font-size: var(--text-base);
  }
  
  .single-product .product-content .product-price .current {
    font-size: var(--text-lg);
  }
  
  .single-product .product-content .product-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .single-product .product-content .wishlist-btn {
    width: 100%;
    height: 40px;
  }
  
  /* Categories */
  .category-card {
    padding: 1.5rem 1rem;
    margin-bottom: 1rem;
  }
  
  .category-card .category-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .category-card h3 {
    font-size: var(--text-base);
  }
  
  /* Section Headers */
  .section-header {
    margin-bottom: 2rem;
  }
  
  .section-header h2 {
    font-size: var(--text-2xl);
  }
  
  .section-header p {
    font-size: var(--text-base);
  }
  
  /* Filters */
  .filter-sidebar {
    margin-bottom: 2rem;
  }
  
  /* Cart Dropdown */
  .cart-dropdown {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    min-width: auto;
    border-radius: 0;
    z-index: 9999;
  }
  
  .cart-dropdown .cart-items {
    max-height: calc(100vh - 200px);
  }
  
  /* Pagination */
  .pagination li a,
  .pagination li span {
    width: 35px;
    height: 35px;
    font-size: var(--text-xs);
  }
  
  /* Breadcrumb */
  .breadcrumb-area {
    padding: 1rem 0;
  }
  
  .breadcrumb-list {
    font-size: var(--text-xs);
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  /* Header */
  .header.shop .search-form {
    max-width: 400px;
    margin: 1rem auto;
  }
  
  /* Products Grid */
  .products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  /* Categories Grid */
  .categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  /* Hero */
  .hero-slider .single-slider h1 {
    font-size: var(--text-3xl);
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  /* Header */
  .header.shop .search-form {
    max-width: 500px;
  }
  
  /* Navigation */
  .mainmenu .nav li a {
    padding: 1rem 1.25rem;
  }
  
  /* Products Grid */
  .products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  
  /* Categories Grid */
  .categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  
  /* Single Product */
  .single-product .product-img img {
    height: 220px;
  }
  
  /* Cart Dropdown */
  .cart-dropdown {
    min-width: 320px;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  /* Products Grid */
  .products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
  
  /* Categories Grid */
  .categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  /* Container */
  .container {
    max-width: 1200px;
  }
  
  /* Products Grid */
  .products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }
  
  /* Categories Grid */
  .categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2rem;
  }
  
  /* Single Product */
  .single-product .product-img img {
    height: 280px;
  }
}

/* ===== MOBILE MENU ===== */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-700);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
  background: var(--gray-100);
  color: var(--walmart-blue);
}

@media (max-width: 991.98px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  .walmart-mainmenu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    z-index: 9999;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(0, 113, 206, 0.2);
    padding-top: 2rem;
    backdrop-filter: blur(10px);
  }

  .walmart-mainmenu.show {
    left: 0;
  }

  .walmart-nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 0;
  }

  .walmart-nav-list li {
    width: 100%;
    margin-bottom: 0.25rem;
  }

  .walmart-nav-list li a {
    padding: 1rem 1.5rem;
    border-bottom: none;
    justify-content: flex-start;
    border-radius: 8px;
    margin: 0 1rem;
    color: var(--gray-600);
    background: transparent;
  }

  .walmart-nav-list li a:hover {
    background: linear-gradient(135deg, rgba(0, 113, 206, 0.1) 0%, rgba(0, 113, 206, 0.15) 100%);
    color: var(--walmart-blue);
    border-bottom: none;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 113, 206, 0.1);
  }

  .walmart-nav-list li.active a {
    background: linear-gradient(135deg, var(--walmart-blue) 0%, var(--walmart-dark-blue) 100%);
    color: var(--white);
    border-bottom: none;
    box-shadow: 0 4px 12px rgba(0, 113, 206, 0.3);
  }
  
  .walmart-nav-list li a i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
  }
  
  /* Mobile Dropdown */
  .walmart-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(0, 113, 206, 0.05) 0%, rgba(0, 113, 206, 0.08) 100%);
    margin: 0.5rem 1rem 0.5rem 2rem;
    display: none;
    backdrop-filter: none;
  }

  .walmart-dropdown.active .walmart-dropdown-menu {
    display: block;
  }

  .walmart-dropdown .dropdown-arrow {
    margin-left: auto;
  }

  .walmart-dropdown-menu li a {
    margin: 0;
    border-radius: 6px;
    color: var(--gray-600);
  }

  .walmart-dropdown-menu li a:hover {
    background: linear-gradient(135deg, rgba(0, 113, 206, 0.15) 0%, rgba(0, 113, 206, 0.2) 100%);
    color: var(--walmart-blue);
    transform: translateX(2px);
  }

  .walmart-submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(0, 113, 206, 0.08) 0%, rgba(0, 113, 206, 0.12) 100%);
    margin: 0.25rem 1rem 0.25rem 1.5rem;
    display: none;
    backdrop-filter: none;
  }

  .walmart-dropdown-submenu.active .walmart-submenu {
    display: block;
  }

  .walmart-submenu li a {
    margin: 0;
    border-radius: 4px;
    color: var(--gray-600);
  }

  .walmart-submenu li a:hover {
    background: linear-gradient(135deg, rgba(0, 113, 206, 0.2) 0%, rgba(0, 113, 206, 0.25) 100%);
    color: var(--walmart-blue);
    transform: translateX(2px);
  }
  
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .mobile-menu-overlay.show {
    opacity: 1;
    visibility: visible;
  }
  
  /* Hide desktop navigation */
  .walmart-nav-list {
    display: none;
  }
  
  .walmart-mainmenu.show .walmart-nav-list {
    display: flex;
  }
}

@media (min-width: 992px) {
  .mobile-menu-overlay {
    display: none;
  }
}

/* Body scroll lock when mobile menu is open */
body.menu-open {
  overflow: hidden;
}

@media (min-width: 992px) {
  body.menu-open {
    overflow: auto;
  }
}

/* ===== SEARCH RESPONSIVE ===== */
@media (max-width: 767.98px) {
  .search-form {
    border-radius: 6px;
  }
  
  .search-form input {
    padding: 0.6rem 0.75rem;
    font-size: var(--text-sm);
  }
  
  .search-form .btn {
    padding: 0.6rem 1rem;
    font-size: var(--text-sm);
  }
}

/* ===== FILTER RESPONSIVE ===== */
@media (max-width: 991.98px) {
  .filter-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    height: 100vh;
    z-index: 9999;
    transition: left 0.3s ease;
    overflow-y: auto;
    border-radius: 0;
  }
  
  .filter-sidebar.show {
    left: 0;
  }
  
  .filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .filter-overlay.show {
    opacity: 1;
    visibility: visible;
  }
  
  .filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--walmart-blue);
    color: var(--white);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: var(--font-medium);
    cursor: pointer;
    margin-bottom: 1rem;
  }
}

@media (min-width: 992px) {
  .filter-toggle {
    display: none;
  }
}

/* ===== PRODUCT DETAIL RESPONSIVE ===== */
@media (max-width: 767.98px) {
  .product-detail-images {
    margin-bottom: 2rem;
  }
  
  .product-detail-info h1 {
    font-size: var(--text-2xl);
  }
  
  .product-detail-price {
    font-size: var(--text-xl);
  }
  
  .product-detail-actions {
    flex-direction: column;
    gap: 1rem;
  }
  
  .product-detail-actions .btn {
    width: 100%;
  }
}

/* ===== CHECKOUT RESPONSIVE ===== */
@media (max-width: 767.98px) {
  .checkout-form .form-row {
    flex-direction: column;
  }
  
  .checkout-form .form-group {
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .order-summary {
    margin-top: 2rem;
  }
}

/* ===== FOOTER RESPONSIVE ===== */
@media (max-width: 767.98px) {
  .footer .footer-top {
    padding: 2rem 0;
  }
  
  .footer .single-footer {
    margin-bottom: 2rem;
    text-align: center;
  }
  
  .footer .single-footer:last-child {
    margin-bottom: 0;
  }
  
  .footer .copyright {
    text-align: center;
  }
}

/* ===== UTILITY RESPONSIVE CLASSES ===== */
@media (max-width: 575.98px) {
  .d-none-mobile { display: none !important; }
  .d-block-mobile { display: block !important; }
  .text-center-mobile { text-align: center !important; }
  .w-100-mobile { width: 100% !important; }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .d-none-sm { display: none !important; }
  .d-block-sm { display: block !important; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .d-none-md { display: none !important; }
  .d-block-md { display: block !important; }
}

@media (min-width: 992px) {
  .d-none-lg { display: none !important; }
  .d-block-lg { display: block !important; }
}

/* ===== PRINT STYLES ===== */
@media print {
  .header,
  .footer,
  .mobile-menu-toggle,
  .filter-toggle,
  .cart-dropdown,
  .mobile-menu-overlay,
  .filter-overlay {
    display: none !important;
  }
  
  .single-product {
    box-shadow: none !important;
    border: 1px solid var(--border-light) !important;
  }
  
  .btn {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
}