    * { box-sizing: border-box; }

    body {
      font-family: 'Segoe UI', sans-serif;
      background: #f1f5f9 !important;
      margin: 0;
    }

    /* Scrollbar */
    ::-webkit-scrollbar { width: 6px; }
    ::-webkit-scrollbar-track { background: #f1f5f9; }
    ::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; }

    /* Header CSS removed to prevent conflict with _Layout.cshtml */

    /* Layout */
    .main-layout {
      display: flex;
      max-width: 1400px;
      margin: 28px auto;
      gap: 24px;
      padding: 0 20px;
    }

    /* Sidebar */
    .sidebar {
      width: 270px;
      flex-shrink: 0;
      background: white;
      border-radius: 18px;
      box-shadow: 0 2px 16px rgba(0,0,0,0.07);
      padding: 24px 20px;
      position: sticky;
      top: 90px;
      max-height: calc(100vh - 110px);
      overflow-y: auto;
      scrollbar-width: thin;
    }
    .sidebar-title {
      font-size: 1.05rem;
      font-weight: 800;
      color: #1e293b;
      margin-bottom: 18px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .clear-btn {
      font-size: 0.78rem;
      color: #2563eb;
      cursor: pointer;
      font-weight: 600;
      background: #eff6ff;
      padding: 3px 10px;
      border-radius: 20px;
      border: none;
      transition: background 0.2s;
    }
    .clear-btn:hover { background: #dbeafe; }
    .filter-section { margin-bottom: 22px; }
    .filter-label {
      font-size: 0.82rem;
      font-weight: 700;
      color: #64748b;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin-bottom: 10px;
      display: block;
    }

    /* Category pills */
    .category-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: #f8fafc;
      border: 1.5px solid #e2e8f0;
      border-radius: 50px;
      padding: 6px 14px;
      font-size: 0.83rem;
      font-weight: 600;
      color: #475569;
      cursor: pointer;
      margin: 3px 2px;
      transition: all 0.2s;
      user-select: none;
    }
    .category-pill:hover { border-color: #2563eb; color: #2563eb; background: #eff6ff; }
    .category-pill.active {
      background: #2563eb;
      border-color: #2563eb;
      color: white;
    }

    /* Price Range */
    .price-range-wrapper { padding: 4px 2px; }
    .price-labels { display: flex; justify-content: space-between; font-size: 0.82rem; color: #475569; font-weight: 600; margin-bottom: 6px; }
    input[type=range] {
      -webkit-appearance: none;
      appearance: none;
      width: 100%;
      height: 5px;
      border-radius: 5px;
      background: linear-gradient(to right, #2563eb 0%, #2563eb var(--val), #e2e8f0 var(--val), #e2e8f0 100%);
      outline: none;
      cursor: pointer;
    }
    input[type=range]::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 18px; height: 18px;
      background: #2563eb;
      border-radius: 50%;
      border: 2.5px solid white;
      box-shadow: 0 2px 8px rgba(37,99,235,0.35);
      cursor: pointer;
      transition: transform 0.15s;
    }
    input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }

    /* Rating filter */
    .rating-row {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 4px;
      cursor: pointer;
      border-radius: 8px;
      transition: background 0.15s;
    }
    .rating-row:hover { background: #f8fafc; }
    .rating-row input[type=radio] { accent-color: #2563eb; width: 15px; height: 15px; }
    .stars { color: #facc15; font-size: 0.9rem; letter-spacing: 1px; }
    .stars-grey { color: #e2e8f0; font-size: 0.9rem; }
    .rating-label { font-size: 0.82rem; color: #475569; font-weight: 500; }

    /* Brand checkboxes */
    .brand-check {
      display: flex;
      align-items: center;
      gap: 9px;
      padding: 5px 2px;
      cursor: pointer;
    }
    .brand-check input[type=checkbox] { accent-color: #2563eb; width: 15px; height: 15px; cursor: pointer; }
    .brand-check label { font-size: 0.84rem; color: #475569; font-weight: 500; cursor: pointer; }

    /* Color Swatch Filters */
    .color-swatch-filter input:checked + span {
        border-color: #1e293b !important;
        transform: scale(1.15);
        box-shadow: 0 0 0 2px white inset;
    }
    .color-swatch-filter:hover span { transform: scale(1.1); }
    
    /* Size Pill Filters */
    .size-pill-filter input:checked + span {
        background-color: #1e293b !important;
        color: white !important;
        border-color: #1e293b !important;
    }
    .size-pill-filter:hover span { border-color: #94a3b8 !important; }

    /* Main content */
    .main-content { flex: 1; min-width: 0; }

    /* Toolbar */
    .toolbar {
      background: white;
      border-radius: 14px;
      box-shadow: 0 2px 12px rgba(0,0,0,0.06);
      padding: 14px 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 18px;
      flex-wrap: wrap;
      gap: 10px;
    }
    .result-count { font-size: 0.9rem; color: #64748b; font-weight: 500; }
    .result-count strong { color: #1e293b; font-weight: 800; }
    .toolbar-right { display: flex; align-items: center; gap: 12px; }

    /* Sort */
    .sort-select {
      border: 1.5px solid #e2e8f0;
      border-radius: 10px;
      padding: 7px 32px 7px 12px;
      font-size: 0.85rem;
      color: #374151;
      font-weight: 600;
      background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
      -webkit-appearance: none;
      appearance: none;
      cursor: pointer;
      outline: none;
      transition: border 0.2s;
    }
    .sort-select:focus { border-color: #2563eb; }

    /* Grid/List toggle */
    .view-toggle { display: flex; gap: 4px; }
    .toggle-btn {
      width: 36px; height: 36px;
      border-radius: 9px;
      border: 1.5px solid #e2e8f0;
      background: #f8fafc;
      color: #94a3b8;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
      transition: all 0.2s;
    }
    .toggle-btn:hover { border-color: #2563eb; color: #2563eb; }
    .toggle-btn.active { background: #2563eb; border-color: #2563eb; color: white; }

    /* Active filters tags */
    .active-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      margin-bottom: 14px;
    }
    .tag {
      background: #eff6ff;
      border: 1px solid #bfdbfe;
      color: #2563eb;
      border-radius: 50px;
      padding: 4px 12px;
      font-size: 0.78rem;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 5px;
      cursor: pointer;
      transition: background 0.2s;
    }
    .tag:hover { background: #dbeafe; }
    .tag .x { font-size: 0.9rem; line-height: 1; }

    /* Product Grid */
    .products-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
      gap: 20px;
      transition: all 0.3s;
    }
    .products-grid.list-view {
      grid-template-columns: 1fr;
    }

    /* Product Card */
    .product-card {
      background: white;
      border-radius: 16px;
      box-shadow: 0 2px 12px rgba(0,0,0,0.07);
      overflow: hidden;
      transition: transform 0.22s cubic-bezier(.4,2,.6,1), box-shadow 0.22s, opacity 0.35s;
      cursor: pointer;
      position: relative;
      animation: fadeIn 0.4s ease both;
      display: flex;
      flex-direction: column;
    }
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(18px) scale(0.97); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }
    .product-card:hover {
      transform: translateY(-5px) scale(1.01);
      box-shadow: 0 10px 32px rgba(37,99,235,0.13);
    }
    .product-card.hiding {
      opacity: 0;
      transform: scale(0.92) translateY(10px);
      pointer-events: none;
    }

    /* List view card */
    .products-grid.list-view .product-card {
      display: flex;
      flex-direction: row;
      align-items: stretch;
      border-radius: 14px;
    }
    .products-grid.list-view .card-img {
      width: 180px;
      min-width: 180px;
      height: auto;
      border-radius: 14px 0 0 14px;
    }
    .products-grid.list-view .new-card-body {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 20px 24px;
    }
    .products-grid.list-view .card-desc { display: block !important; }
    .products-grid.list-view .add-cart-btn { align-self: flex-start; margin-top: 10px; }

    /* Card image */
    .card-img {
      width: 100%;
      height: 190px;
      object-fit: cover;
      display: block;
      background: #f1f5f9;
      transition: transform 0.3s;
    }
    .product-card:hover .card-img { transform: scale(1.04); }

    .card-img-wrap {
      overflow: hidden;
      position: relative;
    }

    /* Badge */
    .badge {
      position: absolute;
      top: 12px;
      left: 12px;
      border-radius: 50px;
      padding: 3px 11px;
      font-size: 0.72rem;
      font-weight: 800;
      letter-spacing: 0.04em;
      z-index: 2;
    }
    .badge-sale { background: #ef4444; color: white; }
    .badge-new  { background: #10b981; color: white; }
    .badge-hot  { background: #f59e0b; color: white; }
    .badge-deal {
        background: #dc2626;
        color: white;
        right: 12px;
        left: auto;
        animation: pulse 2s infinite;
    }
    @keyframes pulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.05); }
        100% { transform: scale(1); }
    }

    /* Wishlist & Quick View buttons */
    .wishlist-btn {
      position: absolute;
      top: 10px; right: 10px;
      width: 32px; height: 32px;
      background: white;
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      box-shadow: 0 2px 8px rgba(0,0,0,0.13);
      border: none;
      cursor: pointer;
      font-size: 1rem;
      color: #cbd5e1;
      transition: color 0.2s, transform 0.2s;
      z-index: 3;
    }
    .wishlist-btn:hover, .wishlist-btn.liked { color: #ef4444; transform: scale(1.15); }

    .quick-view-btn {
      position: absolute;
      bottom: 12px;
      left: 50%;
      transform: translateX(-50%) translateY(10px);
      background: rgba(255,255,255,0.95);
      color: #1e293b;
      border: none;
      border-radius: 20px;
      padding: 6px 14px;
      font-size: 0.8rem;
      font-weight: 700;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
      cursor: pointer;
      opacity: 0;
      transition: all 0.25s;
      z-index: 4;
      white-space: nowrap;
    }
    .product-card:hover .quick-view-btn {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }
    .quick-view-btn:hover {
      background: #1e293b;
      color: white;
    }

    /* Card body */
    .new-card-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; }
    .card-category {
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: #94a3b8;
      margin-bottom: 5px;
    }
    .card-name {
      font-size: 0.93rem;
      font-weight: 700;
      color: #1e293b;
      margin-bottom: 6px;
      line-height: 1.3;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
      min-height: 2.6em;
    }
    .card-desc {
      font-size: 0.8rem;
      color: #64748b;
      margin-bottom: 10px;
      line-height: 1.5;
      display: none;
    }
    .card-rating {
      display: flex;
      align-items: center;
      gap: 5px;
      margin-bottom: 8px;
    }
    .card-stars { color: #facc15; font-size: 0.83rem; }
    .card-rating-count { font-size: 0.77rem; color: #94a3b8; font-weight: 500; }

    .new-card-footer {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      margin-top: auto;
      padding-top: 12px;
    }
    .new-card-footer > .card-price {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
    }
    .new-card-footer > .add-cart-btn {
      margin: 0;
    }
    .card-price {
      display: flex;
      flex-direction: column;
    }
    .price-old {
      font-size: 0.78rem;
      color: #94a3b8;
      text-decoration: line-through;
      font-weight: 500;
    }
    .price-new {
      font-size: 1.13rem;
      font-weight: 800;
      color: #1e293b;
    }
    .add-cart-btn {
      background: linear-gradient(135deg, #2563eb, #7c3aed);
      color: white;
      border: none;
      border-radius: 10px;
      padding: 8px 14px;
      font-size: 0.8rem;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 5px;
      transition: transform 0.15s, box-shadow 0.15s;
    }
    .add-cart-btn:hover { transform: scale(1.06); box-shadow: 0 4px 14px rgba(37,99,235,0.3); }
    .add-cart-btn:active { transform: scale(0.97); }

    /* No results */
    .no-results {
      text-align: center;
      padding: 70px 20px;
      color: #94a3b8;
      display: none;
    }
    .no-results .icon { font-size: 3.5rem; margin-bottom: 16px; }
    .no-results h3 { font-size: 1.2rem; font-weight: 700; color: #64748b; }
    .no-results p { font-size: 0.9rem; margin-top: 6px; }

    /* Search bar */
    .search-wrap {
      position: relative;
      flex: 1;
      max-width: 320px;
    }
    .search-wrap input {
      width: 100%;
      border: 1.5px solid #e2e8f0;
      border-radius: 10px;
      padding: 8px 14px 8px 36px;
      font-size: 0.85rem;
      color: #374151;
      background: #f8fafc;
      outline: none;
      transition: border 0.2s;
      font-family: inherit;
    }
    .search-wrap input:focus { border-color: #2563eb; background: white; }
    .search-wrap .search-icon {
      position: absolute;
      left: 11px; top: 50%;
      transform: translateY(-50%);
      color: #94a3b8;
      font-size: 0.9rem;
      pointer-events: none;
    }

    /* Mobile sidebar toggle */
    .mobile-filter-btn {
      display: none;
      background: #2563eb;
      color: white;
      border: none;
      border-radius: 10px;
      padding: 8px 16px;
      font-size: 0.85rem;
      font-weight: 700;
      cursor: pointer;
      align-items: center;
      gap: 6px;
    }
    @media (max-width: 900px) {
      .mobile-filter-btn { display: flex; }
      .sidebar {
        position: fixed;
        left: -290px;
        top: 0; bottom: 0;
        z-index: 200;
        width: 270px;
        border-radius: 0;
        overflow-y: auto;
        transition: left 0.3s cubic-bezier(.4,0,.2,1);
        box-shadow: 4px 0 30px rgba(0,0,0,0.12);
      }
      .sidebar.open { left: 0; }
    }
    .overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.35);
      z-index: 199;
    }

    /* Pagination */
    .pagination {
      display: flex;
      justify-content: center;
      gap: 8px;
      margin-top: 32px;
    }
    .page-btn {
      width: 36px; height: 36px;
      border-radius: 10px;
      border: 1.5px solid #e2e8f0;
      background: white;
      color: #475569;
      font-weight: 700;
      font-size: 0.87rem;
      cursor: pointer;
      transition: all 0.18s;
      display: flex; align-items: center; justify-content: center;
    }
    .page-btn:hover { border-color: #2563eb; color: #2563eb; }
    .page-btn.active { background: #2563eb; border-color: #2563eb; color: white; }



    /* Sidebar close btn (mobile) */
    .sidebar-close {
      display: none;
      position: absolute;
      top: 14px; right: 14px;
      background: #f1f5f9;
      border: none;
      border-radius: 50%;
      width: 30px; height: 30px;
      cursor: pointer;
      font-size: 1rem;
      color: #64748b;
      align-items: center;
      justify-content: center;
      transition: background 0.2s;
    }
    @media (max-width: 900px) { .sidebar-close { display: flex; } }
    /* Custom Toast Notification */
    .custom-toast {
      position: fixed;
      bottom: 30px;
      right: 30px;
      background: rgba(255, 255, 255, 0.9);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      color: #1e293b;
      padding: 12px 24px;
      border-radius: 16px;
      box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
      display: flex;
      align-items: center;
      gap: 12px;
      z-index: 999999 !important;
      opacity: 0;
      visibility: hidden;
      transform: translateY(20px) scale(0.95);
      transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      border: 1px solid rgba(255, 255, 255, 0.2);
      font-weight: 600;
      font-size: 0.95rem;
    }
    .custom-toast.show {
      opacity: 1;
      visibility: visible;
      transform: translateY(0) scale(1);
    }
