/* ============================================================
   WholesaleCatalogz.com — Textile Q&A System CSS
   FILE: catalog/view/theme/default/stylesheet/textile_qa.css
   Add <link rel="stylesheet" href="catalog/view/theme/default/stylesheet/textile_qa.css">
   to your layout header for pages using tqa- classes.
   ============================================================ */

:root {
  --navy:        #1a2340;
  --navy-dark:   #111827;
  --navy-mid:    #243050;
  --accent:      #c8922a;
  --accent-lt:   #f5e6c8;
  --teal:        #1D9E75;
  --teal-lt:     #e1f5ee;
  --coral:       #c94f2a;
  --coral-lt:    #fdf0ec;
  --purple:      #6b5fd4;
  --purple-lt:   #eeedfe;
  --amber:       #b06e12;
  --amber-lt:    #faeeda;
  --blue:        #1a5fa5;
  --blue-lt:     #e6f1fb;
  --gray-bg:     #f7f6f3;
  --gray-border: #e5e3de;
  --text-1:      #1a1a1a;
  --text-2:      #555;
  --text-m:      #888;
  --white:       #fff;
  --radius:      8px;
  --radius-lg:   12px;
  --font-head:   'DM Serif Display', Georgia, serif;
  --font-body:   'DM Sans', system-ui, sans-serif;
}

.mb-0 { margin-bottom: 0 !important; }
/* ── HERO ── */
.tqa-page-hero {
  background: var(--navy-dark);
  padding: 48px 20px 0;
  text-align: center;
  position: relative; overflow: hidden;
}
.tqa-page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(200,146,42,.12) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 30%, rgba(29,158,117,.08) 0%, transparent 50%);
  pointer-events: none;
}
.tqa-hero-inner { max-width: 760px; margin: 0 auto; position: relative; z-index: 1; }
.tqa-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(200,146,42,.15); border: 1px solid rgba(200,146,42,.35);
  border-radius: 20px; padding: 5px 14px;
  font-size: 12px; font-weight: 600; color: var(--accent);
  letter-spacing: .07em; text-transform: uppercase; margin-bottom: 18px;
}
.tqa-hero-title {
  font-family: var(--font-head);
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 400; color: #fff; line-height: 1.2; margin-bottom: 12px;
}
.tqa-hero-title em { color: var(--accent); font-style: normal; }
.tqa-hero-desc {
  font-size: 15px; color: rgba(255,255,255,.62);
  line-height: 1.75; margin-bottom: 28px; max-width: 580px;
  margin-left: auto; margin-right: auto;
}
.tqa-hero-stats {
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-bottom: none; border-radius: 10px 10px 0 0; overflow: hidden;
}
.tqa-hero-stat {
  flex: 1; padding: 16px 12px; text-align: center;
  border-right: 1px solid rgba(255,255,255,.08);
}
.tqa-hero-stat:last-child { border-right: none; }
.tqa-stat-num { font-family: var(--font-head); font-size: 22px; color: var(--accent); display: block; }
.tqa-stat-label { font-size: 11.5px; color: rgba(255,255,255,.45); margin-top: 2px; }

/* ── SEARCH BAR ── */
.tqa-search-bar-wrap {
  background: var(--white); border-bottom: 1px solid var(--gray-border);
  padding: 14px 20px; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.tqa-search-inner {
  max-width: 780px; margin: 0 auto;
  display: flex; gap: 10px; align-items: center; position: relative;
}
.tqa-search-icon { position: absolute; left: 14px; font-size: 15px; color: var(--text-m); }
.tqa-search-field {
  width: 100%; padding: 11px 14px 11px 40px;
  border: 1.5px solid var(--gray-border); border-radius: 8px;
  font-family: var(--font-body); font-size: 14px; color: var(--text-1);
  background: var(--gray-bg); outline: none; transition: border-color .2s;
}
.tqa-search-field:focus { border-color: var(--accent); background: #fff; }
.tqa-search-hint { font-size: 13px; color: var(--text-m); white-space: nowrap; }

/* ── PAGE WRAP ── */
.tqa-page-wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 28px 20px 60px;
}
.tqa-with-sidebar {
  display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start;
}
@media (max-width: 900px) {
  .tqa-with-sidebar { grid-template-columns: 1fr; }
  .tqa-sidebar { display: none; }
}

/* ── SIDEBAR ── */
.tqa-sidebar { position: sticky; top: 76px; }
.tqa-sidebar-head {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-m);
  padding: 0 4px 10px; border-bottom: 1px solid var(--gray-border); margin-bottom: 8px;
}
.tqa-sidebar-link {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border-radius: var(--radius);
  text-decoration: none; font-size: 13px; color: var(--text-2);
  transition: all .15s; border: none; background: none;
  width: 100%; margin-bottom: 2px;
}
.tqa-sidebar-link:hover { background: var(--accent-lt); color: var(--navy); }
.tqa-sidebar-link.active { background: var(--navy-dark); color: #fff; }
.tqa-sl-icon { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }
.tqa-sl-name { flex: 1; }
.tqa-sl-count {
  background: rgba(0,0,0,.07); font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 10px; flex-shrink: 0;
}
.tqa-sidebar-link.active .tqa-sl-count { background: rgba(255,255,255,.15); }
.tqa-all-link { color: var(--blue); margin-top: 8px; border-top: 1px solid var(--gray-border); padding-top: 12px; }

/* ── CATEGORY GRID (index page) ── */
.tqa-section-heading {
  font-family: var(--font-head); font-size: 22px; font-weight: 400;
  color: var(--navy); margin-bottom: 16px;
}
.tqa-cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px;
  margin-bottom: 40px;
}
.tqa-cat-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border: 1px solid var(--gray-border);
  border-radius: var(--radius-lg); padding: 16px 18px;
  text-decoration: none; transition: box-shadow .2s, border-color .2s;
}
.tqa-cat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); border-color: var(--accent); }
.tqa-cat-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.tqa-cat-info { flex: 1; min-width: 0; }
.tqa-cat-name { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 3px; }
.tqa-cat-desc { font-size: 12px; color: var(--text-m); line-height: 1.4; }
.tqa-cat-count {
  background: var(--navy-dark); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 10px;
  flex-shrink: 0;
}
.tqa-no-cat {
  text-align: center; padding: 24px; color: var(--text-m); font-size: 14px;
}

/* ── FEATURED QUESTIONS GRID ── */
.tqa-featured-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px;
  margin-bottom: 32px;
}
.tqa-featured-card {
  background: var(--white); border: 1px solid var(--gray-border);
  border-radius: var(--radius-lg); padding: 18px 20px;
  text-decoration: none; display: block; transition: box-shadow .2s;
}
.tqa-featured-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.tqa-fq-cat { font-size: 11.5px; color: var(--text-m); margin-bottom: 8px; }
.tqa-fq-question { font-size: 14.5px; font-weight: 600; color: var(--text-1); margin-bottom: 8px; line-height: 1.4; }
.tqa-fq-answer { font-size: 13px; color: var(--text-2); line-height: 1.65; margin-bottom: 12px; }
.tqa-fq-read { font-size: 13px; color: var(--blue); font-weight: 500; }

/* ── CATEGORY PAGE HEADER ── */
.tqa-cat-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 2px solid var(--gray-border);
}
.tqa-cat-header-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.tqa-cat-title { font-family: var(--font-head); font-size: 22px; color: var(--navy); font-weight: 400; }
.tqa-cat-subtitle { font-size: 13px; color: var(--text-m); margin-top: 2px; }
.tqa-cat-q-badge {
  margin-left: auto; background: var(--navy-dark); color: #fff;
  font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 10px;
}

/* ── INLINE SEARCH (category page) ── */
.tqa-inline-search {
  margin-bottom: 18px; position: relative;
}
.tqa-inline-search .tqa-search-field { padding-left: 14px; }

/* ── Q&A CARDS (accordion) ── */
.tqa-qa-card {
  background: var(--white); border: 1px solid var(--gray-border);
  border-radius: var(--radius-lg); margin-bottom: 10px; overflow: hidden;
  transition: box-shadow .2s;
}
.tqa-qa-card:hover { box-shadow: 0 3px 14px rgba(0,0,0,.07); }
.tqa-qa-question {
  width: 100%; background: none; border: none;
  padding: 16px 20px; text-align: left; cursor: pointer;
  display: flex; align-items: flex-start; gap: 12px;
  font-family: var(--font-body); transition: background .15s;
}
.tqa-qa-question:hover { background: var(--gray-bg); }
.tqa-qa-question.open { background: var(--navy-dark); }
.tqa-q-indicator {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-lt); border: 1.5px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: var(--accent);
  flex-shrink: 0; margin-top: 1px; transition: all .15s;
}
.tqa-qa-question.open .tqa-q-indicator { background: var(--accent); color: #fff; }
.tqa-q-text { font-size: 14.5px; font-weight: 600; color: var(--text-1); line-height: 1.45; flex: 1; }
.tqa-qa-question.open .tqa-q-text { color: #fff; }
.tqa-q-chevron { font-size: 11px; color: var(--text-m); flex-shrink: 0; margin-top: 6px; transition: transform .25s; }
.tqa-qa-question.open .tqa-q-chevron { transform: rotate(180deg); color: rgba(255,255,255,.5); }

.tqa-qa-answer {
  display: none; padding: 20px 20px 18px 60px;
  border-top: 1px solid var(--gray-border); background: var(--white);
  animation: tqaSlide .2s ease;
}
.tqa-qa-answer.open { display: block; }
@keyframes tqaSlide { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }

/* ── ANSWER BODY STYLES ── */
.tqa-answer-body { font-size: 14px; color: var(--text-2); line-height: 1.78; }
.tqa-answer-body p { margin-bottom: 10px; }
.tqa-answer-body p:last-child { margin-bottom: 0; }
.tqa-answer-body strong { color: var(--text-1); }
.tqa-answer-body ul, .tqa-answer-body ol { padding-left: 20px; margin-bottom: 10px; }
.tqa-answer-body li { margin-bottom: 4px; }

/* Answer table */
.answer-table {
  width: 100%; border-collapse: collapse;
  margin: 12px 0; font-size: 13.5px;
}
.answer-table th {
  background: var(--navy-dark); color: #fff;
  padding: 8px 12px; text-align: left; font-size: 12px;
  font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}
.answer-table td { padding: 8px 12px; border-bottom: 1px solid var(--gray-border); color: var(--text-2); }
.answer-table tr:last-child td { border-bottom: none; }
.answer-table tr:nth-child(even) td { background: var(--gray-bg); }

/* Tip / Warning callout */
.answer-tip {
  background: var(--teal-lt); border: 1px solid #9fe1cb;
  border-radius: 6px; padding: 10px 14px;
  font-size: 13px; color: #085041; margin-top: 10px; line-height: 1.6;
}

/* ── ANSWER META ── */
.tqa-answer-meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--gray-border);
  font-size: 12px; color: var(--text-m);
}
.tqa-permalink { color: var(--blue); text-decoration: none; }
.tqa-permalink:hover { text-decoration: underline; }
.tqa-helpful { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.tqa-helpful-btn {
  padding: 4px 10px; border: 1px solid var(--gray-border);
  border-radius: 4px; background: none; cursor: pointer;
  font-size: 12px; font-family: var(--font-body); color: var(--text-m);
  transition: all .15s;
}
.tqa-helpful-btn:hover { border-color: var(--teal); color: var(--teal); }
.tqa-helpful-btn.tqa-voted { background: var(--teal-lt); border-color: var(--teal); color: var(--teal); }

/* ── ANSWER LINKS (CTA) ── */
.tqa-answer-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tqa-answer-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; background: var(--navy-dark); color: #fff;
  text-decoration: none; border-radius: 6px;
  font-size: 13px; font-weight: 500; transition: background .2s;
}
.tqa-answer-link:hover { background: var(--navy-mid); }

/* ── NO RESULTS ── */
.tqa-no-results {
  text-align: center; padding: 48px 20px;
  background: var(--white); border: 1px solid var(--gray-border);
  border-radius: var(--radius-lg);
}
.tqa-no-icon { font-size: 36px; margin-bottom: 12px; }
.tqa-no-results h3 { font-size: 17px; color: var(--text-1); margin-bottom: 6px; }
.tqa-no-results p { font-size: 13.5px; color: var(--text-m); }

/* ── SINGLE QUESTION PAGE ── */
.tqa-single-q-wrap {
  background: var(--white); border: 1px solid var(--gray-border);
  border-radius: var(--radius-lg); padding: 28px 32px; margin-bottom: 20px;
}
.tqa-sq-eyebrow { margin-bottom: 14px; }
.tqa-sq-cat-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--gray-bg); border: 1px solid var(--gray-border);
  border-radius: 20px; padding: 4px 12px;
  font-size: 12.5px; color: var(--text-2); text-decoration: none;
}
.tqa-sq-question {
  font-family: var(--font-head); font-size: clamp(20px, 3vw, 28px);
  font-weight: 400; color: var(--navy); line-height: 1.3; margin-bottom: 20px;
}
.tqa-sq-answer { font-size: 15px; color: var(--text-2); line-height: 1.8; margin-bottom: 20px; }
.tqa-sq-helpful {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 0; border-top: 1px solid var(--gray-border);
  border-bottom: 1px solid var(--gray-border); margin-bottom: 16px;
  font-size: 14px; color: var(--text-2);
}
.tqa-sq-votes { font-size: 12px; color: var(--text-m); margin-left: auto; }
.tqa-sq-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.tqa-tag {
  background: var(--gray-bg); border: 1px solid var(--gray-border);
  border-radius: 4px; padding: 3px 10px;
  font-size: 12px; color: var(--text-m);
}

/* ── RELATED QUESTIONS ── */
.tqa-related-section {
  background: var(--white); border: 1px solid var(--gray-border);
  border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 20px;
}
.tqa-related-title { font-size: 17px; font-weight: 600; color: var(--text-1); margin-bottom: 14px; }
.tqa-related-list { display: flex; flex-direction: column; gap: 0; }
.tqa-related-item {
  display: block; padding: 13px 0;
  border-bottom: 1px solid var(--gray-border); text-decoration: none;
  transition: padding .15s;
}
.tqa-related-item:last-child { border-bottom: none; }
.tqa-related-item:hover { padding-left: 6px; }
.tqa-rq-q { font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 3px; }
.tqa-rq-a { font-size: 13px; color: var(--text-m); }

/* ── CTA BLOCK ── */
.tqa-cta-block {
  background: var(--navy-dark); border-radius: var(--radius-lg);
  padding: 28px 24px; margin-bottom: 20px; text-align: center;
}
.tqa-cta-block h3 {
  font-family: var(--font-head); font-size: 20px;
  color: #fff; font-weight: 400; margin-bottom: 6px;
}
.tqa-cta-block p { font-size: 13.5px; color: rgba(255,255,255,.55); margin-bottom: 18px; }
.tqa-cta-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tqa-cta-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 10px 18px; background: var(--accent); color: #fff;
  text-decoration: none; border-radius: 6px;
  font-size: 13px; font-weight: 600; transition: opacity .2s;
}
.tqa-cta-link:hover { opacity: .88; }
.tqa-cta-outline {
  background: transparent; border: 1px solid rgba(255,255,255,.25); color: rgba(255,255,255,.8);
}
.tqa-cta-outline:hover { border-color: rgba(255,255,255,.5); color: #fff; }

/* ── BREADCRUMB ── */
.breadcrumb-bar { background: var(--white); border-bottom: 1px solid var(--gray-border); padding: 0; }
.breadcrumb-inner {
  max-width: 1200px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--text-m); flex-wrap: wrap;
}
.breadcrumb-inner a { color: var(--blue); text-decoration: none; }
.breadcrumb-inner a:hover { text-decoration: underline; }
.breadcrumb-sep { color: #ccc; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .tqa-single-q-wrap { padding: 18px 16px; }
  .tqa-cat-grid { grid-template-columns: 1fr; }
  .tqa-featured-grid { grid-template-columns: 1fr; }
  .tqa-hero-stats { flex-wrap: wrap; }
  .tqa-hero-stat { flex: 1 1 50%; border-bottom: 1px solid rgba(255,255,255,.08); }
  .tqa-qa-answer { padding-left: 20px; }
}
