 .btn-disabled {
      pointer-events: none;
      opacity: 0.6;
      cursor: not-allowed;
    }

    .sidebar {
      background: #f8f9fa;
      border-radius: 8px;
      padding: 20px;
      position: sticky;
      top: 20px;
      max-height: calc(100vh - 40px);
      overflow-y: auto;
    }

    .sidebar h5 {
      font-weight: 700;
      margin-bottom: 20px;
      color: #333;
      border-bottom: 2px solid #007bff;
      padding-bottom: 10px;
    }

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

    .category-item {
      margin-bottom: 8px;
    }

    .category-link {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 10px;
      color: #555;
      text-decoration: none;
      border-radius: 6px;
      transition: all 0.3s;
      font-weight: 500;
    }

    .category-link:hover {
      background: #e9ecef;
      color: #007bff;
      transform: translateX(5px);
    }

    .category-link.active {
      background: #007bff;
      color: white;
      font-weight: 600;
    }

    .category-link.active:hover {
      background: #0056b3;
      color: white;
    }

    .category-image-wrapper {
      width: 40px;
      height: 40px;
      border-radius: 6px;
      overflow: hidden;
      flex-shrink: 0;
      background: white;
      border: 2px solid #dee2e6;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .category-link.active .category-image-wrapper {
      border-color: white;
    }

    .category-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .category-name {
      flex: 1;
      font-size: 14px;
    }

    /* Much smaller product card styles */
    .product-card-small .card {
      max-width: 100%;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .product-card-small .card:hover {
      transform: translateY(-3px);
      box-shadow: 0 6px 12px rgba(0,0,0,0.12) !important;
    }

    .product-card-small .card-img-top {
      height: 140px;
      object-fit: cover;
      transition: transform 0.3s ease;
    }

    .product-card-small .card:hover .card-img-top {
      transform: scale(1.05);
    }

    .product-card-small .card-body {
      padding: 10px 10px 8px 10px;
    }

    .product-card-small .card-title {
      font-size: 13px;
      margin-bottom: 5px;
      line-height: 1.2;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      min-height: 31px;
    }

    .product-card-small .text-muted,
    .product-card-small .text-danger {
      font-size: 12px;
      margin-bottom: 2px;
    }

    .product-card-small .text-danger {
      font-size: 14px;
    }

    .product-card-small .product-stock {
      font-size: 11px;
      margin-top: 5px;
      margin-bottom: 0;
    }

    .product-card-small .btn {
      font-size: 11px;
      padding: 5px 8px;
    }

    .product-card-small .card {
      margin-bottom: 0;
      border-radius: 8px;
      overflow: hidden;
    }
    
    /* Add spacing between rows */
    .product-card-small {
      margin-bottom: 25px;
    }

    /* Remove excessive margin-top from button container */
    .product-card-small .mt-auto {
      margin-top: 8px !important;
      margin-bottom: 0 !important;
    }

    .product-card-small .pt-3 {
      padding-top: 8px !important;
      padding-bottom: 0 !important;
    }

    .card-title{
        font-size: 13px;
    }

    .view_cart{
        font-size: 11px;
    }
    .add_cart{
        font-size: 11px;
    }

    /* =====================================================
       MOBILE / TABLET RESPONSIVE
       (Bootstrap md breakpoint = 768px)
       ===================================================== */
    .products-page { padding-left: 24px; padding-right: 24px; }
    .page-head h2 { font-size: 1.75rem; }

    .card-actions { display: flex; gap: 8px; }
    .card-actions > .action-half { width: 50%; }

    /* Tablet and below */
    @media (max-width: 991.98px) {
      .sidebar { top: 10px; }
    }

    /* Phones and small tablets */
    @media (max-width: 767.98px) {
      .products-page { padding-left: 10px; padding-right: 10px; margin-top: 12px !important; }

      /* Category box becomes a simple dropdown */
      .sidebar {
        position: relative;
        top: auto;
        max-height: none;
        overflow: visible;
        padding: 10px;
        margin-bottom: 14px;
      }

      .sidebar h5 { display: none; }

      .mobile-category-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
        padding: 12px 14px;
        background: #007bff;
        color: #fff;
        border: none;
        border-radius: 6px;
        font-weight: 600;
        font-size: 15px;
        text-align: left;
      }

      .mobile-category-toggle .toggle-text {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .category-list {
        display: none;
        margin-top: 10px;
        max-height: 55vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
      }

      .category-list.show { display: block; }

      .category-link { padding: 10px 8px; }
      .category-link:hover { transform: none; }

      /* Heading + product count */
      .page-head { flex-wrap: wrap; gap: 4px; margin-bottom: 14px !important; }
      .page-head h2 { font-size: 1.25rem; }
      .page-head .text-muted { font-size: 13px; }

      /* Product grid: 2 cards per row */
      .product-card-small { margin-bottom: 12px !important; }

      .product-card-small .card-img-top {
        height: 125px;
        object-fit: contain;
        background: #fff;
        padding: 6px;
      }

      .product-card-small .card-body { padding: 8px; }

      .product-card-small .card-title {
        font-size: 12px;
        min-height: 29px;
      }

      .product-card-small .text-muted,
      .product-card-small .text-danger { font-size: 12px; }

      .product-card-small .product-stock { font-size: 10.5px; }

      /* Buttons stacked, full width, easy to tap */
      .card-actions { flex-direction: column; gap: 6px; }
      .card-actions > .action-half,
      .card-actions .btn { width: 100% !important; }
      .card-actions .btn {
        min-height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .card-actions .qty-box { gap: 6px; }
      .card-actions .qty-box .btn { width: 30% !important; padding: 5px 0; }
      .card-actions .qty-box .qty-num { width: 40% !important; }

      /* No hover jump on touch screens */
      .product-card-small .card:hover { transform: none; }
      .product-card-small .card:hover .card-img-top { transform: none; }
    }

    /* Very small phones */
    @media (max-width: 359.98px) {
      .product-card-small { width: 100%; }
    }

    /* Desktop: category list always visible */
    @media (min-width: 768px) {
      .mobile-category-toggle { display: none; }
      .category-list { display: block !important; }
    }