:root {
  --bg-main: #0a0d14;
  --bg-secondary: #111827;
  --bg-card: #151b2b;
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
  --border-color: #1f2937;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

/* App Layout Structure */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
  width: 250px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 100;
}

.brand-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  padding: 0 1.5rem 2rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo span {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

.nav-menu {
  list-style: none;
  flex-grow: 1;
}

.nav-item {
  margin-bottom: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  border-left-color: var(--accent-color);
  color: var(--accent-color);
  background-color: rgba(37, 99, 235, 0.1);
}

/* Main Content Area */
.app-main {
  flex-grow: 1;
  margin-left: 250px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Topbar */
.mobile-home-btn { display: none; }

.app-topbar {
  height: 70px;
  background-color: var(--bg-main);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 90;
}

.search-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0.5rem 1.5rem;
  width: 400px;
  color: #fff;
}
.search-bar:focus {
  outline: none;
  border-color: var(--accent-color);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.topbar-icon {
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}
.topbar-icon:hover { color: #fff; }

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.user-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--accent-color);
}
.user-info {
  font-size: 0.875rem;
}
.user-info span {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Content Container */
.content-container {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Hero Section */
.hero-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(10, 13, 20, 1) 100%), url('/public/assets/images/hero-bg.jpg') no-repeat center center;
  background-size: cover;
  border-radius: 1rem;
  padding: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border-color);
  margin-bottom: 3rem;
}

.hero-content { max-width: 50%; }
.hero-subtitle { color: var(--text-muted); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; }
.hero-title { font-size: 3rem; font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
.hero-desc { color: var(--text-muted); margin-bottom: 2rem; font-size: 1.1rem; }

.hero-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(17, 24, 39, 0.7);
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}
.hero-feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.feature-icon {
  width: 40px; height: 40px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-color);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.feature-text h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.feature-text p { font-size: 0.75rem; color: var(--text-muted); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--accent-color);
  color: #fff !important;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.btn:hover { background-color: var(--accent-hover); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: #fff !important;
}
.btn-outline:hover { background: rgba(255,255,255,0.05); }

/* Categories Grid */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.section-title { font-size: 1.25rem; font-weight: 600; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}
.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
}
.category-icon { margin-bottom: 1rem; font-size: 2rem; color: var(--accent-color); }
.category-title { font-size: 0.875rem; font-weight: 500; }
.category-count { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}
.product-card:hover { border-color: var(--accent-color); transform: translateY(-5px); }
.product-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.product-image {
  width: 100%;
  height: 180px;
  object-fit: contain;
  margin-bottom: 1rem;
}
.product-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.product-meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 1rem; }
.product-prices { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.5rem; }
.price-current { font-size: 1.25rem; font-weight: 700; }
.price-original { font-size: 0.875rem; color: var(--text-muted); text-decoration: line-through; }
.product-rating { color: var(--warning-color); font-size: 0.875rem; margin-bottom: 1rem; }
.product-card .btn { width: 100%; }

/* Two Column Layout (Bottom) */
.bottom-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

/* Why Choose Us & Trustpilot Panels */
.info-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Footer Banners */
.footer-features {
  display: flex;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-top: 3rem;
}

/* Auth Pages */
.auth-container {
  max-width: 400px;
  margin: 4rem auto;
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
}
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; font-size: 0.875rem; }
.form-control {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  font-family: inherit;
  color: #fff;
}
.form-control:focus { outline: none; border-color: var(--accent-color); }

/* Alerts */
.alert { padding: 1rem; border-radius: 0.375rem; margin-bottom: 1rem; }
.alert-success { background-color: rgba(16, 185, 129, 0.1); color: var(--success-color); border: 1px solid var(--success-color); }
.alert-error { background-color: rgba(239, 68, 68, 0.1); color: #EF4444; border: 1px solid #EF4444; }

/* Dashboard Tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 1rem; border-bottom: 1px solid var(--border-color); text-align: left; }
th { color: var(--text-muted); font-weight: 500; font-size: 0.875rem; }

/* -- Products Page Redesign Styles -- */

.text-gradient-purple {
  background: linear-gradient(90deg, #9333ea, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-badges-row {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap; overflow-x: hidden;
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
}

.header-badge .icon-box {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.header-badge .badge-text h5 {
  font-size: 0.75rem;
  margin: 0;
  color: #fff;
  line-height: 1.2;
}
.header-badge .badge-text span {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}

.category-card:hover {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 0 15px rgba(255,255,255,0.05);
}

.category-card .cat-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}
.category-card .cat-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Custom Range Slider */
.range-container {
  position: relative;
  width: 100%;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}
.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  outline: none;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #a855f7;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(168,85,247,0.5);
}

.btn-gradient {
  background: linear-gradient(90deg, #3b82f6, #9333ea);
  color: #fff;
  border: none;
}
.btn-gradient:hover {
  opacity: 0.9;
}

/* Feature Footer */
.feature-footer-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
  border-radius: 0.5rem;
  margin-top: 2rem;
}
.feature-footer-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.feature-footer-item .icon {
  width: 24px;
  height: 24px;
  color: var(--accent-color);
}
.feature-footer-item h4 {
  font-size: 0.85rem;
  margin: 0;
  color: #fff;
}
.feature-footer-item span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.product-card {
  position: relative;
}
.product-card .wishlist-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}
.product-card .wishlist-btn:hover {
  color: #9333ea;
}


/* Updated Header Badges for new mockup */
.header-badges-container {
  display: flex;
  background: #0d111a;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  overflow: hidden;
}

.header-badge-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-right: 1px solid var(--border-color);
}
.header-badge-item:last-child {
  border-right: none;
}


/* -- Sidebar Redesign Styles -- */

.brand-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.brand-logo-text .brand-prefix {
  color: #06b6d4; /* Cyan */
}
.brand-logo-text .brand-suffix {
  color: #a855f7; /* Purple */
}

/* Gradient Nav Active State */
.nav-link.active {
  background: linear-gradient(90deg, #2563eb, #4c1d95);
  color: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
  border-left: none; /* Remove old left border style */
  font-weight: 600;
}

/* Gradient Box Hover Effect */
.nav-link {
  border-radius: 0.5rem;
  margin: 0 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}
.nav-link:hover:not(.active) {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.1), rgba(76, 29, 149, 0.1));
  border: 1px solid rgba(76, 29, 149, 0.2);
  color: #ffffff;
}

/* Need Help Box with Gradient Border */
.sidebar-help-box {
  margin: auto 1.5rem 1.5rem;
  background: #0f131d;
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  position: relative;
}
.sidebar-help-box::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 0.75rem;
  padding: 1px; 
  background: linear-gradient(180deg, rgba(37,99,235,0.3) 0%, rgba(37,99,235,0.05) 100%); 
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}


/* Update brand suffix for text gradient */
.brand-logo-text .brand-suffix {
  background: linear-gradient(90deg, #d946ef, #8b5cf6, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* ==========================================================================
   Mobile Responsive Adjustments
   ========================================================================== */
@media (max-width: 768px) {
  .topbar-action-text { display: none !important; }
  /* Hide the Desktop Sidebar by default on mobile, but keep close btn visible if forced open */
  .app-sidebar {
    display: none; /* Hide sidebar completely; we use bottom-nav now */
  }
  
  .sidebar-close-btn {
    display: flex !important;
  }

  /* Reset main area margin and add padding for bottom nav */
  .app-main {
    margin-left: 0;
    padding-bottom: 70px;
  }

  /* Topbar Adjustments */
  .app-topbar {
    padding: 0.5rem 1rem !important;
    gap: 0.75rem !important;
    flex-wrap: nowrap; overflow-x: hidden;
  }
  
  .mobile-menu-btn { order: 1; }
  
  .search-bar {
    order: 2;
    width: auto !important;
    max-width: none !important;
    flex: 1;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }
  
  .topbar-actions {
    order: 3;
  }
  
  .notif-ticker-container {


    margin-top: 0.25rem;
  }
  
  /* Hide the desktop user profile dropdown from the header */
  .topbar-actions .user-profile {
    display: none !important;
  }

  /* The hamburger icon, initially hidden on desktop */
  .mobile-menu-btn {
    display: flex !important;
    color: var(--text-muted);
    cursor: pointer;
  }

  /* Hero Banner Stacking */
  .hero-banner {
    flex-direction: column;
    padding: 1.5rem;
    text-align: center;
    border-radius: 0.75rem;
    background-size: cover;
  }
  
  .hero-content {
    max-width: 100%;
  }

  .hero-title {
    font-size: 1.8rem;
    line-height: 1.3;
  }

  .hero-desc {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  /* Hero buttons horizontally centered */
  .hero-content > div[style*="display: flex"] {
    justify-content: center;
    flex-wrap: nowrap; overflow-x: hidden;
  }
  
  .hero-content .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  /* Content Container Padding */
  .content-container {
    padding: 0.5rem;
  }

  /* Layout grids fallback to 1 column */
  .home-layout {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Product grid 2 columns on mobile */
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }
  .product-card {
    padding: 0.5rem !important;
    min-width: 0 !important;
  }
  .product-title {
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
    height: 2.6em !important;
  }
  .price-current {
    font-size: 0.95rem;
  }
  .product-prices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  .product-card .btn, .product-card .btn-outline {
    padding: 0.4rem 0.25rem !important;
    font-size: 0.7rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .product-card > div[style*="display: flex"] {
    flex-wrap: wrap;
    gap: 0.25rem !important;
  }

  /* Categories Grid */
  .categories-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem;
  }

  /* Feature Grid (100% Genuine etc) */
  .feature-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
  }

  /* Bottom Panel Grid */
  .bottom-layout > div > div[style*="display: grid"] {
    grid-template-columns: 1fr !important;
  }
}

/* Base style for mobile menu btn (hidden on desktop) */
.mobile-menu-btn {
  display: none;
}

/* Base style for sidebar close btn (hidden on desktop) */
.sidebar-close-btn {
  display: none;
}

/* ==========================================================================
   Bottom Navigation Bar (Mobile Only)
   ========================================================================== */
.bottom-nav {
  display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
  .topbar-action-text { display: none !important; }
  .bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    z-index: 1000;
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.65rem;
    flex: 1;
    height: 100%;
    position: relative;
    transition: color 0.2s;
  }

  .bottom-nav-item svg {
    margin-bottom: 0.25rem;
    width: 22px;
    height: 22px;
  }

  .bottom-nav-item.active {
    color: var(--accent-color);
  }

  .bottom-nav-badge {
    position: absolute;
    top: 8px;
    right: calc(50% - 15px);
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
    font-weight: bold;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Cart Item Responsive Layout */
.cart-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.cart-item-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.cart-item-details {
  flex: 1;
  min-width: 0;
}
.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}

@media (max-width: 768px) {
  .cart-item-card {
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
  }
  .cart-item-img {
    width: 80px;
    height: 80px;
  }
  .cart-item-actions {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 0.5rem;
  }
}
