@import "../section-breadcrumb/assets/styles.css";
@import "../section-sidebar/assets/styles.css";
@import "../section-content/assets/styles.css";

/* Main Container: sidebar + content horizontal layout */
#main {
  padding-top: 6.63rem;
  padding-bottom: 7.5rem;
  background: #f7f4ec;
  position: relative;
  background-image: url(/wp-content/uploads/2026/04/Chi-tiet-san-pham.webp);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.pl-main {
  display: flex;
  width: 100%;
  min-height: 100vh;
  max-width: 91.5rem;
  margin: 0 auto;
}

.pl-main > .pl-sidebar {
  margin-right: 2.5rem;
}

/* =============================================
   Mobile Filter Button (gradient pill)
   ============================================= */

.pl-filter-btn-wrap {
  opacity: 0;
  visibility: hidden;
  height: 0;
  overflow: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    height 0.3s ease;
}

.pl-filter-btn {
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.625rem 1rem;
  border: none;
  border-radius: 6.25rem;
  /* background: radial-gradient(circle at 46.5% 50%, #cb5140 0%, #d8a061 91%); */
  background: radial-gradient(
    50% 169.61% at 50% 50%,
    #cb5140 46.54%,
    #d8a061 91.01%
  );
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.pl-filter-btn:hover {
  opacity: 0.9;
}

.pl-filter-btn__icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.pl-filter-btn__text {
  margin-left: 0.5rem;
  font-family: "SF Pro Display", sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  color: #f7f4ec;
}

/* =============================================
   Selected Filters (mobile chip row)
   ============================================= */

.pl-selected-filters {
  /* display: flex; */
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: none;
  /* opacity: 0;
  visibility: hidden;
  height: 0; */
  /* overflow: hidden; */
  /* transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    height 0.3s ease,
    margin 0.3s ease; */
}

.pl-selected-filters::-webkit-scrollbar {
  display: none;
}

.pl-selected-filters--visible {
  display: flex;
  margin-top: 1.5rem;
}

.pl-selected-chip {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  background: #ffffff;
  border: none;
  border-radius: 6rem;
  padding: 0 0.375rem 0 0.625rem;
  height: 2.125rem;
  cursor: pointer;
  font-family: "SF Pro Display", sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: #1d1d1d;
  white-space: nowrap;
}

.pl-selected-chip + .pl-selected-chip {
  margin-left: 0.3125rem;
}

.pl-selected-chip__close {
  margin-left: 0.375rem;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pl-selected-chip--clear {
  background: #680103;
  color: #f7f4ec;
  padding: 0 0.625rem;
}

/* =============================================
   Sticky Bottom Bar (mobile only)
   ============================================= */

.pl-sticky-bar {
  position: fixed;
  /* bottom: 0; */
  bottom: 4rem;
  left: 0;
  right: 0;
  z-index: 999;
  padding: 0 0.75rem 0.75rem;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(100%);
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease;
}

.pl-sticky-bar--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.pl-sticky-bar .pl-filter-btn {
  pointer-events: auto;
}

/* =============================================
   Loader text
   ============================================= */

.pl-content__loader-text {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

/* =============================================
   Responsive — Mobile
   ============================================= */

@media screen and (max-width: 639.98px) {
  #main {
    padding-top: 3.75rem;
    background-image: url(/wp-content/uploads/2026/04/MB-Chi-tiet-bai-viet.webp);
  }

  .pl-main {
    flex-direction: column;
    padding-right: 0;
    padding-bottom: 4.25rem;
  }

  .pl-main > .pl-sidebar {
    margin-right: 0;
  }

  .pl-main > * + * {
    /* margin-top: 1.5rem; */
  }

  /* Filter Button */
  .pl-filter-btn-wrap {
    opacity: 1;
    visibility: visible;
    height: auto;
    overflow: visible;
    padding: 0 0.75rem;
    margin-top: 1.25rem;
  }

  /* Selected Filters */
  .pl-selected-filters {
    padding: 0 0.75rem;
  }

  /* Sticky Bar — base mobile overrides handled by default styles */

  /* Loader text */
  .pl-content__loader-text {
    opacity: 1;
    visibility: visible;
    position: static;
    margin-left: 1rem;
    font-family: "Phudu", cursive;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    color: rgba(28, 28, 28, 0.8);
  }
  
  .pl-filter-btn svg {
    width: 1.25rem;
    height: 1.25rem;
  }
  
  .pl-filter-btn__text {
    margin-left: 0;
  }
}
