:root {
  --jz-bg: #f8fafc;
  --jz-card: #ffffff;
  --jz-border: rgba(16, 24, 40, 0.08);
  --jz-text: #0f172a;
  --jz-muted: #64748b;
  --jz-green: #16a34a;
  --jz-green-light: #f0fdf4;
  --jz-purple: #7c3aed;
  --jz-accent: #22c55e;
  --jz-radius: 16px;
  --jz-radius-lg: 24px;
  --jz-radius-sm: 8px;
  --jz-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --jz-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --jz-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --jz-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--jz-bg);
  color: var(--jz-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

/* Standardize Typography - Narrowed to JunaBazaar namespace */
.jz-title,
.jz-section-header h2,
.jz-rail-title,
.jz-content-box h3 {
  color: var(--jz-text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Core Navigation */
.jz-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--jz-border);
  transition: all 0.3s ease;
}

.jz-nav .container {
  display: block;
}

@media (min-width: 768px) {
  .jz-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
}

.jz-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  /* Brand area should never have underline */
}

.jz-brand:hover {
  text-decoration: none !important;
}

.jz-logo-img {
  height: 48px;
  width: auto;
  flex-shrink: 0;
  border-radius: var(--jz-radius-sm);
}

.jz-brand-text {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.jz-brand-text span {
  background: linear-gradient(90deg, var(--jz-green), var(--jz-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.jz-tagline {
  font-size: 0.85rem;
  color: var(--jz-muted);
  opacity: 0.8;
}

/* Buttons */
.jz-btn-primary,
.jz-btn-ghost {
  border-radius: 99px;
  /* Force pill shape for all standard buttons */
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none !important;
  font-size: 0.9375rem;
  white-space: nowrap;
}

.jz-btn-primary {
  background: var(--jz-green);
  color: white;
  border: none;
  box-shadow: var(--jz-shadow-sm);
}

.jz-btn-primary:hover {
  background: #15803d;
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--jz-shadow);
}


.jz-btn-ghost {
  background: white;
  color: var(--jz-text);
  border: 1px solid var(--jz-border);
}

.jz-btn-ghost:hover {
  background: var(--jz-bg);
  border-color: #cbd5e1;
  color: var(--jz-text);
}

.jz-btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  color: var(--jz-muted);
  background: transparent;
  border: 1px solid var(--jz-border);
  flex-shrink: 0;
}

.jz-btn-icon:hover {
  background: white;
  color: var(--jz-green);
  border-color: var(--jz-green);
}

/* Search Bar */
.jz-search-wrap {
  display: flex;
  background: white;
  border: 1px solid var(--jz-border);
  border-radius: var(--jz-radius-sm);
  padding: 4px;
  transition: all 0.2s;
  width: 100%;
  align-items: center;
}

@media (min-width: 768px) {
  .jz-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }

  .jz-nav-left,
  .jz-nav-right {
    flex: 1 0 0%;
    display: flex;
    align-items: center;
  }

  .jz-nav-right {
    justify-content: flex-end;
  }

  .jz-nav-center {
    display: flex;
    justify-content: center;
    flex: 2 0 0%;
    min-width: 0;
    /* Allow shrinking if needed */
  }

  .jz-search-wrap {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (min-width: 1200px) {
  .jz-search-wrap {
    max-width: 800px;
  }
}



.jz-search-wrap:focus-within {
  border-color: var(--jz-green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.jz-search-input {
  border: none;
  background: transparent;
  padding: 6px 12px;
  flex-grow: 1;
  font-size: 1rem;
  outline: none;
}

.jz-search-btn {
  background: var(--jz-green);
  color: white;
  border: none;
  border-radius: calc(var(--jz-radius-sm) - 2px);
  padding: 6px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Layout Utilities */
.jz-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  width: 100%;
  overflow-x: hidden;
  /* Prevent row bleeding */
}

@media (min-width: 992px) {
  .jz-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

@media (max-width: 991px) {
  .jz-shell {
    gap: 24px;
  }
}

.jz-rail {
  position: sticky;
  top: 2rem;
  height: fit-content;
  background: white;
  border: 1px solid var(--jz-border);
  border-radius: var(--jz-radius);
  overflow: hidden;
}

.jz-rail-head {
  padding: 16px;
  border-bottom: 1px solid var(--jz-border);
  background: #fdfdfd;
}

.jz-cat-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--jz-radius-sm);
  color: var(--jz-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.jz-cat-btn:hover {
  background: var(--jz-green-light);
  /* Light Pista */
  color: var(--jz-green);
}

.jz-cat-btn.active {
  background: #dcfce7;
  /* Darker Pista */
  color: var(--jz-green);
  font-weight: 700;
}

.jz-dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}

/* Cards & Products */
.jz-card {
  background: white;
  border: 1px solid var(--jz-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  width: 100%;
  /* Removed max-width and margin:0 auto to prevent grid distortion */
}

.jz-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--jz-shadow-lg);
  border-color: rgba(22, 163, 74, 0.2);
}

.jz-badge-area {
  padding: 8px 12px;
  background: #fdfdfd;
  height: 38px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.jz-card-top {
  position: relative;
  width: 100%;
  height: 200px;
  /* Fixed height for absolute structural stability */
  background: #ffffff;
  border-bottom: 1px solid var(--jz-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  /* Internal padding to 'box' the images and handle odd sizes */
  overflow: hidden;
}

.jz-card-top img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.jz-card:hover .jz-card-top img {
  transform: scale(1.05);
}

.jz-card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.jz-image-link {
  display: contents;
  text-decoration: none;
}

.jz-product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  /* Ensures boxes are same height for 1 or 2 line titles */
  margin-bottom: 8px;
}

.jz-title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
  display: block;
  font-size: 0.95rem;
  line-height: 1.3;
  font-weight: 700;
}

.jz-title-link:hover {
  color: var(--jz-green);
  text-decoration: none;
}

.jz-title-link:focus-visible {
  outline: 2px solid var(--jz-green);
  outline-offset: 2px;
  border-radius: 4px;
}


.jz-chip {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--jz-border);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--jz-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Condition Specific Badge Colors */
.jz-chip-new {
  color: var(--jz-green);
  border-color: rgba(22, 163, 74, 0.2);
}

.jz-chip-refurbished,
.jz-chip-renewed {
  color: var(--jz-purple);
  border-color: rgba(124, 58, 237, 0.2);
}

.jz-chip-certified {
  color: #b45309;
  /* Premium Amber/Gold */
  background: rgba(255, 251, 235, 0.95);
  border-color: rgba(180, 83, 9, 0.2);
}

.jz-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--jz-green);
}

.jz-mrp {
  font-size: 0.8rem;
  text-decoration: line-through;
  color: var(--jz-muted);
  margin-left: 6px;
}

.jz-meta {
  font-size: 0.875rem;
  color: var(--jz-muted);
  margin-bottom: 0.4rem;
}

.jz-card-meta {
  font-size: 0.85rem;
  color: var(--jz-muted);
  margin-bottom: 0.4rem;
  height: 1.4em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jz-card-footer {
  margin-top: auto;
}

/* Homepage Only Fixes - Premium Hero Section */
.page-home .jz-hero {
  position: relative;
  border-radius: var(--jz-radius-lg);
  /* Mesh Gradient Background */
  background-color: #ffffff;
  background-image:
    radial-gradient(at 0% 0%, rgba(22, 163, 74, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(124, 58, 237, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(34, 197, 94, 0.05) 0px, transparent 50%);
  border: 1px solid var(--jz-border);
  padding: 1.5rem;
  margin-bottom: 2rem;
  overflow: hidden;
}

@media (min-width: 768px) {
  .page-home .jz-hero {
    padding: 2.5rem 3rem;
    margin-bottom: 2.5rem;
  }
}

/* Subtle Animated Decoration */
.page-home .jz-hero::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 40%;
  height: 80%;
  background: radial-gradient(circle, rgba(22, 163, 74, 0.03) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.page-home .jz-hero .row {
  position: relative;
  z-index: 1;
}

.page-home .jz-title {
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 1.25rem;
  letter-spacing: -0.04em;
}

.page-home .jz-title span {
  display: block;
  background: linear-gradient(90deg, var(--jz-green), var(--jz-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.1em;
}

.page-home .jz-sub {
  font-size: 1.1rem;
  color: var(--jz-muted);
  max-width: 540px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

@media (min-width: 1200px) {
  .page-home .jz-sub {
    font-size: 1.25rem;
    line-height: 1.7;
  }
}

/* Glassmorphism Panel */
.page-home .jz-hero .jz-content-box {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
  margin: 0 -0.5rem;
  /* Allow slight pull on mobile containers */
  border-radius: var(--jz-radius-md);
}

@media (min-width: 768px) {
  .page-home .jz-hero .jz-content-box {
    margin: 0;
    border-radius: var(--jz-radius-lg);
  }
}

/* Modern Glass Tags */
.jz-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  border: 1px solid var(--jz-border);
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--jz-text);
  transition: all 0.2s;
  cursor: default;
}

.jz-tag:hover {
  background: white;
  border-color: var(--jz-green);
  color: var(--jz-green);
  transform: translateY(-2px);
  box-shadow: var(--jz-shadow-sm);
}

.page-home #explore {
  margin-top: 0.5rem;
}

/* Product Page Specific */
.jz-trust-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 3rem;
}

.jz-trust-item {
  background: white;
  border: 1px solid var(--jz-border);
  border-radius: var(--jz-radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.jz-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.jz-section-header h2 {
  font-size: 1.25rem;
  margin: 0;
}

.jz-content-box {
  background: white;
  border: 1px solid var(--jz-border);
  border-radius: var(--jz-radius);
  padding: 24px;
}

/* USP Item Fluorescent Styles */
.jz-usp-item {
  padding: 1rem;
  border-radius: var(--jz-radius);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: transform 0.2s;
}

.jz-usp-item:hover {
  transform: translateX(4px);
}

.jz-usp-1 {
  background: #f0fdf4;
  /* Lite Fluorescent Green */
}

.jz-usp-2 {
  background: #f5f3ff;
  /* Lite Fluorescent Purple */
}

.jz-usp-3 {
  background: #fffbeb;
  /* Lite Fluorescent Amber */
}


/* Social Icons */
.jz-social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: var(--jz-muted);
  text-decoration: none;
  transition: all 0.2s;
}

.jz-social-icon:hover {
  transform: translateY(-2px);
  color: white;
}

.jz-social-icon.facebook:hover {
  background: #1877f2;
}

.jz-social-icon.twitter:hover {
  background: #1da1f2;
}

.jz-social-icon.whatsapp:hover {
  background: #25d366;
}

.jz-social-icon.telegram:hover {
  background: #0088cc;
}

.jz-social-icon.instagram:hover {
  background: #e4405f;
}

/* Pagination */
.jz-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 3rem 0;
}

.jz-page-link {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid var(--jz-border);
  border-radius: var(--jz-radius-sm);
  color: var(--jz-text);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.jz-page-link:hover {
  border-color: var(--jz-green);
  color: var(--jz-green);
}

.jz-page-link.active {
  background: var(--jz-green);
  color: white;
  border-color: var(--jz-green);
}

.jz-page-link.active:hover {
  color: white;
}

.jz-divider {
  height: 1px;
  background: var(--jz-border);
  margin: 1.5rem 0;
}

.jz-footer {
  font-size: 0.95rem;
  color: var(--jz-muted);
}

footer h5 {
  font-size: 1rem !important;
  color: var(--jz-text);
  margin-bottom: 1.25rem !important;
}

@media (max-width: 575px) {
  .jz-title {
    font-size: 2rem;
  }

  .jz-hero {
    padding: 2rem 1.5rem;
  }
}

.jz-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.jz-card-footer .btn {
  flex: 1 0 auto;
  /* Allow buttons to grow and fit text */
}

@media (max-width: 400px) {
  .jz-card-footer .btn {
    width: 100%;
    /* Full width on very small containers */
  }
}

/* Shortlist Styles */
.jz-shortlist-count {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 5px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: white;
  border: 2px solid white;
  border-radius: 50%;
}

.jz-shortlist-toggle {
  min-width: 110px;
  /* Reduced from 120px to help with wrapping */
  padding-left: 0.6rem;
  padding-right: 0.6rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.jz-shortlist-toggle.shortlisted {
  color: #ef4444;
  border-color: #fca5a5;
  background: #fef2f2;
}

.jz-shortlist-toggle.shortlisted:hover {
  background: #fee2e2;
}

.jz-shortlist-item {
  transition: all 0.2s;
  background: white;
}

.jz-shortlist-item:hover {
  border-color: var(--jz-green) !important;
  box-shadow: var(--jz-shadow-sm);
}

.jz-btn-xs {
  font-size: 0.75rem;
  padding: 2px 8px;
}

/* Header Tab for Shortlist */
.jz-shortlist-tab {
  color: var(--jz-muted);
  font-weight: 600;
  font-size: 1rem;
  padding: 6px 12px;
  border-radius: var(--jz-radius-sm);
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.jz-shortlist-tab:hover {
  color: var(--jz-green);
  background: var(--jz-green-light);
}

@media (max-width: 767px) {
  .jz-shortlist-tab {
    display: none;
  }
}

/* Featured Deals */
.jb-featured-wrap {
  background: white;
  padding: 3rem 0;
  border-top: 1px solid var(--jz-border);
  border-bottom: 1px solid var(--jz-border);
  margin: 0.5rem 0;
}

.jz-shortlist-toggle {
  min-width: 130px;
}

@media (max-width: 768px) {
  .jb-featured-card {
    flex: 0 0 240px;
  }

  .jb-strip-nav {
    display: none;
  }
}