/*
  ==============================================
  CSS VARIABLES (CUSTOM PROPERTIES)
  ==============================================
  New color palette using shades of grey, blue, and teal
  for a modern, consistent, and easily updatable design.
*/
:root {
  /*
  ================================================
   VELORETTI-INSPIRED WARM NEUTRAL PALETTE
   Extracted from the product image:
   Off-whites, warm greys, charcoal, stone accent
  ================================================
  */

  /* Core Warm Neutral Palette */
  --color-white: #f7ebd7;           /* warm near-white */
  --color-black: #2b1b12;           /* near-black charcoal */
  --color-grey-light-1: #ecd9bd;    /* warm light grey */
  --color-grey-light-2: #e6d2b4;    /* slightly deeper warm grey */
  --color-grey-mid-1: #cbaa88;      /* mid warm grey (borders) */
  --color-grey-mid-2: #8a6f5c;      /* muted warm mid tone */
  --color-grey-dark-1: #4a2f21;     /* warm dark grey (body text) */
  --color-grey-dark-2: #2f1d13;     /* deep warm charcoal */

  /* Stone/Warm Accent Palette (replaces Blue) */
  --color-blue-light-1: #f1e0c5;    /* very light stone wash */
  --color-blue-primary: #7e5542;    /* warm stone — primary interactive */
  --color-blue-dark-1: #553523;     /* deep stone for links/headings */
  --color-blue-dark-2: #3b2418;     /* darkest stone */

  /* Warm Sage Accent (replaces Teal) */
  --color-teal-light-1: #e9f0dc;    /* pale sage tint */
  --color-teal-primary: #678662;    /* muted sage green */
  --color-teal-dark-1: #3d6b4f;     /* deep sage */
  --color-teal-dark-2: #1f3a2c;     /* darkest sage */

  /* Semantic Colors */
  --primary-color: #3b2418;         /* deep warm charcoal (was navy) */
  --primary-color-dark: #1f130c;    /* near-black warm */
  --secondary-color: var(--color-grey-light-1);
  --background-color: var(--color-grey-light-2);
  --text-color: var(--color-grey-dark-1);
  --border-color: var(--color-grey-mid-1);
  --highlight-color: var(--color-blue-light-1);
  --active-border: var(--color-blue-primary);

  --background-main: var(--background-color);
  --background-content: var(--secondary-color);
  --background-sidebar: var(--color-white);
  --background-header: var(--color-white);
  --text-on-primary-bg: var(--color-white);
  --highlight-strong: #f3e2c2;      /* warm parchment highlight */

  /* New palette vars (warm stone replaces blue) */
  --color-primary-new: #7e5542;
  --color-primary-dark-new: #553523;
  --bg-surface-new: #f7ebd7;
  --text-primary-new: #2b1b12;
  --text-secondary-new: #6b5040;
  --text-on-primary-new: #f7ebd7;
  --border-color-new: #cbaa88;
  --bg-hover-new: #ecd9bd;
  --shadow-sm: 0 4px 6px -1px rgba(59,36,24,0.08), 0 2px 4px -2px rgba(59,36,24,0.06);
  --shadow-md: 0 10px 15px -3px rgba(59,36,24,0.10), 0 4px 6px -4px rgba(59,36,24,0.08);
  --border-radius-md: 12px;

  /* Backgrounds & Surfaces */
  --bg-main: #f1e0c5;               /* warm off-white page bg */
  --bg-surface: #f7ebd7;
  --bg-hover: #ecd9bd;

  /* Text & Borders */
  --text-primary: #2b1b12;
  --text-secondary: #6b5040;
  --text-on-primary: #f7ebd7;

  /* Spacing & Radii */
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 1rem;
  --spacing-4: 1.5rem;
  --spacing-5: 2rem;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --shadow-sm: 0 4px 6px -1px rgba(59,36,24,0.08), 0 2px 4px -2px rgba(59,36,24,0.06);
  --shadow-md: 0 10px 15px -3px rgba(59,36,24,0.10), 0 4px 6px -4px rgba(59,36,24,0.08);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.3s ease;

  /* ===== DARK MODE VARS (warm-neutral light defaults) ===== */
  --dm-bg: #f1e0c5;
  --dm-surface: #f7ebd7;
  --dm-sidebar-bg: #f7ebd7;
  --dm-header-bg: linear-gradient(135deg, #3b2418 0%, #2f1d13 60%, #1f130c 100%);
  --dm-text: #2b1b12;
  --dm-border: #cbaa88;
  --dm-card-bg: #f7ebd7;
  --dm-input-bg: #f7ebd7;
  --dm-tab-btn-bg: #f7ebd7;
  --dm-tab-btn-color: #4a2f21;
  --dm-sidebar-tabs-bg: #ecd9bd;
  --dm-footer-nav-bg: #f7ebd7;
  --dm-progress-color: #7e5542;
  --dm-toast-bg: #3b2418;
  --dm-toast-color: #f7ebd7;
  --dm-breadcrumb-color: rgba(255,248,240,0.70);
}

/* ===================================
   DARK MODE THEME — LUNA PALETTE
   #f1e0c5 · #e0b488 · #2f665b · #193f3a · #12302b
   =================================== */
[data-theme="dark"] {
  /* ── LUNA Core Variables ── */
  --luna-ice:      #f1e0c5;   /* lightest — text, highlights  */
  --luna-sky:      #e0b488;   /* mid — borders, accents, progress */
  --luna-ocean:    #2f665b;   /* buttons, interactive, hover  */
  --luna-deep:     #193f3a;   /* cards, surfaces, sidebar     */
  --luna-midnight: #12302b;   /* deepest — base backgrounds   */

  /* ── DM System Vars mapped to LUNA ── */
  --dm-bg:               #12302b;
  --dm-surface:          #193f3a;
  --dm-sidebar-bg:       #193f3a;
  --dm-header-bg:        linear-gradient(135deg, #12302b 0%, #193f3a 55%, #1f4d44 100%);
  --dm-text:             #f1e0c5;
  --dm-border:           rgba(47, 102, 91, 0.55);
  --dm-card-bg:          #193f3a;
  --dm-input-bg:         rgba(25, 63, 58, 0.8);
  --dm-tab-btn-bg:       #193f3a;
  --dm-tab-btn-color:    #f1e0c5;
  --dm-sidebar-tabs-bg:  #12302b;
  --dm-footer-nav-bg:    #193f3a;
  --dm-progress-color:   linear-gradient(90deg, #e0b488, #f1e0c5);
  --dm-toast-bg:         #2f665b;
  --dm-toast-color:      #f1e0c5;
  --dm-breadcrumb-color: rgba(241, 224, 197, 0.75);

  /* ── Semantic overrides ── */
  --background-main:     #12302b;
  --background-content:  #193f3a;
  --background-sidebar:  #193f3a;
  --text-color:          #f1e0c5;
  --border-color:        rgba(47, 102, 91, 0.55);
  --bg-surface:          #193f3a;
  --bg-surface-new:      #193f3a;
  --text-primary:        #f1e0c5;
  --text-primary-new:    #f1e0c5;
  --text-secondary:      #e0b488;
  --text-secondary-new:  #e0b488;
  --bg-hover:            rgba(47, 102, 91, 0.45);
  --bg-hover-new:        rgba(47, 102, 91, 0.45);
  --border-color-new:    rgba(47, 102, 91, 0.55);
  --color-white:         #193f3a;
  --color-grey-light-1:  #193f3a;
  --color-grey-light-2:  #12302b;
  --color-grey-dark-1:   #f1e0c5;
  --color-grey-dark-2:   #e0b488;
  --color-grey-mid-2:    #e0b488;
  --highlight-strong:    rgba(47, 102, 91, 0.35);

  /* ── Interactive / accent overrides ── */
  --color-blue-primary:      #e0b488;
  --color-blue-dark-1:       #f1e0c5;
  --color-teal-primary:      #e0b488;
  --color-teal-light-1:      rgba(47, 102, 91, 0.2);
  --color-teal-dark-1:       #f1e0c5;
  --primary-color:            #2f665b;
  --primary-color-dark:       #193f3a;
  --active-border:            #e0b488;
  --color-primary-new:        #2f665b;
  --color-primary-dark-new:   #193f3a;

  /* ── Shadows tuned for deep-ocean depth ── */
  --shadow-sm: 0 4px 6px -1px rgba(18, 48, 43, 0.5), 0 2px 4px -2px rgba(18, 48, 43, 0.4);
  --shadow-md: 0 10px 20px -3px rgba(18, 48, 43, 0.6), 0 4px 8px -4px rgba(18, 48, 43, 0.5);
}

[data-theme="dark"] body {
  background-color: var(--dm-bg);
  background-image: radial-gradient(ellipse at 20% 10%, rgba(47, 102, 91, 0.18) 0%, transparent 55%),
                    radial-gradient(ellipse at 80% 90%, rgba(25, 63, 58, 0.25) 0%, transparent 55%);
  color: var(--dm-text);
}
[data-theme="dark"] .sidebar-left {
  background: linear-gradient(180deg, #193f3a 0%, #12302b 100%);
  border-right: 1px solid rgba(47, 102, 91, 0.4);
  box-shadow: 2px 0 16px rgba(18, 48, 43, 0.5);
}
[data-theme="dark"] .sidebar-tabs {
  background: linear-gradient(180deg, #12302b 0%, #0d2420 100%);
}
[data-theme="dark"] .tab-button {
  background: rgba(25, 63, 58, 0.6);
  color: #f1e0c5;
  border-bottom: 1px solid rgba(47, 102, 91, 0.3);
  transition: all 0.25s ease;
}
[data-theme="dark"] .tab-button:hover {
  background: linear-gradient(90deg, rgba(47, 102, 91, 0.55) 0%, rgba(47, 102, 91, 0.25) 100%);
  color: #f1e0c5;
  border-left: 3px solid #e0b488;
}
[data-theme="dark"] .content-header {
  background: linear-gradient(135deg, #12302b 0%, #193f3a 55%, #1f4d44 100%) !important;
  background-color: transparent !important;
  border-bottom: 1px solid rgba(224, 180, 136, 0.35);
  box-shadow: 0 2px 16px rgba(18, 48, 43, 0.6), 0 1px 0 rgba(224, 180, 136, 0.15) inset;
}
[data-theme="dark"] .content-main {
  background: linear-gradient(160deg, #12302b 0%, #163832 50%, #12302b 100%);
  background-attachment: fixed;
}
[data-theme="dark"] .card,
[data-theme="dark"] .card-section,
[data-theme="dark"] .list-item,
[data-theme="dark"] .quick-contact-box,
[data-theme="dark"] .contact-container {
  background: linear-gradient(145deg, #193f3a 0%, #163832 100%);
  border: 1px solid rgba(47, 102, 91, 0.45);
  color: #f1e0c5;
  box-shadow: 0 4px 16px rgba(18, 48, 43, 0.4), inset 0 1px 0 rgba(241, 224, 197, 0.05);
}
[data-theme="dark"] .card-header {
  border-bottom: 1px solid rgba(47, 102, 91, 0.45);
}
[data-theme="dark"] .form-control,
[data-theme="dark"] .view-search,
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: rgba(18, 48, 43, 0.7);
  border: 1px solid rgba(47, 102, 91, 0.5);
  color: #f1e0c5;
  backdrop-filter: blur(4px);
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .view-search:focus,
[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus {
  background: rgba(25, 63, 58, 0.8);
  border-color: #e0b488;
  color: #f1e0c5;
  box-shadow: 0 0 0 3px rgba(224, 180, 136, 0.2), 0 0 12px rgba(224, 180, 136, 0.1);
  outline: none;
}
[data-theme="dark"] .footer-nav {
  background: linear-gradient(180deg, #193f3a 0%, #12302b 100%);
  border-color: rgba(47, 102, 91, 0.4);
  box-shadow: 0 -4px 20px rgba(18, 48, 43, 0.5);
}
[data-theme="dark"] .sidebar-right {
  background: linear-gradient(180deg, #193f3a 0%, #12302b 100%);
  border-left: 1px solid rgba(47, 102, 91, 0.4);
}
[data-theme="dark"] .footin {
  background: linear-gradient(135deg, #193f3a, #12302b);
  color: #f1e0c5;
  border-top: 1px solid rgba(47, 102, 91, 0.35);
}
[data-theme="dark"] .icon-box {
  background: linear-gradient(145deg, rgba(25, 63, 58, 0.9) 0%, rgba(18, 48, 43, 0.95) 100%);
  border: 1px solid rgba(47, 102, 91, 0.45);
  color: #f1e0c5;
  box-shadow: 0 2px 8px rgba(18, 48, 43, 0.4);
}
[data-theme="dark"] .whitenho {
  background: linear-gradient(145deg, #193f3a, #163832);
  color: #f1e0c5;
  border-bottom: 2px solid rgba(47, 102, 91, 0.4);
  border-top: 0.2rem solid rgba(224, 180, 136, 0.5);
}
[data-theme="dark"] .bbgpc {
  background: linear-gradient(145deg, #193f3a 0%, #12302b 100%);
  color: #f1e0c5;
  box-shadow: 7px 8px 20px rgba(18, 48, 43, 0.5);
}
[data-theme="dark"] .modal-content {
  background: linear-gradient(145deg, #193f3a 0%, #12302b 100%);
  border: 1px solid rgba(47, 102, 91, 0.5);
  box-shadow: 0 20px 60px rgba(18, 48, 43, 0.7), 0 0 0 1px rgba(224, 180, 136, 0.1) inset;
  color: #f1e0c5;
}
[data-theme="dark"] .dropdown-menu {
  background: linear-gradient(160deg, #193f3a 0%, #12302b 100%);
  border: 1px solid rgba(47, 102, 91, 0.5);
  box-shadow: 0 8px 32px rgba(18, 48, 43, 0.6);
  backdrop-filter: blur(12px);
}
[data-theme="dark"] .dropdown-item {
  color: #f1e0c5;
  transition: background 0.2s ease, color 0.2s ease;
}
[data-theme="dark"] .dropdown-item:hover {
  background: rgba(47, 102, 91, 0.4);
  color: #f1e0c5;
}
[data-theme="dark"] .sidebar-tab-filter input {
  background: rgba(18, 48, 43, 0.7);
  color: #f1e0c5;
  border: 1px solid rgba(47, 102, 91, 0.5);
}
[data-theme="dark"] .back-to-top {
  background: linear-gradient(135deg, #2f665b, #193f3a);
  color: #f1e0c5;
  box-shadow: 0 4px 16px rgba(18, 48, 43, 0.6), 0 0 12px rgba(224, 180, 136, 0.15);
  border: 1px solid rgba(224, 180, 136, 0.25);
}
[data-theme="dark"] .back-to-top:hover {
  background: linear-gradient(135deg, #e0b488, #2f665b);
  color: #12302b;
  box-shadow: 0 6px 20px rgba(224, 180, 136, 0.3);
}
[data-theme="dark"] #readingProgressBar {
  background: linear-gradient(90deg, #2f665b, #e0b488, #f1e0c5);
  box-shadow: 0 0 8px rgba(224, 180, 136, 0.5);
}
[data-theme="dark"] .dark-mode-toggle {
  background: rgba(47, 102, 91, 0.2);
  border: 1px solid rgba(224, 180, 136, 0.3);
  color: #f1e0c5;
}
[data-theme="dark"] .dark-mode-toggle:hover {
  background: rgba(47, 102, 91, 0.4);
  border-color: #e0b488;
  color: #f1e0c5;
  box-shadow: 0 0 10px rgba(224, 180, 136, 0.2);
}
[data-theme="dark"] .breadcrumb-trail {
  color: rgba(241, 224, 197, 0.75);
}
[data-theme="dark"] .breadcrumb-trail .bc-sep {
  opacity: 0.4;
}

/* ===== RESET & BASE ===== */
* { box-sizing: border-box; }
html {
  font-size: 87.5%;
  font-weight: normal;
}
body {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-size: clamp(12px, 1.7vw, 14px);
    font-weight: 600;
    line-height: 1.5;
    position: relative;
    overflow: hidden;
    background-color: var(--background-main);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    height: 100%;
    scroll-behavior: smooth;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
h1,h2,h3,h4,h5,h6 {
    font-family: 'Poppins', sans-serif;
}
h1 { font-size: clamp(22px, 4vw, 34px); }
p { font-size: clamp(12px, 1.7vw, 14px); }

/* Custom Scrollbars */
@media screen and (min-width: 768px) {
  ::-webkit-scrollbar { width: 8px; height: 8px; }
  ::-webkit-scrollbar-track { background: var(--color-grey-light-2); border-radius: 10px; }
  ::-webkit-scrollbar-thumb { background-color: var(--color-grey-mid-2); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
  ::-webkit-scrollbar-thumb:hover { background-color: var(--color-grey-dark-1); }
}
@media screen and (max-width: 767px) {
  ::-webkit-scrollbar { display: none; }
}
/* Dark mode scrollbar — LUNA ocean tones */
[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #12302b;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2f665b, #193f3a);
  border-radius: 10px;
  border: 2px solid #12302b;
  background-clip: content-box;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #e0b488, #2f665b);
}

/* ===== READING PROGRESS BAR ===== */
#readingProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--dm-progress-color, var(--color-blue-primary));
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ===== DARK MODE TOGGLE BUTTON ===== */
.dark-mode-toggle {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  font-size: 15px;
  padding: 0;
}
.dark-mode-toggle:hover {
  background: rgba(255,255,255,0.25);
}

/* ===== BREADCRUMB TRAIL ===== */
.breadcrumb-trail {
  font-size: 11px;
  color: var(--dm-breadcrumb-color, rgba(255,255,255,0.65));
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding-right: 8px;
}
.breadcrumb-trail .bc-item {
  opacity: 0.75;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.breadcrumb-trail .bc-item.bc-current {
  opacity: 1;
  font-weight: 700;
  color: #fff;
}
.breadcrumb-trail .bc-sep {
  opacity: 0.4;
  font-size: 10px;
}

/* ===== SIDEBAR TAB FILTER ===== */
.sidebar-tab-filter {
  padding: 6px 8px;
  background-color: var(--color-grey-light-2);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}
.sidebar-tab-filter input {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 11px;
  background-color: var(--color-white);
  color: var(--text-color);
  outline: none;
  transition: border-color 0.2s;
}
.sidebar-tab-filter input:focus {
  border-color: var(--active-border);
}

/* ===== TAB LABEL BADGES ===== */
.tab-badge {
  display: inline-block;
  font-size: 8px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 99px;
  line-height: 1.4;
  vertical-align: middle;
  margin-left: 3px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.badge-new {
  background-color: #eef3e4;
  color: #2f665b;
  border: 1px solid #c9d9b8;
}
.badge-hot {
  background-color: #fff3e0;
  color: #e65100;
  border: 1px solid #ffcc80;
}

/* ===== TOAST NOTIFICATION ===== */
.toast-notification {
  position: fixed;
  bottom: 80px;
  right: 16px;
  background-color: var(--dm-toast-bg, #1e293b);
  color: var(--dm-toast-color, #fff);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  z-index: 9998;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 260px;
}
.toast-notification.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
  position: fixed;
  bottom: 78px;
  right: 14px;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  z-index: 500;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  background-color: var(--color-blue-primary);
}

/* ===== LIVE ONLINE DOT ===== */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34,197,94,0.3);
  vertical-align: middle;
}
.stat-icon-live {
  --icon-bg: #dcfce7;
  --icon-color: #16a34a;
}
.live-indicator-card {
  position: relative;
  overflow: hidden;
}

/* ===== ENHANCED GRID ITEM HOVER (glow) ===== */
.grid-item:hover {
  box-shadow: 0 6px 20px rgba(140, 123, 110, 0.28);
}
.grid-item img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 4px;
  padding: 2px;
  background-color: var(--primary-color);
}

/* ===== ENHANCED CARD TIER BADGES ===== */
.btn-premium {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 6px;
}
.tag.gold {
  background-color: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* ===== SECTION DIVIDER WITH ICON ===== */
.icon-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 1rem 0;
  color: var(--color-grey-mid-2);
  font-size: 12px;
}
.icon-divider::before,
.icon-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}
.icon-divider span {
  white-space: nowrap;
  font-size: 14px;
  color: var(--color-grey-mid-2);
}

/* ===== CALLOUT / PULL QUOTE ===== */
.callout {
  border-left: 4px solid var(--color-teal-primary);
  background-color: var(--color-teal-light-1);
  padding: 0.75rem 1rem;
  border-radius: 0 8px 8px 0;
  margin: 1rem 0;
  font-style: italic;
  color: var(--color-teal-dark-2);
  font-size: 0.9rem;
}
[data-theme="dark"] .callout {
  background: linear-gradient(135deg, rgba(47, 102, 91, 0.15) 0%, rgba(25, 63, 58, 0.2) 100%);
  color: #f1e0c5;
  border-left: 4px solid #e0b488;
}

/* ===== GLASSMORPHISM WIDGETS & MODALS ===== */
.sidebar-right .widget {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--color-grey-dark-1);
  border-radius: 8px;
  font-size: 0.9rem;
}
[data-theme="dark"] .sidebar-right .widget {
  background: rgba(25, 63, 58, 0.55);
  border: 1px solid rgba(47, 102, 91, 0.4);
  color: #f1e0c5;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(18, 48, 43, 0.3), inset 0 1px 0 rgba(241, 224, 197, 0.05);
}

/* ===== MAIN APP LAYOUT ===== */
.app-container {
  display: flex;
  height: 100dvh;
  width: 100vw;
  position: relative;
}
.app-container.sidebar-hidden .sidebar-left {
  display: none;
}

/* Left Sidebar */
.sidebar-left {
  flex: 0 0 18%;
  display: flex;
  flex-direction: column;
  background-color: var(--background-sidebar);
  border-right: 1px solid var(--border-color);
  z-index: 50;
}
.sidebar-left .sidebar-header,
.sidebar-left .sidebar-footer {
  flex-shrink: 0;
  padding: .5rem;
  text-align: center;
  background: var(--primary-color);
  color: var(--text-on-primary-bg);
  font-weight: bold;
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
}
.sidebar-tabs {
  flex-grow: 1;
  overflow-y: auto;
  background-color: var(--color-grey-light-2);
}
.tab-button {
  display: block;
  width: 100%;
  padding: .9rem;
  border: none;
  background-color: var(--color-white);
  text-align: center;
  align-items: center;
  cursor: pointer;
  outline: none;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  color: var(--text-color);
  transition: all 0.2s ease-in-out;
}
.tab-button:hover { background-color: #553523; color: #ecd9bd; }
.tab-button.active {
    background-color: var(--secondary-color);
    color: var(--primary-color-dark);
    font-weight: bolder;
    border-left: .31rem solid var(--active-border);
    box-shadow: inset 3px 0 8px rgba(77,130,232,0.12);
}

/* Main Content Area */
.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  padding: 0px;
}
.content-header {
  padding: .5rem 1rem;
  background-color: #3b2418;
  border-bottom: 2px solid #7e5542;
 /*  border-bottom: 1px solid var(--border-color); */ 
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  gap: 8px;
}
.content-main {
  flex: 1;
  overflow-y: auto;
  padding: .3rem .5rem;
  background-color: var(--background-content);
  transition: opacity 0.3s ease-in-out;
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Right Sidebar */
.sidebar-right {
  display: none;
  flex: 0 0 13.5%;
  background-color: var(--color-grey-light-2);
  border-left: 1px solid var(--border-color);
  padding: 1rem;
  text-align: center;
}

/* Transitions, Search & Hover */
.tab-button, .grid-item, .widget, .icon-item { transition: all 0.2s ease-in-out; }
.grid-item:hover, .widget:hover, .icon-item:hover { transform: translateY(-4px); }

.search-container { position: relative; display: flex; align-items: center; }
#searchIcon { cursor: pointer; color: #ffffff; }
#searchIcon:hover { color: #25d366; }
#searchInput {
    width: 0;
    overflow: hidden;
    border: none;
    background: transparent;
    color: var(--color-white);
    font-weight: 600;
    border-bottom: 2px solid transparent;
    padding: 0.25rem;
    margin-left: 0.5rem;
    outline: none;
    transition: width 0.4s ease-in-out;
}
#searchInput.active { width: 12rem; background-color: #ecd9bd; color: #2b1b12; border-radius: 15px; padding: .5rem; }
#searchInput:focus { border-bottom-color: #25d366; }
.clear-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 2rem;
    font-weight: bolder;
    line-height: 1;
    color: #ec7373;
    cursor: pointer;
    padding: 0 0.5rem;
    display: none;
}
.clear-search-btn:hover { color: #cb1616; }
.no-results-message { text-align: center; padding: 2.5rem 1rem; color: var(--text-color); font-size: 1.1rem; }
mark.highlight { background-color: var(--highlight-strong); color: var(--color-black); padding: 0.1em; border-radius: 3px; }

/* Widget */
.widget {
  padding: 0.5rem;
  background-color: var(--color-white);
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 0.9rem;
}

/* Mobile Bottom Nav / Desktop Primary Nav */
.footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  height: 65px;
  background-color: var(--color-white);
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.08);
  z-index: 100;
}
.footer-nav::before {
  content: '';
  position: absolute;
  top: -35px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: var(--background-content);
  left: calc(var(--active-index, 0) * 20% + 10%);
  transform: translateX(-50%);
  transition: left 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.nav-item {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: var(--color-grey-mid-2);
  transition: color 0.3s ease, transform 0.3s ease;
}
.nav-item .bi {
  font-size: 24px;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.nav-item .nav-label {
  font-size: 11px;
  font-weight: 500;
  margin-top: 4px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.nav-item.active { color: var(--color-blue-primary); }
.nav-item.active .bi { transform: translateY(-28px); }
.nav-item.active .nav-label {
  opacity: 1;
  transform: translateY(-10px);
}

/* Market Tab Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(85px, 1fr)); gap: 8px; }
.grid-item { text-align: center; color: var(--color-blue-dark-1); max-width: 120px; }
.grid-item .text { text-align: center; color: var(--color-blue-dark-2); font-size: 12px; }
.grid-item .text:hover { text-align: center; color: var(--color-teal-primary); font-weight: 600; font-size: 12px; }
.grid-item div { font-size: 12px; font-weight: 500; word-break: break-word; }
.card-section { background: var(--color-white); border-radius: 10px; margin: 0 .1rem .3rem; padding: .5rem; }
.card-section .header { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin-bottom: 8px; }
.card-section .header .see-all { color: var(--color-teal-primary); font-size: 13px; font-weight: bold; cursor: pointer; }
.card-section .header .see-all:hover { color: var(--color-teal-dark-1); font-size: 14px; font-weight: bolder; cursor: pointer; }

/* Home Tab Icon Grid */
.icon-grid { --bs-gutter-y: 1.5rem; --bs-gutter-x: 1rem; }
.icon-item { text-align: center; cursor: pointer; font-weight: 600; }
.icon-box {
    background-color: var(--color-grey-light-1);
    border-radius: 0.75rem;
    padding: .5rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1 / 0.8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid var(--border-color);
    color: var(--color-grey-dark-2);
    font-weight: 500;
    font-size: 0.875rem;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
}
.icon-box:hover {
  background-color: var(--color-teal-light-1);
  box-shadow: 0 4px 12px rgba(122, 140, 120, 0.22);
}
.icon-box i { font-size: 2.5rem; color: var(--color-grey-dark-2); }
.icon-box i:hover { color: var(--primary-color); transition: color 0.2s ease-in-out; }
.icon-label { font-size: 0.875rem; color: var(--color-grey-mid-2); font-weight: 500; }
.icon-item.active .icon-label { color: var(--primary-color); }
.icon-item.active .icon-box i { color: var(--primary-color); }
#blog-content { background-color: var(--color-white); padding: .5rem; }

/* Stories Tab */
.stories{ width: 100%; height: 90px; font-weight: bold; border-bottom: 1px solid var(--color-grey-dark-2); position: relative; margin-top: .5rem; margin-bottom: .5rem; background-color: #C8BFB7cb; overflow-y: hidden; overflow-x: auto; }
._story{ width: 100%; height: 100%; font-weight: bold; display: flex; align-items: center; padding: 0 5px; }
.s-card{ width: 70px; height: 95%; font-weight: bold; border: .05rem solid var(--color-grey-dark-2); border-radius: 100%; overflow: hidden; position: relative; min-width: 100px; margin-right: 3px; margin-left: 3px; cursor: pointer; }
.s-card0{ width: 50px; height: 45%; font-weight: bold; border: 1px solid var(--color-grey-dark-2); border-radius: 15px; overflow: hidden; position: relative; min-width: 50px; margin-right: 3px; margin-left: 3px; cursor: pointer; }
.s-card0:hover{ transform: scale(1.05); transition: transform 0.2s; background-color: var(--color-teal-light-1); }
.s-card img{ width: 100%; height: 100%; background-color: var(--color-blue-light-1); color: var(--color-white); border: 1px solid transparent; border-radius: 100%; }
.s-card img:hover{ transform: scale(1.05); transition: transform 0.2s; }
.s-name{ width: 100%; height: 40%; font-weight: bold; z-index: 2; position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; color: var(--color-white); background-image: linear-gradient(to top,var(--color-black) 5%,transparent); }
.s-name>span{ margin-left: 5px; font-family: sans-serif, Georgia; font-size: .6rem; }
._myStory::before { content: '+'; position: absolute; width: 30px; height: 30px; margin: auto; background-color: var(--color-white); border: solid 2px var(--color-grey-dark-2); border-radius: 50%; color: var(--color-grey-dark-2); display: flex; justify-content: center; align-items: center; font-size: 30px; font-weight: bold; left: .55rem; top: 15px; }
.sticky-card { position: sticky; left: 0; z-index: 4; background: var(--color-white); }

/* Tab2 scoped styles */
#tab2 { background-color: #ecd9bd; }
[data-theme="dark"] #tab2 { background: linear-gradient(160deg, #12302b 0%, #163832 100%); }
#tab2 a { text-decoration: none; }
#tab2 .free-badge {
    background-color: #87e0a4;
    color: #0a200b;
    font-size: 8px;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 9999px;
    text-transform: uppercase;
}
#tab2 .icon-item-explore {
    background-color: #f7ebd7;
    border: 1px solid #cbaa88;
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: left;
    font-weight: normal;
    cursor: pointer;
    width: 100%;
}
[data-theme="dark"] #tab2 .icon-item-explore {
  background: linear-gradient(145deg, rgba(25, 63, 58, 0.9) 0%, rgba(18, 48, 43, 0.95) 100%);
  border: 1px solid rgba(47, 102, 91, 0.45);
  color: #f1e0c5;
  box-shadow: 0 2px 8px rgba(18, 48, 43, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
#tab2 .icon-item-explore:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
#tab2 .icon-item-explore span { color: #2f1d13; font-size: 0.875rem; font-weight: 600; }
[data-theme="dark"] #tab2 .icon-item-explore span { color: #f1e0c5; }
#tab2 .view-more-btn {
    background-color: #ecd9bd;
    border: 1px solid #cbaa88;
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2f1d13;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
    width: 100%;
}
#tab2 .view-more-btn:hover { background-color: #cbaa88; }

/* Contact Form */
.contact-container { background-color: var(--color-white); padding: 1rem; border-radius: 12px; }
.contact-header { font-weight: 600; margin-bottom: 0.5rem; }
.contact-subheader { color: var(--color-grey-mid-2); margin-bottom: 2rem; }
.quick-contact-box { background-color: var(--color-grey-light-2); border: 1px solid var(--border-color); border-radius: 12px; padding: 1.5rem; height: 100%; }
.quick-contact-box h5 { font-weight: 600; }
.quick-contact-box p { font-size: 0.9rem; color: var(--color-grey-mid-2); }
.btn-submit-email { background-color: var(--primary-color); color: var(--color-white); font-weight: 600; padding: 0.75rem; border-radius: 8px; transition: background-color 0.2s; }
.btn-submit-email:hover { background-color: var(--primary-color-dark); color: var(--color-white); }
.btn-whatsapp { background-color: #25d366; color: var(--color-white); font-weight: 600; padding: 0.75rem; border-radius: 8px; }
.btn-whatsapp:hover { background-color: #1dae54; color: var(--color-white); }
.btn-call { background-color: var(--primary-color); color: var(--color-white); font-weight: 600; padding: 0.75rem; border-radius: 8px; }
.btn-call:hover { background-color: var(--primary-color-dark); color: var(--color-white); }

/* Footer social */
.icons-social{ padding:1px; }
.list-social{ text-align: justify; padding:0; }
.icons-social__item{ display:inline-block; transition:all 0.3s; }
.icons-social__item:hover { transform:rotate(10deg); }
.icons-social__link{ font-size:23px; color:var(--color-grey-dark-1); padding:10px; }
.icons-social__link:hover{ color:var(--color-teal-primary); }
.footin{
  display: inline-block;
  position: relative;
  width: auto;
  height: auto;
  padding: 2px 5px;
  bottom: 0;
  color:var(--color-grey-dark-1);
  text-align:center;
  background:var(--color-grey-light-2);
  margin: .5rem 0 0 0;
}
.bbgpc {
  background: var(--color-white);
  color: var(--color-black);
  margin-top: .02rem;
  margin-bottom: .03rem;
  border-radius: 15px;
  box-shadow: 7px 8px 7px 0px rgba(0, 0, 0, 0.1);
}
.quote0 {
  color: var(--color-black);
  font-weight: lighter;
  padding: .5rem;
  padding-left: 20px;
  background-image: url(../img/quote0.png);
  background-size: 100%;
  background-position: bottom 100%;
  border-bottom: 0.7px solid var(--color-black);
  border-left: 8px solid var(--primary-color);
  border-radius: 10px;
  background-color: #d9c0a0;
  background-blend-mode: multiply;
}
.contact {
  background: rgba(140, 123, 110, 0.45);
  color: var(--color-white);
  margin: .5rem;
  padding: 10px auto;
  border-left: 2.3px solid #2f1d13;
}
.whitenho { background: var(--color-white); color: var(--color-black); padding: 10px 5px; margin: 1px; border-bottom: 2.8px solid var(--border-color); border-top: .2rem solid var(--color-blue-light-1); }

/* ============================= */
/* === STYLES MERGED FROM styles2.css === */
/* ============================= */

.tab-content.view {
    opacity: 0;
    transform: translateY(20px);
}
.tab-content.view.active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-4);
}
.view-title {
  font-size: 2rem;
  color: var(--text-primary-new);
}
.header-actions {
    display: flex;
    gap: var(--spacing-3);
}

.search-container-view {
    position: relative;
    display: flex;
    align-items: center;
}
.search-container-view i {
    position: absolute;
    left: var(--spacing-3);
    color: var(--text-secondary-new);
}
.search-container-view input {
    padding: var(--spacing-2) var(--spacing-2) var(--spacing-2) 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color-new);
    background-color: var(--bg-surface-new);
    width: 250px;
    transition: all var(--transition-smooth);
}
.search-container-view input:focus {
    outline: none;
    border-color: var(--color-primary-new);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
    width: 300px;
}

.btn {
  padding: var(--spacing-2) var(--spacing-3);
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2);
}
.btn-primary {
  background-color: var(--color-primary-new);
  color: var(--text-on-primary-new);
}
.btn-primary:hover {
  background-color: var(--color-primary-dark-new);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.btn-secondary {
    background-color: var(--bg-hover-new);
    color: var(--text-primary-new);
    border: 1px solid var(--border-color-new);
}
.btn-secondary:hover { background-color: var(--border-color-new); }

.card {
  background-color: var(--bg-surface);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-4);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-header {
    margin: calc(-1 * var(--spacing-4)) calc(-1 * var(--spacing-4)) var(--spacing-3);
    padding: var(--spacing-3) var(--spacing-4);
    border-bottom: 1px solid var(--border-color);
}
.card-content {
   padding-top: var(--spacing-2);
}
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-4);
}
.full-width { grid-column: 1 / -1; }

.stat-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-3);
}
.stat-card .card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background-color: var(--icon-bg, var(--bg-hover-new));
}
.stat-card .card-icon i {
    font-size: 1.75rem;
    color: var(--icon-color, var(--text-primary-new));
}
.stat-icon-courses { --icon-bg: #eef3e4; --icon-color: #3d7a67; }
.stat-icon-providers { --icon-bg: #e9f0dc; --icon-color: #2e7d32; }
.stat-icon-gigs { --icon-bg: #fff3e0; --icon-color: #f57c00; }

.quick-actions {
    display: flex;
    justify-content: space-around;
    gap: var(--spacing-3);
}
.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-2);
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-secondary-new);
    padding: var(--spacing-2);
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.action-item:hover {
    background-color: var(--bg-hover-new);
    color: var(--color-primary-new);
}
.action-item i { font-size: 2rem; }

.list-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: var(--spacing-3);
    list-style: none;
    padding: 0;
}
.list-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: var(--spacing-3);
    padding: var(--spacing-3);
    background-color: var(--bg-surface-new);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.list-item > .btn {
    margin-top: auto;
    align-self: flex-end;
}
.list-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.list-item .item-icon {
    font-size: 1.5rem;
    color: var(--color-primary-new);
}
.list-item .item-content { flex-grow: 1; }
.list-item h4 { margin-bottom: var(--spacing-1); }

.tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 99px;
}
.tag.orange { background-color: #fff3e0; color: #f57c00; }
.tag.green { background-color: #e9f0dc; color: #2e7d32; }
.tag.gray { background-color: #e9ecef; color: #5a6475; }

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: grid;
    place-items: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
}
.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background-color: var(--bg-surface-new);
    padding: var(--spacing-5);
    border-radius: var(--border-radius-md);
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: scale(0.9);
    transition: transform var(--transition-smooth);
}
.modal-overlay.visible .modal-content { transform: scale(1); }
.modal-close {
    position: absolute;
    top: var(--spacing-3);
    right: var(--spacing-3);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary-new);
}
#modalTitle { margin-bottom: var(--spacing-3); }

/* ============================= */
/* === SERVICE FINDER =========== */
/* ============================= */
.service-card-wrapper {
  display: flex;
  height: 100%;
}
.service-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md) !important;
}
.service-card .card-img-top {
  height: 120px;
  object-fit: cover;
}
.service-card .card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1rem;
}
.service-card .card-text {
  flex-grow: 1;
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.service-card .card-footer {
  background-color: transparent;
  border-top: 1px solid var(--border-color);
  padding: 0.75rem 0 0 0;
  margin-top: auto;
}
.service-card .text-secondary.hover-primary:hover { color: var(--color-blue-primary) !important; }
.service-card mark { background-color: var(--highlight-strong); padding: 0 2px; border-radius: 3px; color: inherit; }
.card-title-diagonal {
  position: absolute;
  left: -45px;
  top: 25px;
  width: 170px;
  transform: rotate(-45deg);
  background-color: rgba(0, 0, 0, 0.7);
  color: var(--color-white);
  padding: 5px 10px;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 2;
}
.disclaimer-text { font-size: 0.8rem; }
.disclaimer-text p { margin-bottom: 0.75rem; color: var(--text-secondary); }
.disclaimer-text strong { color: var(--text-primary); }
.disclaimer-text .text-teal-dark-1 { color: var(--color-teal-dark-1); }
#explore-content .text-primary { color: var(--color-blue-dark-1) !important; }

/* Tab 3 sticky search */
.tab3-search-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: var(--bg-surface, #fff);
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  border-radius: 8px 8px 0 0;
  margin-bottom: 0.75rem;
}
.tab3-search-bar .search-container-view { width: 100%; }
.tab3-search-bar .search-container-view input { width: 100%; }
@media (min-width: 768px) {
  .tab3-search-bar .search-container-view input { width: 300px; }
  .tab3-search-bar .search-container-view input:focus { width: 380px; }
}

/* Explore sticky search */
.explore-search-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: var(--bg-surface, #fff);
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  border-radius: 8px 8px 0 0;
  margin-bottom: 0;
}
.explore-search-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}
.explore-search-inner .position-relative { flex-grow: 1; }
.explore-search-inner input { width: 100%; }

/* Prevent mobile auto-zoom */
@media (max-width: 767px) {
  input, textarea, select, .form-control, .view-search, #searchInput {
    font-size: 16px !important;
  }
}

/* ====== LIGHTBOX ======= */
.lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.lightbox-content-wrapper {
    max-width: 95%;
    max-height: 90%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lightbox-img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 15px;
    object-fit: contain;
}

.lightbox-caption { color: white; margin-top: 15px; font-size: 1.1rem; }
.lightbox-actions { margin-top: 25px; display: flex; gap: 15px; }
.btn-capsule {
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}
.btn-enter-capsule {
   background: #7e5542;
   color: white;
}
.btn-close-capsule { background: rgba(255, 255, 255, 0.15); color: white; border: 1px solid rgba(255, 255, 255, 0.3); }
#tab1 .grid-item img { cursor: pointer; transition: 0.3s; }
#tab1 .grid-item img:hover { transform: scale(1.05); }

/* ============================================== */
/* === Custom Tailwind-Replacement Utilities ==== */
/* ============================================== */
/* Veloretti warm-neutral gradient utilities */
.custom-sidebar-gradient {
  background-image: linear-gradient(
    160deg,
    #3b2418 0%,
    #2f1d13 55%,
    #1f130c 100%
  );
}
.custom-header-gradient {
  background-image: linear-gradient(
    135deg,
    #4a2f21 0%,
    #3b2418 45%,
    #2f1d13 100%
  );
}
.custom-slate-gradient {
  background-image: linear-gradient(
    135deg,
    #cbaa88 0%,
    #8a6f5c 60%,
    #6b5040 100%
  );
}
.custom-z-40 { z-index: 40; }
.top-0 { top: 0; }
.custom-max-w-4xl { max-width: 56rem; }
.custom-text-sm { font-size: .875rem; }
.custom-tracking-widest { letter-spacing: .1em; }
.custom-text-gray-500 { color: #6b7280; }
.custom-mt-12 { margin-top: 3rem; }

/* ============================================== */
/* === RESPONSIVE ADJUSTMENTS ================ */
/* ============================================== */
@media (max-width: 767px) {
  html { font-size: 75%; font-weight: normal; }
  .sidebar-right { display: none; }
  .mobile-widgets { display: block; }
  .mobile-widgets a:hover { background-color: #ecd9bd; color: var(--color-black); font-weight: bold; border-left: .31rem solid var(--active-border); }
  .sidebar-left { flex: 0 0 18%; }
  .sidebar-tabs .tab-button { padding: 0.8rem 0.5rem; font-size: 11px; text-align: center; font-weight: 500; }
  .card-body { display: flex; flex-direction: column; gap: 8px; margin: 0.01rem; }
  .stories{ width: 100%; height: 90px; margin-top: .01rem; margin-bottom: .2rem; margin-left: 0; }
  ._story{ padding: 0 2px; margin: 0; }
  .s-card{ width: 80px; height: max-content; min-width: 80px; padding: 0%; }
  .s-card0{ width: 40px; height: 55%; min-width: 40px; }
  .s-card img{ width: 100%; height: auto; }
  .s-name{ width: 100%; height: 40%; }
  .s-name>span{ margin-left: 2px; margin-right: 2px; font-size: .5rem; color: var(--color-white); }
  ._myStory::before { content: '+'; width: 25px; height: 25px; font-size: 20px; left: .4rem; top: 9px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
  .grid-item img { width: 100%; height: auto; border-radius: 8px; }
  .grid-item div { font-size: 10px; font-weight: 500; word-break: break-word; }
  .icon-grid { --bs-gutter-y: 1rem; --bs-gutter-x: 0.5rem; }
  .icon-box { padding: .5rem; margin-bottom: 0.5rem; aspect-ratio: 1 / 0.8; }
  .icon-item { max-width: 100px; }
  #searchInput.active { width: 8rem; }
  .view-header { flex-direction: column; align-items: flex-start; gap: var(--spacing-3); }
  .view-title { font-size: 1.75rem; }
  .content-main { padding-bottom: 100px; }
  .sidebar-tabs { padding-bottom: 35px; }
  #tab2 { padding: 0.75rem; }
  #tab2 .row { --bs-gutter-x: 0.5rem; --bs-gutter-y: 0.5rem; }
  #tab2 .icon-item-explore { padding: 0.5rem 0.75rem; }
  .back-to-top { bottom: 70px; }
  .toast-notification { bottom: 72px; }
  .breadcrumb-trail { display: none; }
}

@media (min-width: 768px) {
  .app-container { padding-left: 80px; }
  .mobile-widgets { display: none !important; }

  .footer-nav {
      position: fixed;
      left: 0;
      top: 0;
      bottom: 0;
      width: 80px;
      height: 100vh;
      flex-direction: column;
      box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
      border-right: 1px solid var(--border-color);
      z-index: 100;
  }
  .footer-nav::before {
      content: '';
      position: absolute;
      top: calc(var(--active-index, 0) * 100px + 50px);
      left: auto;
      right: -15px;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background-color: var(--background-content);
      transform: translateY(-50%);
      transition: top 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  }
  .nav-item {
      flex: 0 0 100px;
      width: 100%;
      justify-content: center;
  }
  .nav-item .nav-label {
      opacity: 0;
      transform: translateY(10px);
      transition: opacity 0.2s ease, transform 0.2s ease;
      font-size: 12px;
      color: var(--text-color);
  }
  .nav-item:hover .nav-label {
      opacity: 1;
      transform: translateY(0);
  }
  .nav-item.active .bi {
      transform: translateY(0);
      color: var(--color-blue-primary);
  }
  .nav-item.active .nav-label {
      opacity: 1;
      transform: translateY(0);
      color: var(--color-blue-primary);
      font-weight: 700;
  }

  .sidebar-left { flex: 0 0 10%; }
  .sidebar-right { display: flex; flex-direction: column; margin-left: 0; margin-right: 0; }
  .icon-grid { justify-content: justify; }
  .icon-item { max-width: 120px; }
  .icon-box { padding: 0.75rem; aspect-ratio: 1 / 1; }
  .icon-box i { font-size: 4rem; }
  .nav-item .bi { font-size: 28px; }
}

/* SUP AND SUB */
sub,sup{ position:relative; font-size:75%; line-height:0; vertical-align:baseline; }

sup{top:-.5em;}
sub{bottom:-.25em;}


/* HERO IMAGE IN FORUM SECTION */
/* ===== FORUM HERO BANNER ===== */
.forum-hero-banner {
  position: relative;
  width: 100%;
  height: 190px;
  border-radius: 10px;
  overflow: hidden;
  margin: 0 0 2px 0;
  display: flex;
  align-items: flex-end;
}

.forum-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: brightness(0.72) saturate(1.1);
  transition: transform 0.6s ease;
}

.forum-hero-banner:hover .forum-hero-img {
  transform: scale(1.04);
}

/* Gradient overlay */
.forum-hero-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 12px 16px 14px;
  background: linear-gradient(
    to top,
    rgba(0, 33, 71, 0.88) 0%,
    rgba(0, 33, 71, 0.45) 60%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Text block */
.forum-hero-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.forum-hero-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.forum-hero-title {
  font-size: clamp(1.1rem, 4vw, 1.55rem);
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.forum-hero-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  margin: 0;
  letter-spacing: 0.05em;
}

/* Pills row */
.forum-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.forum-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(140, 123, 110, 0.25);
  color: #fff;
  border: 1px solid rgba(140, 123, 110, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
  transition: background 0.2s;
}

.forum-pill:hover {
  background: rgba(140, 123, 110, 0.5);
}

/* Animated shimmer line at top */
.forum-hero-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(140, 123, 110, 0.8),
    rgba(122, 140, 120, 0.8),
    transparent
  );
  animation: shimmer-slide 3s ease-in-out infinite;
  z-index: 3;
}

@keyframes shimmer-slide {
  0%   { left: -60%; }
  100% { left: 110%; }
}

/* Dark mode adjustment */
[data-theme="dark"] .forum-hero-overlay {
  background: linear-gradient(
    to top,
    rgba(18, 48, 43, 0.95) 0%,
    rgba(25, 63, 58, 0.6) 55%,
    transparent 100%
  );
}

/* Dark mode: shimmer line uses LUNA teal palette */
[data-theme="dark"] .forum-hero-shimmer {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(224, 180, 136, 0.85),
    rgba(241, 224, 197, 0.85),
    transparent
  );
}

/* Dark mode: forum pills use LUNA tones */
[data-theme="dark"] .forum-pill {
  background: rgba(47, 102, 91, 0.35);
  border: 1px solid rgba(224, 180, 136, 0.45);
  color: #f1e0c5;
  backdrop-filter: blur(8px);
}
[data-theme="dark"] .forum-pill:hover {
  background: rgba(47, 102, 91, 0.6);
}

/* Responsive */
@media (max-width: 576px) {
  .forum-hero-banner {
    height: 160px;
    border-radius: 8px;
  }
  .forum-hero-title {
    font-size: 1.1rem;
  }
}

/* ============================================================
   LUNA DARK MODE — ADDITIONAL POLISH & INTERACTIVE STATES
   ============================================================ */

/* Active tab button */
[data-theme="dark"] .tab-button.active {
  background: linear-gradient(90deg, rgba(47, 102, 91, 0.5) 0%, rgba(25, 63, 58, 0.4) 100%);
  color: #f1e0c5;
  border-left: 0.31rem solid #e0b488;
  box-shadow: inset 3px 0 10px rgba(224, 180, 136, 0.15);
  font-weight: 700;
}

/* Nav active icon (footer nav / desktop side nav) */
[data-theme="dark"] .nav-item.active {
  color: #e0b488;
}
[data-theme="dark"] .nav-item.active .bi {
  color: #e0b488;
  filter: drop-shadow(0 0 6px rgba(224, 180, 136, 0.45));
}
[data-theme="dark"] .nav-item.active .nav-label {
  color: #f1e0c5;
  font-weight: 700;
}
[data-theme="dark"] .nav-item:hover {
  color: #f1e0c5;
}

/* Icon boxes hover in dark mode */
[data-theme="dark"] .icon-box:hover {
  background: linear-gradient(145deg, rgba(47, 102, 91, 0.5) 0%, rgba(25, 63, 58, 0.7) 100%);
  border-color: rgba(224, 180, 136, 0.5);
  box-shadow: 0 4px 16px rgba(224, 180, 136, 0.15), 0 0 0 1px rgba(224, 180, 136, 0.1) inset;
}
[data-theme="dark"] .icon-box i {
  color: #e0b488;
}
[data-theme="dark"] .icon-box i:hover {
  color: #f1e0c5;
}
[data-theme="dark"] .icon-label {
  color: #e0b488;
}

/* Grid items dark mode */
[data-theme="dark"] .grid-item {
  color: #f1e0c5;
}
[data-theme="dark"] .grid-item .text {
  color: #e0b488;
}
[data-theme="dark"] .grid-item .text:hover {
  color: #f1e0c5;
}
[data-theme="dark"] .grid-item:hover {
  box-shadow: 0 6px 20px rgba(224, 180, 136, 0.2);
}

/* Buttons in dark mode */
[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #2f665b 0%, #193f3a 100%);
  color: #f1e0c5;
  border: 1px solid rgba(224, 180, 136, 0.3);
  box-shadow: 0 2px 8px rgba(18, 48, 43, 0.4);
  transition: all 0.25s ease;
}
[data-theme="dark"] .btn-primary:hover {
  background: linear-gradient(135deg, #e0b488 0%, #2f665b 100%);
  color: #12302b;
  box-shadow: 0 4px 16px rgba(224, 180, 136, 0.3);
  transform: translateY(-2px);
}
[data-theme="dark"] .btn-secondary {
  background: rgba(25, 63, 58, 0.6);
  color: #f1e0c5;
  border: 1px solid rgba(47, 102, 91, 0.5);
}
[data-theme="dark"] .btn-secondary:hover {
  background: rgba(47, 102, 91, 0.45);
  color: #f1e0c5;
}
[data-theme="dark"] .btn-submit-email,
[data-theme="dark"] .btn-call {
  background: linear-gradient(135deg, #2f665b 0%, #193f3a 100%);
  color: #f1e0c5;
  border: 1px solid rgba(224, 180, 136, 0.3);
}
[data-theme="dark"] .btn-submit-email:hover,
[data-theme="dark"] .btn-call:hover {
  background: linear-gradient(135deg, #e0b488, #2f665b);
  color: #12302b;
}

/* Lightbox enter button */
[data-theme="dark"] .btn-enter-capsule {
  background: linear-gradient(135deg, #2f665b, #e0b488);
  color: #12302b;
  box-shadow: 0 4px 16px rgba(224, 180, 136, 0.3);
}

/* Progress / stat icons get LUNA tints */
[data-theme="dark"] .stat-icon-courses { --icon-bg: rgba(47, 102, 91, 0.25); --icon-color: #e0b488; }
[data-theme="dark"] .stat-icon-providers { --icon-bg: rgba(25, 63, 58, 0.35); --icon-color: #f1e0c5; }
[data-theme="dark"] .stat-icon-gigs { --icon-bg: rgba(47, 102, 91, 0.2); --icon-color: #e0b488; }

/* Card see-all links */
[data-theme="dark"] .card-section .header .see-all {
  color: #e0b488;
}
[data-theme="dark"] .card-section .header .see-all:hover {
  color: #f1e0c5;
}

/* Stories strip */
[data-theme="dark"] .stories {
  background-color: rgba(25, 63, 58, 0.5);
  border-bottom: 1px solid rgba(47, 102, 91, 0.4);
}

/* Social icon links */
[data-theme="dark"] .icons-social__link {
  color: #e0b488;
}
[data-theme="dark"] .icons-social__link:hover {
  color: #f1e0c5;
}

/* Search icon in header */
[data-theme="dark"] #searchIcon {
  color: #f1e0c5;
}
[data-theme="dark"] #searchIcon:hover {
  color: #e0b488;
}
[data-theme="dark"] #searchInput.active {
  background-color: rgba(25, 63, 58, 0.85);
  color: #f1e0c5;
  border-radius: 15px;
  border: 1px solid rgba(224, 180, 136, 0.4);
}

/* Mark / highlight */
[data-theme="dark"] mark.highlight {
  background-color: rgba(47, 102, 91, 0.4);
  color: #f1e0c5;
}

/* Icon dividers */
[data-theme="dark"] .icon-divider {
  color: #e0b488;
}
[data-theme="dark"] .icon-divider::before,
[data-theme="dark"] .icon-divider::after {
  background: rgba(47, 102, 91, 0.45);
}
[data-theme="dark"] .icon-divider span {
  color: #e0b488;
}

/* Modal close button */
[data-theme="dark"] .modal-close {
  color: #e0b488;
}
[data-theme="dark"] .modal-close:hover {
  color: #f1e0c5;
}

/* Tab3 / explore sticky search bar */
[data-theme="dark"] .tab3-search-bar,
[data-theme="dark"] .explore-search-bar {
  background: linear-gradient(135deg, #193f3a 0%, #12302b 100%);
  border-bottom: 1px solid rgba(47, 102, 91, 0.4);
}

/* quote block */
[data-theme="dark"] .quote0 {
  background-color: rgba(25, 63, 58, 0.7);
  border-left: 8px solid #2f665b;
  border-bottom: 0.7px solid rgba(47, 102, 91, 0.5);
  color: #f1e0c5;
}

/* contact strip */
[data-theme="dark"] .contact {
  background: rgba(47, 102, 91, 0.25);
  border-left: 2.3px solid rgba(224, 180, 136, 0.6);
  color: #f1e0c5;
}

/* sidebar header/footer bar */
[data-theme="dark"] .sidebar-left .sidebar-header,
[data-theme="dark"] .sidebar-left .sidebar-footer {
  background: linear-gradient(135deg, #12302b 0%, #193f3a 100%);
  color: #f1e0c5;
  border-bottom: 1px solid rgba(47, 102, 91, 0.4);
}

/* Tab2 view-more button */
[data-theme="dark"] #tab2 .view-more-btn {
  background: rgba(25, 63, 58, 0.6);
  border: 1px solid rgba(47, 102, 91, 0.45);
  color: #f1e0c5;
}
[data-theme="dark"] #tab2 .view-more-btn:hover {
  background: rgba(47, 102, 91, 0.5);
  color: #f1e0c5;
}

/* Live dot stays green — it's semantic */
[data-theme="dark"] .live-dot {
  background-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25), 0 0 8px rgba(34, 197, 94, 0.2);
}

/* Custom gradient utilities — LUNA replacements */
[data-theme="dark"] .custom-sidebar-gradient {
  background-image: linear-gradient(160deg, #12302b 0%, #193f3a 55%, #1f4d44 100%);
}
[data-theme="dark"] .custom-header-gradient {
  background-image: linear-gradient(135deg, #12302b 0%, #193f3a 55%, #2f665b 100%);
}
[data-theme="dark"] .custom-slate-gradient {
  background-image: linear-gradient(135deg, #e0b488 0%, #2f665b 60%, #193f3a 100%);
}

/* Mobile widgets dark mode */
[data-theme="dark"] .mobile-widgets a:hover {
  background-color: rgba(47, 102, 91, 0.3);
  color: #f1e0c5;
  border-left: 0.31rem solid #e0b488;
}

/* ============================================== */
/* === MARKETPLACE: PRODUCT MODAL & A11Y ======== */
/* ============================================== */
:focus-visible { outline: 2px solid var(--color-primary-new, #7c4dff); outline-offset: 2px; }
.list-item[data-product-id] { cursor: pointer; }
.list-item[data-product-id]:active { transform: scale(0.99); }
.list-item .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
html.pm-lock, html.pm-lock body { overflow: hidden; }

.pm-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100dvh;
  display: flex; align-items: center; justify-content: center; padding: 12px;
  background: rgba(0,0,0,0.5); z-index: 300;
  opacity: 0; visibility: hidden; overscroll-behavior: contain;
  transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
}
.pm-overlay.visible { opacity: 1; visibility: visible; }
.pm-dialog {
  position: relative; display: flex; flex-direction: column;
  width: 100%; max-width: 460px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
  background: var(--bg-surface-new); color: inherit;
  border-radius: var(--border-radius-md); outline: none;
  transform: scale(0.96); transition: transform var(--transition-smooth);
}
.pm-overlay.visible .pm-dialog { transform: scale(1); }
.pm-close {
  position: absolute; top: 6px; right: 6px; z-index: 2; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: rgba(0,0,0,0.45); color: #fff; font-size: 1.1rem; cursor: pointer;
}
.pm-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--spacing-3); -webkit-overflow-scrolling: touch; }
.pm-image {
  display: block; width: 100%; max-height: 190px; object-fit: contain;
  background: rgba(127,127,127,0.12); border-radius: 8px; margin-bottom: 0.75rem;
}
.pm-scroll h2 { font-size: 1.25rem; margin: 0 0 0.25rem; padding-right: 36px; }
.pm-price { font-weight: 700; font-size: 1.1rem; margin: 0 0 0.5rem; color: var(--color-primary-new); }
.pm-price.pm-price-tbc { font-weight: 500; font-size: 0.9rem; color: var(--text-secondary-new); }
.pm-desc { margin: 0 0 0.35rem; }
#pmTags { font-size: 0.8rem; color: var(--text-secondary-new); margin-bottom: 0.75rem; }
.pm-field, .pm-row { margin-bottom: 0.75rem; }
.pm-scroll label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }
.pm-scroll label span { font-weight: 400; color: var(--text-secondary-new); }
.pm-input, #pmMessage {
  width: 100%; min-height: 44px; padding: 0.5rem 0.75rem; font-size: 1rem; /* 16px stops iOS zoom */
  color: inherit; background: transparent; border: 1px solid rgba(127,127,127,0.55); border-radius: 8px;
}
.pm-qty { display: inline-flex; align-items: center; gap: 0.5rem; }
.pm-qty button {
  width: 44px; height: 44px; font-size: 1.25rem; line-height: 1; cursor: pointer;
  color: inherit; background: transparent; border: 1px solid rgba(127,127,127,0.55); border-radius: 8px;
}
.pm-qty input { width: 64px; min-height: 44px; text-align: center; font-size: 1rem; color: inherit; background: transparent; border: 1px solid rgba(127,127,127,0.55); border-radius: 8px; }
.pm-error { color: #c62828; font-size: 0.9rem; margin-bottom: 0.5rem; }
[data-theme="dark"] .pm-error { color: #ff8a80; }
.pm-actions { flex: 0 0 auto; padding: 0.75rem var(--spacing-3) calc(0.75rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(127,127,127,0.25); }
.pm-actions .btn { width: 100%; min-height: 48px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---- Marketplace: product cards, header buttons, account & cart ---- */
.list-item .product-thumb { display: block; width: 100%; height: 120px; object-fit: cover; border-radius: 8px; }
.list-item .product-price { font-weight: 700; color: var(--color-primary-new); }
.list-item .product-price.is-tbc { font-weight: 500; font-size: 0.85rem; color: var(--text-secondary-new); }
.hdr-btn { position: relative; }
.hdr-btn::after { content: ''; position: absolute; inset: -5px; }            /* 44px touch target */
.hdr-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: #d32f2f; color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center;
}
.pm-dialog h2 { font-size: 1.25rem; margin: 0 0 0.5rem; padding-right: 40px; }
.pm-note { font-size: 0.88rem; color: var(--text-secondary-new); margin: 0 0 0.75rem; }
.pm-hint { font-size: 0.78rem; color: var(--text-secondary-new); margin-top: 0.2rem; }
.pm-field-error { margin: 0.2rem 0 0; font-size: 0.82rem; }
.pm-input[aria-invalid="true"] { border-color: #c62828; }
.pm-input[readonly] { opacity: 0.7; }
.pm-tabs { display: flex; gap: 0.25rem; margin-bottom: 0.9rem; border-bottom: 1px solid rgba(127,127,127,0.3); }
.pm-tabs button { flex: 1; min-height: 44px; background: none; border: 0; border-bottom: 3px solid transparent; color: inherit; font-weight: 600; cursor: pointer; opacity: 0.7; }
.pm-tabs button.active { border-bottom-color: var(--color-primary-new); opacity: 1; }
.pm-submit { width: 100%; min-height: 48px; margin-top: 0.4rem; }
.pm-signin { width: 100%; min-height: 44px; margin-top: 0.25rem; }
.pm-actions .btn + .btn { margin-top: 0.5rem; }
.pm-btn-row { display: flex; gap: 0.5rem; }
.pm-btn-row .btn { flex: 1; }
.pm-empty { text-align: center; padding: 1.25rem 0; }
.pm-empty i { font-size: 2.2rem; opacity: 0.6; }
.pm-banner { padding: 0.75rem; margin-bottom: 0.75rem; border-radius: 8px; background: rgba(46,125,50,0.14); font-size: 0.9rem; }
.pm-banner-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }
.cart-list { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.cart-item { display: flex; gap: 0.65rem; padding: 0.6rem 0; border-bottom: 1px solid rgba(127,127,127,0.25); }
.cart-item img { width: 72px; height: 41px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.cart-info { flex: 1; min-width: 0; }
.cart-name { font-weight: 600; overflow-wrap: anywhere; }
.cart-var, .cart-price { font-size: 0.82rem; color: var(--text-secondary-new); }
.cart-qty { margin-top: 0.35rem; }
.cart-qty button { width: 40px; height: 40px; font-size: 1.1rem; }
.cart-qty .cart-q { min-width: 28px; text-align: center; font-weight: 600; }
.cart-qty .cart-remove { margin-left: auto; border-color: transparent; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.05rem; margin-bottom: 0.4rem; }
.cart-qty{display:flex;}
/* keep toasts clear of modal buttons while a modal is open */
html.pm-lock .toast-notification { bottom: auto; top: 14px; right: 50%; transform: translate(50%, -12px); }
html.pm-lock .toast-notification.show { transform: translate(50%, 0); }
html.pm-lock .back-to-top { display: none !important; }

/* ---- Marketplace content: sale prices, clickable cards ---- */
.product-price .was, .pm-price .was { font-weight: 400; font-size: 0.85em; color: var(--text-secondary-new); }
.product-price .save, .pm-price .save { font-size: 0.75em; font-weight: 700; color: #2e7d32; }
.list-item[data-open-product], .grid-item[data-filter], .icon-item[data-filter], .s-card[data-filter] { cursor: pointer; }
.accordion-button { font-weight: 600; }
.accordion-button:not(.collapsed) { color: inherit; }

/* ===================================================================
   THEME: MIDNIGHT COBALT & PARCHMENT  (palette remapped from the T-WEB reference; see midnight.css)
   Dark is the default; [data-theme="light"] is a soft sage variant.
   =================================================================== */
:root, [data-theme="dark"] {
  --g-bg1:#13253f; --g-bg2:#0F1E33; --g-bg3:#0a1626;
  --g-surface:rgba(255,255,255,.075); --g-surface-2:rgba(255,255,255,.12); --g-solid:#18314f; --g-solid-2:#1d3a5a;
  --g-border:rgba(255,255,255,.15); --g-text:#F4F0E8; --g-text-2:#B9C4D4; --g-heading:#FBF8F2;
  --g-accent:#D2B27A; --g-accent-2:#B8945B; --g-on-accent:#0F1E33; --g-price:#E3C991; --g-good:#8fe0a0; --g-bad:#ff9d8f;
  --g-shadow:0 14px 30px -14px rgba(0,0,0,.65); --g-blur:blur(16px) saturate(120%);
  --g-header:rgba(15,30,51,.80); --g-nav:rgba(15,30,51,.88); --g-input:rgba(255,255,255,.09);
  --g-leaf-op:.07;
  /* legacy variables used by the older rules */
  --dm-bg:#0F1E33; --dm-surface:#18314f; --dm-sidebar-bg:#0e2138; --dm-header-bg:var(--g-header); --dm-text:#F4F0E8; --dm-border:rgba(255,255,255,.15);
  --dm-card-bg:rgba(255,255,255,.075); --dm-input-bg:rgba(255,255,255,.09); --dm-tab-btn-bg:rgba(255,255,255,.08); --dm-tab-btn-color:#E6E0D4;
  --dm-sidebar-tabs-bg:transparent; --dm-footer-nav-bg:rgba(15,30,51,.88); --dm-progress-color:linear-gradient(90deg,#B8945B,#E3C991);
  --dm-toast-bg:#1d3a5a; --dm-toast-color:#F4F0E8; --dm-breadcrumb-color:rgba(244,240,232,.85);
  --background-main:#0F1E33; --background-content:#10233b; --background-sidebar:#0e2138; --background-color:#0F1E33;
  --text-color:#F4F0E8; --border-color:rgba(255,255,255,.15); --bg-surface:#18314f; --bg-surface-new:#18314f;
  --text-primary:#FBF8F2; --text-primary-new:#FBF8F2; --text-secondary:#B9C4D4; --text-secondary-new:#B9C4D4;
  --bg-hover:rgba(255,255,255,.1); --bg-hover-new:rgba(255,255,255,.1); --border-color-new:rgba(255,255,255,.15);
  --color-white:#18314f; --color-grey-light-1:#18314f; --color-grey-light-2:#10233b; --color-grey-dark-1:#F4F0E8; --color-grey-dark-2:#B9C4D4; --color-grey-mid-1:rgba(255,255,255,.15); --color-grey-mid-2:#B9C4D4;
  --color-blue-primary:#D2B27A; --color-blue-dark-1:#EBD9B3; --color-blue-light-1:rgba(210,178,122,.16); --color-teal-primary:#D2B27A; --color-teal-light-1:rgba(210,178,122,.16); --color-teal-dark-1:#EBD9B3;
  --primary-color:#2E4A67; --primary-color-dark:#18314f; --text-on-primary-bg:#F4F0E8; --active-border:#D2B27A; --secondary-color:rgba(210,178,122,.2);
  --color-primary-new:#D2B27A; --color-primary-dark-new:#EBD9B3;
  --highlight-strong:rgba(210,178,122,.25); --border-radius-md:20px; --border-radius-sm:14px;
  --shadow-sm:0 8px 20px -10px rgba(0,0,0,.6); --shadow-md:0 16px 34px -14px rgba(0,0,0,.65);
  --leaf: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='900' height='900' viewBox='0 0 900 900'><g fill='%23D2B27A' fill-opacity='.07'><path d='M640 40C820 120 880 330 800 520C700 440 600 260 640 40Z'/><path d='M60 600C250 560 430 640 500 860C300 880 120 800 60 600Z'/></g><g stroke='%23D2B27A' stroke-opacity='.08' stroke-width='3' fill='none'><path d='M650 60C700 200 760 350 795 510'/><path d='M70 620C220 650 390 740 490 850'/></g></svg>");
}
[data-theme="light"] {
  --g-bg1:#F4F0E8; --g-bg2:#E9E2D5; --g-bg3:#D8CEBE;
  --g-surface:rgba(255,255,255,.66); --g-surface-2:rgba(255,255,255,.85); --g-solid:#F4F0E8; --g-solid-2:#EDE6DA;
  --g-border:rgba(15,30,51,.16); --g-text:#0F1E33; --g-text-2:#4A5C73; --g-heading:#0F1E33;
  --g-accent:#2E4A67; --g-accent-2:#3F5F82; --g-on-accent:#0F1E33; --g-price:#2E4A67; --g-good:#1e7a43; --g-bad:#b3402f;
  --g-shadow:0 12px 26px -14px rgba(15,30,51,.45);
  --g-header:rgba(15,30,51,.92); --g-nav:rgba(244,240,232,.92); --g-input:rgba(255,255,255,.85); --g-leaf-op:.12;
  --dm-bg:#E9E2D5; --dm-surface:#F4F0E8; --dm-sidebar-bg:#E6DDCE; --dm-header-bg:var(--g-header); --dm-text:#0F1E33; --dm-border:rgba(15,30,51,.16);
  --dm-card-bg:rgba(255,255,255,.66); --dm-input-bg:rgba(255,255,255,.85); --dm-tab-btn-bg:rgba(255,255,255,.7); --dm-tab-btn-color:#0F1E33;
  --dm-sidebar-tabs-bg:transparent; --dm-footer-nav-bg:rgba(244,240,232,.92); --dm-progress-color:linear-gradient(90deg,#3F5F82,#2E4A67);
  --dm-toast-bg:#0F1E33; --dm-toast-color:#F4F0E8; --dm-breadcrumb-color:rgba(244,240,232,.9);
  --background-main:#E9E2D5; --background-content:#E9E2D5; --background-sidebar:#E6DDCE; --background-color:#E9E2D5;
  --text-color:#0F1E33; --border-color:rgba(15,30,51,.16); --bg-surface:#F4F0E8; --bg-surface-new:#F4F0E8;
  --text-primary:#0F1E33; --text-primary-new:#0F1E33; --text-secondary:#4A5C73; --text-secondary-new:#4A5C73;
  --bg-hover:rgba(15,30,51,.08); --bg-hover-new:rgba(15,30,51,.08); --border-color-new:rgba(15,30,51,.16);
  --color-white:#F4F0E8; --color-grey-light-1:#EDE6DA; --color-grey-light-2:#E6DDCE; --color-grey-dark-1:#0F1E33; --color-grey-dark-2:#4A5C73; --color-grey-mid-1:rgba(15,30,51,.16); --color-grey-mid-2:#4A5C73;
  --color-blue-primary:#2E4A67; --color-blue-dark-1:#0F1E33; --color-blue-light-1:rgba(46,74,103,.12); --color-teal-primary:#2E4A67; --color-teal-light-1:rgba(46,74,103,.12); --color-teal-dark-1:#0F1E33;
  --primary-color:#2E4A67; --primary-color-dark:#0F1E33; --text-on-primary-bg:#F4F0E8; --active-border:#2E4A67; --secondary-color:rgba(46,74,103,.16);
  --color-primary-new:#2E4A67; --color-primary-dark-new:#0F1E33; --highlight-strong:rgba(46,74,103,.2);
  --shadow-sm:0 8px 20px -10px rgba(15,30,51,.4); --shadow-md:0 16px 34px -14px rgba(15,30,51,.45);
}
:root { --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif; }

/* ---------- page, header, sidebar, nav ---------- */
html, body { background-color: var(--g-bg2); }
body { color: var(--g-text); }
.content-main {
  background-color: transparent;
  background-image: var(--leaf), radial-gradient(circle at 12% 6%, rgba(184,148,91,.30), transparent 42%), radial-gradient(circle at 95% 40%, rgba(46,74,103,.28), transparent 46%), linear-gradient(180deg,var(--g-bg1) 0%,var(--g-bg2) 55%,var(--g-bg3) 100%);
  background-repeat: no-repeat; background-attachment: local, scroll, scroll, scroll;
  background-position: right -160px top -60px, 0 0, 0 0, 0 0; background-size: 520px, auto, auto, auto;
  padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px));
}
.content-header { background: var(--g-header); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); border-bottom: 1px solid var(--g-border); box-shadow: 0 6px 20px -10px rgba(0,0,0,.5); }
.sidebar-left { background: rgba(15,30,51,.55); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); border-right: 1px solid var(--g-border); }
[data-theme="light"] .sidebar-left { background: rgba(244,240,232,.7); }
.sidebar-left .sidebar-header, .sidebar-left .sidebar-footer { background: linear-gradient(135deg,#2E4A67,#1d3a5a); color: #F4F0E8; font-family: var(--font-display); letter-spacing: .04em; border-bottom: 1px solid var(--g-border); }
.sidebar-tabs { background: transparent; padding: 6px 0; }
.sidebar-right { background: rgba(15,30,51,.45); border-left: 1px solid var(--g-border); }
.tab-button {
  width: calc(100% - 8px); margin: 3px 4px; padding: .8rem .5rem; border: 1px solid var(--g-border); border-radius: 16px;
  background: var(--g-surface); color: var(--g-text); box-shadow: none;
}
.tab-button:hover { background: var(--g-surface-2); color: var(--g-heading); }
.tab-button.active { background: linear-gradient(180deg,#DCC08C,#B8945B); color: var(--g-on-accent); border: 1px solid rgba(255,255,255,.35); font-weight: 800; box-shadow: 0 6px 14px -6px rgba(0,0,0,.5); }
[data-theme="light"] .tab-button { background: rgba(255,255,255,.7); color: #0F1E33; }
.tab-badge { white-space: nowrap; }

/* bottom navigation: a calm glass bar, active item sits in a pill (no circle poking out) */
.footer-nav { background: var(--g-nav); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); border-top: 1px solid var(--g-border); box-shadow: 0 -10px 24px -14px rgba(0,0,0,.6); height: calc(66px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); }
.footer-nav::before { display: none !important; }
.nav-item { color: var(--g-text-2); justify-content: center; gap: 2px; }
.nav-item .bi { font-size: 22px; padding: 4px 16px; border-radius: 16px; transition: background .2s, color .2s; }
.nav-item .nav-label { font-size: 11px; color: inherit; }
.nav-item.active { color: var(--g-heading); }
.nav-item.active .bi { transform: none !important; background: rgba(210,178,122,.28); box-shadow: inset 0 0 0 1px rgba(210,178,122,.55); color: var(--g-heading); }
.nav-item.active .nav-label { font-weight: 800; color: var(--g-heading); }
[data-theme="light"] .nav-item.active .bi { background: rgba(46,74,103,.18); box-shadow: inset 0 0 0 1px rgba(46,74,103,.45); }

/* ---------- glass surfaces ---------- */
.card, .list-item, .quick-contact-box, .contact-container, .alert, .widget, .stat-card, .action-item, .accordion-item, .table-responsive {
  background: linear-gradient(160deg, var(--g-surface-2), var(--g-surface)); color: var(--g-text);
  border: 1px solid var(--g-border); border-radius: 22px; box-shadow: var(--g-shadow);
}
.card-header, .card-footer { background: transparent; border-color: var(--g-border); color: var(--g-heading); }
.card-section hr, hr.mt-2 { border-color: var(--g-border); opacity: 1; }
.list-item .item-icon, .card h4, .card h5, .card-header h3 { color: var(--g-heading); font-family: var(--font-display); letter-spacing: .01em; }
.list-item h6, .card p, .card .card-body, .list-item p { color: var(--g-text); }
.text-secondary, .card small.text-secondary { color: var(--g-text-2) !important; }
.alert-secondary { background: linear-gradient(160deg, var(--g-surface-2), var(--g-surface)); color: var(--g-text); }
.product-price { color: var(--g-price); font-weight: 800; }
.product-price.is-tbc, .pm-price.pm-price-tbc { color: var(--g-text-2); font-weight: 600; }
.product-price .was, .pm-price .was { color: var(--g-text-2); font-weight: 500; }
.product-price .save, .pm-price .save { color: var(--g-good); }
.list-item .product-thumb { border-radius: 16px; }
.tag { border: 1px solid transparent; }
.tag.green { background: rgba(143,224,160,.18); color: #b9f0c4; border-color: rgba(143,224,160,.35); }
.tag.gray { background: rgba(255,255,255,.12); color: #E6DDCE; border-color: rgba(255,255,255,.2); }
.tag.orange { background: rgba(240,200,120,.18); color: #f7dfa6; border-color: rgba(240,200,120,.35); }
[data-theme="light"] .tag.green { background: #dcf1e0; color: #1b6a3b; } [data-theme="light"] .tag.gray { background: #EDE6DA; color: #3b5446; } [data-theme="light"] .tag.orange { background: #f8ecd0; color: #7a5410; }
.table-responsive .table { --bs-table-bg: transparent; --bs-table-color: var(--g-text); --bs-table-border-color: var(--g-border); margin: 0; color: var(--g-text); }
.accordion-item { overflow: hidden; margin-bottom: .45rem; border-radius: 18px !important; }
.accordion-button { background: transparent; color: var(--g-heading); font-weight: 700; }
.accordion-button:not(.collapsed) { background: rgba(210,178,122,.18); color: var(--g-heading); box-shadow: none; }
.accordion-button::after { filter: invert(1) brightness(1.4); } [data-theme="light"] .accordion-button::after { filter: none; }
.accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(210,178,122,.4); }
.accordion-body { color: var(--g-text); font-weight: 500; }
.view-header .view-title, .content-main .p-2 > h4, .content-main .sub-h { color: var(--g-heading); font-family: var(--font-display); }
.content-main .p-2 > h4 { font-size: 1.5rem; }
.content-main .sub-h { font-size: 1.1rem; margin: 1.2rem .25rem .55rem; padding-left: .65rem; border-left: 4px solid var(--g-accent-2); }
.form-label, #requestForm .form-label, .pm-scroll label { color: var(--g-text); }
.form-control, .form-select, .pm-input, #pmMessage, .pm-qty input, textarea.form-control {
  background: var(--g-input); color: var(--g-text); border: 1px solid var(--g-border); border-radius: 16px;
}
.form-control::placeholder, .pm-input::placeholder, #pmMessage::placeholder, textarea::placeholder, input::placeholder { color: var(--g-text-2); opacity: .9; }
.form-control:focus, .form-select:focus, .pm-input:focus, #pmMessage:focus { background: var(--g-surface-2); color: var(--g-heading); border-color: var(--g-accent); box-shadow: 0 0 0 .2rem rgba(210,178,122,.3); }
.form-select option, .pm-input option { background: #18314f; color: #F4F0E8; }
[data-theme="light"] .form-select option, [data-theme="light"] .pm-input option { background: #F4F0E8; color: #0F1E33; }
.search-container-view, .search-container { background: var(--g-input); border: 1px solid var(--g-border); border-radius: 999px; }
.search-container-view input, .search-container input, .view-search { background: transparent; color: var(--g-text); border: 0; }
.search-container-view i { color: var(--g-text-2); }
.tab3-search-bar { background: transparent; }

/* segmented control */
.seg { display: inline-flex; gap: .25rem; padding: .25rem; border-radius: 999px; background: var(--g-surface); border: 1px solid var(--g-border); margin: 0 0 .8rem; }
.seg-btn { border: 0; background: transparent; color: var(--g-text); padding: .35rem 1.05rem; min-height: 38px; border-radius: 999px; font-weight: 700; font-size: .85rem; display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; transition: background .2s, color .2s; }
.seg-btn.active { background: linear-gradient(180deg,#DCC08C,#B8945B); color: var(--g-on-accent); box-shadow: 0 4px 10px -4px rgba(0,0,0,.5); }
.seg-pane[hidden] { display: none; }

/* ---------- BUTTONS: sage glass pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; width: auto;
  min-height: 40px; padding: .5rem 1.25rem; border: 0; border-radius: 999px;
  font-weight: 700; font-size: .9rem; line-height: 1.2; letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 8px 16px -8px rgba(0,0,0,.6);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 3px 6px -3px rgba(0,0,0,.6); }
.btn:disabled, .btn.disabled { opacity: .55; transform: none; filter: none; box-shadow: none; cursor: not-allowed; }
.btn-sm { min-height: 34px; padding: .35rem .95rem; font-size: .8rem; }
.btn i { font-size: 1.05em; }
.btn.btn-success, .btn.btn-success:hover, .btn.btn-success:focus, .btn.btn-success:active { background: linear-gradient(180deg,#bcd7a2 0%,#B8945B 100%); color: var(--g-on-accent); }
.btn.btn-primary, .btn.btn-primary:hover, .btn.btn-primary:focus, .btn.btn-primary:active { background: linear-gradient(180deg,#4a6d93 0%,#2E4A67 100%); color: #F4F0E8; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 16px -8px rgba(0,0,0,.6); }
.btn.btn-warning, .btn.btn-warning:hover, .btn.btn-warning:focus, .btn.btn-warning:active { background: linear-gradient(180deg,#e6d38d 0%,#c4ab52 100%); color: #2b2406; }
.btn.btn-danger, .btn.btn-danger:hover, .btn.btn-danger:focus, .btn.btn-danger:active { background: linear-gradient(180deg,#c4745f 0%,#98493a 100%); color: #fff; }
.btn.btn-dark, .btn.btn-dark:hover, .btn.btn-dark:focus, .btn.btn-dark:active { background: rgba(15,30,51,.7); color: #F4F0E8; border: 1px solid var(--g-border); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); }
.btn.btn-light, .btn.btn-light:hover { background: var(--g-surface-2); color: var(--g-heading); border: 1px solid var(--g-border); }
.btn.btn-whatsapp, .btn.btn-whatsapp:hover, .btn.btn-whatsapp:focus, .btn.btn-whatsapp:active { background: linear-gradient(180deg,#2a9a5e 0%,#1b6f43 100%); color: #fff; padding: .55rem 1.35rem; }
.btn.btn-outline-success, .btn.btn-outline-secondary, .btn.btn-outline-light, .btn.btn-ghost { background: transparent; color: var(--g-heading); border: 1.5px solid var(--g-accent-2); box-shadow: none; }
.btn.btn-outline-success:hover, .btn.btn-outline-secondary:hover, .btn.btn-ghost:hover, .btn.btn-outline-light:hover { background: rgba(210,178,122,.2); color: var(--g-heading); }
.btn.btn-link { background: none; box-shadow: none; min-height: 0; padding: .25rem .5rem; border-radius: 8px; color: var(--g-accent); text-decoration: underline; font-weight: 700; white-space: normal; }
.btn.btn-link:hover { transform: none; color: var(--g-heading); }
.btn.w-100 { width: auto !important; min-width: min(240px, 100%); display: flex; margin-inline: auto; }
.list-item .btn { min-width: 76px; align-self: center; flex: 0 0 auto; }
.hdr-btn, .dark-mode-toggle { box-shadow: none; }
.dark-mode-toggle { background: var(--g-surface-2); color: #F4F0E8; border: 1px solid var(--g-border); }
.badge.btn-sm { display: inline-flex; align-items: center; min-height: 0; padding: .4em .9em; border-radius: 999px; box-shadow: none; font-size: .72rem; background: rgba(210,178,122,.2) !important; color: #EDE6DA !important; border: 1px solid rgba(210,178,122,.45); white-space: nowrap; }

/* ---------- HOME: hero + feature panel ---------- */
.home-hero {
  position: relative; overflow: hidden; min-height: 220px; padding: 1.2rem 1.1rem; margin: 0 0 .7rem; border-radius: 28px;
  background: radial-gradient(circle at 85% 30%, rgba(184,148,91,.45), transparent 55%), linear-gradient(150deg,#26425f 0%,#1b3656 60%,#10233b 100%);
  border: 1px solid var(--g-border); box-shadow: var(--g-shadow); color: #F4F0E8;
}
.home-hero-copy { position: relative; z-index: 2; max-width: 60%; }
.home-hero h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 5.6vw, 1.85rem); line-height: 1.12; color: #FBF8F2; margin: 0 0 .55rem; text-transform: none; }
.home-hero p { font-size: .82rem; font-weight: 500; line-height: 1.5; margin: 0 0 .9rem; color: #E0D6C5; text-transform: none; }
.home-hero-cta { display: flex; flex-wrap: wrap; gap: .5rem; }
.home-hero-leaves { position: absolute; top: 0; right: -4%; width: 56%; height: 100%; z-index: 1; filter: drop-shadow(0 8px 12px rgba(0,0,0,.35)); }
.home-panel { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; padding: .85rem; margin: 0 0 .7rem; border-radius: 28px; background: linear-gradient(160deg, var(--g-surface-2), var(--g-surface)); border: 1px solid var(--g-border); box-shadow: var(--g-shadow); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); }
.home-panel-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .15rem; padding: .5rem .3rem; }
.home-panel-item strong { font-size: .84rem; color: var(--g-heading); text-transform: none; }
.home-panel-item span:not(.hp-ico) { font-size: .72rem; font-weight: 500; color: var(--g-text-2); line-height: 1.3; text-transform: none; }
.hp-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid rgba(210,178,122,.7); background: rgba(210,178,122,.12); color: var(--g-accent); font-size: 1.25rem; margin-bottom: .25rem; }
@media (min-width: 768px) { .home-panel { grid-template-columns: repeat(4, 1fr); } .home-hero { min-height: 250px; padding: 1.8rem 2.2rem; } .home-hero-copy { max-width: 50%; } }

/* ---------- Home category/store tiles ---------- */
.grid-item img, .s-card img { border: 1px solid var(--g-border); box-shadow: var(--g-shadow); }
.grid-item .text, .icon-label, .icon-item .icon-label { color: var(--g-text); }
.icon-box { background: linear-gradient(160deg, var(--g-surface-2), var(--g-surface)); border: 1px solid var(--g-border); color: var(--g-accent); border-radius: 20px; }
.s-name > span, .s-name .badge { color: #0F1E33 !important; background: #D2B27A !important; }
.quote0 { background-color: transparent; }

/* ---------- modals (product, account, cart) ---------- */
.pm-overlay { background: rgba(5,10,20,.66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pm-dialog { background: linear-gradient(165deg, rgba(29,58,90,.96), rgba(15,30,51,.97)); color: var(--g-text); border: 1px solid var(--g-border); border-radius: 28px; box-shadow: 0 28px 70px -14px rgba(0,0,0,.7); }
[data-theme="light"] .pm-dialog { background: linear-gradient(165deg, #FBF8F2, #EDE6DA); }
.pm-dialog h2, .pm-scroll h2 { font-family: var(--font-display); color: var(--g-heading); }
.pm-desc, .pm-note, #pmTags { color: var(--g-text-2); }
.pm-desc { color: var(--g-text); }
.pm-price { color: var(--g-price); }
.pm-image { border-radius: 18px; background: rgba(255,255,255,.06); }
.pm-close { background: rgba(15,30,51,.7); color: #F4F0E8; border: 1px solid var(--g-border); }
.pm-actions { border-top: 1px solid var(--g-border); background: transparent; }
.pm-error { color: var(--g-bad); }
.pm-tabs button { color: var(--g-text-2); opacity: 1; } .pm-tabs button.active { color: var(--g-heading); border-bottom-color: var(--g-accent); }
.pm-qty button, .cart-qty button { background: var(--g-surface-2); color: var(--g-heading); border: 1px solid var(--g-border); border-radius: 50%; }
.cart-item { border-bottom: 1px solid var(--g-border); }
.cart-name { color: var(--g-heading); } .cart-var, .cart-price { color: var(--g-text-2); }
.cart-total { color: var(--g-heading); }
.pm-banner { background: rgba(143,224,160,.14); border: 1px solid rgba(143,224,160,.35); color: var(--g-text); }
.pm-qty input { color: var(--g-heading); }
.toast-notification { background: #1d3a5a; color: #F4F0E8; border: 1px solid var(--g-border); border-radius: 14px; }
.back-to-top { background: var(--g-surface-2); color: var(--g-heading); border: 1px solid var(--g-border); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); }
:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; }
::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: rgba(210,178,122,.35); border-radius: 10px; }

/* bottom nav: label sits below the pill, never under it */
.footer-nav .nav-item { flex-direction: column; justify-content: center; gap: 3px; padding: 6px 0 4px; }
.footer-nav .nav-item .nav-label { position: static; transform: none; opacity: 1; margin: 0; line-height: 1.1; }

/* ---- readability + overlap fixes from the automated audit ---- */
h6.sticky-top { position: static !important; }                       /* the little page badge no longer floats over content */
.tab3-search-bar, .explore-search-bar { background: var(--g-bar, #13253f); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); border-bottom: 1px solid var(--g-border); border-radius: 18px; padding: .55rem .6rem; margin-bottom: .75rem; box-shadow: 0 10px 18px -14px rgba(0,0,0,.8); }
:root, [data-theme="dark"] { --g-bar: #112640; }
[data-theme="light"] { --g-bar: #E6DDCE; }
.tab3-search-bar .search-container-view input:focus, .tab3-search-bar .search-container-view input { max-width: 100%; }
.content-header input, .content-header .search-container input { color: #F4F0E8; background: transparent; }
.content-header input::placeholder { color: #DCD1BF; opacity: 1; }
h2[class*="custom-text"], .custom-text-primary, .custom-text-dark { color: var(--g-heading) !important; font-family: var(--font-display); }
.free-badge { background: #D2B27A; color: #0F1E33; font-weight: 800; border-radius: 999px; padding: .05rem .5rem; }
.card-title-diagonal { background: rgba(15,30,51,.88); color: #F7F3EC; }
.card a:not(.btn), .service-card a:not(.btn) { color: var(--g-accent); font-weight: 700; }
[data-theme="light"] .card a:not(.btn) { color: #1f5a4a; }
.btn.btn-whatsapp, .btn.btn-whatsapp:hover, .btn.btn-whatsapp:focus, .btn.btn-whatsapp:active { background: linear-gradient(180deg,#1f8553 0%,#145a36 100%); color: #fff; }
.tag.green { color: #d2f7da; } .tag.orange { color: #fbe8b8; } .tag.gray { color: #EDE6DA; }

/* Bootstrap components inside the glass theme */
.bg-white { background: var(--g-solid-2) !important; color: var(--g-text); }
.text-primary { color: var(--g-heading) !important; }
.text-dark, .text-body { color: var(--g-text) !important; }
.modal-content { background: linear-gradient(165deg, #1d3a5a, #112640); color: var(--g-text); border: 1px solid var(--g-border); border-radius: 26px; box-shadow: 0 28px 70px -14px rgba(0,0,0,.7); }
[data-theme="light"] .modal-content { background: #F4F0E8; }
.modal-header, .modal-footer { border-color: var(--g-border); }
.btn-close { filter: invert(1) brightness(1.5); } [data-theme="light"] .btn-close { filter: none; }
.dropdown-menu { background: var(--g-solid); border: 1px solid var(--g-border); border-radius: 18px; box-shadow: var(--g-shadow); padding: .4rem; }
.dropdown-item { color: var(--g-text); border-radius: 12px; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--g-surface-2); color: var(--g-heading); }
.dropdown-item.btn { box-shadow: none; width: 100%; justify-content: flex-start; background: transparent; color: var(--g-text); min-height: 42px; border-radius: 12px; }
.dropdown-item.btn:hover { transform: none; background: var(--g-surface-2); color: var(--g-heading); }
/* theme-aware tweaks found in the light-mode audit */
.home-hero .btn-ghost, .home-hero .btn.btn-ghost:hover { color: #FBF8F2; border-color: rgba(251,248,242,.75); }
[data-theme="light"] { --g-price: #1b4a3f; --g-good: #17693a; --g-text-2: #3d5a4d; }
[data-theme="light"] .badge.btn-sm { background: #2E4A67 !important; color: #F4F0E8 !important; border-color: transparent; }
/* consistent vertical rhythm so stacked blocks never touch or overlap */
.p-2 > .card, .p-2 > p.card, .p-2 > .alert { margin-bottom: 1rem !important; }
.p-2 > .seg { margin-top: 0; }
.p-2 > .card + .card, .p-2 > .card-body + .card { margin-top: 0; }
.p-2 .card.mb-2 { margin-bottom: .75rem !important; }
.home-hero, .home-panel, .card-section { margin-bottom: .85rem; }
[data-theme="light"] { --g-price: #123f35; }
[data-theme="light"] .tag.green { background: #d3ecd9; color: #11522a; }
[data-theme="light"] .tag.gray { background: #E6DDCE; color: #2f4a3c; }
[data-theme="light"] .tag.orange { background: #f5e6c4; color: #6b4a0c; }
[data-theme="light"] .sidebar-right { background: rgba(244,240,232,.65); }
[data-theme="light"] .sidebar-right, [data-theme="light"] .sidebar-right .widget, [data-theme="light"] .sidebar-right small { color: #0F1E33; }
.home-hero { background: radial-gradient(circle at 88% 28%, rgba(184,148,91,.28), transparent 55%), linear-gradient(150deg,#26425f 0%,#1b3656 60%,#10233b 100%); }
.home-hero p { color: #EDE6DA; }

/* ---- desktop rail, header buttons, widgets, thumbnails (found while reviewing desktop light mode) ---- */
@media (min-width: 768px) { .footer-nav { top: 0; bottom: 0; height: auto; padding-bottom: 0; } }
.content-header .dark-mode-toggle, .content-header .search-container { background: rgba(255,255,255,.14); color: #F4F0E8; border: 1px solid rgba(255,255,255,.28); }
.content-header .dark-mode-toggle i, .content-header .search-container i, .content-header .dark-mode-toggle svg { color: #F4F0E8; }
.sidebar-right .widget, .widget.custom-slate-gradient { background: linear-gradient(160deg,#2c6a5a,#1d3a5a) !important; color: #F4F0E8; border: 1px solid var(--g-border); }
.sidebar-right .widget *, .widget.custom-slate-gradient * { color: inherit; }
.list-item .product-thumb { height: auto; aspect-ratio: 600 / 240; object-fit: cover; }
.cart-item img { height: auto; aspect-ratio: 600 / 240; }
.widget .text-primary, .widget .text-dark, .widget .text-body, .sidebar-right .widget div { color: #F4F0E8 !important; }
.sidebar-right .widget, [data-theme="light"] .sidebar-right .widget, [data-theme="light"] .sidebar-right .widget small, .sidebar-right .widget small { color: #F4F0E8 !important; }
.btn.btn-primary, .btn.btn-primary:hover, .btn.btn-primary:focus, .btn.btn-primary:active { background: linear-gradient(180deg,#357263 0%,#2a4766 100%); color: #F7F3EC; }
[data-theme="light"] { --g-good: #0e5a2e; }

/* ---- fixes: sticky search, sub-headings, sidebar scroll, buttons that always fit ---- */
.tab3-search-bar, .explore-search-bar { position: sticky; top: 0; z-index: 20; }
.sidebar-left { min-height: 0; height: 100%; overflow: hidden; }
.sidebar-tabs { min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scroll-behavior: smooth; touch-action: pan-y; padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
.content-main .sub-h, .content-main .p-2 > h4, .view-header { position: relative; z-index: 3; }
.content-main .sub-h { margin: 1.5rem .25rem 1rem; font-size: 1.15rem; font-weight: 700; text-shadow: none; }
.content-main .p-2 > h4 { margin-bottom: .9rem; }
.btn { white-space: normal; max-width: 100%; text-align: center; }
.list-item .btn, .home-hero-cta .btn, .seg-btn { white-space: nowrap; }
.btn.w-100 { min-width: 0; max-width: 100%; }
.d-flex.flex-column.gap-2 > .d-flex.gap-2 { flex-wrap: wrap; }
.d-flex.flex-column.gap-2 > .d-flex.gap-2 > .btn.w-100 { flex: 1 1 130px; min-width: 0; }
.home-hero-copy { max-width: 68%; }
.home-hero-cta { display: flex; flex-wrap: nowrap; gap: .4rem; width: 100%; }
.home-hero-cta .btn { flex: 1 1 0; min-width: 0; padding: .45rem .4rem; font-size: .8rem; min-height: 38px; }
@media (max-width: 360px) { .home-hero-cta .btn { font-size: .7rem; padding: .4rem .2rem; } .btn { padding-left: .8rem; padding-right: .8rem; } .pm-actions .btn { min-width: 0; width: 100%; } }

/* light theme: the active side tab gets its own deep-green highlight */
[data-theme="light"] .tab-button.active { background: linear-gradient(180deg,#4a6d93,#2a4766); color: #F7F3EC; border: 1px solid rgba(255,255,255,.35); border-left: .31rem solid #D2B27A; font-weight: 800; box-shadow: 0 6px 14px -6px rgba(15,30,51,.6); }
[data-theme="light"] .tab-button:hover:not(.active) { background: #E6DDCE; }
[data-theme="light"] .tab-button.active, [data-theme="light"] .tab-button.active * { color: #F7F3EC !important; }

/* ---- tablets, laptops and large screens: cards sit side by side on these pages ---- */
@media (min-width: 768px) {
  :is(#tab6, #tab7, #tab8, #tab9, #tab11, #tab12) .p-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 1rem; align-items: stretch; }
  :is(#tab6, #tab7, #tab8, #tab9, #tab11, #tab12) .p-2 > h4,
  :is(#tab6, #tab7, #tab8, #tab9, #tab11, #tab12) .p-2 > p.alert,
  :is(#tab6, #tab7, #tab8, #tab9, #tab11, #tab12) .p-2 > .sub-h,
  :is(#tab6, #tab7, #tab8, #tab9, #tab11, #tab12) .p-2 > .table-responsive,
  :is(#tab6, #tab7, #tab8, #tab9, #tab11, #tab12) .p-2 > .accordion,
  :is(#tab6, #tab7, #tab8, #tab9, #tab11, #tab12) .p-2 > .row,
  :is(#tab6, #tab7, #tab8, #tab9, #tab11, #tab12) .p-2 > .btn { grid-column: 1 / -1; }
  :is(#tab6, #tab7, #tab8, #tab9, #tab11, #tab12) .p-2 > .btn { justify-self: start; margin: 0 !important; }
  :is(#tab6, #tab7, #tab8, #tab9, #tab11, #tab12) .p-2 > .card.mb-2,
  :is(#tab6, #tab7, #tab8, #tab9, #tab11, #tab12) .p-2 > .card.card-body { margin: 0 !important; }
  :is(#tab6, #tab7, #tab8, #tab9, #tab11, #tab12) .p-2 > .sub-h { margin: .6rem .25rem 0; }
  :is(#tab6, #tab7, #tab8, #tab9, #tab11, #tab12) .p-2 > p.alert, :is(#tab6, #tab7, #tab8, #tab9, #tab11, #tab12) .p-2 > h4 { margin-bottom: 0 !important; }
}
