:root{
  --green: #0e8f6e;
  --dark-green: #0a6d53;
  --muted: #7a8b8a;
  --bg: #f3f7f6;
  --card-bg: #fff6ef;
  --card-border: #f0d9b9;
  --accent: #ffb400;
  --radius: 8px;
  --max-width: 1000px;
  --shadow: 0 6px 18px rgba(31,41,55,0.06);
}

/* Reset & base */
*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background:linear-gradient(180deg,var(--bg),#eef3f2);
  color:#122;
  line-height:1.35;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
a{color:inherit;text-decoration:none;}
img{max-width:100%;display:block;border-radius:6px;}
.logo-link:hover {
  color: rgb(11, 241, 115) !important;
  }
/* Topbar */
.topbar{
  background:var(--green);
  color:#fff;
  padding:14px 18px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
  position:sticky; top:0; z-index:40;
}
.topbar-inner{
  max-width:var(--max-width);
  margin:0 auto;
  display:flex;
  align-items:center;
  gap:16px;
}
.brand{
  display:flex;
  gap:12px;
  align-items:center;
  font-weight:700;
  font-size:18px;
}
.brand .logo {
  width:34px; height:34px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  color:var(--green);
}
.top-actions{margin-left:auto;display:flex;gap:10px;align-items:center;}
.btn{
  background:rgba(255,255,255,0.12);
  color:#fff;padding:8px 12px;border-radius:8px;font-weight:600;border:0;cursor:pointer;
}
.btn.primary{background:#ffc428;color:#121212;}

/* Layout */
.container{
  max-width:var(--max-width);
  margin:22px auto;
  display:grid;
  grid-template-columns: 300px 1fr;
  gap:22px;
  padding:0 14px;
}

/* Sidebar */
.sidebar{
  background:white;
  border-radius:10px;
  padding:18px;
  box-shadow:var(--shadow);
  height:fit-content;
  position:sticky; top:88px;
}
.sidebar h4{margin:0 0 10px 0;font-size:15px;}
.sort, .filter-section{margin-bottom:14px;}
.select, .checkbox-row{
  width:100%;
  padding:10px 12px;
  border-radius:8px;
  border:1px solid #e6eceb;
  background:#fff;
  font-size:14px;
  color:#213;
}
.filters-list { display:flex; flex-direction:column; gap:8px; margin-top:8px; }
.checkbox-item { display:flex; align-items:center; gap:8px; font-size:14px; cursor:pointer; }
.checkbox-item input[type="checkbox"] { accent-color: #28a745; width:16px;height:16px; cursor:pointer; }
/* Location Selector Styles */
.location-selector {
  text-align: center;
}

.popup {
  display: none;
  background-color: white;
  padding: 20px;
  border: 1px solid #ccc;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#location-btn {
  background-color: #ffc107;
  color: white;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
}



/* Categories list */
.categories {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cat {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: var(--muted);
}

/* Main category button alignment */
.collapse-btn {
  display: grid;
  grid-template-columns: auto 1fr auto auto; /* icon | name | count | arrow */
  align-items: center;                       /* ✅ centers vertically */
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: none;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease;
  border-radius: 6px;
  column-gap: 8px;                           /* space between each column */
}

.collapse-btn:hover {
  background: #f6f8f7;
}

/* Icon on the far left */
.collapse-btn .icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* Category name: allows multiple lines, grows as needed */
.collapse-btn .name {
  color: #222;
  font-weight: 500;
  text-align: left;
  line-height: 1.3;
  white-space: normal;      /* ✅ allows multi-line */
  word-break: break-word;   /* ✅ handles long words */
}

/* Count: just before arrow, centered vertically */
.collapse-btn .count {
  color: #555;
  font-size: 14px;
  margin-right: 4px;
  text-align: right;
}

/* Arrow: final element on the right */
.collapse-btn .arrow {
  color: #777;
  font-size: 13px;
  transform-origin: center;
  transition: transform 0.2s ease;
}

/* Subcategories alignment */
.subcategories {
  display: none;
  list-style: none;
  padding-left: 36px;
  margin: 6px 0 0 0;
}

.subcategories li {
  margin: 4px 0;
}

.subcategories a {
  display: grid;
  grid-template-columns: auto 1fr auto; /* icon | name | count */
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
}

.subcategories a:hover {
  color: var(--dark-green);
}

.subcategories a img {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.subcategories a .name {
  white-space: normal;
  word-break: break-word;
}
.subcategories.open { display: block; }

.subcategories a.subcategory-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.subcategories a.subcategory-link:hover {
  background: #f4f7f6;
}

.subcategories a.active-sub {
  font-weight: 700;
  color: var(--dark-green);
  background: #e7f8f3;
}
.subcategories a .count {
  color: #555;
  font-size: 13px;
  text-align: right;
}

/* Open state */
.cat.open .subcategories {
  display: block;
}
.cat.open .collapse-btn .arrow {
  transform: rotate(90deg);
  color: var(--dark-green);
}
.collapse-btn.active-main {
  font-weight: 700;
  color: var(--dark-green);
  background: #e7f8f3;
}





/* Small responsive */
@media(max-width:520px){
  .container{grid-template-columns:1fr;}
  .sidebar{position:static; order:2; margin-top:12px;}
  .collapse-btn{padding:8px 12px;}
  .subcategories{padding-left:12px;}
}



.main{
  min-height:60vh;
}
.breadcrumbs{font-size:13px;color:var(--muted);margin-bottom:10px}
.hero-search{
  display:flex;gap:12px;align-items:center;background:white;padding:14px;border-radius:10px;box-shadow:var(--shadow);
  margin-bottom:14px;
}
.select-location{min-width:160px;padding:10px;border-radius:8px;border:1px solid #e6eceb;background:#fff}
.search-input{
  flex:1;display:flex;gap:8px;align-items:center;
}
.search-input input{
  width:100%;padding:12px;border-radius:8px;border:1px solid #e6eceb;font-size:15px;
}
.search-btn{background:var(--accent);border:0;padding:10px 14px;border-radius:8px;cursor:pointer;font-weight:700}


/* Bottom Bar */
.bottom-bar {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 15px;
}

.bottom-bar a {
  color: #ffc107;
  margin: 0 10px;
}

.cta-buttons a { display: inline-block; margin: 0.5rem; width: 180px; height: 54px; background-size: contain; background-repeat: no-repeat; background-position: center; text-indent: -9999px; overflow: hidden; border-radius: 8px; }
.google-play { background-image: url('https://upload.wikimedia.org/wikipedia/commons/7/78/Google_Play_Store_badge_EN.svg'); }
.app-store { background-image: url('https://developer.apple.com/assets/elements/badges/download-on-the-app-store.svg'); }