* { 
      box-sizing: border-box; 
      margin: 0; 
      padding: 0; 
    }
    
    body { 
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
      line-height: 1.6;
      color: #333;
    }

    /* Main Content */
    .main-content {
      min-height: calc(100vh - 180px);
      padding: 2rem;
    }

    .container {
      max-width: 1200px;
      margin: 0 auto;
    }

    .page-header {
      text-align: center;
      margin-bottom: 3rem;
    }

    .page-title {
      font-size: 2.5rem;
      color: #2c3e50;
      margin-bottom: 0.5rem;
      font-weight: 300;
    }

    .page-subtitle {
      color: #7f8c8d;
      font-size: 1.1rem;
    }

    .products-info {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 2rem;
      padding: 1rem 0;
      border-bottom: 1px solid #eee;
    }

    .showing-results {
      color: #666;
      font-size: 0.9rem;
    }

    .sort-dropdown {
      padding: 0.5rem 1rem;
      border: 1px solid #ddd;
      border-radius: 5px;
      background: white;
      outline: none;
      cursor: pointer;
    }

    .products-grid { 
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 2rem; 
      margin-bottom: 3rem;
    }
    
    .product-card {
      background: #ffffff;
      border: none;
      border-radius: 16px;
      padding: 0;
      cursor: pointer;
      box-shadow: 0 4px 20px rgba(0,0,0,0.08);
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      height: 480px; /* Increased height to accommodate availability message */
      position: relative;
    }
    
    .product-card:hover { 
      transform: translateY(-8px);
      box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    }
    
    .product-image-container {
      height: 260px;
      background: #f8f9fa;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      position: relative;
    }
    
    .product-card img {
      width: 100%; 
      height: 100%; 
      object-fit: contain; 
      transition: transform 0.3s ease;
      background: transparent;
    }
    
    .product-card:hover img {
      transform: scale(1.05);
    }

    /* Stock Badge Container */
    .stock-badge {
      position: absolute;
      top: 12px;
      right: 12px;
      z-index: 10;
    }

    /* Limited Stock Badge */
    .limited-stock-badge {
      background: linear-gradient(135deg, #ff6b6b, #ee5a52);
      color: white;
      padding: 6px 12px;
      border-radius: 20px;
      font-size: 0.75rem;
      font-weight: 600;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      box-shadow: 0 2px 8px rgba(238, 90, 82, 0.3);
      animation: pulse 2s infinite;
    }

    /* Out of Stock Badge */
    .out-of-stock-badge {
      background: linear-gradient(135deg, #95a5a6, #7f8c8d);
      color: white;
      padding: 6px 12px;
      border-radius: 20px;
      font-size: 0.75rem;
      font-weight: 600;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      box-shadow: 0 2px 8px rgba(127, 140, 141, 0.3);
      opacity: 0.9;
    }

    @keyframes pulse {
      0% {
        box-shadow: 0 2px 8px rgba(238, 90, 82, 0.3);
      }
      50% {
        box-shadow: 0 2px 12px rgba(238, 90, 82, 0.6);
        transform: scale(1.02);
      }
      100% {
        box-shadow: 0 2px 8px rgba(238, 90, 82, 0.3);
      }
    }

    .stock-badge.hidden {
      display: none;
    }
    
    .product-info {
      padding: 1.5rem;
      display: flex;
      flex-direction: column;
      flex-grow: 1;
      justify-content: space-between;
    }
    
    .product-card h3 { 
      margin: 0 0 1rem 0; 
      font-size: 1.1rem; 
      color: #2c3e50; 
      font-weight: 600;
      line-height: 1.3;
      text-align: center;
      min-height: 2.6rem;
    }

    .price-display {
      text-align: center;
      margin: 0.5rem 0;
      font-weight: 600;
    }

    .price-range {
      color: #667eea;
      font-size: 1.1rem;
    }

    .current-price {
      color: #27ae60;
      font-size: 1.2rem;
    }

    /* Availability Message */
    .availability-message {
      text-align: center;
      margin: 0.5rem 0;
    }

    .available-variants {
      color: #27ae60;
      font-size: 0.85rem;
      font-weight: 500;
      font-style: italic;
      background: rgba(39, 174, 96, 0.1);
      padding: 4px 8px;
      border-radius: 8px;
      display: inline-block;
    }
    
    .color-options { 
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 8px;
      margin-top: auto;
      padding-top: 10px;
    }
    
    .color-circle {
      width: 28px; 
      height: 28px; 
      border-radius: 50%;
      border: 3px solid #e1e8ed;
      cursor: pointer; 
      transition: all 0.2s ease;
      position: relative;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .color-circle:hover {
      transform: scale(1.1);
      box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }
    
    .color-circle.selected { 
      border-color: #667eea; 
      transform: scale(1.15);
      box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
    }

    /* Limited stock indicator for color circles */
    .color-circle.limited-stock::after {
      content: '';
      position: absolute;
      top: -3px;
      right: -3px;
      width: 10px;
      height: 10px;
      background: #ff6b6b;
      border-radius: 50%;
      border: 2px solid white;
      z-index: 2;
    }

    /* Out of stock indicator for color circles */
    .color-circle.out-of-stock {
      opacity: 0.5;
      cursor: not-allowed;
      position: relative;
    }

    .color-circle.out-of-stock::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 2px;
      height: 120%;
      background: #95a5a6;
      transform: translate(-50%, -50%) rotate(45deg);
      z-index: 3;
      border-radius: 1px;
    }

    .color-circle.out-of-stock::after {
      content: '';
      position: absolute;
      top: -3px;
      right: -3px;
      width: 10px;
      height: 10px;
      background: #95a5a6;
      border-radius: 50%;
      border: 2px solid white;
      z-index: 2;
    }
    
    .no-image-placeholder {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(45deg, #ecf0f1, #bdc3c7);
      color: #7f8c8d;
      font-size: 14px;
      text-align: center;
    }

    /* Pagination */
    .pagination-container {
      display: flex;
      justify-content: center;
      align-items: center;
      margin: 3rem 0;
      gap: 0.5rem;
    }

    .pagination {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      background: white;
      padding: 1rem;
      border-radius: 50px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }

    .page-btn {
      padding: 0.75rem 1rem;
      border: none;
      background: transparent;
      color: #666;
      cursor: pointer;
      border-radius: 8px;
      transition: all 0.3s ease;
      font-weight: 500;
      min-width: 44px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .page-btn:hover {
      background: #f1f3f4;
      color: #333;
    }

    .page-btn.active {
      background: #478cc9;
      color: white;
    }

    .page-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .page-info {
      margin: 0 1rem;
      color: #666;
      font-size: 0.9rem;
    }

    .empty-state {
      text-align: center;
      padding: 4rem 2rem;
      color: #7f8c8d;
    }

    .empty-state i {
      font-size: 4rem;
      margin-bottom: 1rem;
      opacity: 0.5;
    }

    .filter-bar {
      display: flex;
      margin-left: auto; /* pushes it to the right */
      gap: 1rem;
    }

    /* Clear Filter Button Styles */
    .clear-filter-btn {
      padding: 0.5rem 1rem;
      border: 2px solid #e74c3c;
      border-radius: 5px;
      background: white;
      color: #e74c3c;
      cursor: pointer;
      font-size: 0.9rem;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      transition: all 0.3s ease;
      outline: none;
    }

    .clear-filter-btn:hover:not(:disabled) {
      background: #e74c3c;
      color: white;
      transform: translateY(-1px);
      box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
    }

    .clear-filter-btn:active {
      transform: translateY(0);
    }

    .clear-filter-btn i {
      font-size: 0.8rem;
    }

    .filter-group {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

    .filter-group label {
      font-size: 0.85rem;
      font-weight: 600;
      color: #333;
    }

    /* Mobile Responsive */
    @media (max-width: 768px) {
      .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
      }
      
      .product-card {
        height: 460px; /* Adjusted for mobile */
      }
      
      .product-image-container {
        height: 240px;
      }
      
      .page-title {
        font-size: 2rem;
      }

      /* Adjust badge size for mobile */
      .limited-stock-badge,
      .out-of-stock-badge {
        top: 8px;
        right: 8px;
        padding: 4px 8px;
        font-size: 0.65rem;
      }

      .stock-badge {
        top: 8px;
        right: 8px;
      }

      .available-variants {
        font-size: 0.8rem;
        padding: 3px 6px;
      }

      /* ENHANCED MOBILE FILTER STYLING */
      .products-info {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.5rem;
        background: #f8f9fa;
        border-radius: 12px;
        border: none;
        margin-bottom: 1.5rem;
      }

      .showing-results {
        text-align: center;
        font-size: 0.85rem;
        color: #555;
        order: 3;
        margin-top: 0.5rem;
        padding-top: 1rem;
        border-top: 1px solid #dee2e6;
      }

      .filter-bar {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1rem;
        width: 100%;
      }

      .filter-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
      }

      .filter-bar label {
        font-size: 0.85rem;
        font-weight: 600;
        color: #333;
      }

      .sort-dropdown {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border: 2px solid #e9ecef;
        border-radius: 8px;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
      }

      .sort-dropdown:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
      }

      .clear-filter-btn {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        justify-content: center;
      }

      .pagination {
        padding: 0.5rem;
      }

      .page-btn {
        padding: 0.5rem 0.75rem;
        min-width: 40px;
      }
    }

    /* Extra small mobile devices */
    @media (max-width: 480px) {
      .filter-bar {
        grid-template-columns: 1fr;
        gap: 1.5rem;
      }

      .clear-filter-btn {
        order: 3; /* Move clear button to bottom on very small screens */
      }
    }