.products-module{
  padding:4px;
}

.products-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.products-header h2{
  margin:0;
  font-size:22px;
}

.products-header p{
  margin:5px 0 0;
  color:#64748b;
  font-size:13px;
}

.products-refresh{
  border:1px solid #cbd5e1;
  background:#fff;
  padding:9px 14px;
  border-radius:9px;
  cursor:pointer;
  font-weight:600;
}

.product-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}

.product-kpi{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:15px;
}

.product-kpi-title{
  color:#64748b;
  font-size:12px;
}

.product-kpi-value{
  margin-top:5px;
  font-size:23px;
  font-weight:700;
}

.product-kpi-sub{
  color:#94a3b8;
  font-size:11px;
  margin-top:3px;
}

.products-filters{
  display:grid;
  grid-template-columns:minmax(280px,2fr) repeat(3,minmax(150px,1fr));
  gap:10px;
  margin-bottom:12px;
}

.products-filters input,
.products-filters select{
  width:100%;
  min-height:40px;
  border:1px solid #cbd5e1;
  border-radius:9px;
  background:#fff;
  padding:8px 10px;
}

.products-result-info{
  color:#64748b;
  font-size:12px;
  margin:10px 0;
}

.products-table-wrap{
  width:100%;
  overflow:auto;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:12px;
}

.products-table{
  width:100%;
  min-width:1100px;
  border-collapse:collapse;
}

.products-table th{
  padding:10px 11px;
  text-align:left;
  white-space:nowrap;
  font-size:11px;
  color:#64748b;
  background:#f8fafc;
  border-bottom:1px solid #e2e8f0;
}

.products-table td{
  padding:10px 11px;
  border-bottom:1px solid #eef2f7;
  font-size:12px;
  vertical-align:middle;
}

.products-table tbody tr:last-child td{
  border-bottom:0;
}

.products-table tbody tr:hover{
  background:#fafcff;
}

.products-table .num{
  text-align:right;
  white-space:nowrap;
}

.product-main-cell{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:300px;
}

.product-main-cell strong{
  display:block;
  line-height:1.35;
}

.product-main-cell small{
  display:block;
  color:#94a3b8;
  margin-top:3px;
}

.product-thumb{
  width:46px;
  height:46px;
  flex:0 0 46px;
  object-fit:contain;
  border-radius:8px;
  border:1px solid #e2e8f0;
  background:#fff;
}

.product-thumb-empty{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f8fafc;
}

.product-category{
  max-width:220px;
}

.product-price{
  font-weight:700;
}

.product-stock{
  display:inline-block;
  padding:4px 7px;
  border-radius:999px;
  background:#f1f5f9;
  white-space:nowrap;
  font-size:10px;
  font-weight:700;
}

.product-stock-ok{
  background:#dcfce7;
  color:#166534;
}

.product-stock-out{
  background:#fee2e2;
  color:#991b1b;
}

.product-open{
  white-space:nowrap;
  text-decoration:none;
  font-weight:600;
}

.products-pagination{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:12px;
  margin-top:14px;
}

.products-pagination button{
  border:1px solid #cbd5e1;
  background:#fff;
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
}

.products-pagination button:disabled{
  opacity:.45;
  cursor:not-allowed;
}

.products-pagination span{
  color:#64748b;
  font-size:12px;
}

.products-loading,
.products-error,
.products-empty{
  padding:30px;
  text-align:center;
  color:#64748b;
}

.products-error{
  color:#b91c1c;
}

@media(max-width:1000px){
  .product-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .products-filters{
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:650px){
  .product-kpis{
    grid-template-columns:1fr;
  }

  .products-filters{
    grid-template-columns:1fr;
  }

  .products-header{
    flex-direction:column;
  }

  .products-pagination{
    justify-content:center;
    flex-wrap:wrap;
  }
}

.product-kpis{
  grid-template-columns:repeat(5,minmax(0,1fr));
}

.products-filters{
  grid-template-columns:minmax(260px,2fr) repeat(4,minmax(140px,1fr));
}

.product-row{
  cursor:pointer;
}

.product-details-overlay{
  position:fixed;
  inset:0;
  z-index:30000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(15,23,42,.48);
}

.product-details-modal{
  width:min(760px,100%);
  max-height:90vh;
  overflow:auto;
  background:#fff;
  border-radius:16px;
  box-shadow:0 24px 70px rgba(15,23,42,.28);
}

.product-details-head{
  display:flex;
  justify-content:space-between;
  gap:15px;
  padding:18px 20px;
  border-bottom:1px solid #e2e8f0;
}

.product-details-head h3{
  margin:0 0 4px;
  font-size:18px;
}

.product-details-head small{
  color:#64748b;
}

.product-details-close{
  width:34px;
  height:34px;
  border:0;
  border-radius:8px;
  background:#f1f5f9;
  cursor:pointer;
  font-size:24px;
}

.product-details-body{
  display:grid;
  grid-template-columns:180px 1fr;
  gap:20px;
  padding:20px;
}

.product-details-image{
  width:180px;
  height:180px;
  object-fit:contain;
  border:1px solid #e2e8f0;
  border-radius:12px;
}

.product-details-noimage{
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:42px;
  background:#f8fafc;
}

.product-details-info{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.product-details-info div{
  padding:10px;
  background:#f8fafc;
  border-radius:9px;
}

.product-details-info span{
  display:block;
  color:#64748b;
  font-size:11px;
  margin-bottom:3px;
}

.product-details-info strong{
  font-size:13px;
}

.product-details-actions{
  display:flex;
  justify-content:flex-end;
  padding:15px 20px 20px;
}

.product-details-actions a{
  padding:9px 14px;
  border-radius:9px;
  text-decoration:none;
  font-weight:600;
  background:#f1f5f9;
}

@media(max-width:1100px){
  .product-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .products-filters{
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:650px){
  .product-details-body{
    grid-template-columns:1fr;
  }

  .product-details-image{
    width:100%;
    height:220px;
  }

  .product-details-info{
    grid-template-columns:1fr;
  }
}


.product-details-actions{
  gap:10px;
}

.product-add-quote{
  padding:9px 14px;
  border:0;
  border-radius:9px;
  cursor:pointer;
  font-weight:700;
  background:#0f172a;
  color:#fff;
}

.product-add-quote:hover{
  opacity:.9;
}


.product-details-close{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:38px !important;
  height:38px !important;
  min-width:38px !important;
  padding:0 !important;
  border:1px solid #cbd5e1 !important;
  border-radius:10px !important;
  background:#f1f5f9 !important;
  color:#0f172a !important;
  font-size:26px !important;
  font-weight:700 !important;
  line-height:1 !important;
  cursor:pointer !important;
}

.product-details-close:hover{
  background:#e2e8f0 !important;
  color:#020617 !important;
}


.products-refresh{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:6px !important;
  min-width:120px !important;
  min-height:40px !important;
  padding:9px 14px !important;
  border:1px solid #cbd5e1 !important;
  border-radius:9px !important;
  background:#fff !important;
  color:#0f172a !important;
  font-size:13px !important;
  font-weight:700 !important;
  cursor:pointer !important;
}

.products-refresh:hover{
  background:#f8fafc !important;
  color:#020617 !important;
}



/* =====================================================
   PRODUCTS MOBILE UX V2
   ===================================================== */

@media(max-width:900px){

  #products,
  #products *{
    box-sizing:border-box;
  }

  .products-module{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  .products-header{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:10px !important;
  }

  .products-refresh{
    min-height:44px !important;
  }

  .products-filters{
    display:grid !important;
    grid-template-columns:1fr !important;

    width:100% !important;

    gap:8px !important;
  }

  .products-filters input,
  .products-filters select{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;

    min-height:44px !important;
  }

  .product-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .products-table-wrap{
    width:100% !important;
    max-width:100% !important;

    overflow-x:auto !important;

    -webkit-overflow-scrolling:touch;
  }

  .products-table{
    width:900px !important;
    min-width:900px !important;
  }

  .products-pagination{
    display:flex !important;
    flex-wrap:wrap !important;

    justify-content:center !important;

    gap:8px !important;
  }

  .products-pagination button{
    min-width:44px !important;
    min-height:44px !important;
  }


  /* Product details */

  .product-details-overlay{
    padding:0 !important;
    align-items:flex-end !important;
  }

  .product-details-modal{
    width:100% !important;
    max-width:100% !important;

    max-height:92dvh !important;

    margin:0 !important;

    border-radius:18px 18px 0 0 !important;

    overflow-y:auto !important;
    overflow-x:hidden !important;
  }

  .product-details-body{
    grid-template-columns:1fr !important;
  }

  .product-details-image{
    width:100% !important;
    max-width:320px !important;

    margin-left:auto !important;
    margin-right:auto !important;
  }

  .product-details-actions{
    display:flex !important;
    flex-direction:column !important;
    gap:8px !important;
  }

  .product-details-actions a,
  .product-details-actions button{
    width:100% !important;
    min-height:44px !important;
  }
}


@media(max-width:600px){

  .product-kpis{
    grid-template-columns:1fr 1fr !important;
  }

  .products-refresh{
    width:100% !important;
  }
}



/* Pylon warehouse stock */

.product-warehouses-section{
  margin:0 20px 20px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  overflow:hidden;
  background:#fff;
}

.product-warehouses-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  background:#f8fafc;
  border-bottom:1px solid #e2e8f0;
}

.product-warehouses-head h4{
  margin:0;
  font-size:15px;
}

.product-warehouses-head small{
  display:block;
  margin-top:3px;
  color:#64748b;
  font-size:11px;
}

.product-warehouses-loading,
.product-warehouses-empty,
.product-warehouses-error{
  padding:20px;
  text-align:center;
  color:#64748b;
  font-size:12px;
}

.product-warehouses-error{
  color:#b91c1c;
}

.product-warehouse-total{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:12px 16px;
  border-bottom:1px solid #e2e8f0;
}

.product-warehouse-total span{
  color:#64748b;
  font-size:12px;
}

.product-warehouse-total strong{
  font-size:17px;
}

.product-warehouse-table-wrap{
  overflow:auto;
}

.product-warehouse-table{
  width:100%;
  border-collapse:collapse;
  min-width:550px;
}

.product-warehouse-table th{
  padding:9px 12px;
  text-align:left;
  white-space:nowrap;
  background:#f8fafc;
  color:#64748b;
  font-size:11px;
  border-bottom:1px solid #e2e8f0;
}

.product-warehouse-table td{
  padding:10px 12px;
  font-size:12px;
  border-bottom:1px solid #eef2f7;
}

.product-warehouse-table tbody tr:last-child td{
  border-bottom:0;
}

.product-warehouse-table .num{
  text-align:right;
  white-space:nowrap;
  font-weight:700;
}

.product-warehouse-negative{
  color:#b91c1c;
}

@media(max-width:650px){
  .product-warehouses-section{
    margin:0 12px 14px;
  }

  .product-details-body{
    grid-template-columns:1fr;
  }

  .product-details-image{
    width:100%;
    max-width:180px;
  }

  .product-details-info{
    grid-template-columns:1fr;
  }
}

/* Products source filter */
.products-filters{
  grid-template-columns:minmax(260px,2fr) repeat(5,minmax(140px,1fr));
}

@media(max-width:1000px){
  .products-filters{
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:650px){
  .products-filters{
    grid-template-columns:1fr;
  }
}

/* === B2B CATALOG / XML FEEDS === */

.products-tabs{
  display:flex;
  align-items:center;
  gap:6px;
  margin-bottom:20px;
  padding:5px;
  background:#f1f5f9;
  border-radius:11px;
  overflow-x:auto;
}

.products-tab{
  border:0;
  background:transparent;
  padding:9px 14px;
  border-radius:8px;
  cursor:pointer;
  white-space:nowrap;
  font-size:12px;
  font-weight:600;
}

.products-tab.active{
  background:#fff;
  box-shadow:0 1px 3px rgba(15,23,42,.12);
}

.b2b-products-panel{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:18px;
}

.b2b-products-panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.b2b-products-panel-head h2{
  margin:0;
  font-size:20px;
}

.b2b-products-panel-head p{
  margin:5px 0 0;
  color:#64748b;
  font-size:13px;
}

.b2b-xml-table-wrap{
  width:100%;
  overflow:auto;
  border:1px solid #e2e8f0;
  border-radius:10px;
}

.b2b-xml-table{
  width:100%;
  min-width:900px;
  border-collapse:collapse;
}

.b2b-xml-table th{
  padding:10px 11px;
  text-align:left;
  font-size:11px;
  color:#64748b;
  background:#f8fafc;
  border-bottom:1px solid #e2e8f0;
}

.b2b-xml-table td{
  padding:11px;
  border-bottom:1px solid #eef2f7;
  font-size:12px;
  vertical-align:middle;
}

.b2b-xml-table tr:last-child td{
  border-bottom:0;
}

.b2b-xml-table .num{
  text-align:right;
}

.b2b-feed-main strong{
  display:block;
}

.b2b-feed-main small{
  display:block;
  max-width:380px;
  margin-top:4px;
  color:#94a3b8;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.b2b-xml-preview-btn{
  border:1px solid #cbd5e1;
  background:#fff;
  padding:7px 11px;
  border-radius:8px;
  cursor:pointer;
  font-weight:600;
}

.b2b-xml-preview-btn:disabled{
  opacity:.5;
  cursor:not-allowed;
}

@media(max-width:650px){
  .b2b-products-panel-head{
    flex-direction:column;
  }

  .products-tabs{
    width:100%;
  }
}


/* === FIX B2B PRODUCT TABS TEXT COLOR === */
.products-tab{
  color:#1e293b !important;
}

.products-tab.active{
  color:#0f172a !important;
}


/* === B2B XML FEED MODAL === */

.b2b-modal-overlay{
  position:fixed;
  inset:0;
  z-index:40000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(15,23,42,.55);
}

.b2b-modal{
  width:min(720px,100%);
  max-height:90vh;
  overflow:auto;
  background:#fff;
  border-radius:16px;
  box-shadow:0 25px 80px rgba(15,23,42,.3);
}

.b2b-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding:20px 22px;
  border-bottom:1px solid #e2e8f0;
}

.b2b-modal-head h3{
  margin:0;
  color:#0f172a;
  font-size:20px;
}

.b2b-modal-head p{
  margin:5px 0 0;
  color:#64748b;
  font-size:13px;
}

.b2b-modal-close{
  width:36px;
  height:36px;
  border:0;
  border-radius:9px;
  background:#f1f5f9;
  color:#0f172a !important;
  font-size:22px;
  cursor:pointer;
}

.b2b-modal-form{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  padding:22px;
}

.b2b-field{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.b2b-field-full{
  grid-column:1 / -1;
}

.b2b-field label{
  color:#334155;
  font-size:12px;
  font-weight:700;
}

.b2b-field input,
.b2b-field select{
  width:100%;
  min-height:42px;
  padding:9px 11px;
  border:1px solid #cbd5e1;
  border-radius:9px;
  background:#fff;
  color:#0f172a;
}

.b2b-field input:focus,
.b2b-field select:focus{
  outline:none;
  border-color:#64748b;
}

.b2b-modal-actions{
  grid-column:1 / -1;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:4px;
}

.b2b-button-secondary{
  border:1px solid #cbd5e1;
  background:#fff;
  color:#334155 !important;
  padding:9px 14px;
  border-radius:9px;
  cursor:pointer;
  font-weight:600;
}

.b2b-form-error{
  grid-column:1 / -1;
  padding:10px 12px;
  border-radius:9px;
  background:#fee2e2;
  color:#991b1b;
  font-size:12px;
}

.b2b-form-error.hidden{
  display:none;
}

@media(max-width:650px){

  .b2b-modal-form{
    grid-template-columns:1fr;
  }

  .b2b-field-full,
  .b2b-modal-actions,
  .b2b-form-error{
    grid-column:1;
  }

  .b2b-modal-actions{
    flex-direction:column-reverse;
  }

  .b2b-modal-actions button{
    width:100%;
  }
}


/* === B2B XML PREVIEW === */

.b2b-preview-modal{
  width:min(980px,100%);
}

.b2b-preview-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  padding:18px 22px;
  background:#f8fafc;
  border-bottom:1px solid #e2e8f0;
}

.b2b-preview-summary > div{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:10px;
  padding:12px;
}

.b2b-preview-summary span{
  display:block;
  color:#64748b;
  font-size:11px;
}

.b2b-preview-summary strong{
  display:block;
  margin-top:4px;
  color:#0f172a;
  font-size:15px;
}

.b2b-preview-content{
  padding:20px 22px;
}

.b2b-preview-node{
  margin-bottom:18px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  overflow:hidden;
}

.b2b-preview-node:last-child{
  margin-bottom:0;
}

.b2b-preview-node-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:13px 15px;
  background:#f8fafc;
  border-bottom:1px solid #e2e8f0;
}

.b2b-preview-node-head strong{
  display:block;
  color:#0f172a;
}

.b2b-preview-node-head small{
  display:block;
  margin-top:3px;
  color:#64748b;
}

.b2b-select-product-node{
  border:1px solid #cbd5e1;
  background:#fff;
  color:#0f172a !important;
  padding:8px 11px;
  border-radius:8px;
  cursor:pointer;
  font-weight:600;
}

.b2b-preview-fields{
  width:100%;
  overflow:auto;
}

.b2b-preview-fields table{
  width:100%;
  border-collapse:collapse;
}

.b2b-preview-fields th{
  padding:9px 12px;
  text-align:left;
  color:#64748b;
  font-size:11px;
  background:#fff;
  border-bottom:1px solid #e2e8f0;
}

.b2b-preview-fields td{
  padding:10px 12px;
  border-bottom:1px solid #f1f5f9;
  color:#334155;
  font-size:12px;
  vertical-align:top;
}

.b2b-preview-fields tr:last-child td{
  border-bottom:0;
}

.b2b-preview-fields code{
  color:#0f172a;
  font-weight:700;
}

@media(max-width:650px){

  .b2b-preview-summary{
    grid-template-columns:1fr;
  }

  .b2b-preview-node-head{
    flex-direction:column;
    align-items:flex-start;
  }
}


/* === XML FEED MODAL HARD VISIBILITY FIX === */

#xmlFeedModal .b2b-modal-form{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:16px !important;
  padding:22px !important;
  visibility:visible !important;
  opacity:1 !important;
  height:auto !important;
}

#xmlFeedModal .b2b-field{
  display:flex !important;
  flex-direction:column !important;
  gap:6px !important;
  visibility:visible !important;
  opacity:1 !important;
  height:auto !important;
  min-height:0 !important;
}

#xmlFeedModal .b2b-field-full{
  grid-column:1 / -1 !important;
}

#xmlFeedModal .b2b-field label{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  color:#334155 !important;
  margin:0 0 6px !important;
  font-size:12px !important;
  font-weight:700 !important;
}

#xmlFeedModal .b2b-field input,
#xmlFeedModal .b2b-field select{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  position:static !important;

  width:100% !important;
  height:auto !important;
  min-height:42px !important;

  padding:9px 11px !important;

  background:#ffffff !important;
  color:#0f172a !important;

  border:1px solid #cbd5e1 !important;
  border-radius:9px !important;

  box-sizing:border-box !important;
}

#xmlFeedModal .b2b-modal-actions{
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  grid-column:1 / -1 !important;
}

@media(max-width:650px){

  #xmlFeedModal .b2b-modal-form{
    grid-template-columns:1fr !important;
  }

  #xmlFeedModal .b2b-field,
  #xmlFeedModal .b2b-field-full,
  #xmlFeedModal .b2b-modal-actions{
    grid-column:1 !important;
  }
}


/* === FIX XML PREVIEW BUTTON TEXT === */
.b2b-xml-preview-btn{
  color:#0f172a !important;
}


/* === B2B XML FIELD MAPPING === */

.b2b-mapping-modal{
  width:min(900px,100%);
}

.b2b-mapping-info{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  padding:16px 22px;
  background:#f8fafc;
  border-bottom:1px solid #e2e8f0;
}

.b2b-mapping-info > div{
  padding:10px 12px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:10px;
}

.b2b-mapping-info span{
  display:block;
  color:#64748b;
  font-size:11px;
}

.b2b-mapping-info strong{
  display:block;
  margin-top:4px;
  color:#0f172a;
}

#xmlMappingForm{
  padding:20px 22px;
}

.b2b-mapping-table-wrap{
  overflow:auto;
  border:1px solid #e2e8f0;
  border-radius:11px;
}

.b2b-mapping-table{
  width:100%;
  border-collapse:collapse;
}

.b2b-mapping-table th{
  text-align:left;
  padding:10px 12px;
  background:#f8fafc;
  color:#64748b;
  font-size:11px;
  border-bottom:1px solid #e2e8f0;
}

.b2b-mapping-table td{
  padding:10px 12px;
  border-bottom:1px solid #f1f5f9;
  color:#334155;
}

.b2b-mapping-table tr:last-child td{
  border-bottom:0;
}

#xmlMappingModal select{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  width:100% !important;
  min-height:40px !important;
  padding:8px 10px !important;
  background:#fff !important;
  color:#0f172a !important;
  border:1px solid #cbd5e1 !important;
  border-radius:8px !important;
}

#xmlMappingModal .b2b-modal-actions{
  display:flex !important;
  justify-content:flex-end;
  gap:10px;
  margin-top:18px;
}

@media(max-width:650px){

  .b2b-mapping-info{
    grid-template-columns:1fr;
  }

  .b2b-mapping-table{
    min-width:600px;
  }
}


/* === B2B PRODUCTS PREVIEW === */

.b2b-feed-actions{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
}

.b2b-products-preview-btn{
  border:1px solid #cbd5e1;
  background:#fff;
  color:#0f172a !important;
  padding:7px 11px;
  border-radius:8px;
  cursor:pointer;
  font-weight:600;
}

.b2b-products-preview-btn:disabled{
  opacity:.5;
  cursor:not-allowed;
}

.b2b-products-preview-modal{
  width:min(1180px,100%);
}

.b2b-products-preview-wrap{
  overflow:auto;
  padding:20px 22px;
}

.b2b-products-preview-table{
  width:100%;
  min-width:1000px;
  border-collapse:collapse;
}

.b2b-products-preview-table th{
  padding:10px 11px;
  text-align:left;
  background:#f8fafc;
  color:#64748b;
  font-size:11px;
  border-bottom:1px solid #e2e8f0;
}

.b2b-products-preview-table td{
  padding:10px 11px;
  border-bottom:1px solid #eef2f7;
  vertical-align:middle;
  color:#334155;
  font-size:12px;
}

.b2b-products-preview-table .num{
  text-align:right;
}

.b2b-products-preview-table td small{
  display:block;
  margin-top:3px;
  color:#94a3b8;
}

.b2b-preview-product-img{
  width:52px;
  height:52px;
  object-fit:contain;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#fff;
}

.b2b-final-price{
  font-weight:800;
  color:#0f172a !important;
}


/* === TEST XML IMPORT BUTTON === */
.b2b-test-import-btn{
  border:1px solid #cbd5e1;
  background:#fff;
  color:#0f172a !important;
  padding:7px 11px;
  border-radius:8px;
  cursor:pointer;
  font-weight:600;
}

.b2b-test-import-btn:disabled{
  opacity:.5;
  cursor:not-allowed;
}


.b2b-full-import-btn{
  border:0;
  background:#111827;
  color:#fff !important;
  padding:7px 12px;
  border-radius:8px;
  cursor:pointer;
  font-weight:700;
}

.b2b-full-import-btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}


.b2b-pricing-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  margin-top:22px;
}

.b2b-pricing-card{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:14px;
  padding:18px;
}

.b2b-pricing-card h3{
  margin:0 0 18px;
  font-size:17px;
}

.b2b-pricing-card label{
  display:block;
  margin:12px 0 6px;
  font-size:13px;
  font-weight:700;
}

.b2b-pricing-card select,
.b2b-pricing-card input{
  display:block;
  width:100%;
  box-sizing:border-box;
  padding:9px 10px;
}

.b2b-pricing-save{
  width:100%;
  margin-top:16px;
}

.b2b-pricing-msg{
  min-height:20px;
  margin-top:8px;
  font-size:12px;
}

.b2b-pricing-note{
  margin-top:20px;
  padding:12px 14px;
  border:1px solid #e2e8f0;
  border-radius:10px;
}

@media(max-width:1000px){
  .b2b-pricing-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:620px){
  .b2b-pricing-grid{
    grid-template-columns:1fr;
  }
}


.b2b-special-pricing{
  margin-top:28px;
  padding-top:24px;
  border-top:1px solid #e2e8f0;
}

.b2b-special-rule-form{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:18px;
}

.b2b-special-rule-form label{
  display:block;
  font-size:13px;
  font-weight:700;
  margin-bottom:6px;
}

.b2b-special-rule-form input,
.b2b-special-rule-form select{
  width:100%;
  box-sizing:border-box;
  padding:9px 10px;
}

.b2b-special-rule-action{
  display:flex;
  align-items:flex-end;
}

.b2b-special-rule-action button{
  width:100%;
}

.b2b-special-rules-list{
  margin-top:22px;
}

.b2b-special-disable{
  cursor:pointer;
  padding:6px 9px;
}

@media(max-width:900px){
  .b2b-special-rule-form{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:620px){
  .b2b-special-rule-form{
    grid-template-columns:1fr;
  }
}

