/* ========================================
   PRODUCTS PAGE STYLES
   ======================================== */

.b2b-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin: 24px 0;
}

.b2b-product-card {
    background: var(--b2b-white);
    border-radius: var(--b2b-radius-lg);
    overflow: hidden;
    box-shadow: var(--b2b-shadow-md);
    transition: all var(--b2b-transition-base);
    position: relative;
}

.b2b-product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--b2b-shadow-xl);
}

.b2b-product-image {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    background: var(--b2b-light-gray);
}

.b2b-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--b2b-transition-base);
}

.b2b-product-card:hover .b2b-product-image img {
    transform: scale(1.1);
}

.b2b-product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1;
}

.b2b-product-info {
    padding: var(--b2b-spacing-md);
}

.b2b-product-title {
    font-size: var(--b2b-font-size-lg);
    font-weight: 700;
    color: var(--b2b-dark);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.b2b-product-supplier {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--b2b-gray);
    font-size: var(--b2b-font-size-sm);
    margin-bottom: 0.75rem;
}

.b2b-product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--b2b-spacing-sm);
    border-top: 2px solid var(--b2b-light-gray);
}

.b2b-product-price {
    font-size: var(--b2b-font-size-xl);
    font-weight: 700;
    color: var(--b2b-primary);
}

.b2b-product-moq {
    font-size: var(--b2b-font-size-xs);
    color: var(--b2b-gray);
}

.b2b-product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: var(--b2b-spacing-sm);
}

/* Product Filters */
.b2b-product-filters {
    background: var(--b2b-white);
    padding: var(--b2b-spacing-lg);
    border-radius: var(--b2b-radius-lg);
    box-shadow: var(--b2b-shadow-md);
    margin-bottom: var(--b2b-spacing-lg);
}

.b2b-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--b2b-spacing-md);
}

.b2b-search-box {
    position: relative;
}

.b2b-search-box input {
    padding-left: 3rem;
}

.b2b-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--b2b-gray);
    font-size: 1.25rem;
    pointer-events: none;
}

/* Empty State */
.b2b-empty-state {
    text-align: center;
    padding: var(--b2b-spacing-xl) var(--b2b-spacing-lg);
}

.b2b-empty-state-icon {
    font-size: 4rem;
    color: var(--b2b-light-gray);
    margin-bottom: var(--b2b-spacing-md);
}

.b2b-empty-state h3 {
    color: var(--b2b-dark-gray);
    margin-bottom: 0.5rem;
}

.b2b-empty-state p {
    color: var(--b2b-gray);
    margin-bottom: var(--b2b-spacing-md);
}

/* Product Detail Page */
.b2b-product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--b2b-spacing-xl);
    background: var(--b2b-white);
    padding: var(--b2b-spacing-xl);
    border-radius: var(--b2b-radius-lg);
    box-shadow: var(--b2b-shadow-lg);
}

.b2b-product-gallery {
    position: relative;
}

.b2b-product-main-image {
    width: 100%;
    border-radius: var(--b2b-radius-lg);
    overflow: hidden;
    margin-bottom: var(--b2b-spacing-md);
}

.b2b-product-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--b2b-spacing-sm);
}

.b2b-product-thumbnail {
    border-radius: var(--b2b-radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--b2b-transition-fast);
}

.b2b-product-thumbnail.active {
    border-color: var(--b2b-primary-light);
}

.b2b-product-details h1 {
    font-size: var(--b2b-font-size-3xl);
    margin-bottom: var(--b2b-spacing-md);
}

.b2b-product-specs {
    margin: var(--b2b-spacing-md) 0;
}

.b2b-spec-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--b2b-light-gray);
}

.b2b-spec-label {
    font-weight: 600;
    color: var(--b2b-dark-gray);
}

.b2b-spec-value {
    color: var(--b2b-dark);
}

@media (max-width: 1024px) {
    .b2b-product-detail {
        grid-template-columns: 1fr;
    }

    .b2b-product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .b2b-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .b2b-filter-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .b2b-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* =========================================================
   SUPPLIER PRODUCTS (CANVA DEMO FINAL)
   PC: 4  | Tablet: 3 | Mobile: 2
   Font: Inter
   Colors: #012c5c / #0051a8
   ========================================================= */

.b2b-products-section{
  margin-bottom: 34px;
}

.b2b-products-section-head{
  font-family: 'Inter', sans-serif;
  background: #ffffff;
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(1,44,92,0.10);
  box-shadow: 0 12px 28px rgba(1,44,92,0.08);
}

.b2b-products-section-title{
  font-size: 20px;
  font-weight: 900;
  color: #012c5c;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.b2b-products-section-title::before{
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #012c5c, #0051a8);
  display: inline-block;
}

.b2b-products-section-sub{
  font-size: 14px;
  font-weight: 500;
  color: rgba(1,44,92,0.65);
  margin: 0;
}

/* Grid */
.b2b-supplier-products-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

/* Tablet 3 */
@media (max-width: 1024px){
  .b2b-supplier-products-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}

/* Mobile 2 */
@media (max-width: 768px){
  .b2b-supplier-products-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

/* Card */
.b2b-supplier-product-card{
  font-family: 'Inter', sans-serif;
  border-radius: 22px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(1,44,92,0.10);
  box-shadow: 0 18px 40px rgba(1,44,92,0.12);
  transition: transform .25s ease, box-shadow .25s ease;
}

.b2b-supplier-product-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 28px 60px rgba(1,44,92,0.18);
}

/* Image area */
.b2b-supplier-product-media{
  position: relative;
  background: #f3f6fb;
}

.b2b-supplier-product-img,
.b2b-supplier-img-placeholder{
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.b2b-supplier-img-placeholder{
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(1,44,92,0.40);
  font-size: 36px;
}

/* Badge */
.b2b-status-badge{
  position:absolute;
  top: 14px;
  left: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 5;
}

.b2b-status-badge::before{
  content: "✓";
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  font-weight: 900;
  line-height: 1;
}

.b2b-badge-success{ background:#22c55e; }
.b2b-badge-warning{ background:#f59e0b; }
.b2b-badge-danger{  background:#ef4444; }

/* Body */
.b2b-supplier-product-body{
  padding: 18px;
}

.b2b-supplier-product-title{
  font-size: 22px;
  font-weight: 900;
  color: #012c5c;
  margin: 0 0 12px;
}

/* Meta row */
.b2b-supplier-product-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 16px;
}

/* each meta item */
.b2b-meta-item{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #012c5c;
  min-width: 0;
}

.b2b-meta-item i{
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef4ff;
  color: #0051a8;
}

/* Keep price line neat (but don't break layout) */
.b2b-meta-item span{
  white-space: nowrap;
}

/* Actions */
.b2b-supplier-product-actions{
  display: flex;
  gap: 12px;
}

.b2b-supplier-product-actions button{
  flex: 1;
  min-width: 0;
  border-radius: 14px;
  padding: 12px 0;
  font-weight: 900;
  font-size: 15px;
}

/* Edit -> outline */
.b2b-supplier-product-actions .edit-product-btn{
  background: #ffffff;
  border: 2px solid #0051a8;
  color: #0051a8;
}

.b2b-supplier-product-actions .edit-product-btn:hover{
  background: #eef4ff;
}

/* Delete -> solid */
.b2b-supplier-product-actions .delete-product-btn{
  background: #0051a8;
  border: none;
  color: #ffffff;
}

.b2b-supplier-product-actions .delete-product-btn:hover{
  background: #012c5c;
}

/* Empty mini */
.b2b-empty-mini{
  background: #ffffff;
  border: 1px dashed rgba(1,44,92,0.25);
  border-radius: 14px;
  padding: 16px;
  color: rgba(1,44,92,0.70);
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Pagination (single clean version) */
.b2b-section-pagination{
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.b2b-pager{
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid rgba(1,44,92,0.10);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 10px 18px rgba(1,44,92,0.06);
}

.b2b-pager-btn,
.b2b-pager-num{
  border: 1px solid rgba(1,44,92,0.12);
  background: #ffffff;
  color: #012c5c;
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

.b2b-pager-btn:disabled{
  opacity: 0.45;
  cursor: not-allowed;
}

.b2b-pager-num.active{
  background: linear-gradient(135deg, #012c5c, #0051a8);
  color: #ffffff;
  border-color: transparent;
}

.b2b-pager-numbers{
  display: flex;
  gap: 6px;
}

/* =========================================
   Product Card Responsive Fix (Mobile/Tablet)
========================================= */

/* Make grid responsive clean */
@media (max-width: 1024px){
  .b2b-supplier-products-grid{
    gap: 16px !important;
  }
}

@media (max-width: 768px){
  .b2b-supplier-products-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
}

@media (max-width: 520px){
  .b2b-supplier-products-grid{
    grid-template-columns: 1fr !important; /* 1 card per row on small phones */
  }
}

/* Card padding + title size */
@media (max-width: 768px){
  .b2b-supplier-product-body{
    padding: 14px !important;
  }

  .b2b-supplier-product-title{
    font-size: 18px !important;
    margin-bottom: 10px !important;
  }

  /* Meta: keep items in one column so it won't break */
  .b2b-supplier-product-meta{
    flex-direction: column !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
  }

  .b2b-meta-item{
    width: 100% !important;
  }

  /* Prevent "Price: Rs 1,200.00" breaking badly */
  .b2b-meta-item span,
  .b2b-meta-item{
    white-space: nowrap !important;
  }
}

/* Buttons: nicer on mobile */
@media (max-width: 768px){
  .b2b-supplier-product-actions{
    gap: 10px !important;
  }

  .b2b-supplier-product-actions button{
    padding: 11px 0 !important;
    font-size: 14px !important;
    border-radius: 12px !important;
  }
}

/* Badge: reduce size on mobile so it doesn't overflow */
@media (max-width: 768px){
  .b2b-status-badge{
    top: 10px !important;
    left: 10px !important;
    padding: 5px 12px !important;
    font-size: 11px !important;
  }
}



/* Marketplace Filters - UI polish + responsive */
.b2b-product-filters{
  border-radius:18px;
}

.b2b-filter-row{
  gap:16px;
  align-items:center;
}

.b2b-search-box .b2b-input{
  height:48px;
  border-radius:14px;
  padding-left:48px !important;
}

/* FIX: Select text cutting issue */
.b2b-select,
.b2b-filter-row select{
  height: 52px !important;
  line-height: 52px !important;   /* key */
  padding: 0 16px !important;     /* vertical padding 0 */
  border-radius: 14px !important;
  display: flex;
  align-items: center;
}

/* If browser still clips, force content box */
.b2b-select{
  box-sizing: border-box;
}

/* Mobile safe */
@media (max-width: 900px){
  .b2b-select,
  .b2b-filter-row select{
    height: 50px !important;
    line-height: 50px !important;
  }
}

#filter-btn{
  height:48px;
  border-radius:14px;
  white-space:nowrap;
}

@media (max-width: 900px){
  .b2b-filter-row{
    grid-template-columns: 1fr;
  }
  #filter-btn{
    width:100%;
  }
}