/* B2B Portal Styles */

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  background: #f5f6fa;
}

.b2b-portal-body {
  overflow-x: hidden;
}

/* Hide classic theme elements when in B2B portal */
.b2b-portal-body #header,
.b2b-portal-body #wrapper,
.b2b-portal-body #footer,
.b2b-portal-body .header-nav,
.b2b-portal-body .header-top,
.b2b-portal-body #_desktop_logo,
.b2b-portal-body #_desktop_top_menu,
.b2b-portal-body #search_widget,
.b2b-portal-body .breadcrumb,
.b2b-portal-body #left-column,
.b2b-portal-body #content-wrapper {
  display: none !important;
}

/* ===== Variables ===== */
:root {
  --b2b-sidebar-bg: #1e2a3a;
  --b2b-sidebar-width: 250px;
  --b2b-topbar-bg: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  --b2b-topbar-height: 60px;
  --b2b-accent: #e67e22;
  --b2b-accent-hover: #d35400;
  --b2b-content-bg: #f5f6fa;
  --b2b-card-bg: #ffffff;
  --b2b-text-light: #ecf0f1;
  --b2b-text-muted: #95a5a6;
  --b2b-border: #dfe6e9;
}

/* ===== Sidebar ===== */
.b2b-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--b2b-sidebar-width);
  background: var(--b2b-sidebar-bg);
  z-index: 1000;
  overflow-y: auto;
  height: calc(100vh - var(--topbar-height));
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
  color: var(--b2b-text-light);
  font-size: 1.4rem;
  font-weight: 700;
}

.sidebar-nav {
  padding: 15px 0;
}

.nav-section {
  margin-bottom: 20px;
}

.nav-section-title {
  display: block;
  padding: 10px 20px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--b2b-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--b2b-text-light);
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.nav-item a:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

.nav-item.active a {
  background: rgba(230, 126, 34, 0.1);
  border-left-color: var(--b2b-accent);
  color: var(--b2b-accent);
}

.nav-item a i {
  margin-right: 12px;
  font-size: 20px;
}

.nav-item a .badge {
  margin-left: auto;
  font-size: 0.7rem;
}

/* ===== Topbar ===== */
.b2b-topbar {
  position: fixed;
  top: 0;
  left: var(--b2b-sidebar-width);
  right: 0;
  height: var(--b2b-topbar-height);
  background: var(--b2b-topbar-bg);
  z-index: 999;
  display: flex;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.topbar-search {
  flex: 1;
  max-width: 500px;
  margin: 0 auto;
}

.topbar-search input {
  width: 100%;
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.9rem;
}

.topbar-search input::placeholder {
  color: rgba(255,255,255,0.6);
}

.topbar-search input:focus {
  outline: none;
  background: rgba(255,255,255,0.15);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.topbar-icon {
  position: relative;
  color: var(--b2b-text-light);
  font-size: 24px;
  cursor: pointer;
}

.topbar-icon .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  font-size: 0.65rem;
  padding: 2px 5px;
  background: var(--b2b-accent);
  border-radius: 10px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--b2b-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

.user-name {
  color: var(--b2b-text-light);
  font-size: 0.9rem;
}

/* ===== Main Content ===== */
.b2b-content {
  margin-left: var(--b2b-sidebar-width);
  margin-top: var(--b2b-topbar-height);
  padding: 20px;
  min-height: calc(100vh - var(--b2b-topbar-height));
  background: var(--b2b-content-bg);
}

/* ===== Cards ===== */
.b2b-card {
  background: var(--b2b-card-bg);
  border-radius: 8px;
  border: 1px solid var(--b2b-border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  margin-bottom: 20px;
}

.b2b-card-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--b2b-border);
  font-weight: 600;
}

.b2b-card-body {
  padding: 20px;
}

/* ===== Buttons ===== */
.btn-b2b-primary {
  background: var(--b2b-accent);
  border-color: var(--b2b-accent);
  color: #fff;
}

.btn-b2b-primary:hover {
  background: var(--b2b-accent-hover);
  border-color: var(--b2b-accent-hover);
  color: #fff;
}

/* ===== Tables ===== */
.b2b-table {
  width: 100%;
  background: var(--b2b-card-bg);
  border-radius: 8px;
  overflow: hidden;
}

.b2b-table thead {
  background: var(--b2b-sidebar-bg);
  color: var(--b2b-text-light);
}

.b2b-table th {
  padding: 12px 15px;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.b2b-table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--b2b-border);
  vertical-align: middle;
}

.b2b-table tbody tr:hover {
  background: #f8f9fa;
}

/* ===== Stats Cards ===== */
.stat-card {
  background: var(--b2b-card-bg);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid var(--b2b-border);
  text-align: center;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--b2b-accent);
}

.stat-card .stat-label {
  color: var(--b2b-text-muted);
  font-size: 0.85rem;
  margin-top: 5px;
}

/* ===== Badge Colors ===== */
.badge-b2b-warning {
  background: #f39c12;
  color: #fff;
}

.badge-b2b-danger {
  background: #e74c3c;
  color: #fff;
}

.badge-b2b-success {
  background: #27ae60;
  color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .b2b-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .b2b-sidebar.open {
    transform: translateX(0);
  }
  
  .b2b-topbar,
  .b2b-content {
    margin-left: 0;
  }
}

/* ===== Quick Page Styles ===== */
.page-content h1 {
  margin-bottom: 20px;
  font-size: 1.5rem;
  font-weight: 600;
}

.page-content .card {
  border-radius: 8px;
  border: 1px solid var(--b2b-border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.page-content .table thead {
  background: #2c3e50;
  color: #fff;
}

.page-content .table th {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  padding: 12px;
}

.page-content .table td {
  vertical-align: middle;
  padding: 10px 12px;
}

.page-content .btn-primary {
  background: var(--b2b-accent);
  border-color: var(--b2b-accent);
}

.page-content .btn-primary:hover {
  background: var(--b2b-accent-hover);
  border-color: var(--b2b-accent-hover);
}

.page-content .btn-success {
  background: #27ae60;
  border-color: #27ae60;
}

/* ===== B2B Stat Cards ===== */
.b2b-stat-card {
  background: var(--b2b-card-bg);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--b2b-border);
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  height: 100%;
}

.b2b-stat-card .stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.b2b-stat-card .stat-icon i {
  font-size: 24px;
}

.b2b-stat-card .stat-icon.bg-primary { background: linear-gradient(135deg, #3498db, #2980b9); }
.b2b-stat-card .stat-icon.bg-success { background: linear-gradient(135deg, #27ae60, #1e8449); }
.b2b-stat-card .stat-icon.bg-warning { background: linear-gradient(135deg, #f39c12, #d68910); }
.b2b-stat-card .stat-icon.bg-danger { background: linear-gradient(135deg, #e74c3c, #c0392b); }

.b2b-stat-card .stat-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  color: #2c3e50;
}

.b2b-stat-card .stat-content p {
  margin: 0;
  color: var(--b2b-text-muted);
  font-size: 0.85rem;
}

/* ===== B2B Card Headers ===== */
.b2b-card .card-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--b2b-border);
  background: transparent;
}

.b2b-card .card-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2c3e50;
}

.b2b-card .card-header h3 i {
  font-size: 20px;
  color: var(--b2b-accent);
}

.b2b-card .card-body {
  padding: 20px;
}

/* ===== Quick Action Buttons ===== */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  background: #f8f9fa;
  border-radius: 8px;
  color: #2c3e50;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.quick-action-btn:hover {
  background: var(--b2b-accent);
  color: #fff;
  text-decoration: none;
  border-color: var(--b2b-accent);
}

.quick-action-btn:hover i {
  transform: translateX(3px);
}

.quick-action-btn i {
  transition: transform 0.2s ease;
  font-size: 18px;
}

/* ===== Page Title ===== */
.b2b-page-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 20px;
}

/* ===== Hide Classic Theme Elements in B2B ===== */
.b2b-content #header,
.b2b-content #footer,
.b2b-content .breadcrumb,
.b2b-content #left-column,
.b2b-content #right-column {
  display: none !important;
}

/* ===== Sidebar Logo ===== */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--b2b-text-light);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
}

.sidebar-logo:hover {
  color: var(--b2b-accent);
  text-decoration: none;
}

.sidebar-logo i {
  font-size: 28px;
  color: var(--b2b-accent);
}

/* ===== Topbar Icon as Link ===== */
a.topbar-icon {
  text-decoration: none;
}

a.topbar-icon:hover {
  color: var(--b2b-accent);
}

/* ===== Cart Page Styles ===== */
.cart-product-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--b2b-border);
}

.cart-product-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-product-info .product-name {
  font-weight: 600;
  color: #2c3e50;
  text-decoration: none;
}

.cart-product-info .product-name:hover {
  color: var(--b2b-accent);
}

.cart-product-info .product-reference {
  font-size: 0.8rem;
  color: var(--b2b-text-muted);
}

.quantity-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--b2b-border);
  border-radius: 8px;
  overflow: hidden;
}

.quantity-selector .qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #f8f9fa;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.quantity-selector .qty-btn:hover {
  background: var(--b2b-accent);
  color: #fff;
}

.quantity-selector .qty-btn i {
  font-size: 18px;
}

.quantity-selector .qty-input {
  width: 50px;
  height: 32px;
  border: none;
  border-left: 1px solid var(--b2b-border);
  border-right: 1px solid var(--b2b-border);
  text-align: center;
  font-weight: 600;
  -moz-appearance: textfield;
}

.quantity-selector .qty-input::-webkit-outer-spin-button,
.quantity-selector .qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btn-remove {
  border: none;
  background: none;
  color: #e74c3c;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-remove:hover {
  background: #fde8e8;
}

.cart-summary .card-body {
  padding: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--b2b-border);
}

.summary-row.total {
  border-bottom: none;
  padding-top: 15px;
  font-size: 1.1rem;
  font-weight: 700;
}

.summary-row .total-price {
  color: var(--b2b-accent);
  font-size: 1.3rem;
}

.cart-actions {
  margin-top: 15px;
}

/* ===== Orders Page Styles ===== */
.order-reference {
  color: var(--b2b-accent);
}

.order-total {
  color: #27ae60;
}

.order-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f8f9fa;
  color: #2c3e50;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--b2b-accent);
  color: #fff;
}

.btn-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #3498db;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.btn-detail:hover {
  background: #2980b9;
  transform: scale(1.05);
}

.btn-detail .material-icons {
  font-size: 18px;
}

/* ===== Login Page Styles ===== */
.b2b-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
  padding: 20px;
}

.b2b-login-container {
  display: flex;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  overflow: hidden;
  max-width: 900px;
  width: 100%;
}

.b2b-login-form-section {
  flex: 1;
  padding: 50px;
}

.b2b-login-brand-section {
  flex: 1;
  background: #f8f9fa;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.b2b-login-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 8px;
}

.b2b-login-subtitle {
  color: var(--b2b-text-muted);
  margin-bottom: 30px;
}

.b2b-form-group {
  margin-bottom: 20px;
}

.b2b-form-label {
  display: block;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
}

.b2b-form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #dfe6e9;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.2s;
}

.b2b-form-input:focus {
  outline: none;
  border-color: var(--b2b-accent);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

.b2b-form-input::placeholder {
  color: #b2bec3;
}

.b2b-btn-login {
  width: 100%;
  padding: 14px;
  background: var(--b2b-accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.b2b-btn-login:hover {
  background: var(--b2b-accent-hover);
}

.b2b-login-footer {
  text-align: center;
  margin-top: 20px;
  color: var(--b2b-text-muted);
}

.b2b-login-footer a {
  color: var(--b2b-accent);
  text-decoration: none;
  font-weight: 600;
}

.b2b-login-footer a:hover {
  text-decoration: underline;
}

.b2b-login-help {
  margin-top: 25px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  font-size: 0.85rem;
  color: #636e72;
}

.b2b-login-help a {
  color: var(--b2b-accent);
}

.b2b-brand-logo {
  margin-bottom: 30px;
}

.b2b-brand-logo img {
  max-width: 200px;
}

.b2b-brand-features {
  list-style: none;
  padding: 0;
  margin: 0 0 30px;
}

.b2b-brand-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  color: #2c3e50;
}

.b2b-brand-features li i {
  color: #27ae60;
  font-size: 20px;
}

.b2b-brand-partners h4 {
  font-size: 0.8rem;
  color: var(--b2b-text-muted);
  margin-bottom: 15px;
}

.b2b-partner-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.b2b-partner-tag {
  display: inline-block;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid #dfe6e9;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #2c3e50;
}

/* ===== Page Header with Badge ===== */
.b2b-page-header {
  margin-bottom: 20px;
}

.b2b-page-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
}

.b2b-page-title i {
  font-size: 28px;
  color: var(--b2b-accent);
}

.b2b-page-title .badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.badge.bg-primary {
  background: var(--b2b-accent) !important;
}

.badge.bg-secondary {
  background: #6c757d !important;
}

/* ===== Row Layout ===== */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}

.col-lg-4 {
  flex: 0 0 33.333%;
  max-width: 33.333%;
  padding: 0 10px;
}

.col-lg-8 {
  flex: 0 0 66.666%;
  max-width: 66.666%;
  padding: 0 10px;
}

@media (max-width: 992px) {
  .col-lg-4, .col-lg-8 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .b2b-login-container {
    flex-direction: column;
  }
  
  .b2b-login-brand-section {
    display: none;
  }
}

/* ===== Responsive Sidebar ===== */
@media (max-width: 768px) {
  .b2b-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .b2b-sidebar.open {
    transform: translateX(0);
  }
  
  .b2b-topbar {
    left: 0;
  }
  
  .b2b-content {
    margin-left: 0;
  }
}

/* ===== Alert Styles ===== */
.b2b-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: 500;
}

.b2b-alert i {
  font-size: 22px;
}

.b2b-alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.b2b-alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.b2b-alert-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.b2b-alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* ===== Form Styles ===== */
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 0;
}

.form-col {
  flex: 1;
}

.form-actions {
  margin-top: 20px;
}

.b2b-form-group {
  margin-bottom: 20px;
}

/* ===== Page Header with Actions ===== */
.b2b-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.page-header-left {
  flex: 1;
}

.page-header-right {
  display: flex;
  gap: 10px;
}

/* ===== Address Cards Grid ===== */
.addresses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.address-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--b2b-border);
  overflow: hidden;
  transition: all 0.2s;
}

.address-card:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.address-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid var(--b2b-border);
}

.address-alias {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
}

.address-actions {
  display: flex;
  gap: 8px;
}

.btn-icon-danger {
  color: #e74c3c;
}

.btn-icon-danger:hover {
  background: #fde8e8;
  color: #c0392b;
}

.address-body {
  padding: 20px;
}

.address-body p {
  margin: 0 0 5px;
  color: #636e72;
}

.address-name {
  color: #2c3e50 !important;
}

.address-company {
  font-style: italic;
}

.address-phone {
  margin-top: 10px !important;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--b2b-accent) !important;
}

.address-phone i {
  font-size: 18px;
}

/* ===== Info Items ===== */
.info-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--b2b-border);
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--b2b-text-muted);
}

.info-value {
  font-weight: 600;
  color: #2c3e50;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-active {
  background: #d4edda;
  color: #155724;
}

.status-inactive {
  background: #f8d7da;
  color: #721c24;
}

/* ===== Support Links ===== */
.card-body a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--b2b-accent);
  text-decoration: none;
  margin-bottom: 8px;
}

.card-body a:hover {
  text-decoration: underline;
}

.card-body a i {
  font-size: 18px;
}

.text-muted {
  color: var(--b2b-text-muted) !important;
}


/* ===== PS Content Pages (product, category, etc.) within B2B portal ===== */

/* Inner wrapper for PS pages */
.b2b-ps-inner {
  background: var(--b2b-card-bg);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* Product page layout */
.b2b-ps-content .product-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.b2b-ps-content .product-container .col-md-6 {
  flex: 1 1 45%;
  min-width: 280px;
}

/* Product images */
.b2b-ps-content .product-cover {
  border-radius: 8px;
  overflow: hidden;
}

/* Product title */
.b2b-ps-content h1.h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 15px;
}

/* Price block */
.b2b-ps-content .product-prices {
  margin-bottom: 20px;
}

.b2b-ps-content .current-price .price {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--b2b-accent);
}

/* Add to cart button */
.b2b-ps-content .btn-add-to-cart,
.b2b-ps-content .add-to-cart {
  background: var(--b2b-accent);
  border-color: var(--b2b-accent);
  font-size: 1rem;
  padding: 12px 24px;
  border-radius: 6px;
  color: #fff;
  font-weight: 600;
}

.b2b-ps-content .btn-add-to-cart:hover,
.b2b-ps-content .add-to-cart:hover {
  background: var(--b2b-accent-hover);
  border-color: var(--b2b-accent-hover);
}

/* Product tabs */
.b2b-ps-content .product-tabs {
  margin-top: 30px;
}

.b2b-ps-content .nav-tabs .nav-link {
  color: #555;
  font-weight: 500;
}

.b2b-ps-content .nav-tabs .nav-link.active {
  color: var(--b2b-accent);
  border-bottom-color: var(--b2b-accent);
  font-weight: 600;
}

/* Breadcrumb in PS pages */
.b2b-ps-content .breadcrumb {
  display: flex !important;
  background: transparent;
  padding: 0 0 15px 0;
  margin-bottom: 10px;
}

/* Category listing */
.b2b-ps-content #js-product-list .products {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.b2b-ps-content .product-miniature {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  transition: box-shadow 0.2s;
}

.b2b-ps-content .product-miniature:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  border-color: var(--b2b-accent);
}

/* Qty input */
.b2b-ps-content .qty .input-group {
  width: 120px;
}

/* PS page breadcrumb fix - override the global hide for PS pages */
.b2b-ps-content ~ * .breadcrumb,
.b2b-ps-content .breadcrumb-wrapper {
  display: block !important;
}

@media (max-width: 992px) {
  .b2b-ps-inner {
    padding: 15px;
  }
  .b2b-ps-content .product-container .col-md-6 {
    flex: 1 1 100%;
  }
}

/* ================================================================
   B2B Product Detail Page
   ================================================================ */

.b2b-product-page {
  max-width: 1200px;
}

/* Breadcrumb */
.b2b-product-breadcrumb {
  display: none !important;
  margin-bottom: 16px;
}
.b2b-product-breadcrumb ol,
.b2b-product-breadcrumb .breadcrumb {
  display: flex !important;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 6px;
  align-items: center;
  font-size: 0.85rem;
  color: #888;
  background: transparent;
}
.b2b-product-breadcrumb li + li::before { content: "/"; margin-right: 6px; color: #ccc; }
.b2b-product-breadcrumb a { color: var(--b2b-accent); text-decoration: none; }

/* ── Main card ── */
.b2b-product-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
  padding: 28px;
  margin-bottom: 20px;
}

/* ── Two-column layout ── */
.b2b-product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 900px) {
  .b2b-product-layout { grid-template-columns: 1fr; }
}

/* ── Images column ── */
.b2b-product-images .product-cover img {
  width: 100%;
  border-radius: 8px;
  object-fit: contain;
  background: #f8f9fa;
  max-height: 400px;
}
.b2b-product-images .product-cover {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #f8f9fa;
  cursor: zoom-in;
}
.b2b-product-images .product-images-selection {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.b2b-product-images .thumb-container img,
.b2b-product-images .js-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid #eee;
  cursor: pointer;
  transition: border-color 0.2s;
}
.b2b-product-images .thumb-container img:hover,
.b2b-product-images .js-thumb.selected {
  border-color: var(--b2b-accent);
}
/* Flags */
.b2b-product-images .product-flags {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.b2b-product-images .product-flag {
  background: var(--b2b-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  text-transform: uppercase;
}
.b2b-product-images .product-flag.on-sale { background: #e74c3c; }
.b2b-product-images .product-flag.new     { background: #27ae60; }
.b2b-product-images { position: relative; }

/* ── Info column ── */
.b2b-product-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #1e2a3a;
  margin-bottom: 12px;
  line-height: 1.3;
}

.b2b-product-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.b2b-product-ref {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f0f2f5;
  color: #555;
  font-size: 0.82rem;
  font-family: monospace;
  padding: 4px 10px;
  border-radius: 4px;
}
.b2b-product-ref .material-icons { font-size: 14px; }
.b2b-product-availability {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
}
.b2b-product-availability .material-icons { font-size: 15px; }
.b2b-product-availability.available   { background: #e8f5e9; color: #2e7d32; }
.b2b-product-availability.unavailable { background: #fce4ec; color: #c62828; }

/* Price block */
.b2b-product-price-block {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 16px;
  background: #fafafa;
  border-radius: 8px;
  border-left: 4px solid var(--b2b-accent);
}
.b2b-price-main {
  font-size: 2rem;
  font-weight: 800;
  color: var(--b2b-accent);
}
.b2b-price-original {
  font-size: 1rem;
  color: #aaa;
  text-decoration: line-through;
}
.b2b-discount-badge {
  background: #e74c3c;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}
.b2b-price-tax {
  color: #999;
  font-size: 0.78rem;
  width: 100%;
  margin-top: -6px;
}

/* Short description */
.b2b-product-short-desc {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.65;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f0f0f0;
  text-align: center;
}

/* Form */
.b2b-product-form { margin-top: 4px; }

/* Qty + button row */
.b2b-product-actions {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.b2b-qty-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.b2b-qty-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}
.b2b-qty-btn {
  width: 38px;
  height: 44px;
  border: none;
  background: #f5f5f5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.b2b-qty-btn:hover { background: #e9e9e9; }
.b2b-qty-btn .material-icons { font-size: 18px; color: #444; }
.b2b-qty-input {
  width: 62px;
  height: 44px;
  border: none;
  border-left: 1px solid #eee;
  border-right: 1px solid #eee;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: #222;
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
}
.b2b-qty-input::-webkit-outer-spin-button,
.b2b-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.b2b-qty-btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}
.b2b-min-qty { display: block; font-size: 0.75rem; color: #999; margin-top: 4px; }

.b2b-add-cart-btn {
  height: 44px;
  padding: 0 26px;
  background: var(--b2b-accent);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, transform 0.1s;
  flex: 1;
  justify-content: center;
  min-width: 160px;
}
.b2b-add-cart-btn:hover  { background: var(--b2b-accent-hover); transform: translateY(-1px); }
.b2b-add-cart-btn:active { transform: translateY(0); }
.b2b-add-cart-btn.disabled,
.b2b-add-cart-btn:disabled { background: #ccc; cursor: not-allowed; transform: none; }
.b2b-add-cart-btn .material-icons { font-size: 20px; }

/* Variants (colours, size) */
.b2b-product-form .product-variants { margin-bottom: 16px; }
.b2b-product-form .product-variants-item { margin-bottom: 10px; }
.b2b-product-form .product-variants-item label { font-weight: 600; font-size: 0.85rem; }

/* ── Description / Specs tabs card ── */
.b2b-product-tabs-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
  overflow: hidden;
}

.b2b-tabs-nav {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  border-bottom: 2px solid #f0f0f0;
  background: #fafafa;
}
.b2b-tab-btn {
  background: none;
  border: none;
  padding: 14px 24px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s;
}
.b2b-tab-btn .material-icons { font-size: 17px; }
.b2b-tab-btn:hover  { color: var(--b2b-accent); }
.b2b-tab-btn.active { color: var(--b2b-accent); border-bottom-color: var(--b2b-accent); }

.b2b-tab-panel { display: none; padding: 28px; }
.b2b-tab-panel.active { display: block; }

/* Description content */
.b2b-product-description {
  font-size: 0.92rem;
  color: #444;
  line-height: 1.75;
}
.b2b-product-description p { margin-bottom: 12px; }
.b2b-product-description img { max-width: 100%; border-radius: 6px; }

/* Specs table */
.b2b-spec-list { display: grid; gap: 0; }
.b2b-spec-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  border-bottom: 1px solid #f5f5f5;
  padding: 10px 0;
}
.b2b-spec-row:last-child { border-bottom: none; }
.b2b-spec-row dt { font-weight: 600; color: #555; font-size: 0.87rem; }
.b2b-spec-row dd { color: #333; font-size: 0.87rem; margin: 0; }
@media (max-width: 600px) {
  .b2b-spec-row { grid-template-columns: 1fr; gap: 2px; }
}

/* Attachments */
.b2b-attachment-list { list-style: none; padding: 0; margin: 0; }
.b2b-attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--b2b-accent);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 0;
}
.b2b-attachment-link:hover { text-decoration: underline; }


/* ── Product thumbnails horizontal row ── */
.b2b-product-images ul.product-images {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 10px 0 0 0;
  margin: 0;
}
.b2b-product-images li.thumb-container {
  flex: 0 0 auto;
  list-style: none;
}
.b2b-product-images .thumb.js-thumb {
  display: block;
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 7px;
  border: 2px solid #e0e0e0;
  cursor: pointer;
  transition: border-color 0.18s;
  background: #f8f9fa;
}
.b2b-product-images .thumb.js-thumb:hover,
.b2b-product-images .thumb.js-thumb.selected { border-color: var(--b2b-accent); }

/* Scroll arrows - hide, thumbnails are in row now */
.b2b-product-images .scroll-box-arrows { display: none; }


/* ── Product image zoom modal - hidden by default ── */
.b2b-product-page .js-product-images-modal,
.b2b-product-page #product-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
}
.b2b-product-page #product-modal.in,
.b2b-product-page #product-modal.show { display: flex; }


/* B2B Footer */
.b2b-footer {
  padding: 0;
  text-align: center;
}
