/* ============================================================
   BEAS — furniture.css
   Customer Furniture Browse Page
   ============================================================ */

/* ── PAGE HERO ───────────────────────────────────────────── */
.furn-hero {
  background: linear-gradient(135deg, var(--beas-navy) 0%, #001a33 60%, var(--beas-orange-dark) 120%);
  padding: 56px 0 48px;
  position: relative;
  overflow: hidden;
}
.furn-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(170,68,1,0.08);
  pointer-events: none;
}
.furn-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.furn-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: #fff;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 10px;
}
.furn-hero h1 span { color: var(--beas-orange); }
.furn-hero p {
  color: rgba(255,255,255,0.65);
  font-size: 1rem;
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 0;
}
.furn-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-wrap: wrap;
}
.furn-breadcrumb a { color: rgba(255,255,255,0.7); text-decoration: none; }
.furn-breadcrumb a:hover { color: var(--beas-orange); }
.furn-breadcrumb i { font-size: 0.6rem; color: rgba(255,255,255,0.3); }
.furn-breadcrumb .current { color: var(--beas-orange); }

/* ── STICKY FILTER BAR ────────────────────────────────────── */
.furn-filter-bar {
  background: var(--bg-card);
  border-bottom: 2px solid var(--beas-orange);
  position: sticky;
  top: 68px; /* below navbar — sticky on desktop */
  z-index: 80;
  box-shadow: 0 4px 16px rgba(0,51,102,0.1);
}
.furn-filter-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.furn-filter-inner .filter-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 150px;
}
.furn-filter-inner .filter-group label {
  font-size: 0.68rem;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.furn-select, .furn-search {
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  background: var(--bg-card);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  width: 100%;
}
.furn-select:focus, .furn-search:focus {
  border-color: var(--beas-orange);
  box-shadow: 0 0 0 3px rgba(170,68,1,0.12);
}
.filter-search-wrap {
  position: relative;
  flex: 2;
  min-width: 200px;
}
.filter-search-wrap i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}
.filter-search-wrap .furn-search { padding-left: 34px; }
.filter-clear-btn {
  font-size: 0.75rem;
  white-space: nowrap;
  align-self: flex-end;   /* aligns with bottom of select inputs, not labels */
  margin-bottom: 0;       /* same baseline as the dropdowns */
  height: 38px;           /* match input height exactly */
  display: flex;
  align-items: center;
}

/* Filter loading state */
.furn-filter-bar.filtering::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--beas-orange), transparent);
  animation: filterSweep 1s ease infinite;
}
@keyframes filterSweep {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* ── MAIN CONTENT AREA ────────────────────────────────────── */
.furn-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ── RESULT COUNT BAR ─────────────────────────────────────── */
.furn-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 10px;
}
.furn-result-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.furn-result-count strong { color: var(--text-primary); }
.furn-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.furn-sort select {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  background: var(--bg-card);
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

/* ── CATEGORY GROUP ───────────────────────────────────────── */
.furn-category-group {
  margin-bottom: 56px;
  animation: fadeInUp 0.5s ease both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.furn-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-card);
  flex-wrap: wrap;
  gap: 10px;
}
.furn-category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}
.furn-category-title i { color: var(--beas-orange); font-size: 1.2rem; }
.furn-category-count {
  background: var(--beas-orange);
  color: #fff;
  border-radius: 20px;
  padding: 2px 10px;
  font-family: 'Oswald', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* ── FURNITURE GRID ───────────────────────────────────────── */
.furn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* ── FURNITURE CARD ───────────────────────────────────────── */
.furn-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  position: relative;
}
.furn-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(170,68,1,0.3);
}

/* Badge top-left */
.furn-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Image */
.furn-card-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  background: var(--bg-subtle);
  transition: transform 0.45s ease;
}
.furn-card:hover .furn-card-img { transform: scale(1.06); }
.furn-card-img-wrap {
  overflow: hidden;
  height: 190px;
  position: relative;
  background: var(--bg-subtle);
}
.furn-card-no-img {
  width: 100%;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  color: var(--border-color);
  font-size: 3rem;
}

/* ── CATEGORY-SPECIFIC IMAGE BOX HEIGHTS ────────────────────
   .card-tall  = portrait chairs (swivel, visitor, massage etc.)
                 Height > Width — tall narrow image box
   .card-wide  = landscape desks, tables, sofas, workstations
                 Width > Height — short wide image box
   .card-sq    = everything else (cabinets, safinges, bookshelves)
                 Square-ish default
─────────────────────────────────────────────────────────── */
.furn-card.card-tall .furn-card-img-wrap,
.furn-card.card-tall .furn-card-no-img {
  height: 260px;   /* tall portrait for upright chairs */
}
.furn-card.card-tall .furn-card-img {
  height: 260px;
  object-position: center top;  /* show top of chair (headrest) */
}
.furn-card.card-wide .furn-card-img-wrap,
.furn-card.card-wide .furn-card-no-img {
  height: 150px;   /* shorter, wider for desks and tables */
}
.furn-card.card-wide .furn-card-img {
  height: 150px;
  object-position: center center;
}
.furn-card.card-sq .furn-card-img-wrap,
.furn-card.card-sq .furn-card-no-img {
  height: 190px;
}
.furn-card.card-sq .furn-card-img {
  height: 190px;
}

/* Skeleton matches card type */
.furn-skeleton-card.card-tall .furn-sk-img { height: 260px; }
.furn-skeleton-card.card-wide .furn-sk-img { height: 150px; }

/* Hover overlay with "View Details" */
.furn-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,30,60,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.28s ease;
  backdrop-filter: blur(2px);
}
.furn-card:hover .furn-card-overlay { opacity: 1; }
.furn-card-overlay-label {
  font-family: 'Oswald', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--beas-orange);
  padding: 8px 18px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Card body */
.furn-card-body {
  padding: 14px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}
/* Sub-category label */
.furn-card-sub { margin-bottom: 3px; }

/* Title: clamp to exactly 2 lines so all cards have same title height */
.furn-card-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;   /* 2 lines × 1.25 line-height */
  margin-bottom: 4px;
}
/* Description: clamp to 1 line */
.furn-card-desc { margin-bottom: 6px; }

/* Pill row: ALWAYS the same fixed height regardless of content.
   This anchors the stock/size badge at the same Y across every card in a row. */
.furn-card-pill-row {
  height: 26px;          /* hard height — not min-height */
  display: flex;
  align-items: center;
  margin-top: auto;      /* pushes pill row to bottom of body */
  margin-bottom: 8px;
}
.furn-card-sub {
  font-size: 0.7rem;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--beas-orange);
  font-weight: 600;
}
.furn-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  /* line-clamp applied in .furn-card-body block above */
}
.furn-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 1;   /* 1 line to keep space fixed */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.furn-card-size {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--beas-navy);
  background: var(--bg-subtle);
  padding: 3px 8px;
  border-radius: 4px;
  width: fit-content;
}
.furn-card-footer {
  padding: 0 16px 14px;
  margin-top: auto;
}
.furn-card-inq-btn {
  width: 100%;
  justify-content: center;
  font-size: 0.85rem !important;
  padding: 13px 14px !important;
  min-height: 48px;   /* minimum touch target on mobile */  /* 44px = Apple/Google recommended min touch target */
}
/* Added state */
.furn-card-inq-btn.added {
  background: var(--success, #0d9954) !important;
  border-color: var(--success, #0d9954) !important;
  pointer-events: none;
}

/* ── SEARCH RESULTS MODE ──────────────────────────────────── */
.furn-search-result {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.furn-search-result:hover {
  border-color: var(--beas-orange);
  box-shadow: var(--shadow-md);
}
.furn-search-result img {
  width: 70px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
  flex-shrink: 0;
}
.furn-search-result-info { flex: 1; }
.furn-search-result-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 3px;
}
.furn-search-result-cat {
  font-size: 0.72rem;
  color: var(--beas-orange);
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.furn-search-result-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
}
.furn-search-results-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── FURNITURE DETAIL MODAL ──────────────────────────────── */
.furn-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,20,50,0.6);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  backdrop-filter: blur(4px);
  animation: backdropFade 0.2s ease;
}
.furn-modal-overlay.open { display: flex; }
@keyframes backdropFade { from{opacity:0;} to{opacity:1;} }
.furn-modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
  width: 100%;
  max-width: 860px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;       /* clip rounded corners cleanly */
  animation: modalSlide 0.3s cubic-bezier(0.34,1.56,0.64,1);
  max-height: 90vh;       /* never taller than 90% of viewport */
  height: 90vh;           /* fixed height so both columns are same height */
}
@keyframes modalSlide { from{opacity:0;transform:scale(0.94) translateY(20px);} to{opacity:1;transform:scale(1) translateY(0);} }
.furn-modal-img-col {
  background: var(--bg-subtle);
  position: relative;
  /* Column fills full modal height */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.furn-modal-img {
  width: 100%;
  height: 100%;
  /* object-fit: cover scales image to fill box without distortion.
     Any size image (1024x800, portrait, square) fills the column cleanly. */
  object-fit: cover;
  object-position: center center;
  display: block;
  flex: 1;
}
.furn-modal-img-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--border-color);
}
.furn-modal-body {
  padding: 28px;
  overflow-y: auto;           /* scrolls when content is long */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;  /* smooth scroll on iOS */
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;               /* fills the modal column height */
  /* The Add to Inquiry button is inside this scrollable div —
     it is always reachable by scrolling down */
}
.furn-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  z-index: 2;
  transition: background 0.2s ease;
}
.furn-modal-close:hover { background: var(--beas-orange); }
.furn-modal-cat {
  font-family: 'Oswald', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--beas-orange);
  font-weight: 600;
}
.furn-modal-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.furn-modal-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.75;
}
.furn-modal-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.furn-modal-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
}
.furn-modal-meta-label {
  font-family: 'Oswald', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 80px;
  padding-top: 1px;
}
.furn-modal-meta-val {
  color: var(--text-primary);
  font-weight: 500;
  flex: 1;
}
.furn-modal-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.furn-modal-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.furn-modal-features li i { color: var(--beas-orange); margin-top: 2px; flex-shrink: 0; }
.furn-modal-divider {
  border: none;
  border-top: 1px solid var(--border-card);
}
.furn-modal-inq-btn {
  width: 100%;
  justify-content: center;
  padding: 13px !important;
  font-size: 0.9rem !important;
}

/* ── INQUIRY BASKET ───────────────────────────────────────── */
.inq-basket-wrap {
  position: fixed;
  bottom: 28px;
  right: 24px;   /* RIGHT side */
  z-index: 800;
}
.inq-basket-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--beas-navy);
  color: #fff;
  border: 3px solid var(--beas-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  position: relative;
  transition: all 0.25s ease;
}
.inq-basket-btn:hover { background: var(--beas-orange); transform: scale(1.08); }
.inq-basket-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--beas-orange);
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  border: 2px solid var(--bg-card);
  animation: badgePop 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes badgePop { from{transform:scale(0);} to{transform:scale(1);} }

/* Basket panel */
.inq-basket-panel {
  position: absolute;
  bottom: 64px;
  right: 0;      /* anchors panel right edge to basket button right edge */
  left: auto;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: none;
  flex-direction: column;
  max-height: 420px;
  animation: panelSlide 0.25s ease;
}
.inq-basket-panel.open { display: flex; }
@keyframes panelSlide { from{opacity:0;transform:translateY(10px);} to{opacity:1;transform:translateY(0);} }
.inq-basket-header {
  padding: 12px 16px;
  background: var(--beas-navy);
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.inq-basket-header span { display: flex; align-items: center; gap: 8px; }
.inq-basket-header i { color: var(--beas-orange); }
.inq-basket-clear {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: color 0.15s ease;
}
.inq-basket-clear:hover { color: #ff6b6b; }
.inq-basket-items {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.inq-basket-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
  animation: itemIn 0.25s ease;
}
@keyframes itemIn { from{opacity:0;transform:translateX(10px);} to{opacity:1;transform:translateX(0);} }
.inq-basket-item img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border-card);
  flex-shrink: 0;
}
.inq-basket-item-no-img {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.inq-basket-item-info { flex: 1; min-width: 0; }
.inq-basket-item-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inq-basket-item-cat {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 1px;
}
.inq-basket-remove {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.inq-basket-remove:hover { background: #ff6b6b; border-color: #ff6b6b; color: #fff; }
.inq-basket-empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.inq-basket-empty i { font-size: 2rem; display: block; margin-bottom: 8px; color: var(--border-color); }
.inq-basket-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--border-card);
  background: #f7f9fc;
}
.inq-basket-goto {
  width: 100%;
  justify-content: center;
  font-size: 0.82rem !important;
  padding: 10px !important;
}

/* ── TOAST (furniture page) ───────────────────────────────── */
.furn-toast {
  position: fixed;
  bottom: 96px;   /* above basket button: 52px btn + 16px gap + 28px base */
  right: 24px;   /* same right side as basket */
  left: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-left: 4px solid var(--beas-orange);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-primary);
  z-index: 8500;
  max-width: 280px;
  animation: toastSlide 0.3s ease;
}
@keyframes toastSlide { from{opacity:0;transform:translateX(20px);} to{opacity:1;transform:translateX(0);} }
.furn-toast i { color: var(--beas-orange); font-size: 1rem; flex-shrink: 0; }
.furn-toast.out { animation: toastOut 0.3s ease forwards; }
@keyframes toastOut { to{opacity:0;transform:translateX(20px);} }

/* ── SKELETON ─────────────────────────────────────────────── */
.furn-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.furn-skeleton-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-card);
}
.furn-sk-img {
  height: 190px;
  background: linear-gradient(90deg, #e8edf5 25%, #f4f6fb 50%, #e8edf5 75%);
  background-size: 400% 100%;
  animation: skShimmer 1.4s ease infinite;
}
.furn-sk-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.furn-sk-line {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e8edf5 25%, #f4f6fb 50%, #e8edf5 75%);
  background-size: 400% 100%;
  animation: skShimmer 1.4s ease infinite;
}
.furn-sk-line.w-60 { width: 60%; }
.furn-sk-line.w-80 { width: 80%; }
.furn-sk-line.w-40 { width: 40%; }
.furn-sk-btn {
  height: 34px;
  border-radius: 20px;
  margin-top: 4px;
  background: linear-gradient(90deg, #e8edf5 25%, #f4f6fb 50%, #e8edf5 75%);
  background-size: 400% 100%;
  animation: skShimmer 1.4s ease infinite;
}
@keyframes skShimmer {
  0% { background-position: 100% center; }
  100% { background-position: -100% center; }
}

/* ── EMPTY STATE ──────────────────────────────────────────── */
.furn-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}
.furn-empty i { font-size: 4rem; display: block; margin-bottom: 20px; color: var(--border-color); }
.furn-empty h3 { font-size: 1.2rem; color: var(--text-primary); margin-bottom: 8px; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  /* Stack image above text on mobile */
  .furn-modal {
    grid-template-columns: 1fr;
    grid-template-rows: 240px 1fr;   /* image fixed height, body takes rest */
    height: 92vh;
  }
  .furn-modal-img-col { min-height: 0; height: 240px; flex: none; }
  .furn-modal-img { height: 240px; flex: none; min-height: 0; }
  .furn-modal-img-placeholder { height: 240px; flex: none; min-height: 0; }
  /* Body takes remaining space and scrolls */
  .furn-modal-body { height: calc(92vh - 240px); max-height: none; }
}
@media (max-width: 768px) {
  .furn-filter-inner { gap: 8px; }
  .furn-filter-inner .filter-group { min-width: 120px; }
  .furn-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .furn-card-img-wrap, .furn-card-no-img { height: 150px; }
  .furn-card-img { height: 150px; }
  /* Panel anchored to basket's right edge, opens leftward */
  .inq-basket-panel { width: 290px; right: 0; left: auto; }
  .furn-toast { max-width: 240px; font-size: 0.78rem; }
}
@media (max-width: 480px) {
  .furn-hero { padding: 36px 0 28px; }
  /* Filter bar NOT sticky on mobile — back-to-top arrow scrolls user back up */
  .furn-filter-bar { position: relative; top: auto; box-shadow: none; }
  .furn-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  /* Modal full-screen on small phones */
  .furn-modal { height: 95vh; max-height: 95vh; border-radius: var(--radius-md) var(--radius-md) 0 0; }
  .furn-modal-img-col { height: 200px; }
  .furn-modal-img { height: 200px; }
  .furn-modal-body { height: calc(95vh - 200px); padding: 16px; }
  /* Basket bottom-right on mobile */
  .inq-basket-wrap { bottom: 24px; right: 14px; left: auto; }
  .inq-basket-panel { width: calc(100vw - 44px); right: 0; left: auto; max-width: 300px; }
  /* Bigger tap area on mobile */
  .furn-card-inq-btn { font-size: 0.88rem !important; padding: 13px 10px !important; min-height: 48px; }
  .furn-card-footer { padding: 0 10px 12px; }
  /* Toast above basket on mobile */
  .furn-toast { right: 14px; left: auto; bottom: 92px; max-width: calc(100vw - 30px); }
}
[data-theme="dark"] .furn-sk-img,
[data-theme="dark"] .furn-sk-line,
[data-theme="dark"] .furn-sk-btn {
  background: linear-gradient(90deg, #1a2540 25%, #222f4a 50%, #1a2540 75%);
  background-size: 400% 100%;
  animation: skShimmer 1.4s ease infinite;
}

/* ── STOCK BADGE (shown instead of size for chairs/sofas) ── */
.furn-card-stock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  width: fit-content;
}
.furn-card-stock.in-stock {
  background: rgba(13,153,84,0.1);
  color: #0d9954;
}
.furn-card-stock.low-stock {
  background: rgba(230,126,34,0.1);
  color: #e67e22;
}
/* Hide size pill for no-size categories */
.furn-card.no-size-cat .furn-card-size { display: none; }
/* In modal: always show stock status */
.furn-modal-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  width: fit-content;
}
.furn-modal-stock.in-stock  { background: rgba(13,153,84,0.12);  color: #0d9954; }
.furn-modal-stock.low-stock { background: rgba(230,126,34,0.12); color: #e67e22; }
.furn-modal-stock.out-stock { background: rgba(214,48,49,0.10);  color: #d63031; }

/* ── BACK-TO-TOP override for furniture page ─────────────────
   Centered horizontally. Fully visible only when NOT scrolling.
   While scrolling: faded (opacity 0.3). After stop: full opacity.
────────────────────────────────────────────────────────────── */
body.furn-page #back-to-top {
  bottom: 20px;
  right: 50%;
  transform: translateX(50%) translateY(20px);
  opacity: 0;
}
body.furn-page #back-to-top.visible {
  transform: translateX(50%) translateY(0);
  opacity: 1;
}
body.furn-page #back-to-top.scrolling {
  opacity: 0.25;  /* very faded while actively scrolling */
  transition: opacity 0.1s ease;
}
body.furn-page #back-to-top.visible:not(.scrolling) {
  opacity: 1;
  transition: opacity 0.4s ease 0.3s; /* delay fade-in so it only shows after scroll stops */
}