/* =====================================================
   كتالوج منتجات غرف النوم — خبراء التميز للأثاث الحديث
   ===================================================== */

/* ======== PRODUCT CATALOG HERO ======== */
.catalog-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  padding: 120px 20px 80px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.catalog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(29,26,23,0.82) 0%, rgba(45,32,24,0.6) 60%, rgba(29,26,23,0.8) 100%);
  z-index: 1;
}
.catalog-hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}
.catalog-hero .catalog-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 22px;
  background: rgba(199,161,91,0.12);
  border: 1px solid rgba(199,161,91,0.5);
  color: var(--gold);
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 28px;
  backdrop-filter: blur(6px);
}
.catalog-hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: #fff;
  margin-bottom: 18px;
  line-height: 1.3;
}
.catalog-hero p {
  font-size: clamp(1rem, 2vw, 1.18rem);
  opacity: 0.88;
  margin-bottom: 36px;
  line-height: 1.9;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.catalog-hero .hero-stats {
  display: flex;
  gap: 36px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid rgba(199,161,91,0.2);
}
.hero-stat {
  text-align: center;
}
.hero-stat .stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 4px;
}
.hero-stat .stat-label {
  font-size: 0.82rem;
  opacity: 0.75;
  white-space: nowrap;
}

/* ======== FILTER BAR ======== */
.filter-section {
  background: #fff;
  padding: 24px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  position: sticky;
  top: 76px;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.filter-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 10px 22px;
  border-radius: 50px;
  border: 1.5px solid rgba(199,161,91,0.25);
  background: transparent;
  color: var(--gray);
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}
.filter-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(199,161,91,0.05);
}
.filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
  box-shadow: 0 4px 16px rgba(199,161,91,0.3);
}

/* ======== PRODUCTS SECTION ======== */
.products-section {
  padding: 80px 0 100px;
  background: var(--ivory);
}
.products-section-header {
  text-align: center;
  margin-bottom: 50px;
}
.products-section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 10px;
}
.products-section-header p {
  font-size: 1.05rem;
  color: var(--gray);
  max-width: 560px;
  margin: 0 auto;
}

/* ======== PRODUCT GRID ======== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 20px;
}

/* ======== PRODUCT CARD ======== */
.product-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
  transition: all 0.45s cubic-bezier(0.25,1,0.5,1);
  display: flex;
  flex-direction: column;
  position: relative;
}
.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
  border-color: rgba(199,161,91,0.2);
}
.product-card.hidden {
  display: none;
}

/* Product Image */
.product-img-wrap {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: var(--beige);
}
.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25,1,0.5,1);
}
.product-card:hover .product-img-wrap img {
  transform: scale(1.06);
}

/* Product Badges */
.product-badges {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}
.badge-discount {
  background: #E53E3E;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}
.badge-category {
  background: rgba(29,26,23,0.75);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}
.badge-ask {
  background: var(--gold);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

/* Product Body */
.product-body {
  padding: 22px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-cat-label {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.product-cat-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
}
.product-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--deep);
  margin-bottom: 10px;
  line-height: 1.4;
}
.product-desc {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 14px;
  flex: 1;
}

/* Product Features */
.product-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.product-feature-tag {
  background: var(--beige);
  color: var(--walnut);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

/* Pricing */
.product-pricing {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.05);
  margin-bottom: 16px;
}
.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.price-current {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--deep);
  line-height: 1;
}
.price-current span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray);
  margin-right: 2px;
}
.price-ref-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.price-ref {
  font-size: 0.88rem;
  color: #999;
  text-decoration: line-through;
}
.price-save-badge {
  background: rgba(229,62,62,0.08);
  color: #E53E3E;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(229,62,62,0.15);
}
.price-ask {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold);
}

/* Product CTA Buttons */
.product-actions {
  display: flex;
  gap: 10px;
}
.btn-product-wa {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: #25D366;
  color: #fff;
  border-radius: 50px;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
  text-decoration: none;
  min-height: 46px;
}
.btn-product-wa:hover {
  background: #1EAD56;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,211,102,0.25);
}
.btn-product-details {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background: transparent;
  color: var(--gold);
  border: 1.5px solid rgba(199,161,91,0.4);
  border-radius: 50px;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-product-details:hover {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}

/* ======== SELECTED PRODUCTS ON HOMEPAGE ======== */
.selected-products-section {
  background: var(--beige);
  padding: 100px 0;
}
.selected-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 20px;
}
.selected-product-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  transition: all 0.4s;
  border: 1px solid rgba(0,0,0,0.04);
}
.selected-product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}
.selected-product-img {
  height: 220px;
  overflow: hidden;
  position: relative;
}
.selected-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s;
}
.selected-product-card:hover .selected-product-img img {
  transform: scale(1.06);
}
.selected-product-save-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #E53E3E;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 16px;
}
.selected-product-body {
  padding: 18px 16px 16px;
}
.selected-product-body .cat-label {
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 6px;
}
.selected-product-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--deep);
  margin-bottom: 10px;
  line-height: 1.4;
}
.selected-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.selected-price-current {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--deep);
}
.selected-price-ref {
  font-size: 0.85rem;
  color: #bbb;
  text-decoration: line-through;
}
.selected-product-body .btn-product-wa {
  width: 100%;
  font-size: 0.88rem;
  padding: 10px 14px;
}

/* View All CTA */
.view-all-wrap {
  text-align: center;
  margin-top: 50px;
}
.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 38px;
  background: var(--gold);
  color: #fff;
  border-radius: 50px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(199,161,91,0.3);
  transition: all 0.35s;
}
.btn-view-all:hover {
  background: #b4903f;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(199,161,91,0.4);
}

/* ======== NO RESULTS ======== */
.no-products-msg {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
  display: none;
  grid-column: 1 / -1;
}
.no-products-msg i {
  font-size: 3rem;
  color: var(--gold);
  opacity: 0.4;
  margin-bottom: 16px;
  display: block;
}

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

@media (max-width: 768px) {
  .filter-section {
    top: 72px;
    padding: 16px 0;
  }
  .filter-inner {
    gap: 8px;
    padding: 0 12px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filter-inner::-webkit-scrollbar { display: none; }
  .filter-btn {
    flex-shrink: 0;
    padding: 9px 18px;
    font-size: 0.88rem;
  }

  .products-section {
    padding: 60px 0 80px;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .product-img-wrap {
    height: 200px;
  }
  .product-body {
    padding: 16px 14px 14px;
  }
  .product-name {
    font-size: 0.98rem;
  }
  .price-current {
    font-size: 1.2rem;
  }
  .product-actions {
    flex-direction: column;
  }
  .btn-product-details {
    display: none;
  }
  .btn-product-wa {
    font-size: 0.88rem;
  }
  .selected-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .catalog-hero {
    min-height: 55vh;
    padding: 100px 16px 60px;
  }
  .catalog-hero .hero-stats {
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
  .product-img-wrap {
    height: 240px;
  }
  .product-actions {
    flex-direction: row;
  }
  .btn-product-details {
    display: none;
  }
  .selected-products-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 390px) {
  .catalog-hero h1 {
    font-size: 1.7rem;
  }
  .filter-btn {
    padding: 8px 14px;
    font-size: 0.84rem;
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}
