:root {
  --body-text-font-sm: 1rem;
  --body-text-font-md: 1.125rem;
  --line-height-1: 1.5;
  --line-height-2: 1.75; /* fixed typo: was --line-heigh1-2 */

  /* Buttons */
  --btn-font-size: 14px;
  --btn-font-size-md: 1rem;

  --bs-breakpoint-xs: 0;
  --bs-breakpoint-sm: 576px;
  --bs-breakpoint-md: 768px;
  --bs-breakpoint-lg: 992px;
  --bs-breakpoint-xl: 1200px;
  --bs-breakpoint-xxl: 1400px;
}

p {
  padding: 0;
  margin-bottom: 0 !important;  /* removed !important — too aggressive globally */
}

#product1 {
  width: 90%;
  margin: 21px auto;
  padding: 0;
}

/* ── Filter Section ─────────────────────────────── */

/* Merged duplicate .filter rules */
.filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding-bottom: 1rem;
}

.filter button {
  text-transform: uppercase;
}

.filter-btn {
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text-primary);
}

.filter-btn i {
  color: #666;
}

.filter-button {
  border: none;
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  background-color: #dc2626;
  color: #fff;
  font-weight: 500;
}

.filters-display {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.no-results {
  height: 60vh;
  width: 60vw;
}

.filters-display.active {
  display: flex;
}

.applied-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-option .filter-container {
  display: none; /* hidden by default, shown when filter button is clicked */
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.filter-option {
  display: flex;
  flex-direction: column;
}

.filter-container label {
  cursor: pointer;
  display: flex;
  font-size: 0.875rem;
  color: #333;
}

.filter-container input[type="checkbox"] {
  cursor: pointer;
  opacity: 0;
  position: absolute;
}

.filter-container label::before {
  content: "";
  width: 1.3em;
  height: 1.3em;
  border-radius: 0.15em;
  margin-right: 0.5em;
  border: 1px solid #fe2828;
}

.filter-container label:hover::before {
  background-color: #fe2828;
  border-color: #fe2828;
}

.filter-container input[type="checkbox"]:checked + label::before {
  background-color: #fe2828;
  content: "\2713";
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
}

.filter-list a {
  list-style-type: none;
}

.shoe-filter-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-column-gap: 1.5rem;
  grid-auto-rows: minmax(40px, auto);
}

.shoe-filter-container .shoe-filter {
  padding-right: 0.5rem;
  font-size: 0.9rem;
}

/* Show/hide animation */
.filter-container.hidden {
  display: none;
}

.filter-container.show {
  animation: slideDown 0.3s ease-out;
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Shop Page Header ───────────────────────────── */

#page-header {
  position: relative;
  margin: 18px auto;
  width: 90%;
  height: 40vh;
  background-size: cover;
  background-color: #f4f3f1;
  background-position: top;
  display: flex;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  padding: 14px;
}

#page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

h1, h2 { font-family: 'Bebas Neue', sans-serif; letter-spacing: 2px !important; }
body, p, nav { font-family: 'Space Grotesk', sans-serif !important; }

.men-header {
  background-image: url('../images/men_banner_2.jpg');
}

.women-header {
  background-image: url('../images/womens.jpg');
}

.accessories-header {
  background-image: url('../images/Accessories.jpg');
}

.release-header {
  background-image: url('../images/releases_banner.jpg');
}

/* .men-header {
  background-image: url('../images/mens_1.jpg');
} */

#page-header h2 {
  text-transform: uppercase;
}

#page-header h2,
#page-header p {
  position: relative;
  z-index: 1;
  color: #fff;
}

/* ── Product Page Layout ────────────────────────── */

.product-page {
  display: grid;
  grid-template-columns: 250px 1fr 1fr;
  grid-template-rows: auto auto auto; /* changed from fixed 100px — let content size rows */
  grid-template-areas:
    "filter-section results-sort results-sort"
    "filter-section products-section products-section"
    "pagination-section pagination-section pagination-section";
  gap: 1rem 1.5rem; /* row-gap column-gap — was missing row-gap */
  padding: 1rem;
}

.filter-section {
  text-align: left;
  grid-area: filter-section;
}

.filter-section h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.results-sort {
  display: flex;
  flex-direction: column;
  /* align-items: flex-start; */
  /* justify-content: space-between; */
  grid-area: results-sort;
}

.results-sort .pg-results {
  font-size: 1rem;
  font-weight: 500;
  color: #666;
}



.products-section {
  grid-area: products-section;
}

.pagination-section {
  grid-area: pagination-section;
}

/* ── Products Grid ──────────────────────────────── */

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.product-image {
  width: 100%; /* fixed: was hardcoded 300px, breaks grid */
  height: 300px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  margin-bottom: 0.5rem;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease-in-out;
}


/* Price trend colors */
.price-trend.uptrend {
  color: #2e7d2e;
  background: #e8f5e9;
}

.price-trend.downtrend {
  color: #c62828;
  background: #ffebee;
}

.price-trend.sideways-trend {
  color: #666;
  background: #f4f3f1;
}

/* ── Sort / Filter Controls ─────────────────────── */

.filter-container .pg-results {
  font-weight: 500;
  font-size: var(--btn-font-size);
  display: flex;
  align-items: center;
}

.filter-container .filter-opt {
  display: flex;
  align-items: center;
  padding: 5px;
}

#product-container .filter-container {
  display: none; /* hidden by default, shown when filter button is clicked */
  align-items: center;
  overflow: hidden;
  padding: 0px 21px;
  height: auto;
  transition: height 0.3s ease-out;
  width: 57%;
  justify-content: space-between;
  font-size: 1rem;
}

#sort-icon {
  transition: 0.2s ease-in-out;
}

.rotate-down {
  transform: rotate(180deg);
}

.amount-text {
  padding-right: 0.5rem;
}

.sort-text,
.amount-text {
  font-weight: 500;
}

#sort-btn,
#pg-amount-btn {
  border: transparent;
  font-weight: 500;
  font-size: var(--btn-font-size);
}

.sort-data {
  border-radius: 4px;
  font-weight: 700;
  padding: 5px;
  margin: 0.23rem;
  color: black;
  background-color: transparent;
  position: relative;
}

.filter-container .filter-opt .pg-data {
  text-transform: capitalize;
  border-radius: 4px;
  font-weight: 700;
  padding: 5px;
  color: black;
  background-color: transparent;
}

.sort-content {
  padding: 8px 4px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: none;
  flex-direction: column;
  background-color: #fff;
  text-align: left;
  min-width: 160px;
  overflow: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: absolute;
  right: 0;
  z-index: 9999;
}

.sort-content.show {
  display: flex;
}

.sort-content a {
  text-decoration: none;
  display: block;
  font-weight: 500;
  color: #333;
  padding: 1px 0.5rem;
  border-radius: 0.25rem;
}

.sort-content a:hover {
  background-color: #EDEDED;
  color: #000;
}

.size-btn {
  border: 1px solid #dc2626;
  border-radius: 4px;
  background: transparent;
  padding: 0.5rem 1rem;

}

.size-btn .size-value {
  font-weight: 500;
}

.grid-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

/* ── Misc ───────────────────────────────────────── */

.heading {
  display: flex;
  justify-content: space-between;
}

.btn {
  font-weight: 700;
  cursor: pointer;
}

.pg-btn {
  border: transparent;
  font-weight: 700;
  background-color: transparent;
}

.test-product-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

#product-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 6;
}

#prod-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.pro {
  /* display: flex; */
  flex-direction: column;
  align-items: flex-start;
  cursor: pointer;
  padding: 0.875rem;
  transition: 0.2s ease-in-out;
}

.pro:hover {
  transform: translateY(-5px);
  transition: transform 0.3s ease-in-out;
  border: 1px solid #f4f3f1;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#prod-card-container {
  margin: 8px 16px;
}

.section-p1 {
  padding: 0 20px;
}

/* ── Breadcrumbs ────────────────────────────────── */

.breadcrumbs {
  width: 90%;
  margin: auto;
}

.breadcrumbs .breadcrumbs-routes {
  padding-left: 0;
  margin-bottom: 0;
  display: flex;
}

.breadcrumbs-routes li {
  padding-right: 10px;
  list-style: none;
}

.breadcrumbs-routes li a {
  text-decoration: none;
  color: #000;
}

/* ── Pagination ─────────────────────────────────── */

#pagination {
  padding: 0 20px;
  margin-top: 1.5rem;
}

#pagination #pagination-links {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
  gap: 10px;
  text-align: center;
}

#pagination a {
  text-decoration: none;
  background-color: transparent;
  padding: 12px 20px;
  border-radius: 4px;
  border: none;
  color: #000;
  font-size: 16px;
  font-weight: 500;
  transition: 0.2s ease-in;
}

/* fixed: :selected is not valid — use .active for current page */
#pagination a.active {
  background-color: #202020;
  color: #fff;
  border: 1px solid #f4f3f1;
}

#pagination a:hover {
  background-color: #f9f9f9;
  color: #000;
}

#pagination a i {
  font-size: 16px;
  font-weight: 600;
}

.curr-pg {
  font-weight: 700;
  font-size: 16px;
}



/* color picker */

.color-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 0;
}

.color-wrapper  {
  list-style: none;
  display: flex;
  align-items: center;
}

.color-wrapper .color {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  background-color: var(--swatch);
  cursor: pointer;
  transition: border-color 0.2s ease;
  outline-offset: 3px;
}

.color[data-light="true"] {
  border-color: #ccc;
}

.color:hover,
.color.active {
  border-color: #dc2626;
}

.page-results {
  display: flex;
  align-items: center;
  justify-content: space-between;

}

.load-more-btn {
  border: none;
  background-color: #dc2626;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: 0.3s ease-in-out;
}

.load-more-btn:hover {
  background-color: #b91c1c;
  transform: scale(1.05);
}

.chart-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #878787;
}

/* When the empty state renders inside a product grid, it lands in the
   grid's first column instead of centering — span every column and
   center the content as a flex box regardless of column count. */
.product-grid .chart-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.chart-empty-state i {
  font-size: 2.5rem;
  color: #e1e1e1;
  margin-bottom: 0.75rem;
}

.chart-empty-state h3 {
  color: #000;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.chart-empty-state p {
  font-size: 0.875rem;
}

.no-results-cta {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: 0.25rem;
  background-color: #000;
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: 0.25s ease;
}

.no-results-cta:hover {
  transform: translateY(-2px);
}

hr {
  margin-top: 0.875rem;
  margin-bottom: 0.875rem;
}

.modal-overlay {
  background: rgba(0, 0, 0, 0.1);
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;

}

.modal-overlay.show {
  display: flex;
}



/* ── Responsive ─────────────────────────────────── */

@media (max-width: 991.98px) {
  /* Stack the product page grid on tablet and below */
  .product-page {
    grid-template-columns: 1fr;
    grid-template-areas:
      "filter-section"
      "results-sort"
      "products-section"
      "pagination-section";
  }

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

@media (min-width: 992px) and (max-width: 1199.98px) {
  #prod-cards {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 0.7rem;
    column-gap: 0.7rem;
  }

  .product-card {
    width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {


  .sort-content {
    right: 12px;
  }

  #filter-section {
    gap: 20px;
  }

  #prod-cards {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 0.7rem;
    column-gap: 0.7rem;
  }

  .product-card {
    width: 100%;
  }

  .product-image,
  .pro {
    height: auto;
  }

  .product-image {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #product-container .filter-container {
    width: 50%;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  #prod-cards {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 0.7rem;
    column-gap: 0.7rem;
  }

  .product-card {
    width: 100%;
  }

  #filter-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-width: 575.98px) {

  .product-page {
    grid-template-columns: 1fr;
  }
  

  .product-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  #product-container .filter-container {
    /* width: 100%; */
    align-items: center;
    flex-direction: column;
    padding: 0;
  }

  #prod-cards {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 49%);
    row-gap: 1rem;
    column-gap: 1.2rem;
  }

  .product-card {
    width: 100%;
  }

  #pagination {
    width: 100%;
  }

  #pagination a {
    padding: 0 0.25rem;
  }

  .section-p1 {
    padding: 0;
  }

  .filter-container .filter-opt {
    display: -webkit-inline-box;
  }

  .filter-container .filter-opt .sort-data {
    padding: 1px;
    border: 1px solid #b5a9a9c9;
    display: flex;
    border-radius: 2rem;
  }

  .filter-container .filter-opt .pg-data {
    display: flex;
    padding: 1px;
    border: 1px solid #b5a9a9c9;
    border-radius: 2rem;
  }

  #sort-btn,
  #pg-amount-btn {
    font-size: 1rem;
    font-weight: 500;
  }

  #sort-icon {
    display: inline-flex;
  }

  .results-sort {
    align-items: center;
  }
}