/* ==========================================================================
   All Products & Category Filter Page - Stylesheet
   Using identical Made in Andhra product cards
   ========================================================================== */

/* Hide footer banner on this mobile app category browse screen to prevent overlap */
.all-products-page-wrapper ~ .footer-section {
  display: none !important;
}

.all-products-page-wrapper {
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 140px);
  padding-bottom: 80px; /* Space for bottom fixed nav */
}

/* Top Search Bar */
.cat-search-header {
  padding: 10px 14px;
  background-color: #ffffff;
  border-bottom: 1px solid #f1ede7;
  position: sticky;
  top: 0;
  z-index: 10;
}

.cat-search-box {
  position: relative;
  width: 100%;
}

.cat-search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 15px;
}

.cat-search-field {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border-radius: 50px;
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
  font-size: 13px;
  color: #1e293b;
  outline: none;
  transition: all 0.2s ease;
}

.cat-search-field:focus {
  background-color: #ffffff;
  border-color: #064e3b;
  box-shadow: 0 0 0 3px rgba(6, 78, 59, 0.1);
}

/* Main Split Layout */
.cat-browser-layout {
  display: flex;
  flex: 1;
  min-height: 600px;
}

/* Left Category Filter Sidebar */
.cat-filter-sidebar {
  width: 100px;
  min-width: 100px;
  background-color: #fff6f4;
  border-right: 1px solid #f2e7e1;
  padding: 6px 0;
  display: flex;
  flex-direction: column;
  user-select: none;
}

@media (min-width: 576px) {
  .cat-filter-sidebar {
    width: 120px;
    min-width: 120px;
  }
}

.cat-filter-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 4px 10px 4px;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  transition: all 0.2s ease;
}

.cat-filter-btn:hover {
  background-color: #fef0eb;
}

.cat-filter-btn.active {
  background-color: #ffffff;
}

/* Active red/crimson indicator bar on left */
.cat-filter-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4.5px;
  background: linear-gradient(180deg, #e11d48 0%, #be123c 100%);
  border-radius: 0 4px 4px 0;
}

.cat-btn-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

@media (min-width: 576px) {
  .cat-btn-icon-wrap {
    width: 62px;
    height: 62px;
  }
}

.cat-btn-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.cat-btn-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #334155;
  text-align: center;
  line-height: 1.2;
}

.cat-filter-btn.active .cat-btn-label {
  color: #0f172a;
  font-weight: 800;
}

/* Right Filter Content Area */
.cat-filter-content {
  flex: 1;
  background-color: #ffffff;
  padding: 12px 12px 30px 12px;
}

.cat-filter-panel {
  display: none;
  animation: fadeIn 0.25s ease;
}

.cat-filter-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Subcategory Group */
.subcat-group-section {
  margin-bottom: 20px;
}

.subcat-group-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 10px 0;
  letter-spacing: -0.3px;
}

/* 2-Column Product Grid (Identical Card Styles as Made in Andhra) */
.subcat-items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 650px) {
  .subcat-items-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}
