/**
 * Category Page Polish
 * Boutique Marketplace Narrative - Warm, clean, premium
 *
 * Base color #fff8f3
 * Sage accents #8fa89b / #4C6358
 * EB Garamond headings
 * 8px rounded corners
 * Mobile-first
 */

/* ============================================
   Category Page Base
   ============================================ */

.lula-category-page {
  background: #fff8f3;
  /* LULA-FIX 2026-05-17: removed min-height: 70vh and reduced padding-bottom. */
  padding-bottom: 12px;
}

/* ============================================
   Breadcrumbs
   ============================================ */

.lula-breadcrumbs-wrapper {
  padding: 20px 0 8px 0;
  background: transparent;
}

.lula-breadcrumb {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
}

.lula-breadcrumb .breadcrumb-item {
  font-size: 13px;
  color: #8A8580;
}

.lula-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  content: "/" !important;
  color: #C0BAB0;
  padding: 0 8px;
}

.lula-breadcrumb .breadcrumb-item a {
  color: #6B6661;
  text-decoration: none;
  transition: color 0.2s ease;
}

.lula-breadcrumb .breadcrumb-item a:hover {
  color: #4C6358;
}

.lula-breadcrumb .breadcrumb-item:last-child a {
  color: #2D2A27;
  font-weight: 500;
  pointer-events: none;
}

/* ============================================
   Category Hero
   ============================================ */

.lula-category-hero {
  padding: 32px 0 28px 0;
  text-align: center;
}

.lula-category-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 42px;
  font-weight: 500;
  color: #2D2A27;
  margin: 0 0 12px 0;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.lula-category-description {
  font-size: 15px;
  color: #6B6661;
  line-height: 1.6;
  max-width: 720px;
  margin: 0 auto;
  font-weight: 400;
}

.lula-category-description p {
  margin: 0 0 8px 0;
}

.lula-category-description p:last-child {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .lula-category-hero {
    padding: 20px 0 18px 0;
  }

  .lula-category-title {
    font-size: 30px;
  }

  .lula-category-description {
    font-size: 14px;
  }
}

/* ============================================
   Subcategories Section - Cleaner
   ============================================ */

.lula-subcategories-section {
  margin-bottom: 32px;
  padding: 20px 0;
}

.lula-subcategories-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  color: #2D2A27;
  margin: 0 0 16px 0;
}

.lula-subcategory-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  background: #FFFFFF;
  border: 1px solid #E8E0D8;
  border-radius: 8px;
  color: #2D2A27;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  transition: all 0.2s ease;
  min-height: 56px;
}

.lula-subcategory-card:hover {
  background: rgba(76, 99, 88, 0.05);
  border-color: #8FA89B;
  color: #4C6358;
  text-decoration: none;
  transform: translateY(-1px);
}

.lula-subcategory-name {
  display: block;
}

/* ============================================
   Left Sidebar - Filters
   ============================================ */

#column-left {
  padding-right: 24px;
}

#column-left h2,
#column-left h3,
#column-left .panel-heading,
#column-left .module-heading {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: #2D2A27;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #E8E0D8;
}

/* Bootstrap list-group inside column-left */
#column-left .list-group {
  border: none !important;
  background: transparent !important;
  margin-bottom: 24px !important;
  border-radius: 8px;
  overflow: hidden;
}

#column-left .list-group-item {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid #E8E0D8 !important;
  color: #6B6661 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 10px 12px !important;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

#column-left .list-group-item:last-child {
  border-bottom: none !important;
}

#column-left .list-group-item:hover {
  background: rgba(76, 99, 88, 0.05) !important;
  color: #4C6358 !important;
  padding-left: 16px !important;
}

#column-left .list-group-item.active {
  background: rgba(76, 99, 88, 0.08) !important;
  color: #4C6358 !important;
  font-weight: 600 !important;
  border-left: 3px solid #4C6358 !important;
  padding-left: 12px !important;
}

/* Filter forms inside sidebar */
#column-left .form-check {
  padding-left: 26px;
  margin-bottom: 8px;
}

#column-left .form-check-input {
  border: 1.5px solid #C0BAB0;
  background-color: #FFFFFF;
  border-radius: 4px;
  width: 18px;
  height: 18px;
  margin-left: -26px;
  cursor: pointer;
}

#column-left .form-check-input:checked {
  background-color: #4C6358;
  border-color: #4C6358;
}

#column-left .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(76, 99, 88, 0.15);
  border-color: #8FA89B;
}

#column-left .form-check-label {
  color: #6B6661;
  font-size: 14px;
  cursor: pointer;
}

#column-left .btn-light,
#column-left .btn-primary {
  background: #4C6358 !important;
  border: 1px solid #4C6358 !important;
  color: #FFFFFF !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease;
}

#column-left .btn-light:hover,
#column-left .btn-primary:hover {
  background: #3F5148 !important;
  border-color: #3F5148 !important;
  color: #FFFFFF !important;
}

/* ============================================
   Product Toolbar - Boutique Style
   ============================================ */

.lula-product-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #FFFFFF;
  border: 1px solid #E8E0D8;
  border-radius: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.lula-toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.lula-toolbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.lula-results-count {
  font-size: 13px;
  color: #6B6661;
  font-weight: 500;
}

/* View toggle (grid/list) */
.lula-view-toggle {
  display: flex;
  gap: 4px;
  padding: 2px;
  background: #FAF5EF;
  border-radius: 8px;
}

.lula-view-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #8A8580;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.lula-view-btn:hover {
  color: #4C6358;
  background: rgba(76, 99, 88, 0.05);
}

.lula-view-btn.active {
  background: #FFFFFF;
  color: #4C6358;
  box-shadow: 0 1px 2px rgba(76, 99, 88, 0.1);
}

/* Sort and limit controls */
.lula-sort-control,
.lula-limit-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lula-control-label {
  font-size: 13px;
  color: #8A8580;
  font-weight: 500;
  margin: 0;
  white-space: nowrap;
}

.lula-select {
  padding: 8px 32px 8px 12px;
  border: 1px solid #E8E0D8;
  border-radius: 8px;
  background: #FFFFFF
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%236B6661' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  font-size: 14px;
  color: #2D2A27;
  cursor: pointer;
  min-width: 140px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: all 0.2s ease;
}

.lula-select:hover {
  border-color: #8FA89B;
}

.lula-select:focus {
  outline: none;
  border-color: #4C6358;
  box-shadow: 0 0 0 3px rgba(76, 99, 88, 0.1);
}

/* ============================================
   Mobile Filter Trigger Button
   ============================================ */

.lula-mobile-filter-trigger {
  margin-bottom: 16px;
}

.lula-btn-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #FFFFFF;
  border: 1px solid #E8E0D8;
  border-radius: 8px;
  color: #2D2A27;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
}

.lula-btn-filter:hover {
  background: rgba(76, 99, 88, 0.05);
  border-color: #8FA89B;
  color: #4C6358;
}

.lula-btn-filter i {
  font-size: 14px;
}

/* ============================================
   Product Grid
   ============================================ */

.lula-product-grid {
  margin-bottom: 32px;
}

.lula-product-grid > .col {
  margin-bottom: 24px;
}

/* ============================================
   Pagination - Warm Minimal
   ============================================ */

.lula-pagination-wrapper {
  margin-top: 24px;
  padding: 20px 0;
  border-top: 1px solid #E8E0D8;
}

.lula-pagination-wrapper .pagination {
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.lula-pagination-wrapper .pagination .page-item .page-link {
  background: #FFFFFF !important;
  border: 1px solid #E8E0D8 !important;
  color: #6B6661 !important;
  border-radius: 8px !important;
  padding: 8px 14px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  margin: 0 !important;
  transition: all 0.2s ease;
  min-width: 40px;
  text-align: center;
}

.lula-pagination-wrapper .pagination .page-item .page-link:hover {
  background: rgba(76, 99, 88, 0.05) !important;
  border-color: #8FA89B !important;
  color: #4C6358 !important;
}

.lula-pagination-wrapper .pagination .page-item.active .page-link {
  background: #4C6358 !important;
  border-color: #4C6358 !important;
  color: #FFFFFF !important;
}

.lula-pagination-wrapper .pagination .page-item.disabled .page-link {
  background: #FAF5EF !important;
  color: #C0BAB0 !important;
  opacity: 0.6;
}

.lula-pagination-results {
  font-size: 13px;
  color: #8A8580;
}

/* ============================================
   No Results
   ============================================ */

.lula-no-results {
  text-align: center;
  padding: 64px 20px;
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px solid #E8E0D8;
  margin: 32px 0;
}

.lula-no-results p {
  font-size: 16px;
  color: #6B6661;
  margin: 0 0 20px 0;
}

.lula-btn-primary {
  display: inline-block;
  padding: 12px 28px;
  background: #4C6358;
  color: #FFFFFF !important;
  text-decoration: none !important;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.lula-btn-primary:hover {
  background: #3F5148;
  transform: translateY(-1px);
}

/* ============================================
   Mobile Filter Drawer
   ============================================ */

.lula-mobile-filter-drawer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s 0.3s, opacity 0.3s ease;
}

.lula-mobile-filter-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
  transition: visibility 0s 0s, opacity 0.3s ease;
}

.lula-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(45, 42, 39, 0.5);
}

.lula-drawer-content {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 85%;
  max-width: 360px;
  background: #fff8f3;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.lula-mobile-filter-drawer.is-open .lula-drawer-content {
  transform: translateX(0);
}

.lula-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #E8E0D8;
  background: #FFFFFF;
}

.lula-drawer-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: #2D2A27;
  margin: 0;
}

.lula-drawer-close {
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: #6B6661;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.lula-drawer-close:hover {
  background: rgba(76, 99, 88, 0.08);
  color: #4C6358;
}

.lula-drawer-body {
  padding: 16px 20px 80px 20px;
  flex: 1;
  overflow-y: auto;
}

/* Prevent body scroll when drawer is open */
body.lula-drawer-open {
  overflow: hidden;
}

/* ============================================
   Container/Layout adjustments
   ============================================ */

.lula-category-page .container {
  max-width: 1280px;
}

@media (max-width: 991px) {
  #column-left {
    padding-right: 0;
  }

  .lula-product-toolbar {
    padding: 12px 14px;
    gap: 10px;
  }

  .lula-toolbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .lula-control-label {
    display: none;
  }

  .lula-select {
    min-width: 0;
    flex: 1;
  }
}

/* ============================================
   Hide subcategories if too many (noise)
   ============================================ */
/* Keep subcategories cards clean - they replaced image chips */
.lula-subcategories-section .row {
  --bs-gutter-x: 0.75rem;
}

/* ============================================
   Mobile Bottom Nav - Don't overlap
   ============================================ */

@media (max-width: 767px) {
  .lula-category-page {
    padding-bottom: 16px; /* LULA-FIX 2026-05-17: body handles bottom-nav offset */
  }
}
