/* ============================================================
   CLASSIC TV PAKISTAN — CAROUSELS, NETFLIX POSTER CARDS & GRIDS
   ============================================================ */

.rows-container {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 20px 0 40px;
  position: relative;
  z-index: 10;
}

.carousel-row {
  position: relative;
  width: 100%;
}

.row-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 5%;
  margin-bottom: 12px;
}

.row-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row-title {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.2px;
}

.row-count-badge {
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.row-see-all {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.row-see-all:hover {
  opacity: 0.8;
}

/* Carousel Track & Scroll Controls */
.carousel-wrap {
  position: relative;
}

.carousel-track {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 5% 14px;
  scrollbar-width: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-btn {
  position: absolute;
  top: 0;
  bottom: 14px;
  width: 48px;
  z-index: 20;
  background: rgba(6, 11, 8, 0.7);
  border: none;
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s, background 0.25s;
  backdrop-filter: blur(4px);
}

.carousel-wrap:hover .carousel-btn {
  opacity: 1;
}

.carousel-btn:hover {
  background: rgba(6, 11, 8, 0.95);
  color: var(--gold);
}

.carousel-btn.left {
  left: 0;
  border-radius: 0 8px 8px 0;
}

.carousel-btn.right {
  right: 0;
  border-radius: 8px 0 0 8px;
}

/* Netflix Widescreen 16:9 Video Cards (Identical Uniform Dimensions) */
.netflix-card {
  flex: 0 0 220px;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.netflix-card:hover {
  transform: translateY(-6px) scale(1.04);
  z-index: 5;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

.card-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: #0d1712;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.netflix-card:hover .card-media {
  border-color: rgba(245, 197, 66, 0.2);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(245, 197, 66, 0.1);
}

.card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.netflix-card:hover .card-media img {
  transform: scale(1.05);
}

.card-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  background: linear-gradient(135deg, #102118 0%, #08110b 100%);
  gap: 8px;
}

.card-fallback span {
  font-size: 28px;
}

.card-fallback-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Captions */
.card-info {
  width: 100%;
  padding: 8px 2px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-title-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  flex: 1;
  min-width: 0;
  letter-spacing: -0.1px;
}

.card-urdu {
  font-family: var(--font-urdu);
  font-size: 12px;
  color: var(--gold);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: rtl;
  flex-shrink: 0;
  max-width: 45%;
}

.card-meta-line {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.card-ep-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(6, 11, 8, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 197, 66, 0.4);
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.3px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.card-ep-count {
  color: var(--gold);
  font-weight: 700;
}

/* ============================================================
   MOBILE OVERRIDES: UNIFORM 16:9 NETFLIX VIDEO CARDS
   ============================================================ */
@media (max-width: 850px) {
  .rows-container {
    gap: 16px;
    padding: 8px 0 24px;
  }

  .row-header {
    padding: 0 16px;
    margin-bottom: 6px;
  }

  .row-title {
    font-size: 15px;
  }

  .row-see-all {
    font-size: 11px;
  }

  .carousel-track {
    padding: 2px 16px 8px;
    gap: 10px;
    align-items: flex-start;
  }

  .carousel-btn {
    display: none !important;
  }

  .netflix-card {
    flex: 0 0 160px;
    width: 160px;
    min-width: 160px;
    max-width: 160px;
    border-radius: 6px;
  }

  .netflix-card:hover {
    transform: none;
  }

  .netflix-card:active {
    transform: scale(0.97);
  }

  .card-media {
    border-radius: 6px;
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .card-info {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    padding: 6px 2px 0;
    gap: 2px;
  }

  .card-title {
    font-size: 12px;
  }

  .card-urdu {
    font-size: 11px;
  }

  .card-meta-line {
    font-size: 10px;
  }
}

/* ============================================================
   BROWSE & SEARCH GRID STYLES
   ============================================================ */
.browse-view {
  padding: 100px 5% 60px;
  max-width: 1360px;
  margin: 0 auto;
  width: 100%;
}

.browse-header {
  margin-bottom: 28px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.browse-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.browse-filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.filter-pill {
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.2px;
}

.filter-pill:hover {
  background: rgba(245, 197, 66, 0.08);
  border-color: rgba(245, 197, 66, 0.3);
  color: var(--gold);
}

.filter-pill.active {
  background: rgba(245, 197, 66, 0.15);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 12px rgba(245, 197, 66, 0.15);
}

.browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px 16px;
}

.browse-grid .netflix-card {
  flex: none;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.browse-grid .card-media {
  border-radius: 10px;
  transition: box-shadow 0.3s ease;
}

.browse-grid .netflix-card:hover .card-media {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(245, 197, 66, 0.15);
}

.browse-grid .card-info {
  display: flex !important;
}

/* ============================================================
   POLISHED SEARCH BAR & SUGGESTIONS STYLES
   ============================================================ */
.browse-search-container {
  margin-bottom: 28px;
}

.browse-search-box {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 680px;
  width: 100%;
}

.browse-search-input {
  width: 100%;
  background: rgba(14, 23, 18, 0.95);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 13px 44px 13px 46px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.browse-search-input::placeholder {
  color: var(--text-dim);
}

.browse-search-input:focus {
  border-color: var(--gold);
  background: #09110c;
  box-shadow: 0 0 0 3px rgba(245, 197, 66, 0.12), 0 8px 32px rgba(0, 0, 0, 0.5);
}

.browse-search-icon {
  position: absolute;
  left: 18px;
  color: var(--text-dim);
  pointer-events: none;
}

.browse-search-clear {
  position: absolute;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.browse-search-clear.visible {
  display: flex;
}

.browse-search-clear:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.search-suggestion-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-dim);
}

.search-suggestion-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.search-suggestion-chip:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(245, 197, 66, 0.08);
}

.search-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--text-dim);
}

.search-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  gap: 14px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.search-empty-icon {
  font-size: 52px;
  opacity: 0.7;
}

@media (max-width: 850px) {
  .browse-view {
    padding: 68px 14px 40px;
  }

  .browse-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 12px;
  }

  .browse-grid .netflix-card {
    flex: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .browse-grid .card-info {
    display: flex !important;
  }

  .browse-filter-pills {
    margin-bottom: 20px;
  }
}

@media (max-width: 520px) {
  .browse-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 10px;
  }

  .browse-search-input {
    font-size: 14px;
    padding: 11px 40px 11px 42px;
  }

  .filter-pill {
    padding: 5px 12px;
    font-size: 11px;
  }
}


