:root {
  --bg-dark: #0c0806;
  --bg-card: #140d09;
  --bg-card-hover: #1c130d;
  --bg-border: #281a10;
  --accent-gold: #d8953ec6;
  --accent-amber: #c37b27;
  --accent-gold-hover: #e5b46a;
  --accent-orange: #d15d19;
  --text-main: #f0eae1;
  --text-muted: #8e8075;
  --font-heading: 'Cinzel', serif;
  --font-body: 'Poppins', sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.4;
  min-height: 100vh;
}

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 50px;
  background: rgba(12, 8, 6, 0.98);
  border-bottom: 1px solid var(--bg-border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-heading);
}



.title-main {
  font-weight: 800;
  font-size: 15px;
  color: #ffffff;
  letter-spacing: 1px;
  line-height: 1;
}

.title-sub {
  font-weight: 800;
  font-size: 15px;
  color: var(--accent-gold);
  line-height: 1.2;
}

.tagline {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1.2px;
  line-height: 1.2;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-gold);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-gold);
}

.login-btn {
  background: transparent;
  border: 1px solid var(--accent-amber);
  color: var(--accent-gold);
  padding: 8px 24px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  transition: all 0.2s ease;
}

.login-btn:hover {
  background: var(--accent-amber);
  color: #000;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* USER PROFILE DROPDOWN MENU */
.user-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.user-menu-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card, #150f0b);
  border: 1px solid var(--border-color, #2b1f16);
  padding: 4px 12px 4px 6px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  user-select: none;
  transition: all 0.2s ease;
}

.user-menu-pill:hover,
.user-dropdown-wrapper.active .user-menu-pill {
  border-color: var(--accent-gold, #d8963e);
  background: var(--bg-card-alt, #1a130e);
}

.user-menu-pill img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-ring {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #ff9800;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1a1a1a;
}

.user-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropdown-arrow {
  font-size: 11px;
  color: var(--text-secondary, #8c7867);
  display: inline-block;
  transition: transform 0.2s ease, color 0.2s ease;
}

.user-dropdown-wrapper.active .dropdown-arrow {
  transform: rotate(180deg);
  color: var(--accent-gold, #d8963e);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  background: var(--bg-card, #150f0b);
  border: 1px solid var(--border-color, #2b1f16);
  border-radius: 10px;
  padding: 10px 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1100;
  animation: navbarDropdownFade 0.2s ease forwards;
}

.user-dropdown-wrapper.active .user-dropdown-menu {
  display: block;
}

@keyframes navbarDropdownFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-header {
  padding: 6px 16px 10px;
}

.dropdown-header .user-profile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #ebd9c5);
  display: block;
}

.user-handle {
  font-size: 0.85rem;
  color: #8c7867;
  font-weight: 400;
  display: block;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color, #2b1f16);
  margin: 6px 0;
}

.dropdown-items {
  display: flex;
  flex-direction: column;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: var(--text-secondary, #8c7867);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.dropdown-item i {
  width: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--accent-gold, #d8963e);
}

.dropdown-item:hover {
  background: rgba(216, 150, 62, 0.15);
  color: var(--accent-gold, #d8963e);
}

.dropdown-item.logout-item {
  color: #e74c3c;
}

.dropdown-item.logout-item i {
  color: #e74c3c;
}

.dropdown-item.logout-item:hover {
  background: rgba(231, 76, 60, 0.1);
}

/* Hide login button when user wrapper has the 'logged-in' class */
.user-dropdown-wrapper.logged-in #loginBtn,
.user-dropdown-wrapper.logged-in .login-btn {
  display: none !important;
}

/* Optional: Hide logged-in user details when NOT logged in */
.user-dropdown-wrapper:not(.logged-in) .user-profile-menu {
  display: none !important;
}


/* HERO SECTION */
.hero-packs {
  position: relative;
  height: 380px;
  background: url('assets/header.png') center/cover no-repeat;
  display: flex;
  align-items: center;
  padding: 0 60px;
  border-bottom: 1px solid var(--bg-border);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(12, 8, 6, 0.95) 25%, rgba(12, 8, 6, 0.3) 70%, rgba(12, 8, 6, 0.9) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 500px;
}

.hero-subtitle {
  color: var(--accent-gold);
  letter-spacing: 3px;
  font-size: 13px;
  font-weight: 600;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 56px;
  font-weight: 800;
  line-height: 1.05;
  margin: 10px 0;
  color: #ffffff;
}

.hero-title .highlight {
  color: var(--accent-gold);
}

.hero-desc {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.explorebtn {
  background: linear-gradient(135deg, var(--accent-gold), #b86e20);
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(216, 150, 62, 0.2);
}

/* DIVIDER & MANUAL AD CONTAINER */
.pattern-divider {
  height: 12px;
  background: #1e130a url('assets/pattern_border.png') repeat-x center;
  border-top: 1px solid var(--bg-border);
  border-bottom: 1px solid var(--bg-border);
}



/* MAIN LAYOUT */
.main-layout {
  display: flex;
  padding: 30px 40px;
  gap: 25px;
}

/* SIDEBAR FILTERS */
.filters-sidebar {
  width: 210px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: 8px;
  padding: 18px;
}

.filter-top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
}

.clear-all-btn {
  background: none;
  border: none;
  color: var(--accent-gold);
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
}

.filter-group {
  margin-bottom: 18px;
  border-bottom: 1px solid var(--bg-border);
  padding-bottom: 14px;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent-gold);
  margin-bottom: 10px;
}

.filter-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  cursor: pointer;
}

.filter-options input[type="checkbox"] {
  accent-color: var(--accent-gold);
}

.range-slider {
  width: 100%;
  accent-color: var(--accent-gold);
  margin-top: 5px;
}

.range-values {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* PACKS CENTER SECTION */
.packs-section {
  flex-grow: 1;
}

.search-sort-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
}

.search-box {
  position: relative;
  flex-grow: 1;
}

.search-box input {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--bg-border);
  padding: 10px 40px 10px 15px;
  border-radius: 4px;
  color: var(--text-main);
  font-size: 13px;
}

.search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.select-box {
  position: relative;
  width: 200px;
}

.select-box select {
  width: 100%;
  appearance: none;
  background-color: var(--bg-card);
  border: 1px solid var(--bg-border);
  padding: 10px 30px 10px 15px;
  border-radius: 4px;
  color: var(--text-main);
  font-size: 13px;
  cursor: pointer;
}

.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 10px;
}

.results-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* 5-COLUMN SCROLLABLE PACKS GRID */
.packs-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  max-height: 640px; /* Approximately 15 packs visible (3 rows of 5) */
  overflow-y: auto;
  padding-right: 8px;
  padding-top: 4px;
  scroll-behavior: smooth;
}

/* Custom Scrollbar Styling */
.packs-grid::-webkit-scrollbar {
  width: 6px;
}

.packs-grid::-webkit-scrollbar-track {
  background: var(--bg-card);
  border-radius: 4px;
}

.packs-grid::-webkit-scrollbar-thumb {
  background: var(--accent-gold);
  border-radius: 4px;
}

.packs-grid::-webkit-scrollbar-thumb:hover {
  background: var(--accent-amber);
}

.pack-card {
  background-color: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: 6px;
  padding: 8px;
  position: relative;
  transition: transform 0.3s, border-color 0.3s;
}

.pack-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-gold-hover);
}

/* IN-GRID AD BANNER CARD */
.pack-ad-card {
  grid-column: 1 / -1;
  background-color: var(--bg-card);
  border: 1px dashed var(--bg-border);
  border-radius: 6px;
  padding: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100px;
  margin: 10px 0;
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 2px 6px;
  border-radius: 3px;
  z-index: 2;
}

.badge-new {
  background-color: var(--accent-gold);
  color: #000;
}

.badge-hot {
  background-color: var(--accent-orange);
  color: #fff;
}

.card-img-wrap {
  width: 100%;
  height: 125px;
  border-radius: 4px;
  overflow: hidden;
  background-color: #1a120b;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-title {
  font-size: 12px;
  font-weight: 600;
  margin: 8px 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-subtitle {
  font-size: 10px;
  color: var(--text-muted);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(40, 26, 16, 0.5);
}

.card-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-gold);
}

.card-actions {
  display: flex;
  gap: 4px;
}

.action-btn {
  background: transparent;
  border: 1px solid var(--bg-border);
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: all 0.2s;
}

.action-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold-hover);
}

/* FEATURES BANNER */
.features-banner {
  margin-top: 35px;
  background-color: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: 6px;
  padding: 20px;
  display: flex;
  align-items: center;
}

.feature-primary {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 38%;
  border-right: 1px solid var(--bg-border);
  padding-right: 20px;
}

.icon-circle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  font-size: 18px;
  flex-shrink: 0;
}

.feature-primary-text h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.feature-primary-text p {
  font-size: 11px;
  color: var(--text-muted);
}

.feature-secondary {
  display: flex;
  width: 62%;
  justify-content: space-around;
  padding-left: 15px;
}

.feature-item {
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
  max-width: 100px;
}

.feature-item i {
  color: var(--accent-gold);
  font-size: 14px;
  margin-bottom: 4px;
  display: block;
}

.feature-item strong {
  display: block;
  color: var(--text-main);
  font-size: 11px;
  margin-bottom: 2px;
}

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--bg-border);
  background-color: var(--bg-dark);
}

.footer-banner {
  text-align: center;
  padding: 40px 20px;
  background: radial-gradient(circle at center, #2e1a0e 0%, var(--bg-dark) 80%);
  border-bottom: 1px solid var(--bg-border);
}

.footer-banner h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--accent-gold);
  margin-bottom: 15px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-icons a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(212, 163, 89, 0.1);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  text-decoration: none;
  transition: all 0.3s;
}

.social-icons a:hover {
  background-color: var(--accent-gold);
  color: #000;
}

.footer-columns-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 2fr;
  gap: 30px;
  padding: 40px 50px;
}

.footer-col h5 {
  font-family: var(--font-heading);
  color: var(--accent-gold);
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.3s;
}

.footer-col a:hover,
.footer-col a.active {
  color: var(--accent-gold);
}

.tagline-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin: 8px 0 12px;
}

.copyright {
  font-size: 10px;
  color: #554a42;
}

.newsletter-col p {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.newsletter-form {
  display: flex;
}

.newsletter-form input {
  background-color: var(--bg-card);
  border: 1px solid var(--bg-border);
  padding: 8px 12px;
  font-size: 12px;
  color: #fff;
  border-radius: 4px 0 0 4px;
  outline: none;
  flex-grow: 1;
}

.newsletter-form button {
  background-color: var(--accent-gold);
  border: none;
  color: #000;
  padding: 8px 12px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

/* RESPONSIVE LAYOUT BREAKPOINTS */
@media (max-width: 1500px) {
  .packs-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1024px) {
  .packs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .main-layout {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
  }
  .packs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .main-layout {
    flex-direction: column;
  }
  .filters-sidebar {
    width: 100%;
  }
  .ad-below-hero {
    display: none;
  }
}

/* CARD INTERACTION */
.pack-card {
  cursor: pointer;
}

/* PACK METADATA & STATS */
.pack-meta-info {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--bg-border);
}

.pack-meta-info i {
  color: var(--accent-gold);
  margin-right: 4px;
}

.pack-stats {
  font-size: 10px;
  color: var(--accent-gold);
  margin-top: 4px;
  font-weight: 500;
}

.pack-stats i {
  margin-right: 4px;
}

/* FOOTER DOWNLOAD BUTTON HOVER STYLES */
.download-footer-btn {
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  border-radius: 6px;
  padding: 8px 10px;
}

.download-footer-btn:hover {
  background: linear-gradient(135deg, rgba(228, 220, 210, 0.802), rgba(216, 150, 62, 0.25));
  border-color: var(--accent-gold-hover);
}

.download-footer-btn:hover .download-btn-large {
  background: var(--accent-gold-hover);
  transform: scale(1.03);
}

/* FULL-FOOTER DOWNLOAD BUTTON */
.download-footer-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.download-footer-trigger .card-price {
  font-weight: 700;
  font-size: 15px;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s ease, border-color 0.2s ease
}

.download-footer-trigger .download-label {
  font-weight: 600;
  font-size: 12px;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

/* HOVER STATE */
.download-footer-trigger:hover {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-amber));
  border-color: var(--accent-gold);
  box-shadow: 0 4px 12px rgba(216, 150, 62, 0.3);
}

.download-footer-trigger:hover .card-price,
.download-footer-trigger:hover .download-label {
  color: #000;
}


.pack-card {
  position: relative;
  cursor: pointer;
}

/* RIGHT-ALIGNED FAVORITE BUTTON */
.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  left: auto; /* Guarantees right positioning */
  background: rgba(15, 10, 8, 0.75);
  border: 1px solid var(--bg-border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.fav-btn:hover,
.fav-btn.active {
  color: #e74c3c;
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.2);
}

.hidden {
  display: none !important;
}