/* ===== STORE SECTION WRAPPER ===== */
.store-section {
  width: 100%;
  padding: 40px 5px;
  background-color: #f8f9fa;
}

/* ===== CONTAINER ===== */
.store-container {
  display: flex;
  flex-direction: row;
  max-width: 1200px;
  margin: 0 auto;
  gap: 30px;
  align-items: flex-start;
}

.printer-types {
  display: flex;
  justify-content: space-between; /* or center */
  gap: 40px;
  padding: 0;
  margin: 10px 0 30px;
  list-style: none;
  font-size: 15px;
  font-weight: 500;
  color: #444;
}

/* Optional: center them instead */
.printer-types.centered {
  justify-content: center;
}


/* ===== SIDEBAR ===== */
.store-filter-sidebar {
  flex: 0 0 20%;
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 14px;
  align-self: flex-start;
  top: 20px;
  height: fit-content;
}

/* ===== FILTER CARD ===== */
.filter-card {
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

/* Accordion Header */
.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.filter-header:hover {
  background-color: #f4f4f4;
  border-radius: 5px;
}

.filter-header h6 {
  margin: 0;
}

.filter-toggle {
  font-size: 18px;
  color: #666;
  margin-left: 10px;
}

/* Accordion Content */
.filter-content {
  display: block;
  padding-left: 0;
}

.filter-content label {
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
  cursor: pointer;
}

.filter-content input[type="checkbox"] {
  margin-right: 8px;
}

/* Price Range */
.price-range {
  width: 100%;
  margin-top: 10px;
}

.price-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 14px;
}

/* Apply Button */
.apply-btn {
  padding: 10px 20px;
  background-color: #3498db;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 20px;
  font-size: 16px;
}

.apply-btn:hover {
  background-color: #2980b9;
}

/* ===== PRODUCT AREA ===== */
.store-product-area {
  flex: 1;
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  min-height: 400px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Exactly 3 columns */
  gap: 10px;
}

.product-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.product-thumbnail {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  margin-bottom: 10px;
}

.product-title {
  font-size: 14px;
  font-weight: 500;
  margin: 10px 10px;

  display: -webkit-box;
  -webkit-line-clamp: 2;      /* Amazon uses 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== PAGINATION (ROBUST, MOBILE-FIRST) ===== */
.pagination {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 10px;
  margin: 30px auto 10px;
  padding: 10px;
  width: 30%;
  max-width: 100%;
}

/* Page info always centered */
.pagination .current-page {
  font-size: 14px;
  color: #555;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

/* Buttons */
.pagination a {
  padding: 8px 14px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #3b5d50;
  text-decoration: none;
  font-weight: 500;
  min-width: 90px;
  text-align: center;
  justify-self: center;
  transition: all 0.2s ease;
}

.pagination a:hover {
  background-color: #3b5d50;
  color: #fff;
  border-color: #3b5d50;
}

/* Position buttons */
.pagination .prev {
  justify-self: center;
}

.pagination .next {
  justify-self: center;
}

/* ===== RESPONSIVE DESIGN ===== */

/* For small screens (mobile and tablet) */
@media (max-width: 768px) {
  .store-container {
    flex-direction: column;
    gap: 20px;
  }

  /* Adjust Sidebar: Collapse Sidebar or Make it Toggleable */
  .store-filter-sidebar {
    width: 100%;
    padding: 5px;
    box-shadow: none;
    border-radius: 5px;
  }

  /* Reduce the size of the product grid to 1 column */
  .product-grid {
    grid-template-columns: 1fr;
    justify-items: center; /* center grid items */
  }

  /* Filter toggle button to open/close the sidebar */
  .filter-toggle {
    cursor: pointer;
    display: inline-block;
  }

  .filter-header {
    font-size: 16px;
    padding: 0px;
    justify-content: space-between;
  }

  /* Hide the price range input in a dropdown or off-canvas menu */
  .price-range {
    display: none;
  }

  /* Price labels for mobile */
  .price-labels {
    display: none;
  }

  /* Apply button */
  .apply-btn {
    width: 100%;
  }

  /* Product Card Adjustments */
  .product-card {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
  }

  .product-item {
    width: 100%;
  }

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

  .product-title {
    font-size: 16px;
  }

  .printer-types {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* For very small screens (portrait mode on small devices) */
@media (max-width: 480px) {
  .store-container {
    padding: 0 10px;
  }

  .store-product-area {
    padding: 12px;
  }

  .store-filter-sidebar {
    padding: 10px;
    font-size: 12px;
  }
  
  .product-card {
    margin-bottom: 15px;

  }

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

  .product-title {
    font-size: 10px;
  }

  .pagination {
    padding: 8px 0;
    width: 100%;
    max-width: 100%;
  }

  .pagination a {
    min-width: 80px;
    font-size: 13px;
  }

  .pagination .current-page {
    font-size: 13px;
  }
  .pagination .prev {
    justify-self: start;
  }

  .pagination .next {
    justify-self: end;
  }
}

/* For larger screens (desktop) */
@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr); /* 4 columns for desktop */
  }
}

/* For extra large screens (large desktop or monitors) */
@media (min-width: 1440px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr); /* 5 columns for large screens */
  }
}
