

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      padding: 0;
      overflow-x: hidden;
      background: linear-gradient(135deg, #f5f7fa 0%, #e9edf4 100%);
      min-height: 100vh;
    }

    .main-container {
      max-width: 1400px;
      margin: 0 auto;
      padding: 20px;
      margin-top: 30px;
    }

    .shop-topbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 30px;
      gap: 20px;
    }

    .search-form {
      display: flex;
      align-items: center;
      background: white;
      border-radius: 50px;
      overflow: hidden;
      width: 100%;
      max-width: 350px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
      border: 2px solid transparent;
      transition: all 0.3s ease;
    }

    .search-form:focus-within {
      border-color: #1e918b;
      box-shadow: 0 15px 40px rgba(30, 145, 139, 0.2);
    }

    .search-input {
      flex: 1;
      padding: 12px 20px;
      font-size: 14px;
      border: none;
      outline: none;
      background: transparent;
      min-width: 0;
      font-family: 'Roboto', sans-serif;
    }

    .search-input::placeholder {
      color: #999;
    }

    .search-button {
      padding: 12px 25px;
      background: linear-gradient(135deg, #1e918b 0%, #0d7a78 100%);
      color: #fff;
      border: none;
      cursor: pointer;
      font-size: 14px;
      font-weight: 600;
      border-radius: 50px;
      margin-right: 5px;
      transition: all 0.3s ease;
      white-space: nowrap;
    }

    .search-button:hover {
      background: linear-gradient(135deg, #0d7a78 0%, #005f5c 100%);
      transform: translateY(-2px);
      box-shadow: 0 5px 15px rgba(30, 145, 139, 0.3);
    }

    .sidebar {
      flex-shrink: 0;
      width: 280px;
      padding: 25px;
      border: none;
      background: white;
      border-radius: 15px;
      height: fit-content;
      position: sticky;
      top: 100px;
      box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    }

    .filter-section {
      margin-bottom: 30px;
    }

    .filter-title {
      font-weight: 700;
      margin-bottom: 15px;
      font-size: 16px;
      color: #1a1a1a;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .filter-item {
      margin: 10px 0;
    }

    .filter-item label {
      display: flex;
      align-items: center;
      cursor: pointer;
      color: #555;
      transition: all 0.3s ease;
      font-size: 14px;
    }

    .filter-item label:hover {
      color: #1e918b;
    }

    .filter-item input[type="checkbox"],
    .filter-item input[type="radio"] {
      margin-right: 10px;
      accent-color: #1e918b;
      cursor: pointer;
      width: 18px;
      height: 18px;
    }

    .product-list-container {
      display: flex;
      gap: 30px;
      align-items: flex-start;
    }

    .product-grid {
      display: grid;
      flex: 1;
      gap: 25px;
      grid-template-columns: repeat(3, 1fr);
    }

    .product-card {
      background: white;
      border: none;
      border-radius: 15px;
      padding: 0;
      overflow: hidden;
      position: relative;
      transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
      display: flex;
      flex-direction: column;
      height: 100%;
    }

    .product-card:hover {
      transform: translateY(-8px);
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    }

    .product-image-wrapper {
      position: relative;
      width: 100%;
      height: 250px;
      overflow: hidden;
      background: #f9f9f9;
    }

    .product-card img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.4s ease;
    }

    .product-card:hover img {
      transform: scale(1.08);
    }

    .product-card a {
      flex-grow: 1;
      display: flex;
      flex-direction: column;
      text-decoration: none;
      color: inherit;
      padding: 20px;
    }

    .product-card h4 {
      margin: 0 0 12px 0;
      font-size: 15px;
      font-weight: 700;
      line-height: 1.5;
      min-height: 45px;
      color: #1a1a1a;
    }

    .product-info {
      flex-grow: 1;
    }

    .product-brand {
      font-size: 12px;
      color: #999;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 8px;
    }

    .product-price-wrapper {
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 12px 0;
    }

    .product-price {
      font-size: 18px;
      font-weight: 700;
      color: #1e918b;
    }

    .product-regular-price {
      font-size: 14px;
      color: #999;
      text-decoration: line-through;
    }

    .wishlist-btn {
      position: absolute;
      top: 15px;
      right: 15px;
      background: white;
      color: #ff4757;
      width: 45px;
      height: 45px;
      border: none;
      border-radius: 50%;
      cursor: pointer;
      transition: all 0.3s ease;
      z-index: 10;
      font-size: 22px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .wishlist-btn:hover {
      background: #ff4757;
      color: white;
      transform: scale(1.15);
    }

    .add-to-cart-btn {
      background: linear-gradient(135deg, #1e918b 0%, #0d7a78 100%);
      color: #fff;
      padding: 12px 12px;
      border: none;
      border-radius: 10px;
      cursor: pointer;
      width: calc(100% - 10px);
      margin: 10px auto;
      transition: all 0.3s ease;
      font-weight: 600;
      font-size: 14px;

    }

    .add-to-cart-btn:hover:not(:disabled) {
      background: linear-gradient(135deg, #0d7a78 0%, #005f5c 100%);
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(30, 145, 139, 0.3);
    }

    .add-to-cart-btn:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }

    .pagination {
      display: flex;
      justify-content: center;
      gap: 8px;
      margin: 50px 0;
      flex-wrap: wrap;
    }

    .pagination a {
      padding: 10px 14px;
      background: white;
      border: 1px solid #ddd;
      color: #333;
      text-decoration: none;
      border-radius: 8px;
      transition: all 0.3s ease;
      font-weight: 500;
    }

    .pagination a:hover {
      background: linear-gradient(135deg, #1e918b 0%, #0d7a78 100%);
      color: white;
      border-color: transparent;
      transform: translateY(-2px);
    }

    .pagination .active {
      background: linear-gradient(135deg, #1e918b 0%, #0d7a78 100%);
      color: white;
      border-color: transparent;
    }

    .price-filter {
      padding: 20px;
      background: linear-gradient(135deg, #f8f9fa 0%, #eef2f7 100%);
      border-radius: 12px;
      margin-top: 20px;
      border: 1px solid #e0e0e0;
    }

    .price-filter .price-options {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .price-filter .price-options label {
      padding: 11px 16px;
      background: white;
      color: #333;
      border: 2px solid #ddd;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.3s ease;
      text-align: left;
      font-size: 13px;
      font-weight: 500;
      display: flex;
      align-items: center;
    }

    .price-filter .price-options label:hover {
      background: linear-gradient(135deg, #1e918b 0%, #0d7a78 100%);
      color: white;
      border-color: transparent;
      transform: translateX(5px);
    }

    .price-filter .price-options input[type="radio"] {
      margin-right: 10px;
    }

    .price-filter .price-options input[type="radio"]:checked+label,
    .price-filter .price-options label:has(input[type="radio"]:checked) {
      background: linear-gradient(135deg, #1e918b 0%, #0d7a78 100%);
      color: white;
      border-color: transparent;
    }

    .category-brand-container ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .category-brand-container li {
      padding: 8px 0;
      border-bottom: 1px solid #f0f0f0;
    }

    .category-brand-container li:last-child {
      border-bottom: none;
    }

    .outofstock {
      background: #ffe0e0;
      color: #d32f2f;
      font-weight: bold;
      padding: 12px;
      border-radius: 8px;
      display: inline-block;
      width: calc(100% - 10px);
      margin: 10px auto;
      font-size: 13px;
      text-align: center;
    }

    .results-bar {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      margin-bottom: 25px;
      padding: 15px 0;
      border-bottom: 2px solid rgba(0, 0, 0, 0.05);
      gap: 20px;
    }

    .results-count {
      font-size: 14px;
      color: #666;
      font-weight: 500;
    }

    .sort-dropdown {
      padding: 10px 15px;
      border: 2px solid #ddd;
      border-radius: 8px;
      font-size: 14px;
      background: white;
      cursor: pointer;
      transition: all 0.3s ease;
      font-weight: 500;
    }

    .sort-dropdown:hover {
      border-color: #1e918b;
    }

    .sort-dropdown:focus {
      outline: none;
      border-color: #1e918b;
      box-shadow: 0 0 0 3px rgba(30, 145, 139, 0.1);
    }

    .offer-badge {
      position: absolute;
      top: 15px;
      left: 15px;
      background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%);
      color: white;
      font-weight: 700;
      font-size: 13px;
      padding: 8px 12px;
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
      z-index: 5;
    }

    .mobile-filter-toggle {
      display: none;
      width: 100%;
      padding: 12px;
      background: linear-gradient(135deg, #1e918b 0%, #0d7a78 100%);
      color: white;
      border: none;
      border-radius: 10px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      margin-bottom: 15px;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: all 0.3s ease;
    }

    .mobile-filter-toggle:active {
      transform: scale(0.98);
    }

    .sidebar-close-btn {
      display: none;
      position: absolute;
      top: 15px;
      right: 15px;
      background: transparent;
      border: none;
      font-size: 32px;
      color: #333;
      cursor: pointer;
      width: 40px;
      height: 40px;
      line-height: 1;
      padding: 0;
      z-index: 1000;
      transition: all 0.3s ease;
    }

    .sidebar-close-btn:hover {
      color: #1e918b;
      transform: rotate(90deg);
    }


    /* ==================== MOBILE IMPROVEMENTS ==================== */

    /* Tablet and smaller desktop */
    @media (max-width: 1200px) {
      .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
      }
    }

    @media (max-width: 1024px) {
      .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 18px;
      }

      .sidebar {
        width: 100%;
        position: static;
        top: auto;
        margin-bottom: 20px;
      }

      .product-list-container {
        flex-direction: column;
      }

      .main-container {
        padding: 12px;
        margin-top: 80px;
      }
    }

    @media (max-width: 768px) {

      /* ===== LAYOUT ===== */
      .main-container {
        padding: 8px;
        margin-top: 70px;
      }

      .shop-topbar {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 15px;
      }

      .search-form {
        max-width: 100% !important;
        width: 100%;
      }

      /* ===== SHOW MOBILE FILTER BUTTON ===== */
      .mobile-filter-toggle {
        display: flex !important;
        width: 100%;
        margin-bottom: 12px;
      }

      /* ===== SIDEBAR/FILTER ===== */
      .sidebar {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        height: 100vh !important;
        width: 280px !important;
        z-index: 999 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
        background: white !important;
        padding: 20px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15) !important;
        border-radius: 0 !important;
        margin: 0 !important;
      }

      .sidebar.show {
        transform: translateX(0) !important;
      }

      .sidebar-close-btn {
        display: block !important;
      }

      /* Add overlay when sidebar is open */
      .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
      }

      .sidebar-overlay.show {
        display: block;
      }

      .product-list-container {
        flex-direction: column;
        gap: 15px;
      }

      .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
        width: 100%;
      }

      /* ===== PRODUCT CARDS ===== */
      .product-card {
        border-radius: 12px;
      }

      .product-image-wrapper {
        height: 180px;
      }

      .product-card a {
        padding: 12px;
      }

      .product-card h4 {
        font-size: 13px;
        min-height: auto;
        margin: 0 0 8px 0;
        line-height: 1.3;
      }

      .product-brand {
        font-size: 11px;
        margin-bottom: 6px;
      }

      .product-price-wrapper {
        margin: 8px 0;
        gap: 6px;
      }

      .product-price {
        font-size: 15px;
      }

      .product-regular-price {
        font-size: 12px;
      }

      .add-to-cart-btn {
        padding: 10px 8px;
        font-size: 12px;
        margin: 8px auto;
        width: calc(100% - 16px);
      }

      .wishlist-btn {
        width: 38px;
        height: 38px;
        font-size: 18px;
        top: 10px;
        right: 10px;
      }

      .offer-badge {
        font-size: 11px;
        padding: 6px 10px;
        top: 10px;
        left: 10px;
      }

      .outofstock {
        padding: 10px;
        font-size: 12px;
        margin: 8px auto;
        width: calc(100% - 16px);
      }

      /* ===== RESULTS BAR ===== */
      .results-bar {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 15px;
      }

      .results-count {
        width: 100%;
        text-align: center;
        font-size: 13px;
      }

      .sort-dropdown {
        width: 100%;
        padding: 12px;
        font-size: 13px;
      }

      /* ===== FILTERS ===== */
      .filter-section {
        margin-bottom: 20px;
      }

      .filter-title {
        font-size: 15px;
        margin-bottom: 12px;
      }

      .filter-item label {
        font-size: 13px;
      }

      .filter-item input[type="checkbox"],
      .filter-item input[type="radio"] {
        width: 16px;
        height: 16px;
        margin-right: 8px;
      }

      .category-brand-container li {
        padding: 8px 0;
      }

      .price-filter {
        padding: 15px;
        margin-top: 15px;
      }

      .price-filter .price-options label {
        padding: 10px 12px;
        font-size: 12px;
      }

      .filter-action {
        margin-top: 15px;
        display: flex;
        gap: 8px;
        flex-direction: column;
      }

      .filter-action .btn {
        width: 100%;
        padding: 12px;
        font-size: 13px;
        margin: 0;
      }

      /* ===== PAGINATION ===== */
      .pagination {
        margin: 20px 0;
        gap: 5px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
      }

      .pagination a {
        padding: 10px 12px;
        font-size: 12px;
        min-width: 40px;
        text-align: center;
      }

      /* ===== CLOSE SIDEBAR ON SMALL SCREENS ===== */
      @media (max-width: 480px) {
        .sidebar {
          width: 75vw;
        }

        .product-grid {
          gap: 10px;
        }

        .product-image-wrapper {
          height: 160px;
        }

        .product-card a {
          padding: 10px;
        }

        .product-card h4 {
          font-size: 12px;
        }

        .add-to-cart-btn,
        .outofstock {
          width: calc(100% - 12px);
          margin: 8px 6px;
          padding: 9px 6px;
        }

        .filter-section {
          margin-bottom: 18px;
        }

        .main-container {
          padding: 6px;
        }
      }
    }

    @media (max-width: 480px) {

      /* ===== EXTRA SMALL SCREENS ===== */
      .main-container {
        margin-top: 65px;
        padding: 6px;
      }

      .shop-topbar {
        gap: 8px;
      }

      .search-form {
        width: 100%;
      }

      .search-input {
        padding: 10px 12px;
        font-size: 13px;
      }

      .search-button {
        padding: 10px 12px;
        font-size: 11px;
      }

      .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
      }

      .product-image-wrapper {
        height: 150px;
      }

      .product-card a {
        padding: 8px;
      }

      .product-card h4 {
        font-size: 11px;
        margin: 0 0 6px 0;
      }

      .product-brand {
        font-size: 10px;
        margin-bottom: 4px;
      }

      .product-price {
        font-size: 14px;
      }

      .product-regular-price {
        font-size: 11px;
      }

      .add-to-cart-btn {
        font-size: 11px;
        padding: 8px 6px;
        margin: 6px auto;
        width: calc(100% - 12px);
      }

      .wishlist-btn {
        width: 34px;
        height: 34px;
        font-size: 16px;
        top: 8px;
        right: 8px;
      }

      .offer-badge {
        font-size: 10px;
        padding: 5px 8px;
        top: 8px;
        left: 8px;
      }

      .results-count {
        font-size: 12px;
      }

      .pagination a {
        padding: 8px 10px;
        font-size: 11px;
        min-width: 36px;
      }

      .mobile-filter-toggle {
        font-size: 13px;
        padding: 11px;
      }
    }

    @media (max-width: 360px) {

      /* ===== VERY SMALL SCREENS ===== */
      .product-grid {
        gap: 8px;
      }

      .product-image-wrapper {
        height: 140px;
      }

      .product-card h4 {
        font-size: 10px;
      }

      .product-price {
        font-size: 13px;
      }

      .add-to-cart-btn {
        font-size: 10px;
        padding: 6px 4px;
        width: calc(100% - 8px);
      }

      .pagination a {
        padding: 6px 8px;
        font-size: 10px;
      }
    }

    /* ===== FIX FOR LANDSCAPE MODE ===== */
    @media (max-width: 768px) and (orientation: landscape) {
      .main-container {
        margin-top: 50px;
        padding: 6px;
      }

      .product-image-wrapper {
        height: 150px;
      }

      .sidebar {
        height: 100vh;
        overflow-y: auto;
      }
    }

    /* ===== TOUCH DEVICE OPTIMIZATION ===== */
    @media (hover: none) and (pointer: coarse) {

      .btn:active,
      .add-to-cart-btn:active,
      .wishlist-btn:active {
        opacity: 0.8;
        transform: scale(0.98);
      }

      /* Disable hover effects on touch */
      .product-card:hover {
        transform: none;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
      }

      .product-card:hover img {
        transform: none;
      }
    }

    /* ===== IMPROVE TOUCH TARGETS ===== */
    @media (max-width: 768px) {

      .wishlist-btn,
      .add-to-cart-btn,
      .btn,
      .pagination a {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
      }

      /* Prevent zoom on input focus (iOS) */
      input,
      textarea,
      select {
        font-size: 16px !important;
      }
    }

    /* ===== SMOOTH SCROLLING ===== */
    html {
      scroll-behavior: smooth;
    }

    @media (max-width: 768px) {

      .sidebar,
      .product-grid {
        -webkit-overflow-scrolling: touch;
      }
    }
