/*
 * PolyCMS FlexiWhite Theme
 * Architecturally rewritten for strict consistency.
 */

:root {
  /* Colors */
  --geist-foreground: #000;
  --geist-background: #fff;
  --geist-accents-1: #fafafa;
  --geist-accents-2: #eaeaea;
  --geist-accents-3: #999;
  --geist-accents-4: #888;
  --geist-accents-5: #666;
  --geist-accents-6: #444;
  --geist-accents-7: #333;
  --geist-accents-8: #111;

  --geist-success: #0070f3;
  --geist-success-light: #3291ff;
  --geist-error: #e00;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  --font-mono: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace;

  /* Layout */
  --container-max-width: 1120px;
  --reading-max-width: 768px;
  --radius: 6px;
  --gap: 2rem;

  --header-bg: rgba(255, 255, 255, 0.8);

  /* Primary fallback unification */
  --primary: var(--color-primary, #2563eb);
  --primary-rgb: 37, 99, 235;
  --primary-light: rgba(37, 99, 235, 0.08);
}

/* Dark Mode Overrides */
html.dark {
  --header-bg: rgba(24, 36, 51, 0.8);

  /* Invert Geist Colors */
  --geist-foreground: #f8fafc;
  --geist-background: #232e3c;
  /* Card background */
  --geist-accents-1: #182433;
  /* Body background */
  --geist-accents-2: #3a4859;
  /* Borders */
  --geist-accents-3: #47586b;
  --geist-accents-4: #64748b;
  --geist-accents-5: #94a3b8;
  /* Muted text */
  --geist-accents-6: #cbd5e1;
  --geist-accents-7: #e2e8f0;
  --geist-accents-8: #f1f5f9;

  --geist-success: #206bc4;
  --geist-success-light: #4299e1;

  /* Override inline Theme Options for dark mode */
  --theme-body-background-color: #182433 !important;
  --theme-surface-color: #232e3c !important;
  --theme-body-color: #e2e8f0 !important;
  --theme-body-muted-color: #94a3b8 !important;
  --theme-heading-color: #f8fafc !important;
  --theme-link-color: #4299e1 !important;
  --theme-link-hover-color: #63b3ed !important;
  --color-border: #3a4859 !important;

  /* Primary fallback unification */
  --primary: var(--color-primary, #3b82f6) !important;
  --primary-rgb: 59, 130, 246 !important;
  --primary-light: rgba(59, 130, 246, 0.15) !important;
}

/* -------------------------------------
 * RESET & BASE
 * ------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

body {
  font-family: var(--theme-body-font-family, var(--font-sans));
  background-color: var(--theme-body-background-color, var(--geist-background));
  color: var(--theme-body-color, var(--geist-accents-6));
  line-height: var(--theme-body-line-height, 1.6);
  font-size: var(--theme-body-font-size, 16px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--theme-link-color, inherit);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--theme-link-hover-color, var(--geist-accents-6));
}

/* -------------------------------------
 * TYPOGRAPHY
 * ------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--theme-heading-font-family, var(--theme-body-font-family, var(--font-sans)));
  color: var(--theme-heading-color, var(--geist-foreground));
  font-weight: var(--theme-heading-font-weight, 700);
  line-height: var(--theme-heading-line-height, 1.2);
  letter-spacing: var(--theme-heading-letter-spacing, -0.04em);
  margin-bottom: 1rem;
}

h1 {
  font-size: var(--theme-heading-h1-size, 2.25rem);
}

h2 {
  font-size: var(--theme-heading-h2-size, 1.75rem);
}

h3 {
  font-size: var(--theme-heading-h3-size, 1.375rem);
}

h4 {
  font-size: var(--theme-heading-h4-size, 1.125rem);
}

h5 {
  font-size: var(--theme-heading-h5-size, 1rem);
}

h6 {
  font-size: var(--theme-heading-h6-size, 0.875rem);
}

p {
  margin-bottom: 1.5rem;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--theme-body-muted-color, var(--geist-accents-5));
}

.text-small {
  font-size: 0.875rem;
}

.text-large {
  font-size: 1.125rem;
}

/* -------------------------------------
 * LAYOUT & CONTAINERS
 * ------------------------------------- */
.container {
  width: 100%;
  max-width: var(--theme-container-max-width, var(--container-max-width));
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.reading-container {
  width: 100%;
  max-width: var(--theme-reading-max-width, var(--reading-max-width));
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1024px) {
  .grid-sidebar .reading-container {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

.section {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

/* Grid Layouts */
.grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--gap);
}

.grid-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

.grid-sidebar>* {
  min-width: 0;
}

@media (min-width: 1024px) {
  .grid-sidebar {
    grid-template-columns: 1fr 320px;
  }
}

/* -------------------------------------
 * COMPONENTS
 * ------------------------------------- */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

a.btn,
a.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background-color: var(--geist-foreground);
  color: var(--geist-background);
}

a.btn-primary,
a.btn-primary:hover {
  color: var(--geist-background);
}

.btn-primary:hover {
  background-color: var(--geist-accents-7);
}

.btn-secondary {
  background-color: var(--geist-background);
  color: var(--geist-accents-5);
  border-color: var(--geist-accents-2);
}

a.btn-secondary {
  color: var(--geist-accents-5);
}

.btn-secondary:hover,
a.btn-secondary:hover {
  color: var(--geist-foreground);
  border-color: var(--geist-foreground);
}

/* Card */
.card {
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.card:hover .card-title {
  color: var(--geist-success);
}

.card-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--geist-accents-1);
  margin-bottom: 1.25rem;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-image-wrapper img {
  transform: scale(1.03);
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--geist-accents-4);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.card-meta span {
  white-space: nowrap;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--geist-foreground);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  transition: color 0.2s;
}

.card-excerpt {
  color: var(--geist-accents-5);
  font-size: 0.9375rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0;
}

/* Post Detail Header */
.post-header {
  text-align: center;
  margin-bottom: 3rem;
}

.post-header .card-meta {
  justify-content: center;
  margin-bottom: 1rem;
}

.post-title {
  font-size: var(--theme-heading-h1-size, 2.25rem) !important;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--geist-foreground);
  margin-bottom: 1.5rem;
  line-height: var(--theme-heading-line-height, 1.2);
}

.post-excerpt {
  font-size: 1.25rem;
  color: var(--geist-accents-5);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Post Scroll Tools */
.post-scroll-tools {
  position: sticky;
  top: 50vh;
  height: 0;
  z-index: 10;
  width: 100%;
}

.post-scroll-tools-inner {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 50;
}

.scroll-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background-color: var(--geist-background);
  border: 1px solid var(--geist-accents-2);
  color: var(--geist-accents-5);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.scroll-btn:hover {
  background-color: var(--geist-accents-1);
  color: var(--geist-foreground);
  border-color: var(--geist-accents-3);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 1024px) {
  .post-scroll-tools {
    display: none;
  }
}

.post-cover {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 21/9;
  object-fit: cover;
  margin-bottom: 3rem;
  background-color: var(--geist-accents-1);
}

/* Article Content (Prose) */
.prose {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--geist-accents-7);
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

.prose pre {
  max-width: 100%;
  overflow-x: auto;
  background-color: var(--geist-accents-1);
  padding: 1rem;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  margin: 1.5rem 0;
  border: 1px solid var(--geist-accents-2);
}

.prose code {
  font-family: var(--font-mono);
  background-color: var(--geist-accents-1);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.875em;
  word-break: break-word;
}

.prose pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  white-space: pre;
  word-break: normal;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  margin-top: 1.5em;
  margin-bottom: 0.75em;
}

.prose h2 {
  font-size: var(--theme-heading-h2-size, 1.75rem);
}

.prose h3 {
  font-size: var(--theme-heading-h3-size, 1.375rem);
}

.prose h4 {
  font-size: var(--theme-heading-h4-size, 1.125rem);
}

.prose p {
  margin-bottom: 1.5em;
}

.prose ul,
.prose ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.prose ul {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}

.prose li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.prose blockquote {
  border-left: 4px solid var(--geist-accents-2);
  padding-left: 1.5rem;
  font-style: italic;
  color: var(--geist-accents-5);
  margin: 2em 0;
}

.prose table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  font-size: 0.875rem;
  text-align: left;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--geist-accents-2);
}

.prose th {
  background-color: var(--geist-accents-1);
  font-weight: 500;
  color: var(--geist-foreground);
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--geist-accents-2);
}

.prose td {
  padding: 0.875rem 1rem;
  color: var(--geist-accents-6);
  border-bottom: 1px solid var(--geist-accents-2);
}

.prose tr:last-child td {
  border-bottom: none;
}

/* Product Specific */
.product-price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--geist-foreground);
}

.product-price-strike {
  font-size: 1rem;
  color: var(--geist-accents-4);
  text-decoration: line-through;
  margin-left: 0.5rem;
}

/* Utility */
.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-8 {
  margin-top: 2rem;
}

.w-full {
  width: 100%;
}

.w-6 {
  width: 1.5rem;
}

.h-6 {
  height: 1.5rem;
}

/* Layout Partials */
.header {
  border-bottom: 1px solid var(--geist-accents-2);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  z-index: 50;
}

.mobile-menu-toggle {
  display: none;
}

.mobile-menu {
  display: none;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--geist-foreground);
  letter-spacing: -0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
}

.header-controls,
.header-widget-area,
.nav-item-search,
.nav-item-search .widget,
.nav-item-search .widget-blog-search {
  display: inline-flex;
  align-items: center;
}

.header-controls {
  gap: 0.75rem;
  flex: 0 0 auto;
}

.header-widget-area {
  gap: 0.75rem;
}

.header-actions {
  flex: 0 0 auto;
  margin-left: 0;
}

.header-controls + .header-actions {
  margin-left: 0.75rem;
}

.nav-item-search {
  line-height: 1;
}

.nav-item-search .widget,
.nav-item-search .widget-blog-search {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.nav-item-search .widget-search-trigger,
.header-widget-area .widget-search-trigger {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
}

.nav-item-search .widget-search-trigger--icon,
.header-widget-area .widget-search-trigger--icon {
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  background: #f3f4f6 !important;
  color: #374151 !important;
}

html.dark .nav-item-search .widget-search-trigger--icon,
html.dark .header-widget-area .widget-search-trigger--icon {
  background: #1f2937 !important;
  color: #d1d5db !important;
  border-color: rgba(51, 65, 85, 0.9) !important;
}

.nav-item-search .widget-search-trigger svg,
.header-widget-area .widget-search-trigger svg {
  width: 20px !important;
  height: 20px !important;
}

.nav-links.align-left {
  justify-content: flex-start;
  padding-left: 2rem;
}

.nav-links.align-center {
  justify-content: center;
}

.nav-links.align-right {
  justify-content: flex-end;
  padding-right: 2rem;
}

.nav-links.align-justify {
  justify-content: space-evenly;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.875rem;
  color: var(--geist-accents-5);
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  color: var(--geist-foreground);
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--geist-foreground);
  color: var(--geist-background);
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.2s;
  font-weight: 500;
  border-bottom-right-radius: var(--radius);
}

.skip-link:focus {
  top: 0;
}

/* Breadcrumb */
.breadcrumb-bar {
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: none;
  margin-bottom: 0;
}

.breadcrumb {
  margin: 0;
}

.breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  color: var(--geist-accents-5);
}

.breadcrumb li+li::before {
  content: '/';
  margin: 0 0.5rem;
  color: var(--geist-accents-3);
}

.breadcrumb li a {
  color: var(--geist-accents-5);
  transition: color 0.2s;
}

.breadcrumb li a:hover {
  color: var(--geist-foreground);
}

.breadcrumb li span[aria-current="page"] {
  color: var(--geist-foreground);
  font-weight: 500;
}

/* ============================================
   LISTING SYSTEM (Grid / List Views)
   ============================================ */

/* Header */
.listing-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  gap: 1rem;
}

.listing-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.listing-subtitle {
  color: var(--geist-accents-5);
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Toolbar */
.listing-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.listing-results {
  font-size: 0.8125rem;
  color: var(--geist-accents-5);
}

.listing-view-toggle {
  display: flex;
  border: 1px solid var(--geist-accents-2);
  border-radius: var(--radius);
  overflow: hidden;
}

.view-toggle-btn {
  padding: 0.5rem 0.625rem;
  background: none;
  border: none;
  color: var(--geist-accents-4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.view-toggle-btn:hover {
  color: var(--geist-foreground);
}

.view-toggle-btn.active {
  background: var(--geist-foreground);
  color: var(--geist-background);
}

.view-toggle-btn+.view-toggle-btn {
  border-left: 1px solid var(--geist-accents-2);
}

/* Container */
.listing-container {
  transition: all 0.3s ease;
}

.listing-container.is-grid {
  display: grid;
  grid-template-columns: repeat(var(--listing-columns, 3), 1fr);
  gap: 3rem 1.5rem;
}

.listing-container.is-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Card base */
.listing-card {
  background: var(--geist-background);
  border: 1px solid var(--geist-accents-2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.listing-card:hover {
  border-color: var(--geist-accents-3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Card Image */
.listing-card__image {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--geist-accents-1);
}

.listing-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.35s ease-in-out, transform 0.4s ease;
}

/* Core PolyCMS Lazy Load Smooth Fade-In Engine */
.polycms-lazy-img {
  opacity: 0;
  transition: opacity 0.35s ease-in-out, transform 0.4s ease !important;
  will-change: opacity;
}

.polycms-lazy-img.polycms-loaded {
  opacity: 1 !important;
}

.listing-card:hover .listing-card__image img {
  transform: scale(1.03);
}

.listing-card__no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--geist-accents-3);
}

/* Card Body */
.listing-card__body {
  padding: 1.25rem;
}

.listing-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
}

.listing-card__date {
  color: var(--geist-accents-5);
}

.badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--geist-accents-7);
  transition: all 0.2s;
  white-space: nowrap;
  border-radius: 4px;
}

.badge:hover {
  color: var(--geist-foreground);
}

.listing-card__title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.4em * 2);
}

.listing-card__title a {
  color: var(--geist-foreground);
  transition: color 0.2s;
}

.listing-card__title a:hover {
  color: var(--geist-accents-6);
}

.listing-card__excerpt {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--geist-accents-5);
  margin: 0 0 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-card__author {
  font-size: 0.8125rem;
  color: var(--geist-accents-5);
}

/* Product pricing */
.listing-card__price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.price-current {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--geist-foreground);
}

.price-original {
  font-size: 0.875rem;
  color: var(--geist-accents-4);
  text-decoration: line-through;
}

.price-badge {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.125rem 0.375rem;
  background: var(--geist-foreground);
  color: var(--geist-background);
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.stock-in {
  color: #10b981;
  font-size: 0.8125rem;
  font-weight: 500;
}

.stock-out {
  color: #ef4444;
  font-size: 0.8125rem;
  font-weight: 500;
}

.listing-card__sku {
  color: var(--geist-accents-4);
  font-size: 0.75rem;
  font-family: monospace;
}

/* Title-first card variant */
.is-grid .listing-card.card-title-first {
  display: flex;
  flex-direction: column;
  /* Retain default .listing-card background, border, and box-shadow */
}

.is-grid .listing-card.card-title-first .listing-card__body {
  display: contents;
  /* Allows children to become flex items of the card */
}

/* Reorder children of listing-card */
.is-grid .listing-card.card-title-first .listing-card__title {
  order: 1;
  font-size: 1.1875rem;
  line-height: 1.4;
  margin: 1.25rem 1.25rem 1rem 1.25rem;
  /* Replaces body padding */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.4em * 2);
}

.is-grid .listing-card.card-title-first .listing-card__image {
  order: 2;
  border-radius: 0;
  /* Remove internal border radius so it spans full width */
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.is-grid .listing-card.card-title-first .listing-card__excerpt {
  order: 3;
  margin: 0 1.25rem 0.75rem 1.25rem;
}

.is-grid .listing-card.card-title-first .listing-card__meta {
  order: 4;
  margin: 0 1.25rem 0.5rem 1.25rem;
}

.is-grid .listing-card.card-title-first .listing-card__author {
  order: 5;
  margin: auto 1.25rem 1.25rem 1.25rem;
}

/* LIST VIEW */
.is-list .listing-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: stretch;
}

.is-list .listing-card__image {
  aspect-ratio: auto;
  height: 100%;
  min-height: 180px;
}

.is-list .listing-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.is-list .listing-card__title {
  font-size: 1.25rem;
}

.is-list .listing-card__excerpt {
  -webkit-line-clamp: 3;
}

.is-list .listing-card.card-title-first .listing-card__header {
  padding: 1.5rem 1.5rem 0;
}

/* Empty state */
.listing-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 0;
  color: var(--geist-accents-5);
}


/* ============================================
   PAGINATION (Laravel Tailwind paginator)
   ============================================ */

.w-5 {
  width: 1.25rem;
}

.h-5 {
  height: 1.25rem;
}

nav[role="navigation"] {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--geist-accents-2);
}

/* Hide mobile row on desktop */
nav[role="navigation"]>div:first-child {
  display: none;
}

/* Desktop row: center the pagination */
nav[role="navigation"]>div:last-child {
  display: flex !important;
  justify-content: center;
  align-items: center;
}

/* Hide the results counter ("Showing 1 to 10...") */
nav[role="navigation"] p {
  display: none !important;
}

/* Pagination container (ul equivalent) */
nav[role="navigation"] span.z-0 {
  display: flex !important;
  gap: 0.5rem;
  /* Gap between buttons */
  box-shadow: none !important;
  border: none !important;
}

/* All individual pagination buttons (links and inner spans) */
nav[role="navigation"] span.z-0>a,
nav[role="navigation"] span.z-0>span>span {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.5rem;
  margin: 0 !important;
  /* Override Tailwind's negative margin (-ml-px) */
  border-radius: 8px !important;
  /* Rounded square corners */
  border: 1px solid var(--geist-accents-2) !important;
  background: var(--geist-background);
  color: var(--geist-accents-5);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
  text-decoration: none;
  cursor: pointer;
}

/* Current active page */
nav[role="navigation"] span.z-0>span[aria-current="page"]>span {
  background: var(--geist-foreground) !important;
  color: var(--geist-background) !important;
  border-color: var(--geist-foreground) !important;
  font-weight: 600;
}

/* Hover state for links */
nav[role="navigation"] span.z-0>a:hover {
  background: var(--geist-accents-1) !important;
  color: var(--geist-foreground) !important;
  border-color: var(--geist-accents-3) !important;
}

/* Disabled state (arrows) */
nav[role="navigation"] span.z-0>span[aria-disabled="true"]>span {
  color: var(--geist-accents-3);
  background: var(--geist-background) !important;
  cursor: not-allowed;
}

/* SVG arrows */
nav[role="navigation"] svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

/* Mobile responsive layout */
@media (max-width: 639px) {
  nav[role="navigation"]>div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
  }

  nav[role="navigation"]>div:last-child {
    display: none !important;
  }

  nav[role="navigation"]>div:first-child>span,
  nav[role="navigation"]>div:first-child>a {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--geist-accents-2);
    border-radius: 8px;
    background: var(--geist-background);
    color: var(--geist-accents-5);
    text-decoration: none;
    transition: all 0.15s ease;
  }

  nav[role="navigation"]>div:first-child>a:hover {
    background: var(--geist-accents-1);
    color: var(--geist-foreground);
  }
}

.footer {
  border-top: 1px solid var(--geist-accents-2);
  padding: 3rem 0;
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copyright {
  color: var(--geist-accents-5);
  line-height: 1.6;
}

.footer-copyright p {
  display: inline;
  margin: 0;
}

.footer-powered a {
  color: var(--geist-accents-5);
  font-weight: 500;
  transition: color 0.2s;
}

.footer-powered a:hover {
  color: var(--geist-foreground);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.footer-links .nav-link {
  color: var(--geist-accents-5);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-links .nav-link:hover {
  color: var(--geist-foreground);
}

.pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  list-style: none;
  margin-top: 3rem;
}

.pagination li a,
.pagination li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--geist-accents-2);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.pagination li a:hover {
  border-color: var(--geist-foreground);
  color: var(--geist-foreground);
}

.pagination li.active span {
  background: var(--geist-foreground);
  color: var(--geist-background);
  border-color: var(--geist-foreground);
}

/* Widget Styles */
.widget {
  padding: 1.5rem;
  border: 1px solid var(--geist-accents-2);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.widget-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--geist-foreground);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.widget-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget-list li {
  padding: 0.5rem 0;
}

.widget-language-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget-language-list li {
  padding: 0.35rem 0;
}

.widget-language-list li a {
  color: var(--geist-accents-6);
  font-size: 1rem;
  transition: color 0.2s;
  display: inline-block;
}

.widget-language-list li a:hover,
.widget-language-list li.active a {
  color: var(--geist-foreground);
}

.widget-list li a {
  color: var(--geist-accents-6);
  font-size: 1rem;
  line-height: 1.5;
  display: block;
  transition: color 0.2s;
}

.widget-price {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--geist-foreground);
}

.widget-price .price-old {
  text-decoration: line-through;
  color: var(--geist-accents-4);
  font-weight: 400;
  margin-right: 0.375rem;
}

.widget-price .price-new {
  color: var(--geist-error, #e00);
}

.widget-list li a:hover,
.widget-list li.active a {
  color: var(--geist-foreground);
}

.widget-list .count {
  color: var(--geist-accents-4);
  font-size: 0.8125rem;
}

.widget-area {
  display: flex;
  flex-direction: column;
}

/* Search Widget Form */
.widget-search-form {
  display: flex;
  margin-top: 0.5rem;
}

.widget-search-form input[type="search"] {
  flex: 1;
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid var(--geist-accents-2);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--geist-background);
  color: var(--geist-foreground);
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}

.widget-search-form input[type="search"]:focus {
  border-color: var(--geist-accents-4);
}

.widget-search-form button[type="submit"]:not(.widget-search-icon-submit),
.widget-search-submit-button {
  padding: 0.625rem 1.25rem;
  background: var(--geist-foreground);
  color: var(--geist-background);
  border: 1px solid var(--geist-foreground);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.widget-search-form button[type="submit"]:not(.widget-search-icon-submit):hover,
.widget-search-submit-button:hover {
  opacity: 0.9;
}

.widget-search-icon-submit {
  padding: 0;
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  min-height: 2.25rem;
  border-radius: 9999px;
  background: var(--geist-background);
  color: var(--geist-foreground);
  border: 1px solid var(--geist-accents-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.widget-search-icon-submit:hover {
  opacity: 1;
  background: var(--geist-accents-1);
  color: var(--geist-foreground);
}

/* Tag Cloud Widget */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag-cloud a {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--geist-accents-1);
  color: var(--geist-accents-6);
  border: 1px solid var(--geist-accents-2);
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.2s;
}

.tag-cloud a:hover {
  background: var(--geist-accents-2);
  color: var(--geist-foreground);
  border-color: var(--geist-accents-3);
}

/* ============================================
   LANDING PAGE ELEMENTS
   ============================================ */

/* Hero */
.fw-hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.fw-hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--geist-foreground);
  margin-bottom: 1.25rem;
}

.fw-hero-subtitle {
  font-size: 1.125rem;
  color: var(--geist-accents-5);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.fw-hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Feature Grid */
.fw-features {
  padding: 3.5rem 0;
}

.fw-features-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.fw-features-header h2 {
  margin-bottom: 0.5rem;
}

.fw-features-header p {
  color: var(--geist-accents-5);
  font-size: 1rem;
  margin: 0;
}

.fw-features-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 3), 1fr);
  gap: 1.5rem;
}

.fw-feature-card {
  padding: 2rem 1.5rem;
  background: var(--geist-background);
  border: 1px solid var(--geist-accents-2);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.fw-feature-card:hover {
  border-color: var(--geist-accents-3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.fw-feature-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
  color: var(--geist-foreground);
}

.fw-feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.fw-feature-card p {
  color: var(--geist-accents-5);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}

/* CTA Banner */
.fw-cta {
  padding: 4rem 0;
  text-align: center;
  border-top: 1px solid var(--geist-accents-2);
  border-bottom: 1px solid var(--geist-accents-2);
  background: var(--geist-accents-1);
}

.fw-cta h2 {
  margin-bottom: 0.75rem;
}

.fw-cta p {
  color: var(--geist-accents-5);
  font-size: 1rem;
  margin: 0 auto 1.5rem;
}

/* Core CTA variant (gradient, stats, form) */
.fw-cta--core {
  background: linear-gradient(135deg, #4361ee 0%, #5f60ff 100%);
  color: #fff;
  border: none;
  padding: 5rem 0;
}

.fw-cta--core h2 {
  color: #fff;
}

.fw-cta--core .fw-cta__text {
  color: rgba(255, 255, 255, 0.92);
  max-width: 44rem;
  margin: 0 auto 1rem;
  font-size: 1rem;
  line-height: 1.7;
}

.fw-cta--core .fw-cta__info {
  color: rgba(255, 255, 255, 0.85);
  max-width: 40rem;
  margin: 0 auto 1.5rem;
  font-size: 0.95rem;
  line-height: 1.65;
}

.fw-cta__form {
  max-width: 37.5rem;
  margin: 0 auto;
  padding: 1.5rem;
  border-radius: 0.75rem;
  background: var(--geist-background);
  color: var(--geist-foreground);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
}

.fw-cta__stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.fw-cta__stat {
  min-width: 7rem;
  text-align: center;
}

.fw-cta__stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}

.fw-cta__stat-label {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.82;
}

/* Stats Row */
.fw-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 3rem 0;
}

.fw-stat {
  text-align: center;
}

.fw-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--geist-foreground);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.375rem;
}

.fw-stat-label {
  font-size: 0.875rem;
  color: var(--geist-accents-5);
}

/* Full-width page (for landing pages set as homepage) */
.page-full-width .article-content {
  max-width: none;
}

/* Responsive */
@media (max-width: 1024px) {
  .listing-container.is-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fw-features-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .fw-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Multi-level Menu (Dropdown) */
.nav-item {
  position: relative;
  display: inline-block;
}

.nav-item.has-dropdown>.nav-link {
  padding-right: 15px;
}



.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  max-width: 360px;
  background: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 10px 0;
  margin-top: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1000;
  list-style: none;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .nav-dropdown {
  background: #1f2937;
  border-color: rgba(255, 255, 255, 0.1);
}

.nav-item:hover>.nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown li {
  padding: 0;
}

.nav-dropdown .nav-link {
  display: block;
  padding: 10px 16px;
  color: var(--geist-accents-5) !important;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  transition: all 0.2s ease;
}

.nav-link.has-children-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nav-dropdown .nav-link.has-children-link {
  align-items: flex-start;
}

.nav-link.has-children-link .nav-link-label {
  min-width: 0;
  flex: 1;
}

.submenu-icon {
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.nav-dropdown .nav-link:hover,
.nav-dropdown .nav-link.active {
  background: var(--geist-accents-1);
  color: var(--geist-foreground) !important;
  font-weight: 500;
}

/* Nested Submenu */
.nav-dropdown .nav-item {
  display: block;
  width: 100%;
}

.nav-dropdown .nav-dropdown {
  top: -10px;
  left: 100%;
  margin-top: 0;
  margin-left: 2px;
}

/* Dropdown Reverse (when too close to right edge) */
.nav-dropdown.dropdown-reverse {
  left: auto;
  right: 0;
}

.nav-dropdown .nav-dropdown.dropdown-reverse {
  left: auto;
  right: 100%;
  margin-left: 0;
  margin-right: 2px;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .header-actions {
    display: none;
  }

  .header {
    padding: 0.75rem 0;
  }

  .header .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .header-inner {
    gap: 0.6rem;
    min-height: 48px;
  }

  .logo {
    font-size: 1.15rem;
    line-height: 1;
    white-space: nowrap;
  }

  .header-controls {
    gap: 0.45rem !important;
    margin-left: auto;
  }

  .header-widget-area {
    gap: 0.45rem;
  }

  .header-controls + .header-actions {
    margin-left: 0.45rem;
  }

  .header-actions[style*="display: block"],
  .header-actions[style*="display:block"] {
    display: flex !important;
    align-items: center;
  }

  .header-actions .btn {
    min-height: 42px;
    padding: 0.7rem 1.15rem;
    border-radius: 0.45rem;
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
  }

  .nav-item-search .widget-search-trigger,
  .header-widget-area .widget-search-trigger,
  .fw-theme-toggle {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }

  /* Mobile Spacing & Padding Reductions */
  .section {
    padding-top: 1rem !important;
    padding-bottom: 1.5rem !important;
  }

  .breadcrumb-bar {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    margin-bottom: 0 !important;
  }

  .grid-sidebar {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  .listing-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    margin-bottom: 0.75rem !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .listing-title {
    font-size: 1.5rem !important;
    margin-bottom: 0.25rem !important;
  }

  .listing-subtitle {
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.35rem !important;
  }

  /* Force Grid/List Toggle Toolbar to the RIGHT on mobile */
  .listing-toolbar {
    display: flex !important;
    width: 100% !important;
    justify-content: flex-end !important;
    align-items: center !important;
    margin-top: 0.25rem !important;
    margin-left: 0 !important;
  }

  .listing-results {
    margin-right: auto !important;
  }

  .listing-view-toggle {
    margin-left: auto !important;
  }

  .listing-container.is-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .listing-container.is-list {
    gap: 0.75rem !important;
  }

  .listing-pagination {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }

  /* Mobile Menu Toggle */
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: transparent;
    border: none;
    color: var(--geist-foreground);
    padding: 0;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background-color 0.2s;
  }

  .mobile-menu-toggle:hover {
    background: var(--geist-accents-1);
  }

  .mobile-menu-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .mobile-menu-toggle:focus {
    outline: 2px solid var(--geist-foreground);
    outline-offset: 2px;
  }

  @media (max-width: 480px) {
    .header .container {
      padding-left: 1rem;
      padding-right: 1rem;
    }

    .header-inner {
      gap: 0.45rem;
    }

    .header-controls {
      gap: 0.35rem !important;
    }

    .header-controls + .header-actions {
      margin-left: 0.35rem;
    }

    .nav-item-search .widget-search-trigger,
    .header-widget-area .widget-search-trigger,
    .fw-theme-toggle,
    .mobile-menu-toggle {
      width: 36px !important;
      height: 36px !important;
      min-width: 36px !important;
      min-height: 36px !important;
    }

    .header-actions .btn {
      min-height: 38px;
      padding: 0.6rem 0.95rem;
      font-size: 0.78rem;
    }
  }



  /* Mobile Menu */
  .mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--geist-background);
    border-bottom: 1px solid var(--geist-accents-2);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    padding: 1rem 0 3rem 0;
    z-index: 40;
    height: calc(100vh - 60px);
    overflow-y: auto;
  }

  .mobile-menu.active {
    display: block;
  }

  .mobile-menu .nav-link {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--geist-foreground);
    border-radius: var(--radius);
  }

  .mobile-menu .nav-link:hover,
  .mobile-menu .nav-link.active {
    background: var(--geist-accents-1);
  }

  .mobile-menu .has-dropdown .dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 1rem;
    margin-top: 0.25rem;
    width: 100%;
    background: transparent;
  }

  .mobile-menu .has-dropdown.active .dropdown-menu {
    display: block;
  }

  .is-list .listing-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    min-height: 110px !important;
    overflow: hidden !important;
    position: relative !important;
  }

  .is-list .listing-card__image {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    position: relative !important;
  }

  .is-list .listing-card__image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .is-list .listing-card__body {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding: 0.75rem 0.875rem !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow: hidden !important;
    position: relative !important;
    z-index: 2 !important;
  }

  .is-list .listing-card__meta {
    margin-bottom: 0.25rem !important;
    flex-wrap: wrap !important;
  }

  .is-list .listing-card .badge {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 0.65rem !important;
  }

  .is-list .listing-card__title {
    font-size: 0.875rem !important;
    line-height: 1.35 !important;
    margin-bottom: 0.25rem !important;
    min-height: auto !important;
    word-break: break-word !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .is-list .listing-card__excerpt {
    display: none !important;
  }

  .is-list .listing-card__price-row {
    margin-top: auto !important;
    padding-top: 6px !important;
    border-top: 1px solid var(--border-color, #e2e8f0) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    min-width: 0 !important;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .listing-title {
    font-size: 1.5rem;
  }



  /* Landing page & Archive Hero responsive */
  .fw-hero {
    padding: 0.5rem 0 0.5rem !important;
    margin-bottom: 0.5rem !important;
  }

  .fw-hero-title {
    font-size: 1.5rem !important;
    margin-bottom: 0.25rem !important;
  }

  .fw-hero-subtitle {
    font-size: 0.875rem !important;
    margin-bottom: 0.35rem !important;
    line-height: 1.4 !important;
  }

  .fw-features-grid {
    grid-template-columns: 1fr !important;
  }

  .fw-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;
  }

  .fw-stat-value {
    font-size: 1.5rem;
  }

  /* Footer responsive */
  .footer-inner {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ==========================================================================
   Ecommerce Mini Cart Integration (Tailwind overrides for Vanilla CSS)
   ========================================================================== */

/* Cart Button */
.mini-cart {
  position: relative;
  z-index: 50;
}

.mini-cart>button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f3f4f6;
  border: none;
  cursor: pointer;
  color: #374151;
  transition: all 0.2s;
  position: relative;
  padding: 0;
}

.mini-cart>button:hover {
  background-color: #e5e7eb;
}

html.dark .mini-cart>button {
  background-color: #1f2937;
  color: #d1d5db;
}

html.dark .mini-cart>button:hover {
  background-color: #374151;
}

.mini-cart>button svg {
  width: 20px;
  height: 20px;
}

/* Cart Badge */
.mini-cart>button span {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--geist-background, #ffffff);
  background-color: var(--geist-foreground, #000000);
  border-radius: 50%;
}

/* Dropdown Container */
.mini-cart>div.absolute {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  width: 320px;
  background-color: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 50;
  overflow: hidden;
}

html.dark .mini-cart>div.absolute {
  background-color: #1f2937;
  border-color: #374151;
}

/* Dropdown Header & Subtotal */
.mini-cart .border-b,
.mini-cart .border-t {
  padding: 0.75rem 1rem;
}

.mini-cart .border-b {
  border-bottom: 1px solid #e5e7eb;
}

.mini-cart .border-t {
  border-top: 1px solid #e5e7eb;
}

html.dark .mini-cart .border-b {
  border-bottom-color: #374151;
}

html.dark .mini-cart .border-t {
  border-top-color: #374151;
}

.mini-cart h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 500;
  color: #111827;
}

html.dark .mini-cart h3 {
  color: #ffffff;
}

/* Empty State */
.mini-cart .text-center {
  text-align: center;
  padding: 2rem 1rem;
}

.mini-cart .text-center svg {
  margin: 0 auto;
  height: 3rem;
  width: 3rem;
  color: #9ca3af;
}

.mini-cart .text-center p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

html.dark .mini-cart .text-center p {
  color: #9ca3af;
}

/* Item List */
.mini-cart ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 16rem;
  overflow-y: auto;
}

.mini-cart li {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
}

html.dark .mini-cart li {
  border-bottom-color: #374151;
}

.mini-cart li:last-child {
  border-bottom: none;
}

/* Item Image */
.mini-cart .flex-shrink-0 {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  background-color: #e5e7eb;
  border-radius: 0.25rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

html.dark .mini-cart .flex-shrink-0 {
  background-color: #374151;
}

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

/* Item details */
.mini-cart .flex-1 {
  flex: 1;
  min-width: 0;
}

.mini-cart .flex-1 a {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

html.dark .mini-cart .flex-1 a {
  color: #ffffff;
}

.mini-cart .flex-1 a:hover {
  color: var(--primary, #0057ff);
}

.mini-cart .flex-1 p {
  margin: 0;
  font-size: 0.875rem;
  color: #6b7280;
}

html.dark .mini-cart .flex-1 p {
  color: #9ca3af;
}

/* Remove button */
.mini-cart li button {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-cart li button:hover {
  color: #ef4444;
}

.mini-cart li button svg {
  width: 16px;
  height: 16px;
}

/* More items notice */
.mini-cart .bg-gray-50 {
  padding: 0.5rem 1rem;
  background-color: #f9fafb;
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
}

html.dark .mini-cart .bg-gray-50 {
  background-color: #111827;
  color: #9ca3af;
}

/* Subtotal */
.mini-cart .flex.justify-between {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 500;
  color: #111827;
}

html.dark .mini-cart .flex.justify-between {
  color: #ffffff;
}

/* Footer Actions */
.mini-cart .space-y-2 {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mini-cart .space-y-2 a {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  box-sizing: border-box;
  transition: all 0.2s;
}

/* View Cart Button */
.mini-cart .space-y-2 a:first-child {
  border: 1px solid #d1d5db;
  color: #374151;
  background-color: transparent;
}

.mini-cart .space-y-2 a:first-child:hover {
  background-color: #f9fafb;
}

html.dark .mini-cart .space-y-2 a:first-child {
  border-color: #4b5563;
  color: #d1d5db;
}

html.dark .mini-cart .space-y-2 a:first-child:hover {
  background-color: #374151;
}

/* Checkout Button */
.mini-cart .space-y-2 a:last-child,
.mini-cart .space-y-2\.5 a:first-child {
  background-color: var(--geist-foreground, #000000);
  color: var(--geist-background, #ffffff);
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
}

.mini-cart .space-y-2 a:last-child:hover,
.mini-cart .space-y-2\.5 a:first-child:hover {
  background-color: var(--geist-accents-7, #333333);
  color: var(--geist-background, #ffffff);
}

/* Backdrop */
.mini-cart>div.fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 40;
  background-color: transparent;
  cursor: default;
  pointer-events: auto;
}

/* Vue Transitions */
.mini-cart-enter-active,
.mini-cart-leave-active {
  transition: opacity 0.2s, transform 0.2s;
}

.mini-cart-enter-from,
.mini-cart-leave-to {
  opacity: 0;
  transform: scale(0.95);
}

/* Mobile Multi-level Menu */
.mobile-menu-item {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.mobile-menu-item .nav-link {
  flex: 1;
}

.submenu-toggle {
  padding: 8px 15px;
  cursor: pointer;
  font-size: 14px;
  color: var(--gray, #6c757d);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.submenu-toggle:hover {
  color: var(--primary, #4361ee);
}

.submenu-toggle.active svg {
  transform: rotate(180deg);
}

.submenu-toggle svg {
  transition: transform 0.3s ease;
}

.mobile-submenu {
  width: 100%;
  display: none;
  flex-direction: column;
  padding-left: 15px;
  border-left: 2px solid rgba(0, 0, 0, 0.05);
  margin-top: 5px;
  margin-bottom: 5px;
}

.mobile-submenu.active {
  display: flex !important;
}

.dark .mobile-submenu {
  border-left-color: rgba(255, 255, 255, 0.1);
}

}

/* ==========================================================================
   FlexiWhite Theme - Dark Mode Overrides for Product Detail Page
   ========================================================================== */
html.dark .product-title {
  color: #f8fafc !important;
}

html.dark .product-rating-meta {
  color: #94a3b8 !important;
}

html.dark .product-rating-meta span {
  color: #cbd5e1 !important;
}

/* Related Project Releases Card */
html.dark .product-projecthub-card {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .product-projecthub-card h3 {
  color: #e2e8f0 !important;
}

html.dark .product-projecthub-card div[style*="background:#fff"],
html.dark .product-projecthub-card div[style*="background: #fff"],
html.dark .product-projecthub-card div[style*="background:rgb(255, 255, 255)"] {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .product-projecthub-card div[style*="color:#0f172a"],
html.dark .product-projecthub-card div[style*="color: #0f172a"] {
  color: #e2e8f0 !important;
}

html.dark .product-projecthub-card a {
  color: #60a5fa !important;
}

html.dark .product-projecthub-card a:hover {
  color: #93c5fd !important;
}

/* Prices */
html.dark .product-price-large {
  color: #cbd5e1 !important;
}

html.dark .product-sale-price {
  color: #94a3b8 !important;
}

html.dark .variant-picker-label {
  color: #cbd5e1 !important;
}

html.dark .variant-picker-label .selected-value {
  color: #60a5fa !important;
}

html.dark .variant-option-select {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
}

html.dark .variant-option-select option {
  background-color: #0f172a !important;
  color: #cbd5e1 !important;
}

/* Variant Text Swatches */
html.dark .variant-option-btn.is-text-swatch {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
}

html.dark .variant-option-btn.is-text-swatch:hover:not(.is-disabled) {
  border-color: var(--primary, #3b82f6) !important;
  color: var(--primary, #3b82f6) !important;
  background: rgba(59, 130, 246, 0.08) !important;
}

html.dark .variant-option-btn.is-text-swatch.is-selected {
  border-color: var(--primary, #3b82f6) !important;
  color: var(--primary, #3b82f6) !important;
  background: rgba(59, 130, 246, 0.15) !important;
}

html.dark .variant-option-btn.is-disabled {
  opacity: 0.35 !important;
}

html.dark .variant-option-btn.is-text-swatch.is-disabled {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  border-style: dashed !important;
}

html.dark .variant-option-btn.is-image-swatch {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

html.dark .variant-option-btn.is-image-swatch.is-selected {
  border-color: #fff !important;
  box-shadow: 0 0 0 2px var(--primary, #3b82f6) !important;
}

html.dark .variant-option-btn.is-color-swatch.is-selected {
  border-color: #182433 !important; /* matches dark theme card background */
  box-shadow: 0 0 0 2px var(--primary, #3b82f6) !important;
}

/* Quantity Selector */
html.dark .quantity-selector {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark .quantity-selector button {
  color: #cbd5e1 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark .quantity-selector button:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

html.dark #product-qty-input {
  color: #f8fafc !important;
}

/* Stock display */
html.dark .stock-badge.in-stock {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.2) !important;
  color: #34d399 !important;
}

html.dark .stock-badge.out-of-stock {
  background: rgba(244, 63, 94, 0.1) !important;
  border-color: rgba(244, 63, 94, 0.2) !important;
  color: #f87171 !important;
}

/* Metadata Box */
html.dark .product-metadata-box {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
}

html.dark .product-metadata-box strong {
  color: #f8fafc !important;
}

html.dark .product-metadata-box a {
  color: var(--primary, #60a5fa) !important;
}

html.dark .product-metadata-box a:hover {
  color: #93c5fd !important;
  text-decoration: underline;
}

/* Tab Navigation */
html.dark .product-detail-tabs {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark .product-detail-tabs a {
  color: #94a3b8 !important;
}

html.dark .product-detail-tabs a.active {
  color: var(--primary, #60a5fa) !important;
}

html.dark .product-detail-tabs a.active::after {
  background-color: var(--primary, #60a5fa) !important;
}

/* Specifications */
html.dark .specifications-container h4 {
  color: #e2e8f0 !important;
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark .specifications-container div[style*="background: #fafafa"],
html.dark .specifications-container div[style*="background:#fafafa"] {
  background: rgba(255, 255, 255, 0.02) !important;
}

html.dark .specification-table {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .specification-row {
  border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}

html.dark .specification-label {
  color: #cbd5e1 !important;
}

html.dark .specification-value {
  color: #94a3b8 !important;
}

/* Package Card */
html.dark .package-card {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .package-card:hover {
  border-color: var(--primary, #60a5fa) !important;
}

html.dark .package-card strong {
  color: #f9fafb !important;
}

html.dark .package-card div[style*="color: var(--dark)"] {
  color: #f9fafb !important;
}

html.dark .package-info {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #9ca3af !important;
}

html.dark .package-card ul li {
  color: #94a3b8 !important;
}

/* Language Switcher dropdown & flags */
.flag-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
.flag-icon-wrapper svg {
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  width: 16px;
  height: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}
.nav-link:hover .flag-icon-wrapper svg {
  transform: scale(1.1);
}
.nav-dropdown li.active .nav-link {
  font-weight: 600;
  color: var(--geist-foreground) !important;
}
.nav-dropdown li.active .flag-icon-wrapper svg {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.widget-language-list li a {
  display: inline-flex;
  align-items: center;
}
.widget-language-list li.active a .flag-icon-wrapper svg {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

/* Custom Language Switcher Widget Dropdown styling */
.widget-language-dropdown-custom {
  position: relative;
  display: inline-block;
  width: 100%;
}
.widget-language-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--geist-background, #fff);
  border: 1px solid var(--geist-border, #e2e8f0);
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
  color: var(--geist-foreground, #1e293b);
  justify-content: space-between;
}
.widget-language-dropdown-custom:hover .widget-language-dropdown-menu {
  display: block;
  opacity: 1;
  visibility: visible;
}
.widget-language-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  min-width: 100%;
  margin-top: 4px;
  padding: 6px 0;
  list-style: none;
  background: var(--geist-background, #fff);
  border: 1px solid var(--geist-border, #e2e8f0);
  border-radius: 6px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.widget-language-dropdown-menu li {
  padding: 0 !important;
  margin: 0 !important;
}
.widget-language-dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--geist-foreground, #1e293b);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s ease;
}
.widget-language-dropdown-menu li a:hover {
  background: var(--geist-accents-2, #f1f5f9);
}
.widget-language-dropdown-menu li.active a {
  font-weight: 600;
  background: var(--geist-accents-1, #f8fafc);
  color: var(--primary, #3b82f6);
}
html.dark .widget-language-dropdown-trigger,
.dark .widget-language-dropdown-trigger,
html.dark .widget-language-dropdown-menu,
.dark .widget-language-dropdown-menu {
  background: var(--geist-background, #0f172a);
  border-color: var(--geist-border, #334155);
  color: var(--geist-foreground, #f8fafc);
}
html.dark .widget-language-dropdown-menu li a,
.dark .widget-language-dropdown-menu li a {
  color: var(--geist-foreground, #f8fafc);
}
html.dark .widget-language-dropdown-menu li a:hover,
.dark .widget-language-dropdown-menu li a:hover {
  background: var(--geist-border, #1e293b);
}
html.dark .widget-language-dropdown-menu li.active a,
.dark .widget-language-dropdown-menu li.active a {
  background: var(--geist-border, #1e293b);
  color: var(--primary, #3b82f6);
}

@media (max-width: 1024px) {
  .single-product-details {
    padding-top: 1rem !important;
  }
}

/* Mobile Optimization - Harmony & Spacing Reduction */
@media (max-width: 767px) {
  /* Spacing reductions */
  .section {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  .grid-sidebar {
    gap: 1.5rem !important;
  }
  
  /* Heading size reduction */
  h1, .single-product-title, .post-title {
    font-size: 1.625rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.75rem !important;
  }
  h2 {
    font-size: 1.35rem !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.75rem !important;
  }
  h3 {
    font-size: 1.15rem !important;
    margin-top: 1.25rem !important;
    margin-bottom: 0.5rem !important;
  }
  h4 {
    font-size: 1.05rem !important;
  }
  
  /* Body and text sizes */
  body, p, span, li, a {
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
  }
  .single-product-short-desc p {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
  }
  
  /* Product page adjustments */
  .single-product-grid {
    gap: 1rem !important;
    margin-bottom: 0.75rem !important;
  }
  .single-product-details {
    padding-top: 0.75rem !important;
  }
  .single-product-summary {
    margin-top: 0.5rem !important;
  }
  .single-product-price-row {
    margin-bottom: 0.75rem !important;
  }
  .single-product-price-row .product-price {
    font-size: 1.625rem !important;
  }
  .single-product-stats-row {
    gap: 0.5rem !important;
    margin-top: 0.35rem !important;
    margin-bottom: 0.5rem !important;
    font-size: 0.85rem !important;
  }
  .single-product-actions {
    max-width: 100% !important;
  }
  .product-packages-selector, .product-features-list {
    max-width: 100% !important;
  }
  
  /* Tabs padding reductions */
  .single-product-tab-nav {
    gap: 0.75rem !important;
    margin-bottom: 0.5rem !important;
  }
  .single-product-tab-link {
    padding: 0.35rem 0 !important;
    font-size: 0.85rem !important;
  }
  .single-product-tab-content {
    min-height: 180px !important;
    padding-top: 0.25rem !important;
  }
  .single-product-tab-panel {
    padding-top: 0.25rem !important;
  }
  .single-product-tab-panel > .prose > *:first-child,
  .single-product-tab-panel > *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

