@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* --- CUSTOM VARIABLES --- */
:root {
  --font-family: 'Outfit', sans-serif;
  
  /* HSL Colors - Sleek Cyber Dark Theme */
  --bg-dark: 222 47% 11%;      /* #0b0f19 Deep Space */
  --bg-card: 223 47% 16%;      /* #141c2f Card Slate */
  --bg-nav: 222 47% 11% / 0.8;
  --border-color: 217 33% 22%; /* Soft Slate Border */
  
  --primary: 191 97% 47%;      /* #0ea5e9 Cyber Teal / Cyan */
  --primary-glow: 191 97% 47% / 0.35;
  --secondary: 263 90% 70%;    /* #a78bfa Glowing Violet */
  --secondary-glow: 263 90% 70% / 0.3;
  
  --accent: 168 100% 41%;      /* Neon Mint Green for success/buttons */
  --danger: 343 90% 60%;       /* Neon Pink/Red */
  --warning: 45 93% 47%;       /* Cyber Amber */
  
  --text-primary: 210 40% 98%;   /* Pure White/Ice */
  --text-secondary: 215 20% 74%; /* Muted Grey */
  --text-muted: 215 16% 47%;     /* Dark Muted Grey */

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px hsla(var(--primary), 0.25);
}

/* --- RESET & BASE STYLES --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--primary) / 0.3) hsl(var(--bg-dark));
}

body {
  font-family: var(--font-family);
  background-color: hsl(var(--bg-dark));
  color: hsl(var(--text-primary));
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: hsl(var(--bg-dark));
}
::-webkit-scrollbar-thumb {
  background: hsl(var(--border-color));
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--primary) / 0.5);
}

/* --- LAYOUT UTILITIES --- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.glow-text {
  text-shadow: 0 0 15px hsla(var(--primary), 0.4);
}

/* --- HEADER & NAVIGATION --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: hsl(var(--bg-nav));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid hsl(var(--border-color));
  transition: var(--transition-normal);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: hsl(var(--text-primary));
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.logo span {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo i {
  color: hsl(var(--primary));
  font-size: 24px;
  filter: drop-shadow(0 0 8px hsla(var(--primary), 0.5));
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-full);
  color: hsl(var(--text-secondary));
  transition: var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.nav-link:hover {
  color: hsl(var(--text-primary));
  background-color: hsl(var(--text-primary) / 0.05);
}

.nav-link.active {
  color: hsl(var(--primary));
  background-color: hsl(var(--primary) / 0.1);
  border-color: hsl(var(--primary) / 0.2);
  text-shadow: 0 0 10px hsla(var(--primary), 0.3);
}

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

.btn-admin {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, hsl(var(--primary) / 0.1), hsl(var(--secondary) / 0.1));
  border: 1px solid hsl(var(--primary) / 0.3);
  color: hsl(var(--primary));
  cursor: pointer;
  transition: var(--transition-normal);
}

.btn-admin:hover {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)));
  color: hsl(var(--bg-dark));
  box-shadow: 0 0 20px hsla(var(--primary), 0.4);
  border-color: transparent;
  transform: translateY(-2px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background-color: hsl(var(--text-primary));
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* --- MOBILE DRAWER NAV --- */
@media (max-width: 1024px) {
  nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background-color: hsl(var(--bg-dark));
    border-bottom: 1px solid hsl(var(--border-color));
    flex-direction: column;
    padding: 16px 24px;
    align-items: stretch;
    gap: 6px;
    box-shadow: var(--shadow-md);
  }

  nav.open {
    display: flex;
  }

  .nav-link {
    border-radius: var(--radius-sm);
    padding: 12px 16px;
  }

  .hamburger {
    display: flex;
  }

  .hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .hamburger.open span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* --- MAIN CONTAINER & SPA VIEWS --- */
main {
  flex: 1;
  padding-top: 110px;
  padding-bottom: 60px;
}

.view-section {
  display: none;
  animation: fadeIn var(--transition-slow) forwards;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- HERO SECTION --- */
.hero {
  text-align: center;
  padding: 40px 0 60px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 250px;
  background: radial-gradient(circle, hsla(var(--primary-glow), 0.6) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.hero h1 {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 18px;
  letter-spacing: -1.5px;
}

.hero h1 span {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 18px;
  color: hsl(var(--text-secondary));
  max-width: 650px;
  margin: 0 auto 30px auto;
}

/* Search bar design */
.search-container {
  max-width: 580px;
  margin: 0 auto;
  position: relative;
}

.search-bar {
  width: 100%;
  background-color: hsl(var(--bg-card));
  border: 1px solid hsl(var(--border-color));
  padding: 16px 20px 16px 54px;
  border-radius: var(--radius-full);
  font-size: 16px;
  color: hsl(var(--text-primary));
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.search-bar:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 4px hsla(var(--primary), 0.15), var(--shadow-glow);
}

.search-container i {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--text-muted));
  font-size: 18px;
  transition: var(--transition-fast);
}

.search-bar:focus + i {
  color: hsl(var(--primary));
}

/* --- STATS CLUSTER --- */
.stats-cluster {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 50px 0;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.stat-card {
  background-color: hsl(var(--bg-card));
  border: 1px solid hsl(var(--border-color));
  padding: 24px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, hsl(var(--primary)), transparent);
  transform: scaleX(0);
  transition: var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: hsl(var(--primary) / 0.4);
  box-shadow: var(--shadow-md);
}

.stat-card:hover::before {
  transform: scaleX(1);
}

.stat-card i {
  font-size: 28px;
  color: hsl(var(--primary));
  margin-bottom: 12px;
  display: inline-block;
}

.stat-card .stat-val {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 4px;
  color: hsl(var(--text-primary));
}

.stat-card .stat-lbl {
  font-size: 14px;
  color: hsl(var(--text-secondary));
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

@media (max-width: 768px) {
  .stats-cluster {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero h1 {
    font-size: 36px;
  }
}

/* --- FEED & GRIDS --- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  position: relative;
  padding-left: 16px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 5px;
  border-radius: var(--radius-full);
  background: linear-gradient(to bottom, hsl(var(--primary)), hsl(var(--secondary)));
}

.grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 28px;
}

@media (max-width: 480px) {
  .grid-layout {
    grid-template-columns: 1fr;
  }
}

/* --- GENERAL POST CARDS --- */
.card {
  background-color: hsl(var(--bg-card));
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition-normal);
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  border-color: hsl(var(--primary) / 0.5);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), var(--shadow-glow);
}

.card-img-container {
  height: 190px;
  width: 100%;
  position: relative;
  overflow: hidden;
  background-color: hsl(var(--bg-dark));
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

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

.card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  z-index: 2;
  border: 1px solid transparent;
}

/* Category Specific Badge Styling */
.badge-softwares {
  background-color: hsla(191, 97%, 47%, 0.15);
  color: hsl(var(--primary));
  border-color: hsla(191, 97%, 47%, 0.3);
}
.badge-bios {
  background-color: hsla(263, 90%, 70%, 0.15);
  color: hsl(var(--secondary));
  border-color: hsla(263, 90%, 70%, 0.3);
}
.badge-schem {
  background-color: hsla(45, 93%, 47%, 0.15);
  color: hsl(var(--warning));
  border-color: hsla(45, 93%, 47%, 0.3);
}
.badge-shop {
  background-color: hsla(168, 100%, 41%, 0.15);
  color: hsl(var(--accent));
  border-color: hsla(168, 100%, 41%, 0.3);
}

.card-price-tag {
  position: absolute;
  bottom: 14px;
  right: 14px;
  padding: 6px 14px;
  font-size: 16px;
  font-weight: 800;
  background-color: hsl(var(--bg-dark));
  border: 1px solid hsl(var(--accent) / 0.4);
  color: hsl(var(--accent));
  border-radius: var(--radius-sm);
  z-index: 2;
}

.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
  color: hsl(var(--text-primary));
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-description {
  font-size: 14px;
  color: hsl(var(--text-secondary));
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-description.expanded {
  display: block !important;
  overflow: visible !important;
  -webkit-line-clamp: unset !important;
}

.btn-read-more {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: hsl(var(--primary));
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin-top: -4px;
  margin-bottom: 16px;
  transition: var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-read-more:hover {
  color: hsl(var(--secondary));
  text-shadow: 0 0 8px hsla(var(--secondary-glow), 0.5);
}

.btn-read-more i {
  font-size: 10px;
}

/* Specifications Table inside cards */
.card-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
  padding: 14px;
  background-color: hsl(var(--bg-dark) / 0.4);
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-label {
  font-size: 10px;
  color: hsl(var(--text-muted));
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-value {
  font-size: 13px;
  font-weight: 600;
  color: hsl(var(--text-primary));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

/* --- BUTTONS --- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  text-align: center;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--bg-dark));
  box-shadow: 0 4px 14px hsla(var(--primary), 0.3);
  flex: 1;
}

.btn-primary:hover {
  background-color: hsl(var(--primary) / 0.85);
  box-shadow: 0 6px 20px hsla(var(--primary), 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid hsl(var(--border-color));
  color: hsl(var(--text-secondary));
}

.btn-secondary:hover {
  border-color: hsl(var(--text-primary));
  color: hsl(var(--text-primary));
  background-color: hsl(var(--text-primary) / 0.03);
}

.btn-shop-buy {
  background-color: hsl(var(--accent));
  color: hsl(var(--bg-dark));
  box-shadow: 0 4px 14px hsla(var(--accent), 0.3);
  flex: 1;
}

.btn-shop-buy:hover {
  background-color: hsl(var(--accent) / 0.85);
  box-shadow: 0 6px 20px hsla(var(--accent), 0.5);
  transform: translateY(-1px);
}

/* --- CONTACT US PAGE --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  margin-top: 20px;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-box {
  background-color: hsl(var(--bg-card));
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius-md);
  padding: 36px;
}

.contact-box h3 {
  font-size: 22px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  color: hsl(var(--text-secondary));
}

.form-control {
  width: 100%;
  background-color: hsl(var(--bg-dark));
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: hsl(var(--text-primary));
  font-size: 15px;
  transition: var(--transition-normal);
}

.form-control:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsla(var(--primary), 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 140px;
}

.contact-info-card {
  background-color: hsl(var(--bg-card));
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius-md);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: relative;
  overflow: hidden;
}

.contact-info-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, hsla(var(--secondary-glow), 0.4) 0%, transparent 70%);
  pointer-events: none;
}

.info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.info-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background-color: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--primary));
  font-size: 18px;
  flex-shrink: 0;
}

.contact-email-icon {
  background: linear-gradient(135deg, #ea4335, #c5221f) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(234, 67, 53, 0.35);
}

.contact-whatsapp-icon {
  background: linear-gradient(135deg, #25d366, #128c7e) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.contact-location-icon {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary))) !important;
  color: hsl(var(--bg-dark)) !important;
  border: none !important;
  box-shadow: 0 4px 14px hsla(var(--primary), 0.35);
}

.info-text h4 {
  font-size: 16px;
  margin-bottom: 4px;
}

.info-text p {
  font-size: 14px;
  color: hsl(var(--text-secondary));
}

/* --- STATUTORY PAGES (ABOUT, PRIVACY, TERMS) --- */
.content-rich-box {
  background-color: hsl(var(--bg-card));
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius-md);
  padding: 40px;
  margin-top: 20px;
}

.content-rich-box h2 {
  font-size: 24px;
  margin: 30px 0 15px 0;
  color: hsl(var(--primary));
}

.content-rich-box h2:first-of-type {
  margin-top: 0;
}

.content-rich-box p {
  color: hsl(var(--text-secondary));
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.7;
}

.content-rich-box ul {
  margin-left: 20px;
  margin-bottom: 20px;
  color: hsl(var(--text-secondary));
  font-size: 15px;
}

.content-rich-box li {
  margin-bottom: 8px;
}

/* --- ADMIN PANEL MODALS & AUTH --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(6, 9, 16, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background-color: hsl(var(--bg-card));
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius-md);
  max-width: 440px;
  width: 100%;
  padding: 36px;
  box-shadow: var(--shadow-md);
  text-align: center;
  position: relative;
  animation: modalScale var(--transition-normal) forwards;
}

@keyframes modalScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 20px;
  color: hsl(var(--text-muted));
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close:hover {
  color: hsl(var(--text-primary));
}

.modal-icon {
  font-size: 48px;
  color: hsl(var(--primary));
  margin-bottom: 20px;
  filter: drop-shadow(0 0 10px hsla(var(--primary), 0.3));
}

.modal-box h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.modal-box p {
  color: hsl(var(--text-secondary));
  font-size: 14px;
  margin-bottom: 24px;
}

/* --- ADMIN PORTAL HUB --- */
.admin-hub {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.admin-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid hsl(var(--border-color));
  padding-bottom: 20px;
}

.admin-nav-tabs {
  display: flex;
  gap: 12px;
  background-color: hsl(var(--bg-dark));
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid hsl(var(--border-color));
}

.admin-tab-btn {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: hsl(var(--text-secondary));
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.admin-tab-btn:hover {
  color: hsl(var(--text-primary));
}

.admin-tab-btn.active {
  background-color: hsl(var(--bg-card));
  color: hsl(var(--primary));
  box-shadow: var(--shadow-sm);
}

/* Admin Grid Layouts */
.admin-dashboard-layout {
  display: grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap: 30px;
  align-items: start;
}

@media (max-width: 1100px) {
  .admin-dashboard-layout {
    grid-template-columns: 1fr;
  }
}

.admin-form-panel {
  background-color: hsl(var(--bg-card));
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius-md);
  padding: 30px;
  position: sticky;
  top: 100px;
}

.admin-form-panel h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: hsl(var(--primary));
  display: flex;
  align-items: center;
  gap: 8px;
}

/* File Image Upload Zone */
.upload-zone {
  border: 2px dashed hsl(var(--border-color));
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
  background-color: hsl(var(--bg-dark) / 0.4);
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: hsl(var(--primary));
  background-color: hsl(var(--primary) / 0.03);
}

.upload-zone i {
  font-size: 24px;
  color: hsl(var(--text-muted));
  margin-bottom: 8px;
}

.upload-zone p {
  font-size: 13px;
  color: hsl(var(--text-secondary));
}

.upload-zone span {
  display: block;
  font-size: 11px;
  color: hsl(var(--text-muted));
  margin-top: 4px;
}

/* Image preview box */
.preview-thumbnail {
  margin-top: 10px;
  position: relative;
  display: none;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid hsl(var(--border-color));
}

.preview-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-thumbnail i {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: hsl(var(--bg-dark));
  color: hsl(var(--danger));
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: var(--transition-fast);
}

.preview-thumbnail i:hover {
  transform: scale(1.15);
}

/* Admin Item Grid/Lists */
.admin-items-panel {
  background-color: hsl(var(--bg-card));
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius-md);
  padding: 30px;
  min-height: 500px;
}

.admin-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
}

.admin-search {
  max-width: 300px;
  flex: 1;
}

.admin-search input {
  width: 100%;
  background-color: hsl(var(--bg-dark));
  border: 1px solid hsl(var(--border-color));
  padding: 8px 12px 8px 36px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: hsl(var(--text-primary));
}

.admin-search-container {
  position: relative;
}

.admin-search-container i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--text-muted));
  font-size: 14px;
}

/* Dynamic field visibility classes */
.price-field-group, .tech-metadata-fields {
  display: none;
}

/* Admin Table Listing */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: hsl(var(--text-muted));
  border-bottom: 2px solid hsl(var(--border-color));
}

.admin-table td {
  padding: 16px;
  font-size: 14px;
  color: hsl(var(--text-secondary));
  border-bottom: 1px solid hsl(var(--border-color));
  vertical-align: middle;
}

.admin-table tr:hover td {
  background-color: hsl(var(--text-primary) / 0.02);
}

.admin-table-item {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 250px;
}

.admin-table-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background-color: hsl(var(--bg-dark));
}

.admin-table-name {
  font-weight: 600;
  color: hsl(var(--text-primary));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-action-btns {
  display: flex;
  gap: 8px;
}

.admin-btn-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 13px;
  border: 1px solid transparent;
}

.btn-edit {
  background-color: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  border-color: hsl(var(--primary) / 0.2);
}

.btn-edit:hover {
  background-color: hsl(var(--primary));
  color: hsl(var(--bg-dark));
}

.btn-delete {
  background-color: hsl(var(--danger) / 0.1);
  color: hsl(var(--danger));
  border-color: hsl(var(--danger) / 0.2);
}

.btn-delete:hover {
  background-color: hsl(var(--danger));
  color: hsl(var(--text-primary));
}

/* Empty State Styling */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: hsl(var(--text-muted));
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  color: hsl(var(--border-color));
}

.empty-state p {
  font-size: 15px;
}

/* Messages/Inbox lists */
.messages-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message-item {
  background-color: hsl(var(--bg-dark) / 0.5);
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius-sm);
  padding: 20px;
  transition: var(--transition-normal);
}

.message-item:hover {
  border-color: hsl(var(--primary) / 0.3);
}

.message-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 12px;
}

.message-sender h4 {
  font-size: 16px;
  font-weight: 700;
  color: hsl(var(--text-primary));
}

.message-sender span {
  font-size: 12px;
  color: hsl(var(--text-muted));
}

.message-date {
  font-size: 12px;
  color: hsl(var(--text-muted));
}

.message-subject {
  font-size: 14px;
  font-weight: 600;
  color: hsl(var(--primary));
  margin-bottom: 8px;
}

.message-text {
  font-size: 14px;
  color: hsl(var(--text-secondary));
  white-space: pre-wrap;
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background-color: hsl(var(--bg-card));
  border-left: 4px solid hsl(var(--primary));
  box-shadow: var(--shadow-md);
  border-top: 1px solid hsl(var(--border-color));
  border-right: 1px solid hsl(var(--border-color));
  border-bottom: 1px solid hsl(var(--border-color));
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  max-width: 400px;
  color: hsl(var(--text-primary));
  transform: translateY(20px);
  opacity: 0;
  animation: slideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.success {
  border-left-color: hsl(var(--accent));
}

.toast.danger {
  border-left-color: hsl(var(--danger));
}

.toast.warning {
  border-left-color: hsl(var(--warning));
}

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

/* --- FOOTER --- */
footer {
  background-color: hsl(var(--bg-dark));
  border-top: 1px solid hsl(var(--border-color));
  padding: 40px 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  /* Comments Section Mobile Optimization */
  .comments-wrapper-box {
    padding: 16px !important;
    margin-top: 20px !important;
  }

  .comments-wrapper-box h3 {
    font-size: 18px !important;
    margin-bottom: 16px !important;
  }

  #comments-auth-block {
    padding: 16px !important;
    margin-bottom: 20px !important;
  }

  #comments-logged-out {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  #comments-logged-out span {
    font-size: 13px !important;
    text-align: center;
    line-height: 1.5;
  }

  #btn-comments-google-login {
    width: 100% !important;
    justify-content: center !important;
    padding: 12px 20px !important;
  }

  #comments-logged-in {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
    text-align: center;
  }

  #comments-logged-in div {
    flex-direction: column !important;
    gap: 8px !important;
  }

  #btn-comments-logout {
    width: 100% !important;
    justify-content: center !important;
  }

  .comment-item {
    padding: 12px !important;
    gap: 10px !important;
  }

  .comment-item img {
    width: 32px !important;
    height: 32px !important;
  }

  .comment-item span {
    font-size: 13px !important;
  }

  .comment-item p {
    font-size: 13px !important;
  }
}

.footer-col h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
  color: hsl(var(--text-primary));
}

.footer-col p {
  font-size: 14px;
  color: hsl(var(--text-secondary));
  max-width: 320px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: hsl(var(--text-secondary));
}

.footer-links span {
  cursor: pointer;
  transition: var(--transition-fast);
}

.footer-links span:hover {
  color: hsl(var(--primary));
  transform: translateX(4px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid hsl(var(--border-color));
  padding-top: 24px;
  font-size: 13px;
  color: hsl(var(--text-muted));
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

@media (max-width: 480px) {
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* --- MULTI-IMAGE GALLERY UPLOADER (ADMIN PANEL) --- */
.image-slots-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.image-slot {
  aspect-ratio: 1;
  background-color: hsl(var(--bg-dark));
  border: 2px dashed hsl(var(--border-color));
  border-radius: var(--radius-sm);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition-fast);
}

.image-slot.active {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 12px hsla(var(--primary-glow), 0.4);
}

.image-slot:hover {
  border-color: hsl(var(--secondary));
}

.slot-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  background-color: rgba(0, 0, 0, 0.7);
  color: hsl(var(--text-secondary));
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  z-index: 5;
  pointer-events: none;
}

.image-slot.active .slot-badge {
  background-color: hsl(var(--primary));
  color: hsl(var(--bg-dark));
}

.slot-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

.slot-icon {
  font-size: 16px;
  color: hsl(var(--text-muted));
  z-index: 1;
  transition: var(--transition-fast);
}

.image-slot:hover .slot-icon {
  color: hsl(var(--secondary));
}

.slot-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 10px;
  color: #fff;
  background-color: hsl(var(--danger));
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  opacity: 0.8;
  transition: var(--transition-fast);
  cursor: pointer;
}

.slot-delete:hover {
  transform: scale(1.15);
  opacity: 1;
  background-color: #ff3333;
}

/* --- CARD IMAGE CAROUSEL / SLIDESHOW --- */
.card-carousel {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background-color: hsl(var(--bg-dark));
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: rgba(11, 15, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s var(--transition-fast), background-color var(--transition-fast);
}

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

.carousel-btn:hover {
  background-color: hsl(var(--primary));
  color: hsl(var(--bg-dark));
  border-color: transparent;
  box-shadow: 0 0 10px hsla(var(--primary-glow), 0.5);
}

.carousel-btn.btn-prev {
  left: 10px;
}

.carousel-btn.btn-next {
  right: 10px;
}

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
  padding: 4px 8px;
  background-color: rgba(11, 15, 25, 0.5);
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition-fast);
}

.carousel-dot.active {
  background-color: hsl(var(--primary));
  width: 12px;
  box-shadow: 0 0 6px hsla(var(--primary-glow), 0.6);
}

/* Responsive adjustment for crowded navigation links */
@media (min-width: 1025px) and (max-width: 1320px) {
  .nav-link {
    padding: 6px 10px;
    font-size: 12px;
  }
  nav {
    gap: 4px;
  }
  .btn-admin {
    padding: 6px 12px;
    font-size: 12px;
  }
  .logo {
    font-size: 18px;
  }
}

/* Prevent FOUC (Flash of Unstyled Content) on navigation menu options */
#navbar,
#admin-trigger-btn,
#footer-col-quick-links,
#footer-col-about-links,
.footer-bottom-links {
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}

body.settings-applied #navbar,
body.settings-applied #admin-trigger-btn,
body.settings-applied #footer-col-quick-links,
body.settings-applied #footer-col-about-links,
body.settings-applied .footer-bottom-links {
  opacity: 1 !important;
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 720px;
  margin: 0 auto;
  background: hsla(var(--bg-card), 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid hsl(var(--border-color));
  border-radius: var(--radius-md);
  padding: 20px;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-md), 0 0 30px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cookie-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

@media (max-width: 768px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    bottom: 16px;
    left: 16px;
    right: 16px;
    padding: 16px;
    gap: 16px;
  }
  
  .cookie-content {
    align-items: flex-start;
  }
  
  .cookie-actions {
    justify-content: flex-end;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
