.category-page {
  background: #faf8f5
}

.category-hero {
  min-height: 390px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff
}

.category-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .48)
}

.category-hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: 50px 20px
}

.category-hero h1 {
  font-size: 46px;
  line-height: 1.2;
  margin-bottom: 15px;
  font-weight: 600
}

.category-hero p {
  font-size: 19px;
  margin-bottom: 25px
}

.shop-btn {
  display: inline-block;
  background: #a97142;
  color: #fff;
  padding: 13px 34px;
  border-radius: 30px;
  font-weight: 500
}

.category-links {
  padding: 48px 0;
  background: #fff
}

.category-links h2 {
  text-align: center;
  margin-bottom: 25px;
  color: #232323;
  font-size: 28px
}

.category-link-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px
}

.category-link-grid a {
  padding: 13px 10px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  text-align: center;
  background: #fff;
  color: #444;
  font-size: 14px;
  transition: .2s
}

.category-link-grid a:hover {
  border-color: #a97142;
  color: #a97142;
  transform: translateY(-2px)
}

.category-products {
  padding: 55px 0
}

.category-products .products-container {
  display: block
}

.category-sidebar {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 22px;
  height: max-content;
  position: sticky;
  top: 15px
}

.category-sidebar h2 {
  font-size: 22px;
  margin-bottom: 18px;
  color: #232323
}

.category-filter {
  padding: 18px 0;
  border-top: 1px solid #eee
}

.category-filter h3 {
  font-size: 15px;
  margin-bottom: 10px;
  color: #232323
}

.category-filter label {
  display: block;
  font-size: 13px;
  margin: 7px 0;
  color: #666
}

.category-filter input[type=range] {
  width: 100%
}

.category-filter input[type=checkbox] {
  margin-right: 7px
}

.clear-filter-btn {
  width: 100%;
  padding: 11px;
  border-radius: 7px;
  background: #a97142;
  color: #fff;
  margin-top: 10px
}

.category-products-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px
}

.category-products-top h2 {
  font-size: 27px;
  color: #232323
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 10px
}

.sort-box select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 7px;
  background: #fff
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px
}

.category-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  transition: .25s
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .09)
}

.category-card-image {
  height: 245px;
  background: #f3f3f3;
  position: relative;
  overflow: hidden
}

.category-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.category-card-image .discount-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  background: #a97142;
  color: #fff;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 11px
}

.category-card-image .wishlist-btn {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: #444;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .1)
}

.category-card-info {
  padding: 16px
}

.category-card-info .product-category {
  font-size: 12px;
  color: #a97142;
  margin-bottom: 4px
}

.category-card-info h3 {
  font-size: 16px;
  line-height: 1.4;
  color: #232323;
  min-height: 45px
}

.category-rating {
  font-size: 13px;
  margin: 8px 0
}

.category-rating .stars {
  color: #d4af37
}

.category-price {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 8px 0 14px
}

.category-price .current {
  font-weight: 600;
  color: #232323
}

.category-price .old {
  text-decoration: line-through;
  color: #999;
  font-size: 13px
}

.add-cart-btn {
  width: 100%;
  padding: 11px;
  border-radius: 7px;
  background: #a97142;
  color: #fff;
  font-weight: 500
}

.no-results {
  text-align: center;
  padding: 45px;
  background: #fff;
  border-radius: 10px;
  grid-column: 1/-1;
  color: #777
}

.category-newsletter {
  margin-top: 20px;
  padding: 50px 20px;
  background: #232323;
  color: #fff;
  text-align: center
}

.category-newsletter h2 {
  margin-bottom: 8px
}

.category-newsletter p {
  color: #ddd
}

.category-newsletter form {
  display: flex;
  max-width: 560px;
  margin: 20px auto 0
}

.category-newsletter input {
  flex: 1;
  padding: 13px;
  border: 0;
  border-radius: 7px 0 0 7px
}

.category-newsletter button {
  padding: 13px 25px;
  background: #a97142;
  color: #fff;
  border-radius: 0 7px 7px 0
}

@media(max-width:1050px) {
  .category-link-grid {
    grid-template-columns: repeat(4, 1fr)
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media(max-width:768px) {
  .category-hero {
    min-height: 330px
  }

  .category-hero h1 {
    font-size: 34px
  }

  .category-link-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .category-products-top {
    align-items: flex-start;
    gap: 15px;
    flex-direction: column
  }

  .category-grid {
    grid-template-columns: 1fr
  }

  .category-newsletter form {
    flex-direction: column;
    gap: 8px
  }

  .category-newsletter input,
  .category-newsletter button {
    border-radius: 7px
  }

  .category-card-image {
    height: 270px
  }
}

/* =========================================================
   DINING / OFFICE / DECOR CATEGORY + SUBPAGE LAYOUT
   Main pages: filters + 3-column products (Bedroom/Living style)
   Subpages: Sort By only + 4 products per row
========================================================= */
.category-layout {
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 35px;
  align-items: start
}

.category-layout .products-area {
  min-width: 0
}

.category-sidebar {
  position: sticky;
  top: 20px;
  background: #fff;
  border: 0;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, .08);
  height: max-content
}

.category-sidebar h2 {
  margin: 0 0 25px;
  font-size: 24px;
  color: #333
}

.category-filter {
  margin-bottom: 28px;
  padding: 0;
  border: 0
}

.category-filter h3 {
  margin: 0 0 13px;
  color: #A97142;
  font-size: 16px
}

.category-filter label {
  display: block;
  margin: 0 0 11px;
  cursor: pointer;
  color: #555;
  font-size: 14px
}

.category-filter input[type=checkbox] {
  margin-right: 9px
}

.category-filter input[type=range] {
  width: 100%;
  accent-color: #A97142
}

.category-filter p {
  font-size: 13px;
  color: #666;
  margin: 8px 0 0
}

.category-products .category-products-top {
  margin-bottom: 30px
}

.category-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px
}

.category-card-image {
  height: 320px
}

/* Subpages: exactly four product cards in one row on desktop */
body[data-subcategory] .category-products {
  padding-top: 55px
}

body[data-subcategory] .category-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px
}

body[data-subcategory] .category-card-image {
  height: 260px
}

body[data-subcategory] .category-card-info {
  padding: 14px
}

body[data-subcategory] .category-card-info h3 {
  font-size: 15px;
  min-height: 44px
}

body[data-subcategory] .category-products-top {
  margin-bottom: 24px
}

@media(max-width:1200px) {
  body[data-subcategory] .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }
}

@media(max-width:1050px) {
  .category-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 25px
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  body[data-subcategory] .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media(max-width:768px) {
  .category-layout {
    display: block !important
  }

  .category-sidebar {
    position: static;
    margin-bottom: 25px
  }

  .category-grid,
  body[data-subcategory] .category-grid {
    grid-template-columns: 1fr
  }

  .category-card-image,
  body[data-subcategory] .category-card-image {
    height: 270px
  }
}


/* =========================================================
   PRODUCT CARDS — MATCH BEDROOM / LIVING
   Dining / Office / Decor main pages and subpages
========================================================= */
.category-product-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 5px 20px rgba(0, 0, 0, .07);
  transition: transform .35s ease, box-shadow .35s ease;
  border: 0;
}

.category-product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, .14);
}

.category-product-card .product-image {
  height: 320px;
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
}

.category-product-card .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

.category-product-card:hover .product-image img {
  transform: scale(1.07)
}

.category-product-card .discount-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 3;
  background: #A97142;
  color: #fff;
  padding: 7px 12px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
}

.category-product-card .wishlist-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 4;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
  transition: .3s;
}

.category-product-card .wishlist-btn:hover {
  transform: scale(1.1)
}

.category-product-card .wishlist-btn i {
  font-size: 18px;
  color: #333
}

.category-product-card .wishlist-btn.active i {
  color: #d64545
}

.category-product-card .quick-view {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 2;
  padding: 13px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  text-align: center;
  font-size: 14px;
  transform: translateY(100%);
  transition: .35s ease;
  cursor: pointer;
}

.category-product-card:hover .quick-view {
  transform: translateY(0)
}

.category-product-card .product-info {
  padding: 20px
}

.category-product-card .product-category {
  color: #999;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 7px;
}

.category-product-card .product-info h3 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  line-height: 1.4;
  min-height: 0;
}

.category-product-card .rating {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px
}

.category-product-card .stars {
  color: #f4a623;
  font-size: 14px;
  letter-spacing: 1px
}

.category-product-card .rating-number {
  font-size: 13px;
  font-weight: 600;
  color: #444
}

.category-product-card .reviews {
  color: #999;
  font-size: 12px
}

.category-product-card .price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 17px
}

.category-product-card .current-price {
  font-size: 21px;
  font-weight: 700;
  color: #333;
   text-decoration: none;
}

.category-product-card .original-price {
  font-size: 13px;
  color: #999;
  text-decoration: line-through
}

.category-product-card .add-cart-btn {
  width: 100%;
  border: 0;
  padding: 13px 15px;
  border-radius: 30px;
  background: #242424;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: .3s;
}

.category-product-card .add-cart-btn:hover {
  background: #111;
  transform: translateY(-2px)
}

.category-product-card .add-cart-btn i {
  font-size: 14px
}

/* Main category: same three-column product density as Bedroom/Living */
body:not([data-subcategory]) .category-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px
}

/* Subcategories: four products in one row */
body[data-subcategory] .category-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px
}

body[data-subcategory] .category-product-card .product-image {
  height: 320px
}

@media(max-width:1200px) {
  body[data-subcategory] .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }
}

@media(max-width:1050px) {
  body:not([data-subcategory]) .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  body[data-subcategory] .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media(max-width:768px) {

  body:not([data-subcategory]) .category-grid,
  body[data-subcategory] .category-grid {
    grid-template-columns: 1fr
  }

  .category-product-card .product-image,
  body[data-subcategory] .category-product-card .product-image {
    height: 300px
  }
}

/* Use the same centered pill Quick View treatment as Bedroom/Living on Dining, Office and Decor too. */
.category-product-card .quick-view {
  left: 50%;
  bottom: 15px;
  width: auto;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(0, 0, 0, .75);
  text-align: center;
  font-size: 13px;
  transform: translate(-50%, 10px);
  opacity: 0;
  transition: .3s ease;
}

.category-product-card:hover .quick-view {
  transform: translate(-50%, 0);
  opacity: 1;
}


/* Quick View removed globally */
.quick-view {
  display: none !important;
}