/* ==========================================================================
   YAKIN GRUP MARKETPLACE — B2B & B2C STYLES
   ========================================================================== */

:root {
  /* Brand Core */
  --primary: #3d6e30;
  --primary-hover: #4d8b3d;
  --primary-dark: #1f3e17;
  --primary-light: rgba(61, 110, 48, 0.08);
  --primary-border: rgba(61, 110, 48, 0.22);
  
  --gold: #d4af37;
  --gold-hover: #b89628;
  --gold-light: rgba(212, 175, 55, 0.12);

  --accent-blue: #0284c7;
  --accent-blue-light: rgba(2, 132, 199, 0.08);

  /* Mode Specific Tokens */
  --mode-accent: var(--primary);
  --mode-badge-bg: var(--primary-light);
  --mode-badge-color: var(--primary);
  
  /* Surfaces & Neutrals */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-overlay: rgba(15, 23, 42, 0.65);

  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --border-light: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-active: #cbd5e1;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  --font-brand: 'Cinzel', Georgia, serif;
  --font-heading: 'Manrope', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* B2B / B2C Theme Classes */
body.mode-b2b {
  --mode-accent: #3d6e30;
  --mode-badge-bg: rgba(61, 110, 48, 0.1);
  --mode-badge-color: #2e5924;
}

body.mode-b2c {
  --mode-accent: #0284c7;
  --mode-badge-bg: rgba(2, 132, 199, 0.1);
  --mode-badge-color: #0369a1;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

.container {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   TOP ANNOUNCEMENT & SYSTEM BAR
   ========================================================================== */
.market-topbar {
  background: #0f172a;
  color: #94a3b8;
  font-size: 0.8rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.market-topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar-tag {
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar-link {
  color: #cbd5e1;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.topbar-link:hover {
  color: #ffffff;
}

/* ==========================================================================
   MAIN HEADER & NAVIGATION
   ========================================================================== */
.market-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.04);
}

.market-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  gap: 1.5rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.brand-logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-text {
  font-family: var(--font-brand);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #0f172a;
}

.brand-text span {
  color: var(--primary);
  font-weight: 800;
}

.brand-badge {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  color: #475569;
  border: 1px solid var(--border-light);
  letter-spacing: 0.5px;
}

/* Mode Switcher Toggle Pill */
.mode-switcher {
  display: flex;
  align-items: center;
  background: #e2e8f0;
  padding: 3px;
  border-radius: var(--radius-full);
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mode-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.mode-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

body.mode-b2b .mode-btn[data-mode="b2b"].active {
  color: var(--primary);
}

body.mode-b2c .mode-btn[data-mode="b2c"].active {
  color: #0284c7;
}

/* Search & Filter Bar */
.search-container {
  flex: 1;
  max-width: 440px;
  position: relative;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.4rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  font-size: 0.88rem;
  transition: var(--transition);
  outline: none;
}

.search-input:focus {
  background: #ffffff;
  border-color: var(--mode-accent);
  box-shadow: 0 0 0 3px rgba(61, 110, 48, 0.12);
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

/* Header Action Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ctrl-btn {
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ctrl-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border-active);
}

.currency-select, .lang-select {
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-main);
  cursor: pointer;
  outline: none;
}

/* Cart / RFQ Trigger Button */
.cart-trigger-btn {
  background: #0f172a;
  color: #ffffff;
  border: none;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  position: relative;
}

.cart-trigger-btn:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

body.mode-b2b .cart-trigger-btn {
  background: var(--primary-dark);
}
body.mode-b2b .cart-trigger-btn:hover {
  background: var(--primary);
}

.cart-count-badge {
  background: var(--gold);
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   HERO / BANNER SECTION
   ========================================================================== */
.market-hero {
  padding: 2rem 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border-light);
}

.hero-banner-card {
  background: radial-gradient(circle at top right, #1e3a17, #0f172a);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 2.75rem 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: center;
}

body.mode-b2c .hero-banner-card {
  background: radial-gradient(circle at top right, #0369a1, #0f172a);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-badge-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--gold);
  color: #0f172a;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
  background: #e5be3e;
  transform: translateY(-2px);
}

.btn-secondary-white {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary-white:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  position: relative;
  z-index: 2;
}

.hero-stat-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-stat-number {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gold);
}

.hero-stat-label {
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ==========================================================================
   CATEGORY PILLS & QUICK FILTERS
   ========================================================================== */
.categories-nav-section {
  padding: 1.25rem 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
}

.categories-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
}

.cat-pill-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cat-pill-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.cat-pill-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

body.mode-b2b .cat-pill-btn.active {
  background: var(--primary);
  border-color: var(--primary);
}

body.mode-b2c .cat-pill-btn.active {
  background: #0284c7;
  border-color: #0284c7;
}

/* ==========================================================================
   MAIN CATALOG & LAYOUT
   ========================================================================== */
.catalog-section {
  padding: 2.5rem 0;
  flex: 1;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 2rem;
  align-items: start;
}

/* Sidebar Filters */
.sidebar-filters {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.filter-header h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
}

.filter-reset-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  font-weight: 600;
}

.filter-reset-btn:hover {
  color: var(--primary);
}

.filter-group {
  margin-bottom: 1.5rem;
}

.filter-group-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-option-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.filter-option-label input[type="checkbox"],
.filter-option-label input[type="radio"] {
  accent-color: var(--mode-accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.filter-option-label span.count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Sidebar Callout */
.sidebar-rfq-banner {
  background: linear-gradient(145deg, #1f3e17, #0f172a);
  color: #ffffff;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  margin-top: 1.5rem;
  font-size: 0.85rem;
}

.sidebar-rfq-banner h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--gold);
}

.sidebar-rfq-banner p {
  color: #cbd5e1;
  font-size: 0.78rem;
  margin-bottom: 0.9rem;
  line-height: 1.45;
}

.btn-sidebar-action {
  width: 100%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-sidebar-action:hover {
  background: #ffffff;
  color: #0f172a;
}

/* Products Grid Header / Sorter */
.products-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.results-count {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.results-count strong {
  color: var(--text-main);
  font-weight: 700;
}

.sort-wrapper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.sort-select {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  font-size: 0.84rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}

/* Product Card */
.product-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(61, 110, 48, 0.35);
}

body.mode-b2c .product-card:hover {
  border-color: rgba(2, 132, 199, 0.35);
}

/* Card Image Area */
.card-img-wrapper {
  position: relative;
  height: 200px;
  background: #f1f5f9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .card-img {
  transform: scale(1.04);
}

.card-tags-top {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.tag-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.tag-b2b {
  background: rgba(31, 62, 23, 0.9);
  color: #ffffff;
}

.tag-b2c {
  background: rgba(2, 132, 199, 0.9);
  color: #ffffff;
}

.tag-stock {
  background: rgba(22, 101, 52, 0.9);
  color: #dcfce7;
}

.tag-leadtime {
  background: rgba(180, 83, 9, 0.9);
  color: #fef3c7;
}

.quick-view-btn {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  border: none;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.product-card:hover .quick-view-btn {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Card Body */
.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.card-brand {
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
}

body.mode-b2c .card-brand {
  color: var(--accent-blue);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.6rem;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7rem;
}

.card-specs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-bottom: 1rem;
}

.spec-chip {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 0.74rem;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}

/* Pricing in B2B vs B2C */
.card-price-block {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--border-light);
}

.b2b-tier-preview {
  margin-bottom: 0.5rem;
  font-size: 0.74rem;
  background: var(--primary-light);
  padding: 5px 8px;
  border-radius: 4px;
  color: var(--primary-dark);
  display: flex;
  justify-content: space-between;
}

.price-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.price-amount {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
}

.price-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.b2c-install-option {
  font-size: 0.76rem;
  color: #0369a1;
  font-weight: 600;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Card Actions */
.card-actions-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.btn-card-action {
  background: #0f172a;
  color: #ffffff;
  border: none;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-card-action:hover {
  background: #1e293b;
}

body.mode-b2b .btn-card-action {
  background: var(--primary);
}
body.mode-b2b .btn-card-action:hover {
  background: var(--primary-dark);
}

body.mode-b2c .btn-card-action {
  background: #0284c7;
}
body.mode-b2c .btn-card-action:hover {
  background: #0369a1;
}

.btn-icon-detail {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 0.65rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.88rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-detail:hover {
  background: #e2e8f0;
}

/* ==========================================================================
   INTERACTIVE TOOLS: SOLAR & ENERGY SIMULATOR
   ========================================================================== */
.tools-section {
  padding: 3.5rem 0;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-header-centered {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

.section-badge-pill {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-title-large {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: #0f172a;
}

.section-desc-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.calc-widget-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.calc-inputs-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.calc-field-group label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.calc-field-group select,
.calc-field-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #ffffff;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.calc-field-group select:focus,
.calc-field-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.range-slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.range-slider-wrapper input[type="range"] {
  accent-color: var(--primary);
  height: 6px;
  cursor: pointer;
}

.range-val-badge {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}

/* Calc Results Panel */
.calc-results-panel {
  background: linear-gradient(160deg, #0f172a, #1f3e17);
  color: #ffffff;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.calc-res-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.calc-res-label {
  font-size: 0.85rem;
  color: #cbd5e1;
}

.calc-res-val {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gold);
}

.calc-recommended-package {
  background: rgba(255, 255, 255, 0.08);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.calc-package-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.calc-package-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   B2B BULK RFQ & BOM UPLOADER SECTION
   ========================================================================== */
.b2b-rfq-section {
  padding: 3.5rem 0;
  background: #f1f5f9;
}

.rfq-box-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.rfq-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.rfq-card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.rfq-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.rfq-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   SLIDE-OVER CART & RFQ DRAWER
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 480px;
  height: 100%;
  background: #ffffff;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.cart-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

.drawer-header h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.drawer-close-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.drawer-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.drawer-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.drawer-empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.cart-item-row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.cart-item-thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.cart-item-info h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text-main);
}

.cart-item-price {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--primary);
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.qty-btn {
  background: transparent;
  border: none;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-val {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0 4px;
}

.item-delete-btn {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
}

.drawer-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-light);
  background: #f8fafc;
}

.drawer-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.drawer-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-light);
  margin-bottom: 1.25rem;
}

.btn-drawer-checkout {
  width: 100%;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-drawer-checkout:hover {
  background: #1e293b;
}

body.mode-b2b .btn-drawer-checkout {
  background: var(--primary);
}
body.mode-b2b .btn-drawer-checkout:hover {
  background: var(--primary-dark);
}

body.mode-b2c .btn-drawer-checkout {
  background: #0284c7;
}
body.mode-b2c .btn-drawer-checkout:hover {
  background: #0369a1;
}

/* ==========================================================================
   MODALS (PRODUCT DETAILS, RFQ SUBMIT, SUPPLIER APPLICATION)
   ========================================================================== */
.market-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: var(--bg-overlay);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.market-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header-bar {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 10;
}

.modal-header-bar h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
}

.modal-inner-body {
  padding: 1.75rem;
}

/* Modal Form Styles */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.market-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3.5rem 0 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand h4 {
  font-family: var(--font-brand);
  font-size: 1.2rem;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.86rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h5 {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  font-size: 0.84rem;
  color: #94a3b8;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-bottom-bar {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1024px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-filters {
    position: static;
  }

  .hero-banner-card {
    grid-template-columns: 1fr;
    padding: 2rem;
  }

  .calc-widget-card {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .market-header .container {
    flex-wrap: wrap;
  }

  .search-container {
    order: 3;
    max-width: 100%;
    width: 100%;
  }

  .hero-title {
    font-size: 1.65rem;
  }

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

  .rfq-box-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
