/* static/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700;800&display=swap');

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  overscroll-behavior-y: contain;
  /* para iOS Safari momentum-scrolling */
  -webkit-overflow-scrolling: touch;
}

/* ---------- Variables de color corporativo ---------- */
:root {
  --market-primary: #FD774E;
  --market-primary-rgb: 253,119,78;
  --market-primary-strong: #c74f2a;
  --market-accent: #FD774E;
  --market-focus-ring: rgba(253,119,78,0.35);
  --bs-primary: var(--market-primary);
  --bs-primary-rgb: var(--market-primary-rgb);
  --bs-link-color: var(--market-primary);
  --bs-link-hover-color: var(--market-primary-strong);
  --bs-nav-link-color: var(--market-primary);
  --bs-nav-tabs-border-color: var(--market-primary);
  --bs-nav-tabs-link-hover-border-color: var(--market-primary);
  --bs-nav-tabs-link-active-color: var(--market-primary);
  --bs-nav-tabs-link-active-border-color: var(--market-primary);
  --bs-nav-tabs-link-active-bg: #fff;
  --bs-form-check-input-checked-bg-color: var(--market-primary);
  --bs-form-check-input-checked-border-color: var(--market-primary);
  --site-bg-color: #e7ddd414;
  --market-ink: #0f172a;
  --market-amber: var(--market-accent);
  --market-surface: #f8fafc;
  --market-border: #e5e7eb;
}

/* ---------- Global ---------- */
html {
  background-color: var(--site-bg-color);
}
body {
  font-size: 15px;
  background-color: var(--site-bg-color);
  padding-top: 70px; /* espacio para navbar fijo */
}

/* Overlay pattern on body */
.background-overlay {
  position: relative;
}
.background-overlay::before {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: var(--pattern-url);
  background-repeat: repeat;
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
}

/* Image preview helpers */
.image-preview {
  max-width: 80px;
  max-height: 80px;
}
.preview-wrapper {
  position: relative;
}

/*
 * Use slightly wider side padding on mobile so pages share the
 * same feel as the FAQ and shipping calculator.
 */
.main-container {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}


/* Asegura suficiente espacio para el navbar en pantallas pequeñas */
@media (max-width: 991.98px) {
  body { padding-top: 80px; }
}

/* ---------- Buttons & Form Checks ---------- */
.btn-primary,
.form-check-input:checked {
  background-color: var(--market-primary) !important;
  border-color: var(--market-primary) !important;
}
.btn-primary {
  color: #fff !important;
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--market-primary-strong) !important;
  border-color: var(--market-primary-strong) !important;
  color: #fff !important;
}

/* Botones “suaves” en card-footer */
.card-footer .btn-primary,
.card-footer:last-child .btn-primary {
  background-color: #fd774e1a !important;
  color: var(--market-primary) !important;
  border: none !important;
}
.card-footer .btn-primary:hover,
.card-footer:last-child .btn-primary:hover {
  background-color: var(--market-primary) !important;
  color: #fff !important;
}

.bg-dark-soft {
  background-color: rgba(15, 23, 42, 0.06) !important;
  color: var(--market-ink);
}
.btn-ghost {
  background: #fff;
  border: 1px solid var(--market-border);
  color: var(--market-ink);
}
.btn-ghost:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.btn-ghost-light {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
}
.btn-ghost.dark-outline {
  border: 1px solid rgba(15, 23, 42, 0.15);
  color: var(--market-ink);
}

/* ---------- Sidebar y enlaces activos ---------- */
.list-group-item.active,
.active-link {
  background-color: var(--market-primary) !important;
  border-color: var(--market-primary) !important;
  color: #fff !important;
  box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.1);
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.list-group-item.active:hover {
  background-color: var(--market-primary-strong) !important;
  color: #fff !important;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}

/* Sustituir estilos de list-group por nav-pills */
.nav-pills .nav-link {
  color: var(--bs-primary) !important;
}
.nav-pills .nav-link:hover {
  background-color: rgba(var(--market-primary-rgb), .12);
}
.nav-pills .nav-link.active {
  background-color: var(--bs-primary) !important;
  color: #fff !important;
}

/* Ensure tab backgrounds match site background */
.nav-tabs .nav-link {
  background-color: var(--site-bg-color);
}

/* ---------- Admin Sidebar ---------- */
#adminSidebar {
  --admin-sidebar-text: #223044;
  --admin-sidebar-muted: #738198;
  --admin-sidebar-border: #d9e1ec;
  --admin-sidebar-hover: rgba(var(--market-primary-rgb), 0.1);
  --admin-sidebar-active: var(--market-primary);
  --admin-sidebar-active-strong: var(--market-primary-strong);
  --admin-sidebar-active-soft: rgba(var(--market-primary-rgb), 0.13);
  --admin-sidebar-active-border: rgba(var(--market-primary-rgb), 0.28);
  --admin-sidebar-warning: #8a5a00;
  padding: 0.75rem 0.8rem 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-right: 1px solid var(--admin-sidebar-border);
  box-shadow: 4px 0 18px rgba(15, 23, 42, 0.06);
  color: var(--admin-sidebar-text);
  transition: width 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

@media (min-width: 992px) {
  #sidebarContainer,
  #adminSidebar {
    width: 268px;
  }
  #sidebarContainer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1030;
    transition: width 0.3s ease;
  }
  #adminSidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    padding-top: 70px;
  }
  #sidebarContainer.collapsed,
  #adminSidebar.collapsed {
    width: 68px;
  }
  #sidebarContainer + #contentWrapper {
    margin-left: 268px;
  }
  #sidebarContainer.collapsed + #contentWrapper {
    margin-left: 68px;
  }
}

#adminSidebar .nav-link {
  white-space: nowrap;
  overflow: hidden;
  color: var(--admin-sidebar-text);
}

#adminSidebar.collapsed .nav-link span {
  display: none;
}

#adminSidebar.collapsed .nav-link {
  justify-content: center;
}

#contentWrapper {
  margin-left: 0;
  transition: margin-left 0.3s ease;
}

.admin-sidebar-nav {
  font-size: 0.92rem;
}
.admin-sidebar-heading {
  padding: 0.15rem 0.5rem 0.35rem;
}
.admin-sidebar-section-label {
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--admin-sidebar-muted);
  font-size: 0.7rem;
  font-weight: 700;
}
.admin-sidebar-link {
  position: relative;
  min-height: 38px;
  border-radius: .45rem;
  padding: .44rem .55rem;
  border: 1px solid transparent;
  color: var(--admin-sidebar-text);
  font-weight: 500;
  gap: 0.05rem;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.admin-sidebar-link:hover {
  background: var(--admin-sidebar-hover);
  color: var(--admin-sidebar-active-strong);
}
.admin-sidebar-link:focus-visible {
  outline: 2px solid var(--market-focus-ring);
  outline-offset: 2px;
}
.admin-sidebar-sublink {
  min-height: 34px;
  padding: .34rem .5rem .34rem 1.9rem;
  font-size: 0.9em;
  font-weight: 450;
  color: #40506a;
}
.admin-sidebar-collapse {
  margin-top: .25rem;
  padding-left: 0.35rem;
}
.admin-sidebar-collapse-toggle {
  background: transparent;
  border: 0;
}
.admin-sidebar-collapse-toggle.active-parent {
  background: rgba(var(--market-primary-rgb), 0.08);
  border-color: var(--admin-sidebar-active-border);
  color: var(--admin-sidebar-active-strong);
}
.admin-sidebar-chevron {
  transition: transform 0.2s ease;
  color: var(--admin-sidebar-muted);
  font-size: .78rem;
}
.admin-sidebar-collapse-toggle:not(.collapsed) .admin-sidebar-chevron {
  transform: rotate(180deg);
}
.admin-sidebar-link .admin-sidebar-icon {
  width: 1.25rem;
  min-width: 1.25rem;
  text-align: center;
  font-size: 1.02rem;
}
.admin-sidebar-link.active {
  background: var(--admin-sidebar-active-soft);
  border-color: var(--admin-sidebar-active-border);
  color: var(--admin-sidebar-active-strong);
  box-shadow: inset 3px 0 0 var(--admin-sidebar-active);
}
.admin-sidebar-link-warning {
  color: var(--admin-sidebar-warning);
}
.admin-sidebar-danger-zone {
  border-top: 1px solid var(--admin-sidebar-border);
}
.admin-sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .5rem;
  width: 100%;
  min-height: 40px;
  margin-bottom: .75rem;
  padding: .45rem .6rem;
  border: 1px solid #d5dfeb;
  border-radius: .55rem;
  background: #fff;
  color: var(--admin-sidebar-text);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.admin-sidebar-toggle:hover {
  border-color: var(--admin-sidebar-active-border);
  background: var(--admin-sidebar-hover);
  color: var(--admin-sidebar-active-strong);
}
.admin-sidebar-toggle:focus-visible {
  outline: 2px solid var(--market-focus-ring);
  outline-offset: 2px;
}

@media (min-width: 992px) {
  #adminSidebar.collapsed .admin-sidebar-label,
  #adminSidebar.collapsed .admin-sidebar-section-label {
    display: none;
  }
  #adminSidebar.collapsed .admin-sidebar-chevron {
    display: none;
  }
  #adminSidebar.collapsed .admin-sidebar-toggle {
    justify-content: center;
    padding-inline: .45rem;
  }
  #adminSidebar.collapsed .admin-sidebar-collapse {
    padding-left: 0;
  }
  #adminSidebar.collapsed .admin-sidebar-sublink {
    padding-left: .5rem;
  }
  #adminSidebar.collapsed .admin-sidebar-link.active {
    box-shadow: inset 0 -3px 0 var(--admin-sidebar-active);
  }
  #adminSidebar.collapsed .nav-item {
    text-align: center;
  }
}

/* Toggle button animation */
#toggleSidebar i {
  transition: transform 0.25s ease;
}
#toggleSidebar.collapsed i {
  transform: rotate(180deg);
}

/* ---------- Navbar ---------- */
.navbar.sticky-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
}
.navbar-dark .navbar-nav .nav-link {
  color: #fff;
  border-radius: 50rem;
  padding: .25rem .75rem;
  transition: background-color .2s, color .2s, box-shadow .2s;
  margin: 0 .25rem;
}
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .active-link {
  background-color: #fff !important;
  color: var(--market-primary) !important;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}
.navbar-dark .navbar-toggler {
  border: none;
}
.navbar-icon {
  width: 1.5rem;
  height: 1.5rem;
}
.navbar.bg-primary {
  background-color: var(--bs-primary) !important;
}
.site-logo {
  height: 35px;
  width: auto;
}
.login-logo {
  height: 72px;
  width: auto;
}
.navbar .dropdown-menu {
  z-index: 2000;
}
nav.navbar.mb-4 {
  margin-bottom: 1.5rem !important;
}

/* Ajustes para navbar móvil (trasladado desde base.html y refinado) */
@media (max-width: 991.98px) {
  /* fija el logo siempre a la misma altura y lo centra */
  .navbar-brand-mobile {
    z-index: 1020;
  }
  /* espacio para toggler y campana */
  .navbar-mobile-header .bell-link {
    margin-right: 0;
    padding-right: 0.75rem; /* espacio para la insignia de notificaciones */
    margin-top: 0.25rem;
  }
  /* asegurar que el icono de cuenta se vea completo */
  .navbar-mobile-header .dropdown {
    position: relative;
    z-index: 1030;
  }
  #accountDropdownMobile {
    padding: 0.25rem 0.5rem;
  }
  #accountDropdownMobile::after {
    display: none;
  }
  /* ancho del offcanvas para que no ocupe toda la pantalla */
  #navbarContent.offcanvas {
    width: 80%;
    max-width: 300px;
  }
  /* estilo del sidebar offcanvas en móvil */
  #navbarContent.offcanvas .nav-link {
    margin: 0.25rem 0;           /* un poco más de separación vertical */
    padding-left: 0.25rem;       /* menos sangría para acercar iconos al borde */
    margin-left: 0;
    margin-right: 0;
    font-size: 0.875rem;
    border-radius: .375rem;      /* igual que las cards de Bootstrap */
  }
  #navbarContent.offcanvas .nav-link:hover,
  #navbarContent.offcanvas .active-link {
    border-radius: .375rem;
  }
  #navbarContent.offcanvas .active-link {
    font-weight: bold;           /* elemento activo en negrita */
  }
}

/* ---------- Tables, imágenes & utilidades ---------- */
.table-row { height: 100px; }
.full-width-image {
  width: 100%;
  height: 100px;
  object-fit: cover;
}
.table-responsive {
  border-radius: .25rem;
}
thead th {
  background-color: var(--bs-primary);
  color: #fff;
}
th.sortable {
  cursor: pointer;
}
th.sortable.asc::after  { content: "\25B2"; }
th.sortable.desc::after { content: "\25BC"; }
th a { color: #fff; }

/* ---------- Alerts ---------- */
.alert-container .alert {
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Posición fija de alerts abajo al centro */
.alert-container {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 2000;
}

/* ---------- Marktparse refreshed UI ---------- */
.marktparse-page {
  font-family: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--market-ink);
}
.market-hero {
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(255,255,255,0.16), transparent 48%),
    linear-gradient(135deg, #121826 0%, #1f2937 54%, var(--market-primary) 145%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--market-primary);
  border-radius: .95rem;
  padding: 1rem 1.1rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
}
.market-hero::after {
  display: none;
}
.market-hero-compact {
  min-height: 0;
}
.market-hero-copy {
  min-width: 0;
}
.market-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-end;
  gap: .65rem;
}
.hero-eyebrow {
  letter-spacing: 0.075em;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  font-size: .72rem;
}
.hero-title {
  font-weight: 800;
  color: #fff;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem);
  line-height: 1.05;
}
.hero-count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  color: #fff;
  padding: .2rem .58rem;
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}
.hero-subtitle {
  color: rgba(255, 255, 255, 0.78);
  max-width: 720px;
  font-size: .94rem;
}
.hero-note {
  max-width: 320px;
}
.hero-action-btn {
  min-height: 100%;
}
.mobile-filter-dock {
  background: #fff;
  border: 1px solid var(--market-border);
  border-radius: .9rem;
  padding: .75rem;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}
.mobile-filter-dock .btn,
.mobile-filter-dock .input-group-text,
.mobile-filter-dock .form-control {
  min-height: 42px;
}
.filter-card {
  border-radius: .95rem;
  background: #fff;
  border: 1px solid var(--market-border) !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06) !important;
}
.filter-card .filter-stack {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.filter-group,
.mobile-filter-section {
  border: 1px solid var(--market-border);
  border-radius: .8rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: .7rem;
}
.mobile-filter-section {
  margin-bottom: .75rem;
}
.filter-group-title {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--market-primary-strong);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  margin-bottom: .55rem;
  text-transform: uppercase;
}
.filter-group-title i {
  color: var(--market-primary);
}
.filter-group .form-label,
.mobile-filter-section .form-label {
  font-size: .75rem;
  color: #64748b;
  margin-bottom: .25rem;
}
.filter-group .form-control,
.filter-group .form-select,
.mobile-filter-section .form-control,
.mobile-filter-section .form-select {
  margin-bottom: .65rem;
}
.filter-group .form-control:last-child,
.filter-group .form-select:last-child,
.mobile-filter-section .form-control:last-child,
.mobile-filter-section .form-select:last-child,
.filter-group .input-group:last-child,
.mobile-filter-section .input-group:last-child {
  margin-bottom: 0;
}
.filter-card .form-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem .75rem;
  background: var(--market-surface);
  border: 1px solid var(--market-border);
  border-radius: .9rem;
  margin-bottom: 0;
  width: 100%;
  gap: .5rem;
}
.filter-card .form-switch + .form-label {
  margin-top: .25rem;
}
.mobile-filter-dock .form-switch {
  padding: .6rem .75rem;
  background: var(--market-surface);
  border: 1px solid var(--market-border);
  border-radius: .9rem;
  margin-bottom: .75rem;
  width: 100%;
  gap: .5rem;
}
.modal-body .form-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem .75rem;
  background: var(--market-surface);
  border: 1px solid var(--market-border);
  border-radius: .9rem;
  width: 100%;
  gap: .5rem;
}
.filter-card .form-switch .form-check-input,
.mobile-filter-dock .form-switch .form-check-input,
.modal-body .form-switch .form-check-input {
  margin-left: 0;
  margin-right: .25rem;
  flex-shrink: 0;
}
.filter-card .form-control,
.filter-card .form-select,
.mobile-filter-dock .form-control {
  background: var(--market-surface);
  border: 1px solid var(--market-border);
}
.filter-switch {
  padding: .55rem .65rem;
  border-bottom: 0;
  margin-bottom: 0;
}
.filter-actions {
  position: sticky;
  bottom: .5rem;
  z-index: 3;
  padding-top: .25rem;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff 30%);
}
.result-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .55rem .85rem;
  background: #fff;
  border: 1px solid var(--market-border);
  border-radius: 999px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
  font-weight: 700;
  color: var(--market-ink);
  font-size: .95rem;
}
.view-toolbar {
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(229, 231, 235, .9);
  border-radius: .85rem;
  padding: .55rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}
.view-toolbar .btn.active {
  background: var(--market-primary);
  border-color: var(--market-primary);
  color: #fff;
}
.toolbar-hint {
  padding-inline: .35rem;
}
.active-filters-panel {
  background: #fff;
  border: 1px solid var(--market-border);
  border-radius: .85rem;
  padding: .7rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
.active-filters-label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: #475569;
}
.active-filters-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  border: 1px solid rgba(var(--market-primary-rgb), 0.22);
  background: rgba(var(--market-primary-rgb), 0.08);
  color: #334155;
  border-radius: 999px;
  padding: .3rem .62rem;
  font-size: .8rem;
  font-weight: 600;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.active-filter-chip i {
  flex-shrink: 0;
}
.mobile-clear-filters-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: .75rem;
  z-index: 1050;
  padding: 0 .75rem;
}
.mobile-clear-filters-bar .btn {
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
  border-width: 1px;
}
.loading-indicator .spinner-border {
  width: 3rem;
  height: 3rem;
  color: var(--market-amber);
}

/* ---------- Dashboard ---------- */
.dashboard-page .dashboard-heading {
  color: var(--market-ink);
}
.dashboard-page .dashboard-subtitle {
  font-size: .92rem;
}
.dashboard-page .dashboard-metric {
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.dashboard-page .dashboard-metric:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.11);
}
.dashboard-page .dashboard-metric .metric-label {
  color: #64748b;
  font-size: .85rem;
  margin-bottom: .35rem;
}
.dashboard-page .dashboard-metric .metric-value {
  color: #0f172a;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.dashboard-page .dashboard-panel {
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}
.dashboard-page .dashboard-panel .card-header {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid #e5e7eb;
}
.dashboard-page .dashboard-panel .card-title {
  color: #334155;
  font-weight: 700;
}
.dashboard-page .dashboard-chart-area {
  min-height: 260px;
}
.dashboard-page .dashboard-chart-area canvas {
  width: 100% !important;
  height: 100% !important;
}
.dashboard-page .dashboard-users-table {
  max-height: 420px;
}
.dashboard-page .dashboard-table {
  margin-bottom: 0;
}
.dashboard-page .dashboard-users-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #334155;
}
.dashboard-page .dashboard-table tbody tr:hover {
  background: #fff7f2;
}
.dashboard-page .dashboard-avatar {
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
}

/* ---------- Product Cards ---------- */
.product-card {
  border: none;
  border-radius: .45rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}
.product-card .card-img-top {
  width: 100%;
  height: 270px;
  object-fit: cover;
}
.product-card .card-body {
  padding: 0 .5rem;
}
.product-card .price-text {
  margin-right: .25rem;
}
.product-card .card-body .badge {
  margin-left: .25rem;
}

/* Compact cards */
.compact-card .card-img-top { height: 150px; }
.compact-card .small-text   { font-size: .85rem; }
.compact-card .card-text    { font-size: .8rem; }

/* Títulos y texto */
.card-title a {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-text { font-weight: 600; }
.small-text { font-size: .9rem; }
.medium     { font-size: 1rem; }
.small-body { padding: .5rem 1rem; }

/* Extra padding specifically for Marktplace product cards */
.mp-product-card .card-body {
  padding: 1rem;
}

/* Icon shipping */
.icon-shipping {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 1.1em;
}
.image-container {
  position: relative;
  display: inline-block;
}
.image-container .badge-primary {
  background-color: transparent;
  color: #fff;
}
.wishlist-icon {
  position: absolute;
  bottom: 5px;
  right: 5px;
  font-size: 1.4em;
  color: red;
  background: none;
  border: none;
  cursor: pointer;
}
.wishlist-button.btn-outline-secondary:hover,
.wishlist-button.btn-danger:hover {
  color: #fff;
  background-color: transparent;
  border-color: #6c757d;
}
.marktparse-page .product-card {
  border-radius: .95rem;
  border: 1px solid #e8edf3;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  animation: card-enter .34s ease both;
}
.marktparse-page .product-card .card-body {
  padding: .65rem .7rem .75rem;
}
.marktparse-page .product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}
.marktparse-page .product-media {
  position: relative;
  overflow: hidden;
  border-radius: .8rem;
  background: linear-gradient(135deg, #f8fafc 0%, #fff7f2 100%);
}
.marktparse-page .product-media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform .35s ease;
}
.marktparse-page .product-card:hover .product-media img {
  transform: scale(1.04);
}
.marktparse-page .media-top {
  position: absolute;
  top: .6rem;
  right: .6rem;
  left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .3rem;
  z-index: 2;
}
.marktparse-page .chip {
  border-radius: .75rem;
  padding: .28rem .6rem;
  font-weight: 700;
  font-size: .78rem;
}
.marktparse-page .shipping-chip {
  background: rgba(14, 165, 233, 0.16);
  color: #0ea5e9;
  border: 1px solid rgba(14, 165, 233, 0.35);
}
.marktparse-page .icon-shipping {
  top: .6rem;
  right: .6rem;
  left: auto;
  font-size: .78rem;
}
.marktparse-page .price-chip {
  position: absolute;
  bottom: .65rem;
  left: .65rem;
  padding: .5rem .75rem;
  background: linear-gradient(135deg, #fd774e 0%, #f97316 100%);
  color: #fff;
  border-radius: .8rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: 0 16px 30px rgba(253, 119, 78, 0.25);
  z-index: 1;
}
.marktparse-page .brand-pill {
  background: #1f2937;
  color: #fff;
  border-radius: .65rem;
  padding: .3rem .6rem;
  font-weight: 700;
  font-size: .8rem;
  margin-right: .2rem;
  margin-bottom: .2rem;
}
.marktparse-page .new-pill {
  background: #d1fae5;
  color: #065f46;
  border-radius: .65rem;
  padding: .3rem .6rem;
  font-weight: 700;
  font-size: .8rem;
  margin-bottom: .2rem;
}
.marktparse-page .meta-pill {
  background: #f1f5f9;
  color: #0f172a;
  border-radius: .65rem;
  padding: .24rem .5rem;
  border: 1px solid #e2e8f0;
  font-size: .78rem;
  margin-bottom: .2rem;
  white-space: nowrap;
}
.marktparse-page .meta-row {
  flex-wrap: nowrap;
  justify-content: space-between;
}
.marktparse-page .product-actions {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}
.marktparse-page .product-actions .btn {
  position: relative;
  z-index: 3;
  pointer-events: auto;
}
.marktparse-page .subtle-link {
  color: #475569;
}
.marktparse-page .modern-title a {
  color: var(--market-ink);
  text-decoration: none;
}
.marktparse-page .modern-title .stretched-link::after {
  z-index: 1;
}
.marktparse-page .modern-title {
  font-size: .95rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
  margin-bottom: .6rem;
}
.marktparse-page .modern-title a:hover {
  color: #111827;
}
.marktparse-page .store-pill {
  background: rgba(var(--market-primary-rgb), 0.1);
  color: var(--market-primary-strong);
  border-radius: .65rem;
  padding: .28rem .5rem;
  font-weight: 700;
  font-size: .78rem;
  margin-bottom: .2rem;
  display: inline-flex;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.marktparse-page .badge-row {
  gap: .35rem;
}
.marktparse-page .wishlist-icon {
  border: 1px solid rgba(255,255,255,0.6);
  backdrop-filter: blur(6px);
  color: #ef4444;
  box-shadow: 0 10px 24px rgba(0,0,0,0.14);
  z-index: 2;
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.marktparse-page .wishlist-icon.btn-outline-secondary {
  background: rgba(255,255,255,0.7);
}
.marktparse-page .wishlist-icon.btn-danger {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}
.marktparse-page .wishlist-icon:hover {
  transform: translateY(-1px);
}

/* ---------- Cart hover & overlay ---------- */
.cart-item-card {
  cursor: pointer;
  transition: background-color .2s;
  min-height: 200px;
}
.cart-item-card:hover {
  background-color: var(--site-bg-color);
}
.cart-item-card:hover .cart-edit-link {
  background-color: var(--market-primary) !important;
  color: #fff !important;
}
.cart-loading-overlay {
  position: absolute;
  top:    0;
  right:  0;
  bottom: 0;
  left:   0;
  display:        flex;
  align-items:    center;
  justify-content: center;
  background-color: transparent;
  z-index:        10;
}
.cart-content.invisible {
  visibility: hidden;
}

/* ---------- Checkout helpers ---------- */
.checkout-steps .nav-link {
  white-space: normal;
}
.checkout-steps .step-label {
  margin-left: .25rem;
}
.checkout-summary .list-group-item {
  flex-wrap: wrap;
}
.checkout-steps {
  overflow-x: auto;
  padding-bottom: .2rem;
  -webkit-overflow-scrolling: touch;
}
.checkout-steps .nav-item {
  flex: 0 0 auto;
}
.checkout-steps::-webkit-scrollbar {
  height: 4px;
}
.step-circle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.checkout-summary-sticky {
  will-change: transform;
}
.checkout-action-bar {
  margin-top: .5rem;
}
.checkout-action-wrap {
  width: 100%;
}

/* ---------- Utility Image Sizes ---------- */
.img-20 { width:20px; height:20px; }
.img-24 { width:24px; height:24px; }
.img-30 { width:30px; height:30px; }
.img-40 { width:40px; height:40px; object-fit:cover; }
.img-60 { width:60px; height:60px; object-fit:cover; }
.img-80 { width:80px; height:80px; object-fit:cover; }

/* ---------- Dimension Helpers ---------- */
.min-w-0   { min-width:0; }
.max-w-500 { max-width:500px; }
.max-w-600 { max-width:600px; }
.max-w-800 { max-width:800px; }
.max-w-90  { max-width:90px; }
.sticky-top-70 { top:70px; }
.h-400     { height:400px; }
.font-small-90 { font-size:.9rem; }
.w-60p     { width:60%; }
.w-40p     { width:40%; }
.w-20p     { width:20%; }
.w-33p     { width:33%; }
.w-60px    { width:60px; }
.w-70px    { width:70px; }
.w-140px   { width:140px; }
.truncate-140 { max-width:140px; }
.truncate-160 { max-width:160px; }
.col-w-6 { width: 6%; }
.col-w-7 { width: 7%; }
.col-w-9 { width: 9%; }
.col-w-12 { width: 12%; }
.col-w-17 { width: 17%; }
.col-w-24 { width: 24%; }
.switch-compact { transform: scale(0.9); }
.no-pointer-events { pointer-events: none; }
.progress-thin { height: 4px; }
.checkout-progress-bar { transition: width .25s ease; }

/* ---------- Accessibility ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.dropdown-item:focus-visible {
  outline: 2px solid var(--market-focus-ring);
  outline-offset: 2px;
}

/* ---------- Visual System Refresh ---------- */
.config-compact > .row > [class*="col-"] > .card,
.config-compact .tab-pane > .card,
.config-compact .tab-pane .card {
  border: 1px solid var(--market-border);
  border-radius: .95rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}
.config-compact > .row > [class*="col-"] > .card > .card-body {
  padding: 1rem;
}
.config-compact .nav-tabs {
  gap: .45rem;
  border-bottom: 0;
  overflow-x: auto;
  flex-wrap: nowrap;
  padding-bottom: .35rem;
  scrollbar-width: thin;
}
.config-compact .nav-tabs .nav-link {
  border: 1px solid var(--market-border);
  border-radius: 999px;
  color: #475569;
  background: #fff;
  white-space: nowrap;
  font-weight: 700;
  padding: .45rem .78rem;
}
.config-compact .nav-tabs .nav-link:hover {
  background: rgba(var(--market-primary-rgb), .08);
  border-color: rgba(var(--market-primary-rgb), .24);
  color: var(--market-primary-strong);
}
.config-compact .nav-tabs .nav-link.active {
  background: var(--market-primary);
  border-color: var(--market-primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(var(--market-primary-rgb), .22);
}
#pane-scheduler .scheduler-metrics,
#pane-scheduler .cycle-tile {
  border-color: rgba(var(--market-primary-rgb), .18);
  background: linear-gradient(180deg, #fff 0%, #fff7f2 100%);
}
#pane-scheduler .scheduler-metric-value,
#pane-scheduler .cycle-value {
  color: var(--market-primary-strong);
}
.config-table-wrap,
.mybuyee-page .table-responsive {
  scrollbar-width: thin;
}
.config-sticky-table thead th,
.mybuyee-page .table thead th {
  font-size: .76rem;
  letter-spacing: .035em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .logo-slider .slider {
    animation: none !important;
  }
  .marktparse-page .product-card {
    animation: none !important;
  }
}

/* ---------- Media Queries ---------- */
@media (max-width:1280px) {
  .product-card .card-img-top { height:170px; }
}
@media (max-width:767px) {
  .market-select {
    display:flex; flex-wrap:wrap; gap:.25rem;
  }
  .market-select .btn {
    flex:1 0 calc(50% - .25rem);
  }
}
@media (max-width:991.98px) {
  .marktparse-page.has-mobile-filter-bar {
    padding-bottom: 5.75rem;
  }
  .market-hero-actions {
    justify-content: flex-start;
  }
  .hero-action-btn {
    width: 100%;
  }
  .market-hero-actions form {
    flex: 1 1 100%;
  }
}

@media (max-width:767.98px) {
  .dashboard-page .dashboard-subtitle {
    font-size: .85rem;
  }
  .dashboard-page .dashboard-chart-area {
    min-height: 220px;
  }
  .dashboard-page .dashboard-users-table {
    max-height: none;
  }
  .active-filter-chip {
    max-width: calc(100vw - 2.75rem);
  }
  .checkout-steps {
    flex-wrap:nowrap; gap:.25rem; font-size:.9rem;
  }
  .checkout-steps .step-label { display:none; }
  .cart-name { max-width:120px; }
  .product-card .card-img-top { height:160px; }
  .small-text { font-size:.8rem; }
  .card-text  { font-size:.8rem; }
  .market-hero { padding: 1rem; }
  .hero-title { font-size: 1.55rem; }
  .hero-subtitle { font-size: .86rem; }
  .market-hero-actions {
    gap: .45rem;
  }
  .view-toolbar {
    border-radius: .75rem;
    padding: .45rem;
  }
  .toolbar-hint {
    display: none !important;
  }
  .view-toolbar #share-url {
    max-width: 48%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-filter-section {
    padding: .65rem;
    margin-bottom: .75rem;
  }
  .checkout-page {
    padding-bottom: calc(6rem + env(safe-area-inset-bottom));
  }
  .checkout-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background: rgba(255,255,255,0.97);
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -12px 28px rgba(15, 23, 42, 0.12);
    padding: .65rem .75rem calc(.65rem + env(safe-area-inset-bottom));
    margin: 0;
    display: grid !important;
    gap: .5rem;
    grid-template-columns: 1fr 1fr;
  }
  .checkout-action-bar .btn {
    width: 100%;
    font-size: .9rem;
  }
  .checkout-action-wrap {
    width: 100%;
  }
  .mobile-clear-filters-bar {
    bottom: calc(.7rem + env(safe-area-inset-bottom));
  }
}

@media (min-width:992px) {
  .checkout-summary-sticky {
    position: sticky;
    top: 84px;
  }
  .checkout-summary-sticky .checkout-summary {
    max-height: 52vh;
    overflow: auto;
  }
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Modals ---------- */
.modal-backdrop {
  z-index:3000 !important;
}
.modal {
  z-index:3001 !important;
}

/* ---------- Price Range Inputs ---------- */
.price-range input[type=number]::-webkit-outer-spin-button,
.price-range input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance:none; margin:0;
}
.price-range input[type=number] {
  -moz-appearance:textfield; min-width:70px;
}

/* ---------- Marketplace Search ---------- */
.market-select .btn {
  white-space:nowrap;
}

/* ---------- Code Input ---------- */
.code-input {
  font-family:monospace; white-space:pre;
}

/* ---------- Sign-in Page Styles ---------- */
html, body {
  height:100%;
}
.body-login {
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:calc(100vh - 80px);
  padding:40px 0;
  background-color:var(--site-bg-color);
}
.form-signin {
  width:100%;
  max-width:330px;
  padding:15px; margin:auto;
}
.form-signin .form-floating:focus-within {
  z-index:2;
}
.form-signin input[type="text"],
.form-signin input[type="email"] {
  margin-bottom:-1px;
  border-bottom-right-radius:0;
  border-bottom-left-radius:0;
}
.form-signin input[type="password"] {
  margin-bottom:10px;
  border-top-left-radius:0;
  border-top-right-radius:0;
}

/* ---------- Product Detail Carousel ---------- */
#itemCarousel {
  max-width:600px;
  margin:0 auto;
}
#itemCarousel img {
  max-height:400px; object-fit:contain;
}

/* ---------- Checkout & Terms Cards Hover ---------- */
.card-checkout,
.card-terms {
  background-color:#fff;
  border:1px solid #e0e0e0;
  border-radius:.75rem;
  transition:transform .25s cubic-bezier(.4,0,.2,1),
             box-shadow .25s cubic-bezier(.4,0,.2,1);
}
.card-checkout:hover,
.card-terms:hover {
  transform: translateY(-5px);
  box-shadow:0 .5rem 1rem rgba(0,0,0,0.1);
}

/* ---------- Lighter Card Headers & Icons ---------- */
.card-checkout .card-header,
.card-terms .card-header {
  background:#fff;
  color:#343a40!important;
  border-bottom:1px solid #e0e0e0;
  border-top-left-radius:.75rem;
  border-top-right-radius:.75rem;
}
.card-checkout .card-header i,
.card-terms .card-header i {
  color:var(--bs-primary); font-size:1.1rem;
}

/* ---------- Terms List Styling ---------- */
.terms-list {
  list-style:none; padding-left:0; margin:0;
}
.terms-list li {
  position:relative; padding-left:1.9rem;
  margin-bottom:.75rem; line-height:1.45;
}
.terms-list li::before {
  content:"\F26B";
  font-family:"bootstrap-icons";
  position:absolute; left:0; top:.15rem;
  color:var(--bs-success); font-size:1rem;
}

/* ---------- Accept Checkbox Styling ---------- */
#agree-all.form-check-input:checked {
  background-color:var(--bs-primary)!important;
  border-color:var(--bs-primary)!important;
}

/* ---------- Estilos de "Add item" & "Pending Carts" ---------- */
.card.shadow-sm.rounded.mb-4 {
  border: none;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.card.shadow-sm.rounded.mb-4:hover {
  transform: translateY(-2px);
}
.card.shadow-sm.rounded.mb-4 .card-header {
  background: #fff;
  color: #343a40 !important;
}
.card.shadow-sm.rounded.mb-4 .card-header i {
  color: var(--bs-primary);
}
.card.shadow-sm.rounded.mb-4 .btn-outline-primary {
  color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  background: transparent !important;
}

/* ---------- Smooth banner animation ---------- */
#missingInfoBox.fade {
  transition: opacity .4s ease;
}

/* ---------- Mobile cart list helpers ---------- */
.mobile-cart-list .list-group-item {
  border: 1px solid #e0e0e0;
  border-radius: .25rem;
  margin-bottom: .75rem;
}
.mobile-cart-list .btn {
  margin-right: .5rem;
  margin-bottom: .25rem;
}

/* ───────── Sección “Cómo funciona” ───────── */
.how-it-works {
  margin-bottom: 1rem;
  text-align: center;
  margin-bottom: 1rem !important;
}

.how-it-works h4 {
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hiw-card {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: .75rem;
  transition: transform .2s, box-shadow .2s;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1.5rem;
}

.hiw-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 .5rem 1rem rgba(0,0,0,0.1);
}

.hiw-card i {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--bs-primary);
}

.hiw-card h6 {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.hiw-card p {
  margin: 0;
  color: #6c757d;
  font-size: .9rem;
}

/* ----- Modern "Cómo funciona" steps ----- */
.hiw-step,
.hiw-step-mobile {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: .75rem;
  transition: transform .2s, box-shadow .2s;
}
.hiw-step:hover,
.hiw-step-mobile:hover {
  transform: translateY(-5px);
  box-shadow: 0 .5rem 1rem rgba(0,0,0,0.1);
}
.hiw-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  padding: 1.5rem;
}
.hiw-step-mobile {
  padding: .75rem;
}
.step-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bs-primary);
  color: #fff;
  border-radius: 50%;
}
.hiw-step .step-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}
.hiw-step-mobile .step-icon {
  width: 40px;
  height: 40px;
  margin-right: .75rem;
  font-size: 1.25rem;
}
.step-icon .step-number {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  width: 22px;
  height: 22px;
  background: #fff;
  color: var(--bs-primary);
  border-radius: 50%;
  font-size: .75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bs-primary);
}
.hiw-step h6,
.hiw-step-mobile h6 {
  font-weight: 500;
  margin-bottom: .25rem;
}
.hiw-step p,
.hiw-step-mobile p {
  margin: 0;
  color: #6c757d;
  font-size: .9rem;
}
.hiw-step-mobile p {
  font-size: .8rem;
}
.hiw-steps-mobile {
  display: flex;
  flex-direction: column;
}

@media (max-width:576px) {
  .how-it-works-mobile {
    display: flex;
    gap: .25rem;
  }
  .hiw-card-mobile {
    flex: 1 1 0;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: .75rem;
    padding: .75rem;
  }
  .hiw-card-mobile i {
    font-size: 1.5rem;
    color: var(--bs-primary);
    margin-bottom: .25rem;
  }
  .hiw-card-mobile h6 {
    font-size: .85rem;
    font-weight: 500;
    margin-bottom: .25rem;
  }
  .hiw-card-mobile p {
    font-size: .7rem;
    margin: 0;
    color: #6c757d;
  }
}
/* ───────────────────────────────────────────── */

/* ---------- Footer links ---------- */
.footer-link {
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.footer-link.active {
  text-decoration: underline;
  font-weight: 600;
}

footer.bg-primary {
  width: 100%;
  font-size: 0.8rem;
}
/* ---------- Responsive Tables ---------- */
@media (max-width:576px) {
  .table-mobile thead { display: none; }
  .table-mobile tbody tr { display: block; border:1px solid #e0e0e0; border-radius:.5rem; margin-bottom:.75rem; padding:.5rem; }
  .table-mobile tbody tr td { display:flex; justify-content:space-between; padding:.25rem .5rem; }
  .table-mobile tbody tr td::before { content: attr(data-label); font-weight:600; margin-right:.5rem; }
  .table-mobile tbody tr td:first-child::before { content:""; }

  .order-card,
  .package-card {
    border:none;
    border-radius:.5rem;
    box-shadow:0 2px 8px rgba(0,0,0,0.1);
    transition: background-color .2s;
  }
  .order-card:hover,
  .package-card:hover {
    background-color:var(--site-bg-color);
  }
  .order-card .card-body > div,
  .package-card .card-body > div { padding:.25rem 0; }
  .order-card .card-title,
  .package-card .card-title {
    font-size: 1.1rem;
  }
  .order-card ul,
  .package-card ul {
    padding-left: 0;
    font-size: .9rem;
  }
  .order-card li,
  .package-card li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
    padding: .35rem 0;
  }
  .order-card .shipment-btn,
  .package-card .shipment-btn {
    text-align: end;
  }
  .order-card li:last-child,
  .package-card li:last-child { border-bottom: none; }
  .package-card .form-check {
    display: flex;
    align-items: flex-start;
  }
  .package-card .form-check-input {
    position: static;
    margin-left: 0;
    margin-right: .5rem;
  }
}

/* ---- Packages tabs ---- */
#packagesTabs .nav-link {
  width: 100%;
}

@media (max-width:576px) {
  #packagesTabs .nav-item {
    flex: 0 0 50%;
  }
}

/* ---- Ready select radio ---- */
.ready-select.form-check-input {
  margin-left: 0;
}

/* ---- Logo slider ---- */
.logo-slider {
  overflow: hidden;
  --gap: 10px;
}
.logo-slider .slider {
  display: flex;
  gap: var(--gap);
  animation: slidein var(--duration, 30s) linear infinite;
}
.logo-slider .logos {
  display: contents;
}
.logo-slider .logo-item {
  flex: 0 0 calc((100% - (var(--visible, 5) - 1) * var(--gap)) / var(--visible, 5));
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  animation: fade-in 0.5s cubic-bezier(0.455, 0.03, 0.515, 0.955) forwards;
}
.logo-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 576px) {
  .logo-slider .logo-item {
    width: auto;
    flex: 0 0 auto;
    height: 100px;
    width: 200px;
  }
}


@keyframes slidein {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-100%, 0, 0); }
}

@keyframes fade-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* ---------- Address list ---------- */
.address-list .list-group-item {
  border-radius: .375rem;
}
.address-actions .btn {
  margin-left: .25rem;
}

/* ---------- Dark Mode ---------- */
[data-bs-theme="dark"] {
  --site-bg-color: #1a1a2e;
  --market-ink: #e8e8f0;
  --market-surface: #16213e;
  --market-border: #2d2d4e;
  --bs-body-bg: #1a1a2e;
  --bs-body-color: #e8e8f0;
  --bs-card-bg: #16213e;
  --bs-nav-tabs-link-active-bg: #16213e;
}
[data-bs-theme="dark"] body {
  background-color: var(--site-bg-color);
  color: var(--market-ink);
}
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .product-card,
[data-bs-theme="dark"] .filter-card,
[data-bs-theme="dark"] .result-pill,
[data-bs-theme="dark"] .active-filters-panel,
[data-bs-theme="dark"] .mobile-filter-dock,
[data-bs-theme="dark"] .hiw-card,
[data-bs-theme="dark"] .hiw-step,
[data-bs-theme="dark"] .hiw-step-mobile,
[data-bs-theme="dark"] .card-checkout,
[data-bs-theme="dark"] .card-terms {
  background-color: var(--market-surface) !important;
  border-color: var(--market-border) !important;
  color: var(--market-ink);
}
[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-footer,
[data-bs-theme="dark"] .list-group-item {
  background-color: var(--market-surface);
  border-color: var(--market-border);
  color: var(--market-ink);
}
[data-bs-theme="dark"] .navbar.bg-primary {
  background-color: #0d0d1a !important;
}
[data-bs-theme="dark"] #adminSidebar {
  background: #0d0d1a;
  border-color: var(--market-border);
}
[data-bs-theme="dark"] .dropdown-menu {
  background-color: #16213e;
  border-color: var(--market-border);
}
[data-bs-theme="dark"] .dropdown-item {
  color: var(--market-ink);
}
[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
  background-color: #2d2d4e;
  color: var(--market-ink);
}
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: var(--market-surface);
  border-color: var(--market-border);
  color: var(--market-ink);
}
[data-bs-theme="dark"] .form-control::placeholder {
  color: #8888aa;
}
[data-bs-theme="dark"] .table {
  color: var(--market-ink);
  border-color: var(--market-border);
}
[data-bs-theme="dark"] .modal-content {
  background-color: #16213e;
  border-color: var(--market-border);
  color: var(--market-ink);
}
[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
  border-color: var(--market-border);
}
[data-bs-theme="dark"] .bg-dark-soft {
  background-color: rgba(232, 232, 240, 0.08) !important;
}
[data-bs-theme="dark"] .btn-ghost {
  background: #16213e;
  border-color: var(--market-border);
  color: var(--market-ink);
}
[data-bs-theme="dark"] .btn-ghost:hover {
  background: #2d2d4e;
  border-color: #4a4a6e;
}
[data-bs-theme="dark"] .active-filter-chip {
  background: rgba(var(--market-primary-rgb), 0.14);
  border-color: rgba(var(--market-primary-rgb), 0.34);
  color: var(--market-ink);
}
[data-bs-theme="dark"] .market-hero,
[data-bs-theme="dark"] .view-toolbar,
[data-bs-theme="dark"] .filter-group,
[data-bs-theme="dark"] .mobile-filter-section,
[data-bs-theme="dark"] .config-compact .nav-tabs .nav-link {
  background: var(--market-surface);
  border-color: var(--market-border);
}
[data-bs-theme="dark"] .view-toolbar,
[data-bs-theme="dark"] .config-compact .nav-tabs .nav-link {
  color: var(--market-ink);
}
[data-bs-theme="dark"] .market-hero {
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(var(--market-primary-rgb), 0.12), transparent 48%),
    linear-gradient(135deg, #0d0d1a 0%, #16213e 62%, rgba(var(--market-primary-rgb), 0.36) 145%);
  border-color: var(--market-border);
}
[data-bs-theme="dark"] .hero-subtitle,
[data-bs-theme="dark"] .filter-group .form-label,
[data-bs-theme="dark"] .mobile-filter-section .form-label {
  color: #a8a8c5;
}
[data-bs-theme="dark"] .filter-actions {
  background: linear-gradient(180deg, rgba(22,33,62,0), var(--market-surface) 30%);
}
[data-bs-theme="dark"] .config-compact .nav-tabs .nav-link.active,
[data-bs-theme="dark"] .view-toolbar .btn.active {
  color: #fff;
  background: var(--market-primary);
  border-color: var(--market-primary);
}
[data-bs-theme="dark"] .marktparse-page .product-card {
  background: var(--market-surface);
  border-color: var(--market-border);
}
[data-bs-theme="dark"] .marktparse-page .meta-pill {
  background: #2d2d4e;
  color: var(--market-ink);
  border-color: #4a4a6e;
}
[data-bs-theme="dark"] .marktparse-page .store-pill {
  background: #1e2a5e;
  color: #a5b4fc;
}
[data-bs-theme="dark"] .marktparse-page .new-pill {
  background: #064e3b;
  color: #6ee7b7;
}
[data-bs-theme="dark"] .marktparse-page .brand-pill {
  background: var(--market-ink);
  color: #1a1a2e;
}
[data-bs-theme="dark"] .marktparse-page .modern-title a {
  color: var(--market-ink);
}
[data-bs-theme="dark"] thead th {
  background-color: #0d0d1a;
  color: #e8e8f0;
}
[data-bs-theme="dark"] .checkout-action-bar {
  background: rgba(22, 33, 62, 0.97) !important;
  border-color: var(--market-border);
}

/* ---------- Gallery / List View Toggle ---------- */
body.view-list #product-container {
  display: flex !important;
  flex-direction: column;
  gap: 0.65rem;
}
body.view-list #product-container .col,
body.view-list #product-container [class*="col-"] {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
}
body.view-list .product-card {
  flex-direction: row;
  height: auto !important;
  min-height: 112px;
  align-items: stretch;
  border-radius: .85rem;
}
body.view-list .product-card .card-img-top,
body.view-list .product-card img.card-img-top {
  width: 112px !important;
  height: 112px !important;
  object-fit: cover;
  border-radius: .85rem 0 0 .85rem;
}
body.view-list .product-card .product-media {
  flex-shrink: 0;
  width: 112px;
  border-radius: .85rem 0 0 .85rem;
  overflow: hidden;
}
body.view-list .product-card .product-media img {
  width: 112px !important;
  height: 112px !important;
  aspect-ratio: unset;
  object-fit: cover;
}
body.view-list .product-card .card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem .9rem;
  padding: .7rem .85rem;
}
body.view-list .product-card .badge-row,
body.view-list .product-card .meta-row {
  grid-column: 1;
}
body.view-list .product-card .modern-title {
  grid-column: 1;
  min-height: 0;
  margin-bottom: 0 !important;
  -webkit-line-clamp: 1;
}
body.view-list .product-card .product-actions {
  grid-column: 2;
  grid-row: 1 / span 3;
  min-width: 150px;
}
body.view-list .product-card .price-chip {
  bottom: .5rem;
  left: .5rem;
  padding: .35rem .55rem;
  font-size: .86rem;
}
body.view-list .product-card .wishlist-icon {
  top: .45rem;
  right: .45rem;
  bottom: auto;
}
body.view-list .product-card .shipping-chip {
  display: none;
}

@media (max-width: 767.98px) {
  body.view-list .product-card .card-img-top,
  body.view-list .product-card img.card-img-top,
  body.view-list .product-card .product-media,
  body.view-list .product-card .product-media img {
    width: 86px !important;
    height: 104px !important;
  }
  body.view-list .product-card .card-body {
    grid-template-columns: minmax(0, 1fr);
    gap: .35rem;
  }
  body.view-list .product-card .product-actions {
    grid-column: 1;
    grid-row: auto;
    min-width: 0;
    grid-template-columns: 1fr 1fr auto;
  }
  body.view-list .product-card .product-actions .btn {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ---------- SSE New Item Flash ---------- */
@keyframes newItemFlash {
  0% { outline: 2px solid var(--market-primary); outline-offset: 2px; }
  100% { outline: 2px solid transparent; }
}
.new-item-flash { animation: newItemFlash 2s ease-out forwards; }
