/*========================================
  CATALOG SPLIT VARIANT
  Dual-column layout with sidebar navigation
  Premium editorial design with separated sections
========================================*/

/* Container */
.catalog-split-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: calc(100vh - 85px);
  margin-top: 85px;
}

/* Sidebar */
.catalog-sidebar {
  background: linear-gradient(180deg,
    rgba(15, 15, 20, 0.98),
    rgba(10, 10, 15, 0.95));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 85px;
  height: calc(100vh - 85px);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Custom scrollbar for sidebar */
.catalog-sidebar::-webkit-scrollbar {
  width: 6px;
}

.catalog-sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.catalog-sidebar::-webkit-scrollbar-thumb {
  background: rgba(158, 240, 249, 0.3);
  border-radius: 3px;
}

.catalog-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(158, 240, 249, 0.5);
}

.sidebar-sticky {
  padding: 2rem 1.5rem;
}

.sidebar-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-title {
  font-family: "Portmanteau", serif;
  font-size: 2rem;
  color: var(--color-active);
  margin-bottom: 0.25rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.sidebar-subtitle {
  font-size: 0.9rem;
  color: #777;
  font-style: italic;
  font-weight: 300;
}

/* Sidebar Filters */
.sidebar-filters {
  margin-bottom: 2.5rem;
}

.filter-section {
  margin-bottom: 1.5rem;
}

.filter-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #777;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.filter-section select,
.filter-section input:not(.catalog-search-input) {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--color-subdued-white);
  font-size: 0.9rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.filter-section select:focus,
.filter-section input:not(.catalog-search-input):focus {
  outline: none;
  border-color: var(--color-active);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 0 3px rgba(158, 240, 249, 0.1);
}

.filter-section select:hover,
.filter-section input:not(.catalog-search-input):hover {
  border-color: rgba(255, 255, 255, 0.2);
}

/* Search Box */
.search-box {
  position: relative;
}

.search-box svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #666;
  pointer-events: none;
}

.catalog-search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--color-subdued-white);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.catalog-search-input:focus {
  outline: none;
  border-color: var(--color-active);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 0 3px rgba(158, 240, 249, 0.1);
}

.catalog-search-input::placeholder {
  color: #666;
  font-style: italic;
}

/* Sidebar Nav */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  color: #999;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.nav-link svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(158, 240, 249, 0.2);
  color: var(--color-subdued-white);
}

.nav-link.active {
  background: linear-gradient(135deg,
    rgba(158, 240, 249, 0.15),
    rgba(158, 240, 249, 0.08));
  border-color: rgba(158, 240, 249, 0.3);
  color: var(--color-active);
}

.nav-link.active svg {
  transform: translateX(4px);
}

/* Main Content */
.catalog-main-content {
  padding: 3rem 3rem 4rem;
  max-width: 1400px;
}

.content-section {
  margin-bottom: 4rem;
}

.section-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.section-title {
  font-family: "Portmanteau", serif;
  font-size: 2.5rem;
  color: var(--color-active);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.section-desc {
  font-size: 1.1rem;
  color: #888;
  font-style: italic;
  font-weight: 300;
}

/* Grid */
.split-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
  gap: 2.5rem;
  width: 100%;
}

/* Ensure cards don't overlap */
.courses-grid,
.apparel-grid {
  width: 100%;
  margin: 0;
}

/* Cards */
.split-card {
  background: var(--card-gradient);
  border-radius: 12px;
  box-shadow: var(--box-shadow-header);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.04);
  min-width: 0; /* Prevent grid blowout */
  width: 100%;
  height: 100%;
}

.split-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7),
              0 0 40px rgba(158, 240, 249, 0.15);
  border-color: rgba(158, 240, 249, 0.25);
}

.card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

/* Card Image */
.split-card-image {
  position: relative;
  height: 280px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a1f, #0f0f14);
}
.apparel-card .split-card-image {
  position: relative;
  height: 280px;
  overflow: hidden;
  background: transparent;
}

.split-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.apparel-card .split-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 150;
}

.split-card:hover .split-card-image img {
  transform: scale(1.1);
}

.image-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.7) 100%);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.split-card:hover .image-gradient {
  opacity: 0.4;
}

/* Card Badges */
.card-badges {
  position: absolute;

  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 250;
}

.badge {
  padding: 2px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.badge.format-badge {
  background: var(--card-gradient);
  color: #fff;
  align-content: center;
}

.badge.level-badge {
  background: var(--card-gradient);
  border-color: rgba(200, 150, 250, 0.4);
  color: #fff;
  align-content: center;
}

.badge.apparel-badge {
  background: var(--action-button-gradient);
  border-color: #333;
  color: #bbb;
  align-content: center;
}

.split-card:hover .badge {
  transform: translateY(-2px);
}

/* Card Body */
.split-card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background: linear-gradient(180deg, 
    rgba(26, 26, 31, 0.95) 0%, 
    rgba(20, 20, 25, 0.98) 100%);
}

.split-card-title {
  font-size: 1.5rem;
  color: var(--color-subdued-white);
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
  transition: color 0.3s ease;
  font-family: "Portmanteau", serif;
}

.split-card:hover .split-card-title {
  color: var(--color-active);
  text-shadow: 0 0 20px rgba(158, 240, 249, 0.3);
}

.split-card-desc {
  font-size: 0.975rem;
  color: #aaa;
  line-height: 1.7;
  margin-bottom: auto;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.split-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(158, 240, 249, 0.12);
}

.split-card-price {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--color-active);
  text-shadow: 0 2px 8px rgba(158, 240, 249, 0.4);
  letter-spacing: -0.5px;
}

.split-card-price:empty::before {
  content: "FREE";
  font-size: 1.3rem;
  font-weight: 900;
}

.learn-more {
  font-size: 0.95rem;
  font-weight: 700;
  color: #777;
  transition: all 0.3s ease;
}

.split-card:hover .learn-more {
  color: var(--color-active);
  transform: translateX(6px);
}

/* Apparel Carousel */
.apparel-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

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

.apparel-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.5s ease;
  padding: 1rem;
}

.apparel-image.active {
  opacity: 1;
}

.carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.split-card:hover .carousel-controls {
  opacity: 1;
}

.carousel-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--color-subdued-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-btn svg {
  width: 18px;
  height: 18px;
}

.carousel-btn:hover {
  background: #151515;
  border-color: #333;
  color: var(--color-active);
  transform: scale(1.15);
}

.carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 300;
}

.indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 50%, 
                              #45454585,
                              #252525c9);
  border: 2px groove #000;
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background: radial-gradient(circle at 50%, 
                              #252525c9,
                              #454545f3);
  width: 100px;
  height: 24px;
  border-radius: 12px;
}

/* No Results */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem 2rem;
  color: #666;
}

.no-results svg {
  width: 72px;
  height: 72px;
  margin-bottom: 1.5rem;
  color: #444;
}

.no-results p {
  font-size: 1.35rem;
  font-style: italic;
}

/* Responsive */
@media (max-width: 1200px) {
  .split-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 1024px) {
  .catalog-split-container {
    grid-template-columns: 260px 1fr;
  }
  
  .sidebar-sticky {
    padding: 1.5rem 1.25rem;
  }
  
  .catalog-main-content {
    padding: 2.5rem 2rem 3rem;
  }
  
  .section-title {
    font-size: 2.25rem;
  }
}

@media (max-width: 900px) {
  .catalog-split-container {
    grid-template-columns: 1fr;
  }
  
  .catalog-sidebar {
    position: relative;
    top: 0;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  
  .sidebar-sticky {
    padding: 2rem 1.5rem;
  }
  
  .sidebar-nav {
    flex-direction: row;
  }
  
  .catalog-main-content {
    padding: 2rem 1.5rem 3rem;
  }
  
  .split-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .sidebar-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }
  
  .sidebar-title {
    font-size: 1.75rem;
  }
  
  .sidebar-nav {
    gap: 0.75rem;
  }
  
  .nav-link {
    flex: 1;
    justify-content: center;
    padding: 0.75rem;
  }
  
  .nav-link span {
    display: none;
  }
  
  .catalog-main-content {
    padding: 1.5rem 1rem 2.5rem;
  }
  
  .section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .section-desc {
    font-size: 1rem;
  }
  
  .split-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .split-card-image {
    height: 200px;
  }
  
  .split-card-body {
    padding: 1.5rem;
  }
  
  .split-card-title {
    font-size: 1.2rem;
  }
  
  .split-card-desc {
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}

@media (max-width: 480px) {
  .sidebar-sticky {
    padding: 1.5rem 1rem;
  }
  
  .sidebar-title {
    font-size: 1.5rem;
  }
  
  .filter-section {
    margin-bottom: 1.25rem;
  }
  
  .catalog-main-content {
    padding: 1.25rem 0.75rem 2rem;
  }
  
  .section-header {
    margin-bottom: 1.25rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .section-desc {
    font-size: 0.95rem;
  }
  
  .content-section {
    margin-bottom: 3rem;
  }
  
  .split-card-image {
    height: 180px;
  }
  
  .split-card-body {
    padding: 1.25rem;
  }
  
  .split-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}
