/* =========================================================
   UNITED LINE FURNITURE
   SHOP PAGE — CLEAN MASTER CSS
   Replaces the old shop.css completely
========================================================= */

/* =========================================================
   1. SHOP HERO
========================================================= */

.shop-hero {
  position: relative;
  width: 100%;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(
      90deg,
      rgba(15, 13, 11, 0.88) 0%,
      rgba(15, 13, 11, 0.72) 25%,
      rgba(15, 13, 11, 0.40) 48%,
      rgba(15, 13, 11, 0.08) 72%,
      rgba(15, 13, 11, 0.00) 100%
    ),
    url("../images/heroes/shop-hero.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.shop-hero .container {
  position: relative;
  z-index: 2;
  width: min(1400px, calc(100% - 96px));
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

.shop-hero-inner {
  width: 100%;
  position: relative;
  z-index: 2;
}

.shop-hero-content {
  width: 100%;
  max-width: 690px;
  padding: 72px 0;
}

.shop-hero-breadcrumb,
.shop-hero .breadcrumb {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  font-size: 14px;
  font-weight: 500;
}

.shop-hero-breadcrumb a,
.shop-hero .breadcrumb a {
  color: #fff;
  text-decoration: none;
}

.shop-hero-breadcrumb span,
.shop-hero .breadcrumb span {
  color: rgba(255, 255, 255, 0.68);
}

.shop-hero-breadcrumb strong {
  color: #d3a06a;
  font-weight: 600;
}

.shop-hero h1 {
  max-width: 680px;
  margin: 0;
  color: #fff;
  font-family: "Playfair Display", serif;
  font-size: clamp(56px, 5vw, 78px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -1.2px;
}

.shop-hero-description,
.shop-hero-content > p,
.shop-hero p {
  max-width: 570px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.90);
  font-size: 17px;
  line-height: 1.7;
}

.shop-hero-benefits {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 48px;
}

.shop-benefit {
  position: relative;
  width: 145px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-right: 24px;
  margin-right: 24px;
}

.shop-benefit:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 0;
  width: 1px;
  height: 70px;
  background: rgba(255, 255, 255, 0.25);
}

.shop-benefit svg {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  fill: none;
  stroke: #d5a46d;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shop-benefit span {
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}


/* =========================================================
   2. SHOP SECTION / DESKTOP LAYOUT
========================================================= */

.shop-section {
  padding: 48px 0 90px;
  background: #fff;
}

.shop-section > .container {
  width: min(1400px, calc(100% - 96px));
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

/*
  Supports both structures used in the project:
  .shop-layout and .shop-content
*/
.shop-layout,
.shop-content {
  width: 100%;
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  gap: 52px;
  align-items: start;
  box-sizing: border-box;
}

.shop-products,
.shop-products-area,
.shop-main {
  width: 100%;
  min-width: 0;
}


/* =========================================================
   3. FILTER SIDEBAR
========================================================= */

.shop-sidebar,
.shop-filters {
  min-width: 0;
}

.shop-sidebar {
  position: sticky;
  top: 120px;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e6e0d8;
}

.filter-header h3 {
  margin: 0;
  color: var(--dark, #211f1c);
  font-family: "Playfair Display", serif;
  font-size: 27px;
  font-weight: 600;
}

.filter-header button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #8b735b;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

.filter-group {
  padding: 25px 0;
  border-bottom: 1px solid #ece6df;
}

.filter-group h4 {
  margin: 0 0 16px;
  color: #26231f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.filter-group label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 35px;
  color: #625c56;
  font-size: 13px;
  cursor: pointer;
}

.filter-group label:hover span {
  color: var(--brown, #9b7652);
}

.filter-group input[type="checkbox"],
.filter-group input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brown, #9b7652);
  cursor: pointer;
}

.filter-group small {
  color: #a58b70;
  font-size: 11px;
}


/* =========================================================
   4. TOOLBAR
========================================================= */

.shop-toolbar {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 0 0 30px;
  padding: 0 0 18px;
  border-bottom: 1px solid #e6e0d8;
  box-sizing: border-box;
}

.results-count {
  margin: 0;
  color: #746e67;
  font-size: 13px;
}

.results-count strong {
  color: #1e1c19;
  font-weight: 700;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-right select,
#shopSort {
  min-width: 220px;
  height: 48px;
  padding: 0 42px 0 15px;
  border: 1px solid #ddd7cf;
  background: #fff;
  color: #2d2925;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
}

.toolbar-right select:focus,
#shopSort:focus {
  border-color: var(--brown, #9b7652);
}

.mobile-filter-btn {
  display: none;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 18px;
  border: 1px solid #ddd7cf;
  background: #fff;
  color: var(--dark, #211f1c);
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
}


/* =========================================================
   5. PRODUCT GRID
   Desktop = 3 columns
   Tablet  = 2 columns
   Mobile  = 2 columns
========================================================= */

.shop-product-grid,
.shop-products-grid,
.category-products-grid,
.products-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 22px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


/* =========================================================
   6. PRODUCT CARD
========================================================= */

.shop-product-grid .product-card,
.shop-products-grid .product-card,
.category-products-grid .product-card,
.products-grid .product-card,
.shop-products .product-card {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eee8e1;
  box-sizing: border-box;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

@media (hover: hover) {
  .shop-product-grid .product-card:hover,
  .shop-products-grid .product-card:hover,
  .category-products-grid .product-card:hover,
  .products-grid .product-card:hover,
  .shop-products .product-card:hover {
    transform: translateY(-4px);
    border-color: #ddd3c7;
    box-shadow: 0 14px 34px rgba(43, 34, 25, 0.07);
  }
}


/* =========================================================
   7. PRODUCT IMAGE
========================================================= */

.shop-product-grid .product-image-wrap,
.shop-products-grid .product-image-wrap,
.category-products-grid .product-image-wrap,
.products-grid .product-image-wrap,
.shop-products .product-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f7f5f1;
}

.shop-product-grid .product-image-wrap > a,
.shop-products-grid .product-image-wrap > a,
.category-products-grid .product-image-wrap > a,
.products-grid .product-image-wrap > a {
  display: block;
  width: 100%;
  height: 100%;
}

.shop-product-grid .product-image-wrap img,
.shop-products-grid .product-image-wrap img,
.category-products-grid .product-image-wrap img,
.products-grid .product-image-wrap img,
.shop-products .product-image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

@media (hover: hover) {
  .shop-product-grid .product-card:hover .product-image-wrap img,
  .shop-products-grid .product-card:hover .product-image-wrap img,
  .category-products-grid .product-card:hover .product-image-wrap img,
  .products-grid .product-card:hover .product-image-wrap img,
  .shop-products .product-card:hover .product-image-wrap img {
    transform: scale(1.025);
  }
}


/* =========================================================
   8. BADGE / WISHLIST
========================================================= */

.product-badge,
.shop-products .product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  padding: 7px 10px;
  background: #fff;
  color: #332d27;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.3px;
}

.new-badge,
.shop-products .new-badge {
  background: #a1764c;
  color: #fff;
}

.product-wishlist,
.shop-products .product-wishlist {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #27231f;
  font-size: 19px;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(36, 29, 22, 0.08);
}


/* =========================================================
   9. VIEW PRODUCT BUTTON
========================================================= */

.quick-add-btn,
.shop-product-grid .quick-add-btn,
.shop-products-grid .quick-add-btn,
.category-products-grid .quick-add-btn,
.products-grid .quick-add-btn {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 6;
  width: auto;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 0;
  background: rgba(255, 255, 255, 0.96);
  color: #211f1c;
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}


/* =========================================================
   10. PRODUCT INFORMATION
========================================================= */

.shop-product-grid .product-info,
.shop-products-grid .product-info,
.category-products-grid .product-info,
.products-grid .product-info,
.shop-products .product-info {
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 17px 16px 20px;
  box-sizing: border-box;
}

.shop-product-grid .product-category,
.shop-products-grid .product-category,
.category-products-grid .product-category,
.products-grid .product-category,
.shop-products .product-category {
  display: block;
  margin: 0 0 7px;
  color: #9b8067;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.shop-product-grid .product-info h3,
.shop-products-grid .product-info h3,
.category-products-grid .product-info h3,
.products-grid .product-info h3,
.shop-products .product-info h3 {
  margin: 0 0 11px;
  color: #24211e;
  font-family: "Playfair Display", serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}

.shop-product-grid .product-info h3 a,
.shop-products-grid .product-info h3 a,
.category-products-grid .product-info h3 a,
.products-grid .product-info h3 a,
.shop-products .product-info h3 a {
  color: inherit;
  font: inherit;
  text-decoration: none;
}

.shop-product-grid .product-price,
.shop-products-grid .product-price,
.category-products-grid .product-price,
.products-grid .product-price,
.shop-products .product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.shop-product-grid .current-price,
.shop-products-grid .current-price,
.category-products-grid .current-price,
.products-grid .current-price,
.shop-products .current-price {
  color: #211f1c;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.old-price,
.shop-products .old-price {
  color: #aaa39c;
  font-size: 12px;
  text-decoration: line-through;
}


/* =========================================================
   11. PAGINATION
========================================================= */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 55px;
}

.pagination button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #ddd7cf;
  background: #fff;
  color: #403b36;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.pagination button:hover,
.pagination button.active {
  background: #211f1c;
  color: #fff;
  border-color: #211f1c;
}

.pagination button.disabled {
  opacity: 0.35;
  pointer-events: none;
}


/* =========================================================
   12. TABLET
========================================================= */

@media (max-width: 1050px) {

  .shop-hero .container,
  .shop-section > .container {
    width: calc(100% - 50px);
  }

  .shop-layout,
  .shop-content {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 30px;
  }

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


/* =========================================================
   13. MOBILE — FINAL CLEAN RESPONSIVE RULES
========================================================= */

@media (max-width: 768px) {

  /* HERO */

  .shop-hero {
    min-height: 520px;
    align-items: center;
    background:
      linear-gradient(
        0deg,
        rgba(15, 13, 11, 0.94) 0%,
        rgba(15, 13, 11, 0.74) 45%,
        rgba(15, 13, 11, 0.22) 78%,
        rgba(15, 13, 11, 0.08) 100%
      ),
      url("../images/heroes/shop-hero.jpg");
    background-size: cover;
    background-position: 60% center;
  }

  .shop-hero .container {
    width: calc(100% - 36px);
  }

  .shop-hero-content {
    max-width: 100%;
    padding: 42px 0 34px;
  }

  .shop-hero-breadcrumb,
  .shop-hero .breadcrumb {
    margin-bottom: 18px;
    font-size: 13px;
  }

  .shop-hero h1 {
    font-size: 46px;
    line-height: 1;
    letter-spacing: -0.5px;
  }

  .shop-hero-description,
  .shop-hero-content > p,
  .shop-hero p {
    max-width: 440px;
    margin-top: 17px;
    font-size: 15px;
    line-height: 1.6;
  }

  .shop-hero-benefits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
    margin-top: 30px;
  }

  .shop-benefit {
    width: auto;
    margin: 0;
    padding: 0;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .shop-benefit::after {
    display: none;
  }

  .shop-benefit svg {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    margin: 0;
  }

  .shop-benefit span {
    font-size: 12px;
  }


  /* SHOP SECTION */

  .shop-section {
    padding: 28px 0 50px;
  }

  .shop-section > .container {
    width: calc(100% - 28px);
    max-width: none;
    margin: 0 auto;
    padding: 0;
  }

  .shop-layout,
  .shop-content {
    width: 100%;
    display: block;
  }

  .shop-sidebar {
    display: none;
    position: static;
    width: 100%;
    margin: 0 0 24px;
    padding: 20px;
    background: #faf8f5;
    border: 1px solid #e6e0d8;
    box-sizing: border-box;
  }

  .shop-sidebar.active {
    display: block;
  }


  /* TOOLBAR */

  .shop-toolbar {
    width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin: 0 0 24px;
    padding: 0 0 20px;
  }

  .results-count {
    width: 100%;
    text-align: center;
    font-size: 13px;
  }

  .toolbar-right {
    width: 100%;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
  }

  .mobile-filter-btn {
    width: 100%;
    height: 48px;
    display: inline-flex;
    padding: 0 10px;
  }

  .toolbar-right select,
  #shopSort {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding-left: 12px;
    font-size: 12px;
  }


  /* PRODUCT GRID — THE MOBILE ISSUE FIX */

  .shop-product-grid,
  .shop-products-grid,
  .category-products-grid,
  .products-grid,
  .shop-products .shop-product-grid,
  .shop-products .shop-products-grid {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 10px;
    row-gap: 16px;
    margin: 0;
    padding: 0;
  }


  /* PRODUCT CARD */

  .shop-product-grid .product-card,
  .shop-products-grid .product-card,
  .category-products-grid .product-card,
  .products-grid .product-card,
  .shop-products .product-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    transform: none;
    box-shadow: none;
  }


  /* MOBILE IMAGE */

  .shop-product-grid .product-image-wrap,
  .shop-products-grid .product-image-wrap,
  .category-products-grid .product-image-wrap,
  .products-grid .product-image-wrap,
  .shop-products .product-image-wrap {
    width: 100%;
    height: 210px;
    min-height: 210px;
    aspect-ratio: auto;
    overflow: hidden;
    background: #f5f2ee;
  }

  .shop-product-grid .product-image-wrap img,
  .shop-products-grid .product-image-wrap img,
  .category-products-grid .product-image-wrap img,
  .products-grid .product-image-wrap img,
  .shop-products .product-image-wrap img {
    width: 100%;
    height: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
    object-fit: cover;
    object-position: center;
    transform: none;
  }


  /* MOBILE VIEW PRODUCT */

  .quick-add-btn,
  .shop-product-grid .quick-add-btn,
  .shop-products-grid .quick-add-btn,
  .category-products-grid .quick-add-btn,
  .products-grid .quick-add-btn {
    left: 7px;
    right: 7px;
    bottom: 7px;
    min-height: 38px;
    padding: 0 5px;
    opacity: 1;
    visibility: visible;
    transform: none;
    font-size: 10px;
    letter-spacing: 0;
  }


  /* MOBILE BADGE / WISHLIST */

  .product-badge,
  .shop-products .product-badge {
    top: 8px;
    left: 8px;
    padding: 6px 8px;
    font-size: 8px;
  }

  .product-wishlist,
  .shop-products .product-wishlist {
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    font-size: 17px;
  }


  /* MOBILE PRODUCT INFO */

  .shop-product-grid .product-info,
  .shop-products-grid .product-info,
  .category-products-grid .product-info,
  .products-grid .product-info,
  .shop-products .product-info {
    min-height: 0;
    height: auto;
    padding: 12px 10px 14px;
  }

  .shop-product-grid .product-category,
  .shop-products-grid .product-category,
  .category-products-grid .product-category,
  .products-grid .product-category,
  .shop-products .product-category {
    margin-bottom: 6px;
    font-size: 8px;
    letter-spacing: 0.9px;
  }

  .shop-product-grid .product-info h3,
  .shop-products-grid .product-info h3,
  .category-products-grid .product-info h3,
  .products-grid .product-info h3,
  .shop-products .product-info h3 {
    min-height: 0;
    margin: 0 0 9px;
    font-size: 15px;
    line-height: 1.18;
  }

  .shop-product-grid .current-price,
  .shop-products-grid .current-price,
  .category-products-grid .current-price,
  .products-grid .current-price,
  .shop-products .current-price {
    font-size: 14px;
  }

  .old-price,
  .shop-products .old-price {
    font-size: 11px;
  }


  /* PAGINATION */

  .pagination {
    margin-top: 40px;
  }

  .pagination button {
    width: 37px;
    height: 37px;
  }
}


/* =========================================================
   14. VERY SMALL PHONES
   Still 2 columns
========================================================= */

@media (max-width: 390px) {

  .shop-hero .container {
    width: calc(100% - 24px);
  }

  .shop-hero h1 {
    font-size: 40px;
  }

  .shop-section > .container {
    width: calc(100% - 20px);
  }

  .shop-product-grid,
  .shop-products-grid,
  .category-products-grid,
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 8px;
    row-gap: 14px;
  }

  .shop-product-grid .product-image-wrap,
  .shop-products-grid .product-image-wrap,
  .category-products-grid .product-image-wrap,
  .products-grid .product-image-wrap,
  .shop-products .product-image-wrap {
    height: 185px;
    min-height: 185px;
    aspect-ratio: auto;
  }

  .shop-product-grid .product-info,
  .shop-products-grid .product-info,
  .category-products-grid .product-info,
  .products-grid .product-info,
  .shop-products .product-info {
    min-height: 0;
    height: auto;
    padding: 10px 8px 11px;
  }

  .shop-product-grid .product-info h3,
  .shop-products-grid .product-info h3,
  .category-products-grid .product-info h3,
  .products-grid .product-info h3,
  .shop-products .product-info h3 {
    min-height: 0;
    font-size: 14px;
  }

  .shop-product-grid .current-price,
  .shop-products-grid .current-price,
  .category-products-grid .current-price,
  .products-grid .current-price,
  .shop-products .current-price {
    font-size: 13px;
  }

  .toolbar-right {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 8px;
  }
}
