 /* PRODUCT GRID */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    padding-left: 8px;
    padding-right: 8px;
}

  /* On small devices (<768px): 2 per row */
  @media (max-width: 767px) {
    .product-list {
      grid-template-columns: repeat(2, 1fr);
    }
  }


  .product-item {transition: transform .18s ease, box-shadow .18s ease;
    user-select: none;padding: 10px; text-align: center; background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1); transition: transform 0.2s, box-shadow 0.2s; border:0;
  }
  .product-item:hover { box-shadow: 0 14px 34px rgba(0,0,0,0.12);  box-shadow: 0 6px 12px rgba(0,0,0,0.2); }

  /* SHARED SCROLLBAR */
  .shared-scrollbar {
    position: absolute;
    top: 0;
    right: 0; 
    width: 6px;
    height: 100%;
    background: #f1f1f1; 
    border-radius: 10px;
    z-index: 1000; 
    cursor: pointer; 
    opacity: 0; 
    transition: opacity 0.3s ease;
  }
  .shared-scrollbar-thumb {
    width: 100%; 
    background-color: #2ecc71;
    border-radius: 10px; 
    position: absolute; 
    top: 0; 
    height: 50px;
    transition: top 0.2s ease, background-color 0.2s ease; 
    cursor: grab;
  }
  .shared-scrollbar-thumb:active { cursor: grabbing; }

  /* FAB cart */
  .fab-cart {
    position: fixed;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    background: #fbedc92e;
    border: none;
    padding: 7px;
    box-shadow: 0 5px 18px rgb(92 92 92 / 40%), inset 0 19px 30px rgb(243 227 189);
    backdrop-filter: blur(3);
    font-size: 17px;
  }
  .fab-cart span { font-weight: 800; }


  /* Mobile overlay */
  .overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
    display: none;
    transition: opacity 0.3s ease;
  }

  .overlay.active {
    display: block;
    opacity: 1;
  }



/* Wrapper for img + text (where overlay applies)  for product list */
.product-content {
    position: relative;
    padding-bottom: 10px; 
    height: 100%;
}

/* Hover overlay */
.hover-overlay {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 45%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-content:hover .hover-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Initial button */
.overlay-init .add-to-bag {
    font-size: 32px;
    padding: 10px 20px;
    width: 100%;
    height: 100%;
    background: none;
    color: white;
    border: 0;
}

.overlay-init{height:100%}

/* Controls layout */
.overlay-controls {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    user-select: none;
}
.overlay-controls:hover{
    z-index: 1020;
}

.overlay-price {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}


/* Buttons */
.overlay-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: #ffc107;
    color: #fff;
    font-size: 26px;
    font-weight: bold;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
}

.overlay-btn.decrease { left: 20px; }
.overlay-btn.increase { right: 20px; }

.overlay-qty {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


/* Quantity bar */
.quantity-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #e0a800e3;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    font-weight: 600;
    height: 50px;
}

.quantity-btn button {
    flex: 0 0 50px;
    border: none;
    background: #e0a800;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    height: 100%;
}

.quantity-btn .qty-text {
    flex: 1;
    text-align: center;
    color: #000;
}

.card-title{font-size:17px;}

/* Overlay text at bottom with light background */
.overlay-text {
position: absolute;
bottom: 0;
width: 100%;
text-align: center;
padding: 8px 0;
font-weight: lighter;
z-index: 2028;
}

/* Optional: on hover, slightly highlight background */
.product-content:hover .overlay-text {
background: rgba(255, 255, 255, 1);
color: #000;
}

/* ---------- Responsive Tweaks ---------- */
@media (max-width: 767px) {
.overlay-price { font-size: 1rem; }
.overlay-text { font-size: 0.9rem; }
.overlay-btn { width: 30px; height: 30px; font-size: 1.2rem; }
.overlay-qty { font-size: 1.2rem; }
.quantity-btn { height: 40px; }
.quantity-btn button { flex: 0 0 40px; font-size: 0.9rem; }
.card-title{font-size: 12px;}
.category-block,.subcategory-block,.child-block {
    font-size: 16px;
    padding-left: 4px;
}
.child-block {
    font-size: 16px;
    padding-left: 10px;
}
.card-img-top{padding: 5px;}
}












/* Top info row */
.pagination-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background-color: rgba(67, 97, 238, 0.08);
    border-radius: 10px;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
    margin: 0;
}

.items-per-page {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.items-per-page label {
    margin: 0;
    font-weight: 500;
    color: var(--dark-color);
}

.items-select {
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    min-width: 80px;
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.pagination {
    margin: 0;
}

.page-item {
    margin: 0 4px;
    transition: transform 0.3s ease;
}

.page-item:hover {
    transform: translateY(-2px);
}

.page-link {
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-link:hover {
    background-color: var(--primary-color);
    box-shadow: 0 6px 12px rgba(67, 97, 238, 0.2);
}

.page-item.active .page-link {
    background: linear-gradient(120deg, var(--primary-color) 0%, var(--accent-color) 100%);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.page-item.disabled .page-link {
    color: #adb5bd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
    background-color: #f8f9fa;
}

.page-nav {
    font-weight: 700;
}

.page-nav .page-link {
    padding: 0.75rem 1rem;
}

/* Features List */
.features-list {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.features-list li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
}

.features-list li:before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    background: linear-gradient(120deg, var(--success-color) 0%, var(--primary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }
    
    .pagination-top-row {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .items-per-page {
        justify-content: center;
    }
    
    .page-link {
      padding: 0.6rem 0.9rem;
      font-size: 0.9rem;
      color:black
    }
}

@media (max-width: 576px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-item {
        margin-bottom: 8px;
    }
}