/* B2B QuotePro - main.css (supplemental) */

/* ── Loading overlay ───────────────────────────────── */
#b2bqtp-loading {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 10;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(2px);
  border-radius: var(--radius-lg);
}
#b2bqtp-loading .spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Filter sidebar mobile ─────────────────────────── */
@media (max-width: 900px) {
  #b2bqtp-filter-sidebar {
    position: fixed;
    top: 0; left: -320px;
    width: 300px; height: 100vh;
    overflow-y: auto;
    z-index: 1100;
    background: var(--color-surface);
    box-shadow: var(--shadow-xl);
    transition: left .3s ease;
    padding: 1.5rem;
  }
  #b2bqtp-filter-sidebar.is-open { left: 0; }
  body.filter-sidebar-open::before {
    content: '';
    position: fixed; inset: 0; z-index: 1099;
    background: rgba(0,0,0,.45);
  }
}

/* ── AI chat messages ──────────────────────────────── */
.chat-msg {
  display: flex;
  gap: .6rem;
  margin-bottom: .875rem;
  align-items: flex-end;
}
.chat-msg--user {
  flex-direction: row-reverse;
}
.chat-msg__avatar {
  width: 28px; height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.chat-msg__avatar svg { width: 16px; height: 16px; }
.chat-msg__bubble {
  max-width: 80%;
  padding: .55rem .85rem;
  border-radius: 1rem;
  font-size: .875rem;
  line-height: 1.5;
}
.chat-msg--ai .chat-msg__bubble {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-bottom-left-radius: .25rem;
}
.chat-msg--user .chat-msg__bubble {
  background: var(--color-primary);
  color: #fff;
  border-bottom-right-radius: .25rem;
}
/* typing dots */
.typing-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-text-muted);
  margin: 0 1.5px;
  animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* quick replies */
#b2bqtp-ai-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .5rem 1rem;
  border-top: 1px solid var(--color-border);
}
.quick-reply-btn {
  background: none;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: 2rem;
  padding: .3rem .8rem;
  font-size: .75rem;
  cursor: pointer;
  transition: all .2s;
}
.quick-reply-btn:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ── Product list view ─────────────────────────────── */
.products-grid.view-list {
  grid-template-columns: 1fr;
}
.products-grid.view-list .product-card {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 1.25rem;
  align-items: center;
}
.products-grid.view-list .product-card__image {
  aspect-ratio: 1;
}
@media (max-width: 600px) {
  .products-grid.view-list .product-card {
    grid-template-columns: 1fr;
  }
}

/* ── Single product page ───────────────────────────── */
.product-single {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 2rem 0;
}
.product-gallery__main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--color-surface);
}
.product-gallery__main img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.product-gallery__thumbs {
  display: flex; gap: .5rem; margin-top: .75rem;
}
.product-gallery__thumbs img {
  width: 70px; height: 70px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color .2s;
}
.product-gallery__thumbs img.active,
.product-gallery__thumbs img:hover {
  border-color: var(--color-primary);
}
.product-summary .product-title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  margin-bottom: .5rem;
}
.product-summary .product-sku {
  font-size: .85rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}
.product-summary .product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
}
.product-qty-row {
  display: flex; gap: .75rem; align-items: center;
  margin-bottom: 1.25rem;
}
.product-tabs { margin-top: 3rem; }
.product-tabs__nav {
  display: flex; gap: 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 1.5rem;
}
.product-tabs__nav button {
  background: none; border: none;
  padding: .75rem 1.5rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all .2s;
}
.product-tabs__nav button.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}
.product-tabs__panel { display: none; }
.product-tabs__panel.active { display: block; }
@media (max-width: 768px) {
  .product-single {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ── Account / My Quotes ───────────────────────────── */
.account-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  margin: 2rem 0;
}
.account-nav a {
  display: flex; align-items: center; gap: .5rem;
  padding: .7rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-weight: 500;
  transition: all .15s;
}
.account-nav a:hover,
.account-nav a.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.quote-status-badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 2rem;
  font-size: .75rem;
  font-weight: 600;
}
.quote-status-badge.pending  { background: #fef3c7; color: #92400e; }
.quote-status-badge.responded { background: #d1fae5; color: #065f46; }
.quote-status-badge.expired   { background: #fee2e2; color: #991b1b; }
@media (max-width: 768px) {
  .account-layout { grid-template-columns: 1fr; }
}

/* ── Responsive utilities ──────────────────────────── */
.hide-mobile  { display: block; }
.show-mobile  { display: none;  }
@media (max-width: 700px) {
  .hide-mobile { display: none; }
  .show-mobile { display: block; }
}
