* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
  line-height: 1.5;
  
  overflow: hidden; 
}

.header {
  background-color: #374151;
  color: white;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
}

.terms-link {
  color: #d1d5db;
  font-size: 14px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.search-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.user-badge {
  background-color: #2563eb;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-title {
  padding: 24px 0;
  text-align: right;
}

.page-title h1 {
  color: #2563eb;
  font-size: 28px;
  font-weight: 600;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 24px;
  min-height: calc(100vh - 120px);
}

.sidebar {
  background: white;
  border-radius: 8px;
  padding: 0;
  height: 100vh;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow:scroll; 
}

.category-section {
  padding: 16px 0;
}

.category-item {
  padding: 12px 20px;
  cursor: pointer;
  transition: background-color 0.2s;
  border-left: 3px solid transparent;
}

.category-item:hover {
  background-color: #f1f5f9;
}

.category-item.active {
  background-color: #eff6ff;
  border-left-color: #2563eb;
}

.category-item.active .category-label {
  color: #2563eb;
  font-weight: 500;
}

.category-label {
  font-size: 14px;
  color: #475569;
}

.main-content {
  background: white;
  border-radius: 8px;
  padding: 24px;
  height: 100vh;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow:scroll;
}

.section-header {
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: #1e293b;
}

.products-grid {
  display: grid;
  gap: 24px;
}

.product-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: box-shadow 0.2s;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-image {
  flex-shrink: 0;
}

.product-image img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  background-color: #f1f5f9;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 16px;
  font-weight: 500;
  color: #1e293b;
  margin-bottom: 12px;
  line-height: 1.4;
}

.product-details {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.min-quantity {
  color: #64748b;
  font-size: 14px;
}

.quantity-value {
  color: #1e293b;
  font-weight: 500;
  font-size: 14px;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.price {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
}

.add-to-quote-btn {
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.add-to-quote-btn:hover:not(:disabled) {
  background-color: #1d4ed8;
}

.add-to-quote-btn.out-of-stock {
  background-color: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}

.quote-sidebar {
  background: white;
  border-radius: 8px;
  padding: 24px;
  height: 100vh;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow:scroll; 
}

.quote-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.quote-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
}

.clear-quote {
  background: none;
  border: none;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
}

.clear-quote:hover {
  color: #475569;
}

.quote-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.quote-item {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.quote-item-header {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.vendor-badge {
  width: 32px;
  height: 32px;
  background-color: #dc2626;
  color: white;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
}

.vendor-badge:nth-child(1) {
  background-color: #dc2626;
}

.item-details {
  flex: 1;
}

.item-name {
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  margin-bottom: 4px;
}

.item-price {
  font-size: 12px;
  color: #64748b;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border: 1px solid #d1d5db;
  background: white;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
}

.qty-btn:hover {
  background-color: #f9fafb;
}

.qty-input {
  width: 40px;
  height: 24px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
}

.item-total {
  margin-left: auto;
  font-weight: 600;
  color: #1e293b;
}

.quote-summary {
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
}

.subtotal {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 500;
}

.checkout-btn {
  width: 100%;
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.checkout-btn:hover {
  background-color: #1d4ed8;
}

@media (max-width: 768px) {
  .main-container {
    max-width: 768px;
    padding: 0 16px;
  }
  
  .content-wrapper {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .sidebar {
    order: 2;
  }
  
  .main-content {
    order: 1;
    padding: 16px;
  }
  
  .quote-sidebar {
    order: 3;
    padding: 16px;
  }
  
  .product-card {
    flex-direction: column;
    text-align: center;
  }
  
  .product-image img {
    width: 100px;
    height: 100px;
    margin: 0 auto;
  }
  
  .page-title h1 {
    font-size: 24px;
    text-align: center;
  }
}
@media (max-width: 768px) {
  .product-footer {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 6px;
  }

  .price {
    text-align: left !important;
    width: 100%;
  }

  .add-to-quote-btn {
    align-self: flex-start !important;
  }
}

@media (max-width: 1200px) {
  .content-wrapper {
    grid-template-columns: 240px 1fr 280px;
  }
}
/* ===================================== */
/* 🔧 Full Responsive Fix for All Devices */
/* ===================================== */

/* Tablet view (max 992px) */
/* ========================================================= */
/* 🔧 FINAL RESPONSIVE FIX + SMART LAYOUT BEHAVIOR */
/* ========================================================= */

/* Keep the quote sidebar fixed on large screens */
@media (min-width: 992px) {
  .quote-sidebar {
    position: sticky;
    top: 80px;
    height: calc(100vh - 100px);
    overflow-y: auto;
  }
}

/* Category sidebar vertical + scrollable always */
.sidebar {
  position: sticky;
  top: 70px;
  height: calc(100vh - 80px);
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  border-radius: 8px;
}

/* Make categories clean on mobile */
.category-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: 0.2s;
  border-left: 3px solid transparent;
}
.category-item:hover {
  background-color: #f3f4f6;
}
.category-item.active {
  background-color: #e0e7ff;
  border-left-color: #2563eb;
  font-weight: 500;
}

/* On smaller screens — single-column view */
@media (max-width: 992px) {
  .content-wrapper {
    display: flex;
    flex-direction: column;
  }

  /* Sidebar stays scrollable on top */
  .sidebar {
    order: 1;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
  }

  /* Show main content below */
  .main-content {
    order: 2;
    padding: 16px;
    min-height: auto;
  }

  /* Quote sidebar pinned at bottom (like a cart summary) */
  .quote-sidebar {
    order: 3;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    background: white;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    z-index: 200;
    border-top: 1px solid #e2e8f0;
    padding: 10px 16px;
  }

  .quote-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .checkout-btn {
    flex: 1;
    padding: 10px;
    font-size: 14px;
  }

  /* Products in a nice grid */
  .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .product-card {
    flex-direction: column;
    text-align: center;
    padding: 16px;
  }
}

/* When a category is clicked, show only that section */
.products-grid.active-category {
  animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Prevent body from cutting off scroll */
body {
  overflow: auto !important;
}

/* Ultra small phones */
@media (max-width: 480px) {
  .header-content {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }

  .category-item {
    padding: 10px;
    font-size: 13px;
  }

  .section-header h2 {
    font-size: 18px;
  }

  .checkout-btn {
    font-size: 13px;
  }
  .cat-tab{
    font-size: 8px;
  }
}
/* ============================= */
/* 📱 Mobile-Friendly UI Layout */
/* ============================= */

/* Banner */
.mobile-banner {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  margin: 10px 0;
}
.mobile-banner img {
  width: 100%;
  display: block;
  border-radius: 8px;
}

/* Category Tabs */
.mobile-category-tabs {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  gap: 8px;
  padding: 8px 0;
  margin-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
  scrollbar-width: none;
}
.mobile-category-tabs::-webkit-scrollbar {
  display: none;
}
.cat-tab {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  flex-shrink: 0;
  transition: 0.2s;
}
.cat-tab.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
@media (max-width: 480px) {
  
  .cat-tab{
    font-size: 12px;
  }
  .headerCart-A{
    margin-top: -40px;
  }
}
/* Products */
.products-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 100px;
}
.product-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: 0.2s;
}
.product-card:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.product-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}
.product-info {
  flex: 1;
}
.product-title {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
}
.min-quantity {
  font-size: 13px;
  color: #64748b;
}
.quantity-value {
  font-size: 13px;
  color: #1e293b;
  font-weight: 500;
  margin-left: 4px;
}
.price {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-top: 4px;
}
.add-to-quote-btn {
  background: #2563eb;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.2s;
}
.add-to-quote-btn:hover {
  background: #1d4ed8;
}
.add-to-quote-btn.out-of-stock {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e5e7eb;
}

/* Floating Quote Button */
.floating-quote-btn {
  position: fixed;
  bottom: 101px;
  right: 16px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 200;
}
.floating-quote-btn i {
  font-size: 18px;
}
.floating-quote-btn:hover {
  background: #1e40af;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  body {
    background: #f9fafb;
    overflow-y: auto;
  }
  .sidebar, .quote-sidebar {
    display: none;
  }
  .main-content {
    padding: 12px;
  }
}
/* ===================================== */
/* 🔹 Quote Popup Styling (Modern Look) */
/* ===================================== */
.quote-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 300;
  justify-content: center;
  align-items: flex-end;
  backdrop-filter: blur(2px);
}

.quote-popup {
  width: 100%;
  max-height: 80vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 20px;
  overflow-y: auto;
  animation: slideUp 0.35s ease-out;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.15);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Header */
.quote-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 10px;
}
.quote-popup-header h4 {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  letter-spacing: 0.2px;
}
.close-quote-popup {
  background: none;
  border: none;
  font-size: 26px;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.2s;
}
.close-quote-popup:hover {
  color: #111827;
}

/* Body */
.quote-popup-body {
  padding: 10px 0;
}
.quote-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  padding: 10px 0;
}
.quote-item:last-child {
  border-bottom: none;
}
.item-info h5 {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}
.item-info p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}
.item-total {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

/* Footer */
.quote-popup-footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding-top: 14px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quote-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 16px;
  color: #111827;
}

/* 🔹 Clear and Proceed Buttons */
.btn-clear,
.btn-checkout {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-clear {
  background: linear-gradient(145deg, #f3f4f6, #e5e7eb);
  color: #374151;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5),
              0 2px 4px rgba(0, 0, 0, 0.05);
}
.btn-clear:hover {
  background: linear-gradient(145deg, #e5e7eb, #d1d5db);
  transform: translateY(-1px);
}

.btn-checkout {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #fff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}
.btn-checkout:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
  transform: translateY(-1px);
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .quote-popup {
    border-radius: 16px 16px 0 0;
    padding: 16px;
  }
  .quote-popup-header h4 {
    font-size: 16px;
  }
  .btn-clear, .btn-checkout {
    font-size: 14px;
    padding: 10px;
  }
}
.banner-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 16px;
  touch-action: pan-y;
  user-select: none;
}

.banner-track {
  display: flex;
  transition: transform 0.4s ease-in-out;
  width: 100%;
}

.banner-slide {
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  justify-content: center;
}

.banner-slide img {
  width: 70%;
  object-fit: cover;
  border-radius: 8px;
 
}

@media (max-width: 600px) {
  .banner-slide img {
    height: 50px;
  }
}

/* Optional: dots below banner */
.banner-dots {
  text-align: center;
  margin-top: 8px;
}
.banner-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 4px;
  background: #ccc;
  border-radius: 50%;
  transition: background 0.3s;
}
.banner-dot.active {
  background: #2563eb;
}
