/* ==========================================================================
   Moble Sib Official Store Theme (shop.moblesib.ir)
   Exact Colors: Primary Red rgb(222, 26, 34) | Gold #fbbc34 | Dark #242424
   Font: Vazirmatn | Native RTL
   Ultra-sleek Luxury Custom Scrollbars | Zero Emojis
   ========================================================================== */

:root {
  --font-base: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Woodmart Moble Sib Theme Colors */
  --sib-red: #de1a22;
  --sib-red-hover: #c0141b;
  --sib-red-light: #fff1f2;
  --sib-gold: #fbbc34;
  --sib-gold-hover: #e5a720;
  
  --bg-main: #f8f9fa;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #f3f4f6;
  
  --text-dark: #242424;
  --text-body: #4b5563;
  --text-muted: #8c95a6;
  
  --border-light: #e5e7eb;
  --border-focus: #de1a22;
  
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 14px rgba(0, 0, 0, 0.06);
  --shadow-popup: 0 12px 30px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-base);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-dark);
  direction: rtl;
  text-align: right;
  line-height: 1.6;
  height: 100vh;
  overflow: hidden;
}

/* ==========================================================================
   Ultra-Sleek Luxury Custom Scrollbars
   ========================================================================== */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.6);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #cbd5e1, #94a3b8);
  border-radius: var(--radius-full);
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--sib-red), #991b1b);
  box-shadow: 0 0 6px rgba(222, 26, 34, 0.4);
}

/* Firefox custom scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 rgba(241, 245, 249, 0.6);
}

/* Screen reader / SEO Accessible Text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* App Layout */
.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--bg-main);
}

/* Top Navigation Bar */
.top-nav {
  background: var(--bg-surface);
  border-bottom: 2px solid var(--border-light);
  box-shadow: var(--shadow-subtle);
  position: relative;
  z-index: 20;
  width: 100%;
  box-sizing: border-box;
}

.nav-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex-shrink: 1;
}

.brand-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 46px;
  max-width: 135px;
  object-fit: contain;
  transition: height 0.2s ease, max-width 0.2s ease;
}

.brand-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  min-width: 0;
}

.brand-title .title-main,
.brand-title .title-extra {
  white-space: nowrap;
}

.live-pill {
  font-size: 0.72rem;
  font-weight: 600;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.live-pill .dot {
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 480px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Buttons */
.btn-woodmart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-short-text {
  display: none;
}

.btn-full-text {
  display: inline;
}

.btn-primary {
  background: var(--sib-red);
  color: white;
}
.btn-primary:hover {
  background: var(--sib-red-hover);
  color: white;
  box-shadow: 0 4px 10px rgba(222, 26, 34, 0.25);
}

.btn-outline {
  background: var(--bg-surface);
  border-color: var(--border-light);
  color: var(--text-dark);
}
.btn-outline:hover {
  border-color: var(--sib-red);
  color: var(--sib-red);
}

.phone-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--sib-red);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  transition: background 0.2s ease;
}
.phone-chip:hover {
  background: #fee2e2;
}

.phone-number {
  font-family: inherit;
  direction: ltr;
}

/* Chat Main Container */
.chat-container {
  flex: 1;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-surface);
  box-shadow: var(--shadow-subtle);
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
}

.messages-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  scroll-behavior: smooth;
}

/* Chat Rows */
.chat-row {
  display: flex;
  gap: 14px;
  max-width: 90%;
  animation: slideFadeIn 0.25s ease-out;
}

@keyframes slideFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-row.user {
  align-self: flex-start;
  flex-direction: row-reverse;
}

.chat-row.assistant {
  align-self: flex-end;
  width: 100%;
  max-width: 95%;
}

.avatar-cell {
  flex-shrink: 0;
}

.avatar-circle {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.chat-row.assistant .avatar-circle {
  background: var(--sib-red);
  color: white;
  box-shadow: 0 3px 8px rgba(222, 26, 34, 0.25);
}

.chat-row.user .avatar-circle {
  background: #242424;
  color: white;
}

.content-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.sender-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sib-red);
}

.chat-row.user .sender-name {
  text-align: left;
  color: var(--text-dark);
}

.bubble-box {
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  line-height: 1.8;
  direction: rtl;
  text-align: right;
}

.chat-row.assistant .bubble-box {
  background: #ffffff;
  border: 1px solid #eaedf2;
  box-shadow: var(--shadow-card);
  color: var(--text-dark);
  border-top-right-radius: 4px;
}

.chat-row.user .bubble-box {
  background: var(--sib-red);
  color: #ffffff;
  border-top-left-radius: 4px;
  box-shadow: 0 4px 12px rgba(222, 26, 34, 0.2);
}

.bubble-box p {
  margin-bottom: 10px;
}
.bubble-box p:last-child {
  margin-bottom: 0;
}

.highlight-note {
  background: #fdf2f2;
  border-right: 3px solid var(--sib-red);
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  margin: 12px 0;
  font-size: 0.88rem;
  line-height: 1.75;
  color: #991b1b;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.highlight-note i {
  color: var(--sib-red);
  font-size: 1.05rem;
  margin-top: 3px;
  flex-shrink: 0;
}

.highlight-note .note-text {
  flex: 1;
  display: inline;
  line-height: 1.75;
  word-spacing: normal;
  letter-spacing: normal;
  text-align: right;
}

.highlight-note .note-text strong {
  font-weight: 700;
  color: #7f1d1d;
}

.question-prompt {
  margin-top: 14px;
  font-weight: 700;
  color: var(--sib-red-hover);
}

.bubble-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Interactive Choice Chips */
.interactive-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.choice-chip {
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  color: var(--text-dark);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.choice-chip i {
  color: var(--sib-red);
  font-size: 0.9rem;
}

.choice-chip:hover {
  background: #fff;
  border-color: var(--sib-red);
  color: var(--sib-red);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* Product Cards Grid in Chat */
.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.prod-tile {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-subtle);
  max-width: 420px;
  width: 100%;
}

.prod-tile:hover {
  transform: translateY(-4px);
  border-color: var(--sib-red);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.tile-img-box {
  position: relative;
  width: 100%;
  height: 195px;
  background: #f8fafc;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.prod-tile:hover .tile-img {
  transform: scale(1.06);
}

.tile-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--sib-red);
  color: white;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.tile-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.tile-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.4;
}

.tile-specs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.spec-badge {
  font-size: 0.72rem;
  background: #f3f4f6;
  color: var(--text-body);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.spec-badge i {
  color: var(--sib-red);
}

.tile-desc {
  font-size: 0.8rem;
  color: var(--text-body);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tile-footer {
  margin-top: auto;
  padding-top: 10px;
}

.tile-btn-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px;
  background: var(--sib-red);
  color: white;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.tile-btn-buy:hover {
  background: var(--sib-red-hover);
}

/* Sticky Suggestions Bar */
.sticky-suggestions {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  padding: 10px 24px;
}

.suggestions-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
}

.suggest-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sib-red);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.suggest-items {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.suggest-item-btn {
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  color: var(--text-dark);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.suggest-item-btn:hover {
  background: #fff;
  border-color: var(--sib-red);
  color: var(--sib-red);
}

/* Chat Footer / Input */
.chat-footer {
  padding: 12px 20px 16px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  position: relative;
  z-index: 10;
}

.chat-input-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-card {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 5px 8px 5px 12px;
  min-height: 52px;
  box-sizing: border-box;
  gap: 8px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.input-card:focus-within {
  border-color: var(--border-focus);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(222, 26, 34, 0.08);
}

.input-card textarea {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-dark);
  font-size: 0.94rem;
  font-family: inherit;
  resize: none;
  max-height: 120px;
  min-height: 40px;
  height: 40px;
  line-height: 1.5;
  padding: 8px 6px;
  text-align: right;
  direction: rtl;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  box-sizing: border-box;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.input-card textarea::placeholder {
  color: #94a3b8;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.input-card textarea::-webkit-scrollbar,
.input-card textarea::-webkit-scrollbar-button,
.input-card textarea::-webkit-scrollbar-track,
.input-card textarea::-webkit-scrollbar-thumb,
.input-card textarea::-webkit-scrollbar-corner {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  background: transparent !important;
}

.btn-submit {
  background: var(--sib-red);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  font-size: 16px;
  flex-shrink: 0;
  margin: 0;
}

.btn-submit:hover {
  background: var(--sib-red-hover);
  box-shadow: 0 2px 8px rgba(222, 26, 34, 0.25);
}

.btn-submit:active {
  transform: scale(0.95);
}

.footer-guarantee {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-muted);
}
.footer-guarantee a {
  color: var(--sib-red);
  text-decoration: none;
  font-weight: 700;
}

/* Catalog Drawer */
/* Catalog Drawer Modal */
.catalog-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  z-index: 999;
  justify-content: flex-start;
  transition: opacity 0.25s ease;
}

.catalog-drawer-overlay.open {
  display: flex;
}

.catalog-drawer {
  background: #ffffff;
  width: 540px;
  max-width: 95vw;
  height: 100vh;
  box-shadow: -8px 0 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  animation: slideDrawer 0.28s ease-out;
  overflow: hidden;
}

@keyframes slideDrawer {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-header {
  padding: 16px 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.drawer-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-title i {
  color: var(--sib-red);
  font-size: 1.15rem;
}

.drawer-close {
  background: #f1f5f9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.drawer-close:hover {
  background: #fee2e2;
  color: var(--sib-red);
}

.drawer-search {
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  gap: 10px;
  transition: border-color 0.2s ease;
}

.search-input-wrap:focus-within {
  border-color: var(--sib-red);
  box-shadow: 0 0 0 3px rgba(222, 26, 34, 0.1);
}

.search-input-wrap i {
  color: #94a3b8;
  font-size: 0.95rem;
}

.search-input-wrap input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 0.88rem;
  color: var(--text-dark);
  text-align: right;
  direction: rtl;
  font-family: inherit;
}

.filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pill {
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: #475569;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill:hover {
  border-color: #cbd5e1;
  color: var(--text-dark);
}

.pill.active {
  background: var(--sib-red);
  color: #ffffff;
  border-color: var(--sib-red);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(222, 26, 34, 0.25);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 14px;
}

/* Drawer Product Card */
.drawer-prod-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  min-height: 250px;
}

.drawer-prod-card:hover {
  border-color: var(--sib-red);
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(222, 26, 34, 0.12);
}

.drawer-prod-img-box {
  position: relative;
  width: 100%;
  height: 130px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.drawer-prod-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.drawer-prod-card:hover .drawer-prod-img {
  transform: scale(1.05);
}

.drawer-prod-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--sib-red);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.drawer-prod-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}

.drawer-prod-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.3em;
}

.drawer-spec-pill {
  font-size: 0.7rem;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
}

.drawer-spec-pill i {
  color: var(--sib-red);
  font-size: 0.65rem;
}

.drawer-prod-desc {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: auto;
}

.drawer-prod-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.drawer-btn-ask {
  flex: 1;
  background: var(--sib-red);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s ease;
  font-family: inherit;
}

.drawer-btn-ask:hover {
  background: var(--sib-red-hover);
}

.drawer-btn-link {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 0.74rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

.drawer-btn-link:hover {
  color: var(--sib-red);
  border-color: var(--sib-red);
  background: #fff;
}

/* Typing Indicator Animation */
.typing-box {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
}
.typing-circle {
  width: 6px;
  height: 6px;
  background: var(--sib-red);
  border-radius: 50%;
  animation: bounceDot 1.2s infinite ease-in-out;
}
.typing-circle:nth-child(2) { animation-delay: 0.2s; }
.typing-circle:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounceDot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-5px); opacity: 1; }
}

/* ==========================================================================
   Full Spectrum Responsive Design (320px Mobile to 4K Ultra-Wide)
   ========================================================================== */

/* Large Desktops & 4K Displays (> 1440px) */
@media (min-width: 1440px) {
  .chat-container {
    max-width: 1160px;
  }
  .messages-viewport {
    padding: 30px 36px;
  }
  .bubble-box {
    font-size: 0.96rem;
  }
  .catalog-drawer {
    width: 580px;
  }
  .drawer-body {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
  }
}

/* Laptops & Tablets Landscape (992px - 1320px) */
@media (max-width: 1320px) {
  .nav-container {
    padding: 10px 18px;
    gap: 12px;
  }
  .brand-logo-img {
    height: 42px;
    max-width: 120px;
  }
  .brand-subtitle {
    display: none !important; /* Hide long slogan on laptops/tablets so buttons NEVER overflow */
  }
  .btn-woodmart {
    padding: 8px 14px;
    font-size: 0.82rem;
    gap: 6px;
  }
  .phone-chip {
    padding: 7px 11px;
    font-size: 0.82rem;
  }
}

@media (max-width: 1100px) {
  .brand-title .title-extra {
    display: none !important; /* Keep 'مشاور هوشمند' + online badge */
  }
  .btn-woodmart span.btn-full-text {
    display: none !important;
  }
  .btn-woodmart span.btn-short-text {
    display: inline !important;
  }
  .phone-chip {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
}

/* Tablets Portrait (769px - 991px, e.g. iPad Air 820px) */
@media (max-width: 991px) {
  .nav-container {
    padding: 9px 14px;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
  }
  .brand-logo-img {
    height: 38px;
    max-width: 110px;
  }
  .brand-title {
    font-size: 0.92rem;
    white-space: nowrap;
    min-width: 0;
  }
  .brand-title .title-extra {
    display: none !important;
  }
  .btn-badge-count {
    display: none !important;
  }
  .brand-subtitle, 
  .phone-chip {
    display: none !important;
  }
  .nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }
  .btn-woodmart span.btn-full-text {
    display: none !important;
  }
  .btn-woodmart span.btn-short-text {
    display: inline !important;
  }
  .btn-woodmart {
    padding: 7px 11px;
    font-size: 0.8rem;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .chat-container {
    max-width: 100%;
    border-left: none;
    border-right: none;
  }
  .cards-row {
    grid-template-columns: repeat(auto-fit, minmax(250px, 360px));
    justify-content: flex-start;
    gap: 14px;
  }
  .prod-tile {
    max-width: 380px;
  }
  .tile-img-box {
    height: 190px;
  }
  .catalog-drawer {
    width: 480px;
  }
}

/* Standard Mobile & Small Tablets (581px - 768px, e.g. iPad Mini 744px-768px) */
@media (max-width: 768px) {
  body {
    height: 100dvh; /* Dynamic viewport height for iOS/Android address bars */
  }
  .app-layout {
    height: 100dvh;
  }
  .nav-container {
    padding: 8px 12px;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }
  .brand-logo-img {
    height: 34px;
    max-width: 95px;
  }
  .brand-title {
    font-size: 0.88rem;
    gap: 5px;
    white-space: nowrap;
    min-width: 0;
  }
  .brand-title .title-extra {
    display: none !important;
  }
  .btn-badge-count {
    display: none !important;
  }
  .brand-subtitle, 
  .phone-chip {
    display: none !important;
  }
  .nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .btn-woodmart span.btn-full-text {
    display: none !important;
  }
  .btn-woodmart span.btn-short-text {
    display: inline !important;
  }
  .btn-woodmart {
    padding: 6px 10px;
    font-size: 0.78rem;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .chat-container {
    width: 100%;
    border: none;
  }
  .messages-viewport {
    padding: 14px 12px;
    gap: 16px;
  }
  .chat-row {
    max-width: 100%;
    gap: 10px;
  }
  .chat-row.assistant {
    max-width: 100%;
  }
  .avatar-circle {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
  .bubble-box {
    padding: 12px 14px;
    font-size: 0.88rem;
  }
  .cards-row {
    grid-template-columns: repeat(auto-fit, minmax(240px, 360px));
    justify-content: flex-start;
    gap: 12px;
  }
  .prod-tile {
    max-width: 380px;
  }
  .tile-img-box {
    height: 185px;
  }
  .catalog-drawer {
    width: 100vw;
    max-width: 100vw;
  }
  .drawer-body {
    grid-template-columns: repeat(2, 1fr);
    padding: 12px;
    gap: 10px;
  }
  .drawer-prod-card {
    min-height: 235px;
  }
  .drawer-prod-img-box {
    height: 115px;
  }
  .drawer-prod-title {
    font-size: 0.78rem;
  }
  .drawer-prod-desc {
    display: none; /* Hide long description in mobile 2-col to keep cards neat */
  }
  .chat-footer {
    padding: 8px 10px 12px;
  }
  .input-card {
    padding: 4px 6px 4px 10px;
    min-height: 48px;
    gap: 6px;
  }
  .input-card textarea {
    font-size: 0.88rem;
    min-height: 38px;
    height: 38px;
    padding: 7px 6px;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
  }
  .btn-submit {
    width: 38px;
    height: 38px;
    font-size: 0.88rem;
    margin: 0;
  }
  .footer-guarantee {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    margin-top: 6px;
  }
}

/* Compact Mobile (421px - 580px) */
@media (max-width: 580px) {
  .nav-container {
    padding: 7px 10px;
    gap: 6px;
  }
  .brand-logo-img {
    height: 32px;
    max-width: 88px;
  }
  .brand-title {
    font-size: 0.86rem;
    white-space: nowrap;
    gap: 5px;
  }
  .brand-title .title-extra {
    display: none !important;
  }
  .btn-badge-count {
    display: none !important;
  }
  .brand-subtitle,
  .phone-chip {
    display: none !important;
  }
  .nav-actions {
    gap: 5px;
    flex-shrink: 0;
  }
  .btn-woodmart {
    padding: 6px 9px;
    font-size: 0.76rem;
    gap: 4px;
  }
  .btn-woodmart span.btn-full-text {
    display: none !important;
  }
  .btn-woodmart span.btn-short-text {
    display: inline !important;
  }
  .cards-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .prod-tile {
    max-width: 100%;
  }
  .tile-img-box {
    height: 180px;
  }
  .interactive-chips {
    flex-direction: column;
    gap: 6px;
  }
  .choice-chip {
    width: 100%;
    justify-content: flex-start;
    padding: 8px 12px;
    font-size: 0.8rem;
  }
}

/* Extra-Small Mobile (< 420px - iPhone SE, Galaxy Fold cover, etc.) */
@media (max-width: 420px) {
  .nav-container {
    padding: 6px 8px;
    gap: 5px;
  }
  .brand-logo-img {
    height: 27px;
    max-width: 75px;
  }
  .brand-info {
    gap: 0;
  }
  .brand-title {
    font-size: 0.82rem;
    white-space: nowrap;
    gap: 4px;
  }
  .brand-title .title-extra {
    display: none !important;
  }
  .btn-badge-count {
    display: none !important;
  }
  .live-pill {
    padding: 2px 6px;
    font-size: 0.64rem;
    gap: 4px;
  }
  .nav-actions {
    gap: 5px;
    flex-shrink: 0;
  }
  .btn-woodmart {
    padding: 6px 9px;
    font-size: 0.74rem;
    gap: 4px;
  }
  .tile-img-box {
    height: 165px;
  }
  .drawer-header {
    padding: 12px 14px;
  }
  .drawer-title {
    font-size: 0.92rem;
  }
  .drawer-search {
    padding: 10px 12px;
    gap: 8px;
  }
  .search-input-wrap {
    padding: 6px 10px;
  }
  .pill {
    padding: 4px 9px;
    font-size: 0.72rem;
  }
  .drawer-body {
    grid-template-columns: repeat(2, 1fr);
    padding: 10px 8px;
    gap: 8px;
  }
  .drawer-prod-card {
    min-height: 220px;
  }
  .drawer-prod-img-box {
    height: 105px;
  }
  .drawer-prod-title {
    font-size: 0.75rem;
    min-height: 2.2em;
  }
  .drawer-prod-body {
    padding: 8px 8px 10px;
  }
  .drawer-btn-ask {
    font-size: 0.68rem;
    padding: 5px 6px;
  }
  .drawer-btn-link {
    padding: 5px 7px;
    font-size: 0.68rem;
  }
}

/* Ultra-Compact Mobile (< 360px) */
@media (max-width: 360px) {
  .nav-container {
    padding: 6px 6px;
    gap: 4px;
  }
  .brand-logo-img {
    height: 25px;
    max-width: 65px;
  }
  .brand-title {
    font-size: 0.78rem;
  }
  .live-pill .live-text {
    display: none !important;
  }
  .live-pill {
    padding: 3px;
  }
  .btn-woodmart {
    padding: 5px 7px;
    font-size: 0.7rem;
    gap: 3px;
  }
  .drawer-body {
    grid-template-columns: 1fr;
  }
  .drawer-prod-img-box {
    height: 140px;
  }
  .drawer-prod-desc {
    display: -webkit-box;
  }
}
