/* Two column layout for listings page */
.page-layout {
  display: flex;
  gap: 24px;
  margin-top: 20px;
}

.sidebar-col {
  width: 260px;
  flex-shrink: 0;
}

.main-col {
  flex: 1;
}

/* Breadcrumb */
.breadcrumb {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  font-size: 14px;
  color: var(--muted);
}

.breadcrumb .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.breadcrumb a {
  color: var(--dark);
  font-weight: 500;
}

/* Sort Bar */
.sort-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.sort-pills {
  display: flex;
  gap: 10px;
}

.sort-pill {
  background: #fff;
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  color: var(--mid);
  transition: all 0.2s;
}

.sort-pill.active {
  background: #B8860B; /* Brown/yellow from sketch */
  border-color: #B8860B;
  color: #fff !important;
  font-weight: 600;
}
.sort-pill:hover:not(.active) {
  background: #f0f2f5;
  border-color: #d1d5db;
}

/* Ad Strip */
.ad-strip {
  background: #FFF9E6; /* Light yellow background */
  border: 1px solid #FFD54F;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 25px;
}

.ad-badge {
  background: var(--yp);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Listing Card */
/* Listing Card - Sketch Redesign */
.listing-item {
  display: flex;
  flex-direction: row;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 20px;
  transition: box-shadow 0.2s, transform 0.2s;
  animation: fadeUp 0.4s ease forwards;
  opacity: 0;
  overflow: hidden;
  height: 240px; /* Fixed height to match sketch proportions */
}

.listing-item:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.listing-item.featured-card {
  border: 1px solid #FF0000; /* Red border from sketch */
}

/* Sidebar Active Category Style (Sketch Match) */
.sidebar-content a.sub-cat-link {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  color: var(--mid);
  text-decoration: none;
  font-size: 15px;
  border-radius: 6px;
  margin-bottom: 4px;
  transition: all 0.2s;
}

.sidebar-content a.sub-cat-link:hover {
  background: #f5f6f8;
}

.sidebar-content a.sub-cat-link.active {
  background: #e8f5e9;
  color: #1B6B3A;
  font-weight: 600;
}

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

/* LEFT: Cover Image */
.item-cover {
  width: 40%;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.badge-ft-img {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #045D3A;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  z-index: 2;
  letter-spacing: 0.5px;
}

/* RIGHT: Content */
.item-content {
  width: 60%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.biz-name {
  color: var(--dark);
  font-size: 20px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.biz-name a {
  color: var(--dark);
  text-decoration: none;
}
.biz-name a:hover {
  color: var(--green);
}

.badge-vf { 
  border: 1px solid #1B6B3A; 
  color: #1B6B3A; 
  font-size: 11px; 
  padding: 2px 8px; 
  border-radius: 12px; 
  font-weight: 500;
}

.item-rating-block {
  text-align: right;
}

.rating-stars {
  font-size: 15px;
  font-weight: 700;
  color: #333;
}
.rev-count {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.status-txt {
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}
.status-txt.open { color: #1B6B3A; }
.status-txt.closed { color: var(--red); }

.biz-loc {
  font-size: 15px;
  color: var(--mid);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-pin { color: #888; font-size: 14px; }

.biz-desc {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
}

.contact-info {
  display: flex;
  gap: 20px;
  font-size: 15px;
  color: var(--dark);
}
.icon-phone { color: #045D3A; margin-right: 4px; }
.map-link {
  color: var(--muted);
  font-weight: 400;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.map-link:hover { color: var(--dark); }

.btn-details-sketch {
  background: #FFC107;
  color: #000;
  padding: 10px 28px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-details-sketch:hover {
  background: #e0a800;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 30px;
}

.page-btn {
  width: 36px;
  height: 36px;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-weight: 500;
}

.page-btn.active {
  background: var(--yp);
  border-color: var(--yp);
}

.page-btn:hover:not(.active) {
  background: var(--bg);
}

/* View Toggle Buttons */
.view-toggle-btn {
  background: #fff;
  font-size: 18px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-toggle-btn.active, .view-toggle-btn:hover {
  color: #B8860B !important;
  border-color: #B8860B !important;
  background: rgba(184, 134, 11, 0.1) !important;
}

/* Grid View Mode */
#listingList.grid-mode {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

#listingList.grid-mode .listing-item {
  flex-direction: column;
  height: 100%;
  margin-bottom: 0;
  border-radius: 12px;
}

#listingList.grid-mode .item-cover {
  width: 100%;
  height: 190px;
}

#listingList.grid-mode .item-content {
  width: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

#listingList.grid-mode .item-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

#listingList.grid-mode .item-rating-block {
  text-align: left;
}

#listingList.grid-mode .item-footer {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

#listingList.grid-mode .contact-info {
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

#listingList.grid-mode .btn-details-sketch {
  text-align: center;
  width: 100%;
}

