/* ===== videoCategory.css – Category Video Listing (edge‑to‑edge mobile) ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #4361ee;
  --primary-dark: #3a56d4;
  --secondary: #ff6b6b;
  --accent: #f9c74f;
  --success: #4caf50;
  --dark: #1e293b;
  --gray-900: #0f172a;
  --gray-800: #334155;
  --gray-700: #475569;
  --gray-600: #64748b;
  --gray-500: #94a3b8;
  --gray-400: #cbd5e1;
  --gray-300: #e2e8f0;
  --gray-200: #f1f5f9;
  --gray-100: #f8fafc;
  --white: #ffffff;
  --bg-light: #f8fafc;

  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.07);
  --shadow-hover: 0 20px 30px -10px rgba(67, 97, 238, 0.2);
  --transition: all 0.2s ease;

  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-light);
  color: var(--dark);
  line-height: 1.5;
  overflow-x: hidden;
  width: 100%;
  padding-bottom: 70px; /* space for bottom nav */
}

/* ===== MODERN HEADER – edge‑to‑edge ===== */
.modern-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-300);
  padding: 0.75rem 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.back-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--gray-800);
  padding: 0.25rem 1rem;
  cursor: pointer;
  transition: var(--transition);
  height: 40px;
  display: flex;
  align-items: center;
  text-decoration: none;
}
.back-btn:hover { color: var(--primary); }

.header-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gray-900);
  padding-right: 1rem;
}

/* ----- Floating Categories (horizontal scroll) ----- */
.floating-categories {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 1rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
}
.floating-categories::-webkit-scrollbar {
  display: none;
}

.category-chip {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--gray-200);
  color: var(--gray-700);
  border-radius: 2rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}
.category-chip.active {
  background: var(--primary);
  color: white;
}
.category-chip:hover {
  background: var(--primary);
  color: white;
}

/* ===== MAIN CONTENT – edge‑to‑edge ===== */
.main-content {
  max-width: 100%;
  margin: 0;
  padding: 0;
  width: 100%;
}

.category-title {
  padding: 1.5rem 1rem 0.5rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.category-title i {
  color: var(--primary);
}

/* ----- Alert Messages ----- */
.alert {
  padding: 1rem;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  border-radius: 0;
}
.alert-success {
  background: rgba(76, 175, 80, 0.1);
  border-left: 4px solid var(--success);
  color: var(--success);
}

/* ===== VIDEO GRID – two columns on mobile ===== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 1rem;
  width: 100%;
}

.video-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-300);
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.video-thumbnail {
  position: relative;
  aspect-ratio: 9 / 16; /* vertical video format */
  background: var(--gray-900);
  overflow: hidden;
}
.video-thumbnail video,
.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.video-card:hover .video-thumbnail video,
.video-card:hover .video-thumbnail img {
  transform: scale(1.05);
}

/* Overlay with stats and price */
.video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
}
.video-stats {
  display: flex;
  gap: 0.75rem;
}
.stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.stat i {
  font-size: 0.9rem;
}
.price-badge {
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.6rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* Like button inside thumbnail */
.like-btn-card {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(4px);
  z-index: 10;
}
.like-btn-card:hover {
  background: rgba(0,0,0,0.8);
  transform: scale(1.1);
}
.like-btn-card i {
  font-size: 1rem;
}
.like-btn-card .fas.fa-heart {
  color: var(--like-red, #ff3040);
}

/* Card footer with shop info */
.card-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
}
.shop-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--gray-300);
}
.shop-details {
  flex: 1;
  min-width: 0;
}
.shop-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.video-caption {
  font-size: 0.8rem;
  color: var(--gray-600);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 2rem;
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px dashed var(--gray-400);
}
.empty-state i {
  font-size: 3rem;
  color: var(--gray-400);
  margin-bottom: 1rem;
}
.empty-state h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}
.empty-state p {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}
.browse-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: var(--primary);
  color: white;
  border-radius: 3rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.browse-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -8px var(--primary);
}

/* ===== BOTTOM NAVIGATION (mobile) ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--gray-300);
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0.25rem;
  z-index: 50;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--gray-600);
  font-size: 0.7rem;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.nav-item i {
  font-size: 1.2rem;
}
.nav-item:hover,
.nav-item.active {
  color: var(--primary);
  background: var(--gray-200);
}

/* ===== TABLET & DESKTOP UPGRADES ===== */
@media (min-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
  }
  .category-title {
    padding: 2rem 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
  }
  .floating-categories {
    padding: 1rem 2rem;
    justify-content: center;
  }
  .bottom-nav {
    display: none; /* hide bottom nav on desktop */
  }
  body {
    padding-bottom: 0;
  }
}

@media (min-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== UTILITIES ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
}