/* =========================================
   SACRED PORTAL BANNER (FLUID & RESPONSIVE)
   ========================================= */

.portal-banner {
  position: relative;
  width: 100%;
  /* Ensures enough vertical height for the header clearance AND the content */
  min-height: clamp(450px, 65vh, 750px);
  display: flex;
  flex-direction: column;
  /* Centers content in the remaining space after top padding */
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-text-primary, #2b1d19);

  /* Creates an impenetrable safe zone for your transparent header */
  padding-top: clamp(100px, 15vh, 160px);
  padding-bottom: 2rem;
  box-sizing: border-box;
}

/* --- Ethereal Background Animation --- */
.pb-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  animation: slowZoom 25s linear infinite alternate;
}

@keyframes slowZoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.15);
  }
}

.pb-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(26, 18, 16, 0.4) 0%,
    rgba(26, 18, 16, 0.95) 100%
  );
  z-index: 2;
}

/* --- Content Wrapper --- */
.pb-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 90%;
  max-width: 800px;
  margin: 0 auto;
}

/* --- Integrated Breadcrumb --- */
.pb-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap; /* Prevents overflow on narrow mobile screens */
  gap: clamp(8px, 2vw, 15px);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  width: 100%;
}

.pb-link,
.pb-current {
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: clamp(0.7rem, 1.2vw, 0.85rem);
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.4;
}

.pb-link {
  font-weight: 500;
  color: rgba(253, 251, 246, 0.65);
  text-decoration: none;
  transition: color 0.3s ease;
}

.pb-link:hover {
  color: var(--color-accent, #c78d6a);
}

.pb-separator {
  color: var(--color-accent, #c78d6a);
  font-size: clamp(0.6rem, 1vw, 0.8rem);
  display: flex;
  align-items: center;
}

.pb-current {
  font-weight: 600;
  color: var(--color-text-inverse, #fdfbf6);
}

/* --- Title & Typography --- */
.pb-title {
  font-family: var(--font-heading, "Cinzel", serif);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 400;
  color: var(--color-text-inverse, #fdfbf6);
  line-height: 1.15;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  letter-spacing: 1px;
  text-shadow: 0 4px 25px rgba(0, 0, 0, 0.5);
}

.pb-subtitle {
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  color: #c2b4ae;
  line-height: 1.6;
  max-width: 900px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* --- The Guiding Thread --- */
.pb-thread {
  width: 1px;
  height: clamp(50px, 10vh, 100px);
  background: linear-gradient(
    to bottom,
    var(--color-accent, #c78d6a) 0%,
    transparent 100%
  );
  opacity: 0.7;
}

/* =========================================
   MOBILE RESPONSIVE OVERRIDES (PORTAL BANNER)
   ========================================= */

/* --- Tablets & Large Phones (max-width: 768px) --- */
@media (max-width: 768px) {
  .portal-banner {
    /* Strict height limits for mobile to keep it in the viewport */
    min-height: 400px;
    height: 60vh;
    /* Exact pixel clearance for your mobile header */
    padding-top: 100px;
    padding-bottom: 1.5rem;
  }

  .pb-content {
    width: 100%;
    padding: 0 1.2rem; /* Ensures text never touches the screen edge */
  }

  .pb-breadcrumb {
    gap: 8px; /* Tighter gap for mobile */
    margin-bottom: 1.5rem;
  }

  .pb-link,
  .pb-current {
    font-size: 0.7rem;
    letter-spacing: 1px; /* Reduced tracking to fit more text */
  }

  .pb-separator {
    font-size: 0.6rem;
  }

  .pb-title {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    /* Prevents massive words from breaking the layout horizontally */
    word-wrap: break-word;
  }

  .pb-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
    padding: 0 10px;
  }

  .pb-thread {
    height: 50px; /* Shorter thread for compact mobile screens */
  }
}

/* --- Small Phones (max-width: 480px) --- */
@media (max-width: 480px) {
  .portal-banner {
    min-height: 350px;
    padding-top: 90px; /* Slightly less clearance needed on tiny screens */
  }

  .pb-breadcrumb {
    gap: 5px;
    margin-bottom: 1rem;
  }

  .pb-link,
  .pb-current {
    font-size: 0.65rem;
  }

  .pb-title {
    font-size: 2.2rem; /* Locked-in smaller size for narrow screens */
    padding: 0 5px;
  }

  .pb-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .pb-thread {
    height: 40px;
  }
}

/* =========================================
   TABLET & LAPTOP RESPONSIVE OVERRIDES
   ========================================= */

/* --- Tablets (Portrait & Landscape: 769px to 1024px) --- */
@media (min-width: 769px) and (max-width: 1024px) {
  .portal-banner {
    min-height: 500px;
    height: 55vh;
    padding-top: 120px; /* Exact clearance for tablet-sized header */
    padding-bottom: 2rem;
  }

  .pb-content {
    width: 90%;
    max-width: 700px; /* Constrains line length for better reading */
  }

  .pb-breadcrumb {
    gap: 12px;
    margin-bottom: 2rem;
  }

  .pb-link,
  .pb-current {
    font-size: 0.75rem;
  }

  .pb-title {
    font-size: 3.8rem; /* Perfectly scaled for iPad screens */
    line-height: 1.15;
    margin-bottom: 1.2rem;
  }

  .pb-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    padding: 0 20px;
  }

  .pb-thread {
    height: 70px;
  }
}

/* --- Laptops & Standard Desktops (1025px to 1440px) --- */
@media (min-width: 1025px) and (max-width: 1440px) {
  .portal-banner {
    min-height: 600px;
    height: 65vh;
    padding-top: 140px; /* Standard desktop header clearance */
  }

  .pb-content {
    width: 85%;
    max-width: 800px;
  }

  .pb-breadcrumb {
    gap: 15px;
    margin-bottom: 2.5rem;
  }

  .pb-link,
  .pb-current {
    font-size: 0.8rem;
  }

  .pb-title {
    font-size: 4.5rem; /* Classic, cinematic desktop size */
    margin-bottom: 1.5rem;
  }

  .pb-subtitle {
    font-size: 1.15rem;
    margin-bottom: 3rem;
  }

  .pb-thread {
    height: 90px;
  }
}

/* --- Ultra-Wide Monitors (1441px and above) --- */
@media (min-width: 1441px) {
  .portal-banner {
    /* Locks the maximum height so it doesn't stretch infinitely on huge monitors */
    height: 700px;
    padding-top: 150px;
  }

  .pb-content {
    max-width: 900px;
  }

  .pb-title {
    font-size: 5rem; /* Capped maximum font size */
  }

  .pb-subtitle {
    font-size: 1.25rem;
  }

  .pb-thread {
    height: 100px;
  }
}

/* =========================================
   1. SACRED PORTAL BANNER (FLUID & RESPONSIVE)
   ========================================= */

.portal-banner {
  position: relative;
  width: 100%;
  min-height: clamp(450px, 65vh, 750px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-text-primary, #2b1d19);
  padding-top: clamp(100px, 15vh, 160px);
  padding-bottom: 2rem;
  box-sizing: border-box;
}

.pb-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  animation: slowZoom 25s linear infinite alternate;
}

@keyframes slowZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.15); }
}

.pb-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(26, 18, 16, 0.4) 0%,
    rgba(26, 18, 16, 0.95) 100%
  );
  z-index: 2;
}

.pb-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 90%;
  max-width: 800px;
  margin: 0 auto;
}

.pb-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(8px, 2vw, 15px);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  width: 100%;
}

.pb-link,
.pb-current {
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: clamp(0.7rem, 1.2vw, 0.85rem);
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.4;
}

.pb-link {
  font-weight: 500;
  color: rgba(253, 251, 246, 0.65);
  text-decoration: none;
  transition: color 0.3s ease;
}

.pb-link:hover { color: var(--color-accent, #c78d6a); }

.pb-separator {
  color: var(--color-accent, #c78d6a);
  font-size: clamp(0.6rem, 1vw, 0.8rem);
  display: flex;
  align-items: center;
}

.pb-current {
  font-weight: 600;
  color: var(--color-text-inverse, #fdfbf6);
}

.pb-title {
  font-family: var(--font-heading, "Cinzel", serif);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 400;
  color: var(--color-text-inverse, #fdfbf6);
  line-height: 1.15;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  letter-spacing: 1px;
  text-shadow: 0 4px 25px rgba(0, 0, 0, 0.5);
}

.pb-subtitle {
  font-family: var(--font-body, "Jost", sans-serif);
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  color: #c2b4ae;
  line-height: 1.6;
  max-width: 650px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.pb-thread {
  width: 1px;
  height: clamp(50px, 10vh, 100px);
  background: linear-gradient(
    to bottom,
    var(--color-accent, #c78d6a) 0%,
    transparent 100%
  );
  opacity: 0.7;
}

/* =========================================
   2. PREMIUM SHOP LAYOUT & FILTERS
   ========================================= */

.shop-layout-section {
  background-color: var(--color-bg-base, #FDFBF6);
  padding: 4rem 0 8rem 0;
  font-family: var(--font-body, 'Jost', sans-serif);
}

.shop-container {
  width: 95%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 4rem;
  align-items: flex-start;
}

/* --- Mobile Filter Bar --- */
.mobile-filter-bar {
  display: none;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(135, 56, 35, 0.15);
}

.btn-filter-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--color-primary, #873823);
  color: var(--color-primary, #873823);
  padding: 10px 20px;
  border-radius: 2px;
  font-family: var(--font-body, 'Jost', sans-serif);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
}

/* --- Sidebar Filters --- */
.shop-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 130px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent, #C78D6A) transparent;
  padding-right: 15px;
}

.shop-sidebar::-webkit-scrollbar { width: 4px; }
.shop-sidebar::-webkit-scrollbar-thumb { background: var(--color-accent, #C78D6A); border-radius: 4px; }

.sidebar-close {
  display: none;
}

.filter-widget {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(135, 56, 35, 0.1);
}

.filter-widget:last-child { border-bottom: none; }

.filter-title {
  font-family: var(--font-heading, 'Cinzel', serif);
  font-size: 1.2rem;
  color: var(--color-text-primary, #2B1D19);
  margin-bottom: 1.2rem;
  letter-spacing: 1px;
}

/* Category Links */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li { margin-bottom: 0.8rem; }

.category-list a {
  text-decoration: none;
  color: var(--color-text-secondary, #7A6962);
  font-size: 1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.category-list a::before {
  content: '—';
  margin-right: 8px;
  color: transparent;
  transition: color 0.3s ease;
}

.category-list a:hover,
.category-list a.active {
  color: var(--color-primary, #873823);
  font-weight: 500;
}

.category-list a:hover::before,
.category-list a.active::before {
  color: var(--color-accent, #C78D6A);
}

/* Custom Checkboxes */
.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--color-text-secondary, #7A6962);
  margin-bottom: 0.8rem;
  cursor: pointer;
}

.filter-checkbox input { display: none; }

.filter-checkmark {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(135, 56, 35, 0.3);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.filter-checkbox input:checked ~ .filter-checkmark {
  background: var(--color-primary, #873823);
  border-color: var(--color-primary, #873823);
}

.filter-checkbox input:checked ~ .filter-checkmark::after {
  content: '✓';
  color: #FDFBF6;
  font-size: 10px;
}

/* Range Slider */
.price-slider-wrap { width: 100%; position: relative; }
.price-slider { width: 100%; accent-color: var(--color-primary, #873823); cursor: pointer; }
.price-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--color-text-secondary, #7A6962);
  margin-top: 10px;
}

/* --- Main Shop Area --- */
.shop-main {
  flex-grow: 1;
  min-width: 0;
}

.shop-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(135, 56, 35, 0.15);
}

.results-count { font-size: 1rem; color: var(--color-text-secondary, #7A6962); }

.lux-select {
  padding: 8px 15px;
  border: 1px solid rgba(135, 56, 35, 0.2);
  background: transparent;
  color: var(--color-text-primary, #2B1D19);
  font-family: var(--font-body, 'Jost', sans-serif);
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  border-radius: 2px;
}




/* =========================================
   4. GLOBAL MOBILE RESPONSIVENESS
   ========================================= */

@media (max-width: 900px) {
  .shop-container { flex-direction: column; gap: 0; }
  .mobile-filter-bar { display: flex; width: 100%; }
  .desktop-only { display: none; }
  
  /* PERFECTED MOBILE SIDEBAR DRAWER */
  .shop-sidebar {
    position: fixed;
    top: 0; 
    left: -100%;
    width: 320px;
    max-width: 85vw; /* Prevents overflow on very small phones */
    height: 100vh;
    max-height: 100vh;
    background-color: var(--color-bg-base, #FDFBF6);
    z-index: 9999; /* Higher than header */
    padding: 2.5rem 2rem;
    box-shadow: 20px 0 50px rgba(43, 29, 25, 0.4);
    transition: left 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  }
  
  .shop-sidebar.active { left: 0; }
  
  .sidebar-close {
    display: flex;
    position: absolute;
    top: 15px; 
    right: 15px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(135, 56, 35, 0.1);
    border-radius: 50%;
    color: var(--color-text-primary, #2B1D19);
    cursor: pointer;
    z-index: 10000;
  }

  .filter-widget {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
  }
  
  /* Background Overlay */
  .filter-overlay {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100vh;
    background: rgba(26, 18, 16, 0.6);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
  }
  
  .filter-overlay.active {
    display: block;
    opacity: 1;
  }
}

@media (max-width: 600px) {
  /* Banner */
  .portal-banner { min-height: 400px; padding-top: 100px; padding-bottom: 1.5rem; }
  .pb-title { font-size: 2.8rem; line-height: 1.2; }
  .pb-subtitle { font-size: 1rem; }
}

@media (max-width: 480px) {
  .portal-banner { min-height: 350px; padding-top: 90px; }
  .pb-title { font-size: 2.2rem; }
}