/* ======================================
   SINGLE-ROW FILTER BAR
   ====================================== */
.filter-bar-single {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 10px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  padding: 10px 18px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.fbs-left, .fbs-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.fbs-right {
  margin-right: auto;
}

.fbs-select {
  padding: 7px 10px;
  border: 1.5px solid #e8e8e8;
  border-radius: 8px;
  font-family: var(--font-arabic), 'Tajawal', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  background: #f8f9fb;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.fbs-select:hover,
.fbs-select:focus {
  border-color: #C9A96E;
  box-shadow: 0 0 0 3px rgba(201,169,110,0.12);
}

.fbs-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8f9fb;
  border: 1.5px solid #e8e8e8;
  border-radius: 8px;
  padding: 6px 12px;
  transition: border-color 0.2s;
}

.fbs-search:focus-within {
  border-color: #C9A96E;
}

.fbs-search input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-arabic), 'Tajawal', sans-serif;
  font-size: 13px;
  color: #1a1a2e;
  width: 130px;
}

.fbs-view {
  display: flex;
  gap: 4px;
}

.fbs-view-btn {
  width: 32px;
  height: 32px;
  border: 1.5px solid #e8e8e8;
  border-radius: 8px;
  background: #f8f9fb;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: #555;
}

.fbs-view-btn.active,
.fbs-view-btn:hover {
  background: #1a1a2e;
  border-color: #1a1a2e;
  color: white;
}

.fbs-count {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
  font-weight: 600;
}

.fbs-count strong {
  color: #1a1a2e;
  font-size: 14px;
}

/* Divider between left and right */
.fbs-left::after {
  content: '';
  width: 1px;
  height: 24px;
  background: #e8e8e8;
  margin: 0 4px;
}

/* ======================================
   PRODUCT CARDS — PREMIUM MOBILE-FIRST
   ====================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ── Card Shell ── */
.product-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #ede9e3;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(107,66,38,0.14);
  border-color: rgba(201,169,110,0.3);
}

/* ── Image Wrapper ── */
.pc-img-wrap {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #f8f5f0;
  flex-shrink: 0;
}

.pc-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .pc-img-wrap img {
  transform: scale(1.07);
}

/* ── Badge ── */
.pc-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  z-index: 3;
  letter-spacing: 0.02em;
  font-family: 'Cairo', sans-serif;
}
.pc-badge--sale { background: linear-gradient(135deg,#ef4444,#dc2626); color: #fff; box-shadow: 0 2px 8px rgba(239,68,68,0.4); }
.pc-badge--new  { background: linear-gradient(135deg,#10b981,#059669); color: #fff; box-shadow: 0 2px 8px rgba(16,185,129,0.4); }
.pc-badge--hot  { background: linear-gradient(135deg,#C9A96E,#a18247); color: #fff; box-shadow: 0 2px 8px rgba(201,169,110,0.4); }

/* ── Wishlist Heart ── */
.pc-wish {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  backdrop-filter: blur(4px);
}
.pc-wish:hover,
.pc-wish.active { color: #ef4444; transform: scale(1.12); }
.pc-wish.active svg { fill: #ef4444; stroke: #ef4444; }

/* ── Hover Actions ── */
.pc-actions {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(26,21,16,0.75) 0%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  z-index: 2;
}
.product-card:hover .pc-actions {
  opacity: 1;
  transform: translateY(0);
}

.pc-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1510;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.pc-action-btn:hover { transform: scale(1.15); background: #C9A96E; color: white; }
.pc-action-cart { background: #1a1510; color: white; }
.pc-action-cart:hover { background: #C9A96E; }

/* ── Body ── */
.pc-body {
  padding: 12px 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

/* ── Rating Row ── */
.pc-rating-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pc-stars { display: flex; gap: 1px; }
.pc-star {
  font-size: 13px;
  color: #C9A96E;
  line-height: 1;
}
.pc-star--half { opacity: 0.5; }
.pc-rating-val {
  font-size: 12px;
  font-weight: 800;
  color: #1a1510;
  margin-right: 2px;
}
.pc-rating-count {
  font-size: 10px;
  color: #9ca3af;
  font-weight: 600;
}

/* ── Category ── */
.pc-cat {
  font-size: 10px;
  font-weight: 700;
  color: #C9A96E;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ── Name ── */
.pc-name {
  font-size: 13px;
  font-weight: 700;
  color: #1a1510;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pc-name a {
  color: inherit;
  text-decoration: none;
}
.pc-name a:hover { color: #6B4226; }

/* ── Stock Status ── */
.pc-stock {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #059669;
}
.pc-stock--out { color: #ef4444; }
.pc-stock-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(16,185,129,0.2);
}
.pc-stock-dot--out { background: #ef4444; box-shadow: 0 0 0 2px rgba(239,68,68,0.2); }

/* ── Price ── */
.pc-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}
.pc-price-current {
  font-size: 16px;
  font-weight: 900;
  color: #C9A96E;
  letter-spacing: -0.01em;
}
.pc-price-current small {
  font-size: 11px;
  font-weight: 700;
  color: #9B7A40;
}
.pc-price-old {
  font-size: 11px;
  color: #b0a090;
  text-decoration: line-through;
  font-weight: 600;
}

/* ── Add to Cart Button ── */
.pc-btn {
  width: 100%;
  margin-top: 8px;
  padding: 9px 10px;
  background: #1a1510;
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'Cairo', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.02em;
}
.pc-btn:hover {
  background: linear-gradient(135deg, #6B4226, #C9A96E);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107,66,38,0.35);
}

/* ── Legacy classes kept for backward compat ── */
.product-image { position:relative; aspect-ratio:4/3; overflow:hidden; background:#f5f5f5; }
.product-image img { width:100%; height:100%; object-fit:cover; transition:transform 0.4s; }
.product-badge { position:absolute; top:10px; right:10px; padding:3px 10px; border-radius:999px; font-size:11px; font-weight:800; z-index:2; }
.product-badge.sale { background:#ef4444; color:white; }
.product-badge.new { background:#10b981; color:white; }
.product-actions { position:absolute; inset:0; background:rgba(26,26,46,0.45); display:flex; align-items:center; justify-content:center; gap:8px; opacity:0; transition:opacity 0.25s; }
.product-card:hover .product-actions { opacity:1; }
.action-btn { width:38px; height:38px; border-radius:50%; border:none; background:white; font-size:16px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:transform 0.2s; box-shadow:0 2px 8px rgba(0,0,0,0.2); }
.action-btn:hover { transform:scale(1.15); background:#C9A96E; }
.product-info { padding:12px 14px 14px; }
.product-category { font-size:10px; font-weight:700; color:#C9A96E; text-transform:uppercase; letter-spacing:0.08em; margin-bottom:4px; }
.product-title { font-size:13px; font-weight:700; color:#1a1a2e; margin-bottom:6px; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.product-title a { color:inherit; text-decoration:none; }
.product-rating { font-size:11px; color:#888; margin-bottom:6px; }
.product-price { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.product-price .current { font-size:15px; font-weight:900; color:#1a1a2e; }
.product-price .old { font-size:11px; color:#aaa; text-decoration:line-through; }
.product-colors { display:flex; gap:5px; margin-top:8px; }
.color-swatch { width:14px; height:14px; border-radius:50%; border:1.5px solid rgba(0,0,0,0.1); }
.product-add-btn { display:block; width:calc(100% - 28px); margin:0 14px 14px; padding:8px; background:#1a1a2e; color:white; border:none; border-radius:8px; font-family:var(--font-arabic),'Tajawal',sans-serif; font-size:12px; font-weight:700; cursor:pointer; transition:background 0.2s; }
.product-add-btn:hover { background:#C9A96E; }

/* ======================================
   QUICK VIEW MODAL
   ====================================== */
.qv-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}

.qv-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.qv-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: min(720px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 20px;
  z-index: 9001;
  padding: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 24px 80px rgba(0,0,0,0.25);
}

.qv-modal.open {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%);
}

.qv-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid #e8e8e8;
  background: white;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.qv-close:hover { background: #f0f0f0; }

.qv-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.qv-img {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  background: #f5f5f5;
}

.qv-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qv-info h2 {
  font-size: 20px;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 8px;
  line-height: 1.4;
}

.qv-cat {
  font-size: 12px;
  font-weight: 700;
  color: #C9A96E;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.qv-price {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.qv-price .qv-price-current {
  font-size: 24px;
  font-weight: 900;
  color: #1a1a2e;
}

.qv-price .qv-price-old {
  font-size: 14px;
  color: #aaa;
  text-decoration: line-through;
}

.qv-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
}

.qv-desc {
  font-size: 13px;
  color: #555;
  line-height: 1.8;
  margin-bottom: 16px;
}

.qv-features {
  list-style: none;
  margin-bottom: 20px;
}

.qv-features li {
  font-size: 13px;
  color: #444;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.qv-features li::before {
  content: '✓';
  color: #10b981;
  font-weight: 800;
}

.qv-actions {
  display: flex;
  gap: 10px;
}

.qv-btn-cart {
  flex: 1;
  padding: 13px;
  background: #1a1a2e;
  color: white;
  border: none;
  border-radius: 10px;
  font-family: var(--font-arabic), 'Tajawal', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.qv-btn-cart:hover { background: #C9A96E; }

.qv-btn-wish {
  width: 46px;
  height: 46px;
  border: 1.5px solid #e8e8e8;
  border-radius: 10px;
  background: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

.qv-btn-wish:hover { border-color: #ef4444; }

.qv-btn-detail {
  padding: 13px 18px;
  border: 1.5px solid #1a1a2e;
  border-radius: 10px;
  background: white;
  color: #1a1a2e;
  font-family: var(--font-arabic), 'Tajawal', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}

.qv-btn-detail:hover {
  background: #1a1a2e;
  color: white;
}

/* ======================================
   RESPONSIVE
   ====================================== */
@media (max-width: 1100px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 800px) {
  .filter-bar-single {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
  }
  .fbs-left, .fbs-right {
    flex-wrap: wrap;
    width: 100%;
  }
  .fbs-left::after { display: none; }
  .fbs-right { margin-right: 0; }
  .fbs-search input { width: 100px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .qv-content { grid-template-columns: 1fr; }
  .qv-modal { padding: 20px; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .product-info { padding: 8px 10px 10px; }
  .product-title { font-size: 12px; }
  .product-price .current { font-size: 13px; }
  .fbs-select { font-size: 12px; padding: 6px 8px; }
}
