/* ==========================
   GLOBAL WRAPPER & TYPOGRAPHY
   ========================== */
.pr-store-section {
  border-radius: 24px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1e293b;
  box-sizing: border-box;
}
.pr-container { max-width: 1300px; margin: 0 auto; }
.pr-header-row {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  margin-bottom: 2.5rem; gap: 1rem;
}
.section-heading {
  color: #13366f; font-size: 2.4rem; margin: 0 0 0.5rem 0; font-weight: 800; letter-spacing: -0.02em;
}
.section-sub { color: #475569; font-size: 1.1rem; margin: 0; }
.pr-badge-link {
  display: inline-flex; align-items: center; background: #ffffff; color: #13366f;
  border: 2px solid #e2e8f0; padding: 0.6rem 1.2rem; border-radius: 50px; font-weight: 700;
  font-size: 0.95rem; text-decoration: none; box-shadow: 0 2px 4px rgba(0,0,0,0.02); transition: all 0.2s ease;
}
.pr-badge-link:hover { border-color: #13366f; background: #f1f5f9; }

/* ==========================
   SEARCH & TOOLBAR LAYOUT
   ========================== */
.pr-toolbar {
  background: #ffffff; padding: 1.2rem; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  margin-bottom: 2.5rem; display: flex; flex-direction: column; gap: 1rem;
}
.search-wrapper { position: relative; width: 100%; }
.search-wrapper input[type="text"] {
  width: 100%; padding: 0.85rem 1rem 0.85rem 2.8rem; border: 1px solid #cbd5e1; border-radius: 10px;
  font-size: 1rem; box-sizing: border-box; outline: none; transition: border-color 0.2s; background: #f8fafc;
}
.search-wrapper input[type="text"]:focus { border-color: #13366f; background: #ffffff; }
.search-icon {
  position: absolute; top: 50%; left: 12px; transform: translateY(-50%); font-size: 18px;
  color: #64748b; user-select: none; pointer-events: none;
}
.filters-container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; }
.filter-box select {
  width: 100%; padding: 0.75rem 1rem; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 0.95rem;
  background-color: #f8fafc; color: #13366f; font-weight: 500; cursor: pointer; outline: none;
  box-sizing: border-box; transition: border-color 0.2s;
}
.filter-box select:focus { border-color: #13366f; background-color: #ffffff; }

/* Custom Multi-Select Dropdown Styles */
.custom-multiselect { position: relative; width: 100%; }
.multiselect-toggle {
  width: 100%; padding: 0.75rem 1rem; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 0.95rem;
  background-color: #f8fafc; color: #13366f; font-weight: 500; cursor: pointer; outline: none;
  box-sizing: border-box; text-align: left; display: flex; justify-content: space-between;
  align-items: center; transition: border-color 0.2s;
}
.multiselect-toggle:hover, .multiselect-toggle:focus { border-color: #13366f; background-color: #ffffff; }
.multiselect-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; width: 100%; background: #ffffff;
  border: 1px solid #cbd5e1; border-radius: 10px; box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  z-index: 100; padding: 0.5rem 0; box-sizing: border-box; max-height: 240px; overflow-y: auto;
}
.dropdown-header {
  display: flex; justify-content: space-between; align-items: center; padding: 0.4rem 1rem 0.6rem 1rem;
  border-bottom: 1px solid #f1f5f9; font-size: 0.85rem; font-weight: 700; color: #64748b;
}
.clear-filter-btn {
  background: none; border: none; color: #ef4444; font-size: 0.8rem; cursor: pointer; padding: 0; font-weight: 600;
}
.clear-filter-btn:hover { text-decoration: underline; }
.multiselect-option {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 1rem; font-size: 0.9rem;
  color: #1e293b; cursor: pointer; user-select: none; transition: background 0.15s;
}
.multiselect-option:hover { background: #f1f5f9; }
.multiselect-option .option-label { flex: 1 !important; }

/* ==========================
   THEME-PROOF CUSTOM CHECKBOX
   ========================== */
#book-section .custom-checkbox {
  position: relative !important; display: inline-flex !important; align-items: center !important;
  justify-content: center !important; width: 20px !important; height: 20px !important; min-width: 20px !important;
  flex-shrink: 0 !important; margin: 0 !important; padding: 0 !important; box-sizing: border-box !important;
}
#book-section .custom-checkbox input.pr-checkbox-input[type="checkbox"] {
  position: absolute !important; top: 0 !important; left: 0 !important; width: 20px !important;
  height: 20px !important; margin: 0 !important; padding: 0 !important; opacity: 0 !important;
  cursor: pointer !important; z-index: 2 !important; display: block !important;
  appearance: none !important; -webkit-appearance: none !important; pointer-events: auto !important;
}
#book-section .custom-checkbox .checkbox-visual {
  display: inline-block !important; position: relative !important; top: 0 !important; left: 0 !important;
  width: 20px !important; height: 20px !important; min-width: 20px !important; max-width: 20px !important;
  max-height: 20px !important; background-color: #ffffff !important; border: 2px solid #cbd5e1 !important;
  border-radius: 4px !important; box-sizing: border-box !important; pointer-events: none !important;
  z-index: 1 !important; transition: background-color 0.15s ease, border-color 0.15s ease !important;
  flex-shrink: 0 !important; margin: 0 !important; padding: 0 !important; float: none !important;
}
#book-section .custom-checkbox input.pr-checkbox-input[type="checkbox"]:checked + .checkbox-visual {
  background-color: #13366f !important; border-color: #13366f !important;
}
#book-section .custom-checkbox input.pr-checkbox-input[type="checkbox"]:checked + .checkbox-visual::after {
  content: '' !important; display: block !important; position: absolute !important; left: 6px !important;
  top: 2px !important; width: 5px !important; height: 10px !important; border: solid #ffffff !important;
  border-width: 0 2px 2px 0 !important; transform: rotate(45deg) !important; box-sizing: border-box !important;
}
#book-section .custom-checkbox input.pr-checkbox-input[type="checkbox"]:focus-visible + .checkbox-visual {
  box-shadow: 0 0 0 3px rgba(19, 54, 111, 0.2) !important;
}
#book-section .custom-checkbox input.pr-checkbox-input[type="checkbox"]:hover + .checkbox-visual {
  border-color: #13366f !important;
}
#book-section .multiselect-option input.pr-checkbox-input[type="checkbox"]:checked ~ .option-label {
  color: #13366f !important; font-weight: 700 !important;
}

@media (max-width: 1024px) { .filters-container { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .filters-container { grid-template-columns: 1fr; }
  .section-heading { font-size: 1.8rem; }
  .pr-store-section { padding: 1rem 0.5rem 3rem; }
}

/* ==========================
   BOOK GRID & CARDS
   ========================== */
.book-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.25rem; align-items: stretch;
}
.book-card {
  background: white; border-radius: 14px; padding: 1rem; box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  border: 1px solid #e2e8f0; text-align: center; display: flex; flex-direction: column; height: 100%;
  box-sizing: border-box; min-width: 0; text-decoration: none; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.book-title {
  font-weight: 700; font-size: 0.95rem; color: #13366f; flex-grow: 1; overflow: visible;
  margin-bottom: 0.2rem; line-height: 1.35;
}
.book-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(19, 54, 111, 0.08); border-color: #cbd5e1; }
@media (max-width: 1280px) { .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1024px) { .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px)  { .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; } }
@media (max-width: 480px)  { .book-grid { grid-template-columns: 1fr; } }
.book-img-wrapper {
  width: 100%; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: #f8fafc; border-radius: 10px; margin-bottom: 0.8rem;
}
.book-img-wrapper img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.3s ease; }
.book-card:hover .book-img-wrapper img { transform: scale(1.04); }
.hide { display: none !important; }
