/* BACKGROUND DECORATIONS (Premium Milliy) */

/* 1. Base shell configuration (Pattern Background) */
.bilim-bg-shell {
  position: relative;
  overflow-x: hidden;
  min-height: 0;
}

/* Soft geometric pattern on the main shell */
.bilim-bg-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(212,175,55,0.03) 0, rgba(212,175,55,0.03) 1px, transparent 1px, transparent 10px);

  background-image: repeating-linear-gradient(45deg, rgba(212,175,55,0.02) 0, rgba(212,175,55,0.02) 1px, transparent 1px, transparent 10px);
  background-repeat: repeat;
  background-size: 300px;
  opacity: var(--bilim-decor-opacity, 0.03);
  pointer-events: none;
  z-index: -3;
}

/* 2. Product Section Map Watermark & Glow */
.bilim-bg-books {
  position: relative;
  z-index: 1;
}

/* Glow (Radial) */
.bilim-bg-books::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90vw;
  height: 90vh;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0) 65%);
  pointer-events: none;
  z-index: -2;
}

/* Uzbekistan Map Watermark */
.bilim-bg-books::before {
  content: '';
  position: absolute;
  top: 5%;
  right: -5%;
  width: 65%;
  height: 90%;

  background-repeat: no-repeat;
  background-position: center right;
  background-size: contain;
  opacity: var(--bilim-decor-opacity, 0.04);
  pointer-events: none;
  z-index: -1;
}

/* 3. Side Ornaments (Desktop only) */
.bilim-bg-decor-left,
.bilim-bg-decor-right {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 140px;
  pointer-events: none;
  z-index: 0;
  background-size: contain;
  background-repeat: repeat-y;
  opacity: 0.15; /* 0.12 - 0.20 */
  display: none; /* Hidden by default (Mobile/Tablet) */
}

.bilim-bg-decor-left {
  left: 0;
  background-position: left top;

}

.bilim-bg-decor-right {
  right: 0;
  background-position: right top;

}

/* 4. Footer Skyline */
.bilim-bg-skyline {
  position: relative;
  width: 100%;
  height: 35px; /* Mobile height */

  background-size: contain;
  background-repeat: repeat-x;
  background-position: center bottom;
  opacity: 0.45; /* 0.35 - 0.60 */
  pointer-events: none;
  z-index: 1;
  margin-top: -10px; /* Slight overlap for smooth transition */
}

/* Responsive Rules */
@media (max-width: 767px) {
  /* Mobile: Simplify decorations for clean UI and performance */
  .bilim-bg-shell::before {
    opacity: 0.02;
  }
  .bilim-bg-books::before,
  .bilim-bg-books::after {
    display: none;
  }
}

@media (min-width: 768px) {
  .bilim-bg-skyline {
    height: 45px; /* Tablet height */
  }
}

@media (min-width: 1200px) {
  .bilim-bg-decor-left,
  .bilim-bg-decor-right {
    display: block; /* Show ornaments on large screens */
  }
  .bilim-bg-skyline {
    height: 60px; /* Reduced from 120px */
  }
  .bilim-bg-books::before {
    opacity: 0.05;
  }
}

/* Ensure cards are opaque so pattern doesn't bleed through */
.product-card, .book-card, .catalog-product-card, .filter-card {
  position: relative;
  z-index: 2; /* Keep cards above background decors */
  background-color: #fff !important; 
}
