/* ────────────────────────────────────────────────────────
   ROBUST RECONSTRUCTION: CATALOG UI/UX
   ──────────────────────────────────────────────────────── */

:root {
  --premium-bg: var(--color-slate-50);
  --premium-card-bg: var(--color-white);
  --premium-accent: var(--color-blue-600);
  --premium-accent-hover: var(--color-blue-700);
  --premium-text-main: var(--color-slate-900);
  --premium-text-muted: var(--color-slate-500);
  --premium-border: rgba(15, 23, 42, 0.06);
  --premium-shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.03);
  --premium-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.08);
  --premium-radius: 16px;
}

body.dark-theme {
  --premium-bg: var(--color-slate-900);
  --premium-card-bg: var(--color-slate-800);
  --premium-accent: var(--color-blue-500);
  --premium-accent-hover: var(--color-blue-400);
  --premium-text-main: var(--color-slate-50);
  --premium-text-muted: var(--color-slate-400);
  --premium-border: rgba(255, 255, 255, 0.1);
  --premium-shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.3);
  --premium-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.5);
}

body.catalog-page {
  background-color: var(--premium-bg);
}

/* ── HERO & AURORA GLASSMORPHISM ─────────────────────────────── */

.text-gradient {
  background: linear-gradient(135deg, var(--color-blue-500), var(--color-indigo-500));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Glass Pill Search */

.btn-pill-dropdown {
  background: transparent;
  border: none;
  color: var(--color-slate-700);
  font-size: 1rem;
  font-weight: 600;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.btn-pill-dropdown:hover {
  color: var(--color-text-main);
}

.btn-pill-dropdown::after {
  margin-left: 8px;
}

/* Quick Filters */

.btn-quick-filter {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(15, 23, 42, 0.05);
  color: var(--color-slate-600);
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.btn-quick-filter:hover,
.btn-quick-filter.active {
  background: var(--color-white);
  color: var(--color-text-main);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: rgba(15, 23, 42, 0.1);
}

.btn-quick-filter::after {
  margin-left: 8px;
}

/* ── DARK THEME HERO OVERRIDES ─────────────────────────────── */

body.dark-theme .btn-pill-dropdown {
  color: var(--color-slate-300);
}

body.dark-theme .btn-pill-dropdown:hover {
  color: var(--color-white);
}

body.dark-theme .btn-quick-filter {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--color-slate-300);
}

body.dark-theme .btn-quick-filter:hover,
body.dark-theme .btn-quick-filter.active {
  background: rgba(30, 41, 59, 1);
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── LAYOUT GRID ───────────────────────────────────────── */
.lnd-premium-grid {
  display: grid;
  gap: 32px;
  width: 100%;

  @media screen and (min-width: 764px) {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* ── PREMIUM CARD ──────────────────────────────────────── */
.lnd-premium-card {
  background: var(--premium-card-bg);
  border: 1px solid var(--premium-border);
  box-shadow: var(--premium-shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  height: 100%;
}

.lnd-premium-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--premium-shadow-hover);
  border-color: rgba(37, 99, 235, 0.15);
}

/* Card Header (Image) */
.premium-card-header {
  height: 220px;
  position: relative;
  overflow: hidden;
  background: var(--color-slate-100);
}

.premium-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.lnd-premium-card:hover .premium-hero-img {
  transform: scale(1.08);
}

.premium-logo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--color-slate-300);
  background: var(--color-bg-main);
}

body.dark-theme .premium-logo-fallback {
  background: var(--color-bg-elevated);
  color: var(--color-slate-600);
}

.premium-logo-fallback img {
  max-width: 60%;
  max-height: 60%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.lnd-premium-card:hover .premium-logo-fallback img {
  transform: scale(1.1);
}

/* Floating Category Tag */
.premium-category-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--premium-text-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

/* Card Body */
.premium-card-body {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.premium-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--premium-text-main);
  margin-bottom: 16px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-red-500);
  box-shadow: 0 0 0 rgba(239, 68, 68, 0.2);
}

/* Meta Grid */
.premium-meta-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 20px;
  margin-bottom: 20px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--premium-text-muted);
}

.meta-item i {
  color: var(--color-text-muted);
  font-size: 1rem;
}

.meta-item.rating i {
  color: var(--color-amber-500);
}

.meta-item.rating strong {
  color: var(--premium-text-main);
  font-weight: 800;
}

.premium-desc {
  color: var(--premium-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Footer */
.premium-card-footer {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
}

.btn-premium-primary,
.btn-premium-secondary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;

  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-premium-primary {
  background: var(--premium-accent);
  color: var(--color-white) !important;
  border: 1px solid var(--premium-accent);
}

.btn-premium-primary:hover {
  background: var(--premium-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(37, 99, 235, 0.25);
}

.btn-premium-secondary {
  background: var(--color-bg-main);
  color: var(--premium-text-main) !important;
  border: 1px solid var(--color-border-light);
}

.btn-premium-secondary:hover {
  background: var(--color-slate-100);
  border-color: var(--color-border-light);
  transform: translateY(-2px);
}

body.dark-theme .btn-premium-secondary {
  background: var(--color-bg-elevated);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .btn-premium-secondary:hover {
  background: var(--color-slate-700);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── EMPTY STATE ───────────────────────────────────────── */
.catalog-empty-state {
  background: var(--premium-card-bg);
  border: 1px solid var(--premium-border);
  padding: 80px 40px;
  text-align: center;
  box-shadow: var(--premium-shadow-soft);
  max-width: 700px;
  margin: 40px auto;
}

.empty-icon-wrapper {
  width: 100px;
  height: 100px;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.1),
    rgba(96, 165, 250, 0.1)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px;
  color: var(--premium-accent);
  font-size: 2.5rem;
}

.empty-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--premium-text-main);
  margin-bottom: 16px;
  font-family: "Outfit", sans-serif;
  letter-spacing: -0.5px;
}

.empty-desc {
  color: var(--premium-text-muted);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 40px;
}

.btn-empty-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--premium-accent);
  color: var(--color-white) !important;
  padding: 14px 32px;

  font-weight: 800;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.btn-empty-primary:hover {
  background: var(--premium-accent-hover);
  transform: translateY(-);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

/* ── MEGA SEARCH INLINE PANEL ─────────────────────────────── */

.btn-fancy-search {
  background: linear-gradient(135deg, var(--color-blue-500) 0%, var(--color-blue-600) 100%);
  color: white;
  border: none;
  padding: 16px 40px;

  font-size: 1.15rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
  transition:
    max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease,
    margin-bottom 0.4s ease,
    padding 0.4s ease,
    transform 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  max-height: 120px;
}

.btn-fancy-search:hover {
  transform: translateY(-);
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4);
  color: white;
}

.btn-fancy-search.hide {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-width: 0 !important;
}

.btn-mega-search {
  background: var(--color-blue-500);
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 14px 32px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

.btn-mega-search:hover {
  background: var(--color-blue-600);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(59, 130, 246, 0.3);
}

/* Mobile adjustments */

/* Enterprise Catalog CSS (Moved from catalog.php) */
:root {
  --ent-text: var(--color-slate-900);
  --ent-muted: var(--color-slate-500);
  --ent-accent: var(--color-indigo-900);
  --ent-border: var(--color-border-light);
  --ent-bg: var(--color-white);
  --ent-card: var(--color-white);
  --ent-pill: var(--color-slate-50);
}

body.catalog-page {
  background-color: var(--ent-bg) !important;
}

.ent-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 992px) {
  .ent-layout {
    flex-direction: row;
    gap: 2.5rem;
  }
}

.ent-sidebar {
  width: 100%;
}

@media (min-width: 992px) {
  .ent-sidebar {
    width: 280px;
    flex-shrink: 0;
  }
}

.ent-main {
  flex: 1;
  min-width: 0;
}

.ent-sticky {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 10px;
}

.ent-sticky::-webkit-scrollbar {
  width: 6px;
}

.ent-sticky::-webkit-scrollbar-thumb {
  background-color: var(--color-slate-300);
  border-radius: 10px;
}

.remove-filter-btn {
  color: var(--color-text-muted);
  transition: color 0.2s;
  cursor: pointer;
}

.remove-filter-btn:hover {
  color: var(--color-red-500) !important;
}

@keyframes ent-skeleton-pulse {
  0% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.5;
  }
}

.ent-skeleton {
  background-color: var(--color-slate-300);
  animation: ent-skeleton-pulse 1.5s ease-in-out infinite;
}

/* Premium Glass & Micro-Animations */

.lnd-premium-card {
  font-size: 0.92rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--color-slate-100);
}

.lnd-premium-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08) !important;
  border-color: var(--color-border-light);
}

.premium-card-header {
  height: 160px !important;
  overflow: hidden;
}

.premium-hero-img {
  transition: transform 0.4s ease;
}

.lnd-premium-card:hover .premium-hero-img {
  transform: scale(1.05);
}

.premium-card-body {
  padding: 1.25rem !important;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.premium-title {
  font-size: 1.1rem !important;
}

.premium-desc {
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0 !important;
  font-size: 0.85rem;
}

.premium-meta-grid {
  gap: 0.5rem !important;
  margin-bottom: 0.75rem !important;
}

.premium-card-footer {
  padding: 1rem 1.25rem !important;
  flex-wrap: wrap;
  gap: 0.5rem !important;
}

.btn-premium-primary,
.btn-premium-secondary {
  padding: 0.5rem 0.75rem !important;
  font-size: 0.8rem !important;
  flex: 1;
  text-align: center;
  justify-content: center;
}

@media screen and (min-width: 992px) {
  .lnd-premium-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media screen and (min-width: 764px) {
  .container.pb-5.catalog {
    padding-top: 100px;
  }
}

@media screen and (max-width: 764px) {
  .container.pb-5.catalog {
    padding-top: 50px;
  }
}

/* Dark Theme Overrides for Enterprise Catalog */
body.dark-theme {
  --ent-text: var(--color-slate-50);
  --ent-muted: var(--color-slate-400);
  --ent-accent: var(--color-blue-400);
  --ent-border: rgba(255, 255, 255, 0.1);
  --ent-bg: var(--color-slate-900);
  --ent-card: var(--color-slate-800);
  --ent-pill: var(--color-slate-700);
}

body.dark-theme .ent-skeleton::-webkit-scrollbar-thumb {
  background-color: var(--color-slate-600);
}

body.dark-theme .remove-filter-btn {
  color: var(--color-text-muted);
}

body.dark-theme .ent-skeleton {
  background-color: var(--color-slate-700);
}

body.dark-theme .lnd-premium-card {
  border-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .lnd-premium-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .premium-category-tag {
  background: rgba(15, 23, 42, 0.95);
}
