:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-dim: #64748b;
  --border: #e2e8f0;
  --neon-cyan: #0284c7;
  --neon-blue: #2563eb;
  --neon-pink: #db2777;
  --neon-emerald: #059669;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
  --bg: #090d16;
  --surface: #111827;
  --text: #f8fafc;
  --text-dim: #94a3b8;
  --border: #1e293b;
  --neon-cyan: #00f0ff;
  --neon-blue: #3b82f6;
  --neon-pink: #ec4899;
  --neon-emerald: #10b981;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Space Grotesk', sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Header & Navbar */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
}

.brand-dip {
  font-family: 'Syne', sans-serif; 
  font-weight: 800;
  color: #FFB800; /* Deep Yellow */
}

.brand span:not(.brand-dip) {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--neon-cyan); 
}

/* Light Pink Role Pills */
.role-pills {
  display: flex;
  background: #fdf2f8;
  border: 1px solid #fbcfe8;
  padding: 4px;
  border-radius: 30px;
  gap: 4px;
}

.role-btn {
  background: transparent;
  border: none;
  color: #db2777;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.role-btn.active {
  background: #ec4899;
  color: #fff;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.btn:hover {
  border-color: var(--neon-cyan);
}

.btn-action {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-cyan));
  color: #fff;
  border: none;
}

.logo img {
    height: 90px;
    width: 90px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #ff8c00;
}

/* Layout Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
  flex: 1;
}

/* Hero Strip */
.hero-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
}

.view-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.view-subtitle {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* Desktop: unchanged, stays inline */
.title-suffix {
  display: inline;
}

/* Mobile: force it onto a new line right after DIPTRONIC */
@media (max-width: 768px) {
  .view-title#txtHeroTitle {
    display: flex;
    flex-direction: column;
  }

  .title-suffix {
    display: block;
    margin-top: 4px;
  }
}

/* Custom Vibrant Search Bar */
.custom-search-bar {
  display: flex;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 420px;
}

.custom-search-bar:focus-within {
  border-color: #00f0ff;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
}

.custom-search-bar input {
  border: none !important;
  background: transparent !important;
  padding: 0.8rem 1.2rem;
  font-size: 0.9rem;
  flex: 1;
  outline: none;
  color: #0f172a;
}

.search-btn-vibrant {
  background: #ccff00;
  border: none;
  padding: 0 1.4rem;
  font-size: 1.15rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.search-btn-vibrant:hover {
  background: #b5e600;
}

.search-btn-vibrant:active {
  transform: scale(0.95);
}

/* Vivid Cart Button */
.btn-cart-vibrant {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-cyan));
  color: #ffffff;
  border: none;
  padding: 0.65rem 1.4rem;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 132, 199, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-cart-vibrant:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 132, 199, 0.5);
}

.btn-cart-vibrant:active {
  transform: scale(0.97);
}

.create-account-prompt {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem; /* Creates clean spacing before the form fields */
}

/* Neon Green Rounded Capsule Login Button */
.btn-login-vibrant {
  background: linear-gradient(135deg, #10e300, #0db800);
  color: #ffffff;
  border: none;
  padding: 0.65rem 1.6rem;
  border-radius: 50px;
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(16, 227, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-login-vibrant:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 227, 0, 0.5);
}

.btn-login-vibrant:active {
  transform: scale(0.97);
}

/* Top Category Dropdown Navigation Bar */
.category-dropdown-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  gap: 1rem;
}

.cat-dropdown-item {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.cat-dropdown-item:hover {
  color: var(--neon-cyan);
}

/* Pink / Coral Category Section Banners */
.pink-category-banner {
  background: linear-gradient(90deg, #ff7e5f, #feb47b);
  color: #fff;
  padding: 0.9rem 1.5rem;
  font-size: 1.15rem;
  font-weight: 800;
  text-align: center;
  border-radius: 8px;
  margin: 2rem 0 1.2rem 0;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(255, 126, 95, 0.3);
  position: relative;
}

.pink-category-banner::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: #000;
  margin: 6px auto 0 auto;
  border-radius: 2px;
}

/* Filters & Tiers */
.filter-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem 1.5rem;
  border-radius: 12px;
}

.filter-label {
  font-weight: 700;
  font-size: 0.9rem;
}

.tier-selector-container {
  display: flex;
  gap: 0.6rem;
}

.tier-pill-modern {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.45rem 1rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.tier-pill-modern.active {
  background: var(--surface);
  border-color: var(--neon-cyan);
  color: var(--text);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

.tier-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
}

.tier-pill-modern.active .tier-dot {
  background: var(--neon-cyan);
  box-shadow: 0 0 6px var(--neon-cyan);
}

/* Grid Market */
.grid-market {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.market-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.market-card:hover {
  transform: translateY(-4px);
  border-color: var(--neon-cyan);
}

/* Clearer & Bolder Product Badges */
.item-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.badge-new { background: #d1fae5; color: #065f46; border: 2px solid #10b981; }
.badge-refurb { background: #dbeafe; color: #1e40af; border: 2px solid #3b82f6; }
.badge-verified { background: #fce7f3; color: #9d174d; border: 2px solid #ec4899; }

.item-img-box {
  width: 100%;
  height: 160px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.item-trend {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--neon-emerald);
  margin-bottom: 1.2rem;
}

.item-card-actions-stacked {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-full {
  width: 100%;
  text-align: center;
}

/* Trade-In Section Split */
.section-divider {
  text-align: center;
  margin: 3rem 0 1.5rem 0;
}

.section-divider h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

.section-divider p {
  color: var(--text-dim);
}

.grid-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media(max-width: 900px) {
  .grid-split { grid-template-columns: 1fr; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.panel-heading {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.field {
  margin-bottom: 1.2rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-dim);
}

.field input[type="text"], .field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
}

.upload-preview {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
}

.quote-box {
  background: var(--bg);
  border: 1px dashed var(--neon-cyan);
  border-radius: 12px;
  padding: 1.2rem;
  text-align: center;
  margin: 1.5rem 0;
}

.quote-caption {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.quote-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--neon-cyan);
  font-family: 'Syne', sans-serif;
}

.quote-subcaption {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

/* Stepper Tracker */
.panel-heading-sm {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.panel-subtext {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.stepper {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 2rem 0;
}

.stepper::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 15px;
  right: 15px;
  height: 2px;
  background: var(--border);
  z-index: 1;
}

.step-node {
  position: relative;
  z-index: 2;
  text-align: center;
}

.step-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  margin: 0 auto 0.5rem auto;
  transition: all 0.3s;
}

.step-node.active .step-circle {
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.step-node.completed .step-circle {
  background: var(--neon-emerald);
  border-color: var(--neon-emerald);
  color: #fff;
}

.step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
}

.status-notes-box {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.data-table th, .data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

/* Modals & Overlays */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.style-modal {
  background: #ffffff;
  color: #1e293b;
  border-radius: 12px;
  padding: 2.2rem 2rem 2rem 2rem;
  width: 100%;
  max-width: 650px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  border: none;
}

.neon-highlight-title {
  background-color: #dcfce7;
  color: #166534;
  font-size: 1.6rem;
  font-weight: 800;
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border-radius: 6px;
  box-shadow: inset 0 -4px 0 #22c55e;
  margin-bottom: 0.5rem;
}

.modal-close-btn-green {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #22c55e;
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close-btn-green:hover {
  background: #16a34a;
}

.btn-submit-green {
  width: 100%;
  background: #22c55e;
  color: #fff;
  border: none;
  padding: 0.85rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-submit-green:hover {
  background: #16a34a;
}

.text-center {
  text-align: center;
}

.legal-modal-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 1rem;
}

.legal-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  display: block;
  margin-bottom: 0.2rem;
}

.legal-list {
  padding-left: 1.2rem;
  color: #475569;
}

.legal-footer-note {
  font-size: 0.9rem;
  color: #475569;
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.modal-box-ref {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  position: relative;
  box-shadow: var(--shadow);
}

.modal-close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
}

/* Payment Option Custom Cards */
.payment-option-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  padding: 0.85rem 1.15rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-option-card:hover {
  border-color: #22c55e;
}

.payment-option-card input[type="radio"] {
  accent-color: #22c55e;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.payment-card-info {
  display: flex;
  flex-direction: column;
}

.payment-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.payment-card-desc {
  font-size: 0.78rem;
  color: #64748b;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  font-family: 'Syne', sans-serif;
}

.login-subtitle {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.login-tabs {
  display: flex;
  background: var(--bg);
  padding: 4px;
  border-radius: 10px;
  gap: 4px;
  margin-bottom: 1.2rem;
}

.login-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dim);
  border-radius: 8px;
  cursor: pointer;
}

.login-tab-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.field-group {
  margin-bottom: 1rem;
}

.field-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text-dim);
}

.field-group input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
}

.btn-workspace {
  width: 100%;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-cyan));
  color: #fff;
  border: none;
  padding: 0.85rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
}

.demo-accounts-box {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 1.2rem;
  text-align: center;
  line-height: 1.5;
}

.demo-accounts-box a {
  color: var(--neon-cyan);
  text-decoration: none;
}

/* Cart Drawer */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  display: flex;
  justify-content: flex-end;
}

.cart-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  background: var(--surface);
  width: 100%;
  max-width: 380px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0,0,0,0.2);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.cart-overlay.active .cart-drawer {
  transform: translateX(0);
}

.cart-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-close {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-weight: 700;
}

/* Footer */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  margin-top: auto;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.highlight-badge {
  background-color: #ff0033;
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 800;
  display: inline-block;
}

#footerCopyright, #footerMadeBy {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-links {
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

.footer-links a {
  color: var(--neon-blue);
  text-decoration: none;
  margin: 0 0.5rem;
}

.footer-links a:hover {
  text-decoration: underline;
}



/* --- RESPONSIVE MOBILE & TABLET ADAPTATIONS --- */

/* General Container Padding Adjustment for Small Screens */
@media (max-width: 1024px) {
  .container {
    padding: 1rem;
  }
  
  .header-inner {
    padding: 0.8rem 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .hero-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.5rem;
  }

  .custom-search-bar {
    max-width: 100%;
  }
}

/* Tablet & Mobile Breakpoint (Phones < 768px) */
@media (max-width: 768px) {
  /* Navbar and Brand adjustments */
  .header-inner {
    gap: 0.8rem;
  }

  .brand {
    font-size: 1.3rem;
  }

  /* Role pills stacking or scrolling smoothly */
  .role-pills {
    width: 100%;
    justify-content: center;
    overflow-x: auto;
    padding: 3px;
  }

  .role-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .nav-actions .btn, 
  .btn-cart-vibrant, 
  .btn-login-vibrant {
    flex: 1;
    justify-content: center;
    padding: 0.55rem 0.6rem;
    font-size: 0.78rem;
    text-align: center;
  }

  /* Hero section typography */
  .view-title {
    font-size: 1.5rem !important;
  }

  .view-subtitle {
    font-size: 0.88rem;
  }

  /* Category dropdown horizontal scrolling enhancement */
  .category-dropdown-bar {
    padding: 0.6rem 1rem;
    gap: 0.8rem;
    justify-content: flex-start;
  }

  .cat-dropdown-item {
    font-size: 0.82rem;
  }

  /* Filter row stack */
  .filter-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
  }

  .tier-selector-container {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .tier-pill-modern {
    white-space: nowrap;
    padding: 0.4rem 0.8rem;
    font-size: 0.78rem;
  }

  /* Product Grid: Force single or dual compact columns on mobile */
  .grid-market {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
  }

  /* Trade-In split grid to single column */
  .grid-split {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .panel {
    padding: 1.25rem;
  }

  /* Modals responsiveness */
  .style-modal,
  .modal-box-ref,
  .legal-modal-container {
    max-width: 92% !important;
    padding: 1.5rem 1.2rem !important;
    max-height: 90vh;
  }

  /* Cart drawer full width on mobile */
  .cart-drawer {
    max-width: 100% !important;
  }

  /* Tables horizontal scrolling wrapper for admin/company views */
  .data-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* Extra Small Phones (< 480px) */
@media (max-width: 480px) {
  .grid-market {
    grid-template-columns: 1fr;
  }

  .view-title {
    font-size: 1.35rem !important;
  }
}