/* FORM GROUPS */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row > * {
  flex: 1;
}

/* FILTERS & SEARCH */
.filters-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-box i, .search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  width: 16px;
  height: 16px;
}

.search-box input {
  padding-left: 36px;
}

.filter-select {
  width: auto;
  min-width: 150px;
}

/* O CONTEÚDO ORIGINAL AQUI FOI MOVIDO PARA O BLOCO FINAL RESPONSIVE */

/* LIST ITEMS & TABLES */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-item {
  background-color: var(--bg-primary);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
}

.list-item:hover {
  border-color: var(--border-hover);
  background-color: var(--bg-secondary);
}

.list-item-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.list-item-info {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  display: block;
}

.list-item-subtitle {
  font-size: 12px;
  color: var(--text-tertiary);
  display: block;
}

.list-item-meta {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-right: 16px;
}

.meta-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.meta-label {
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.meta-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.list-item-actions {
  display: flex;
  gap: 8px;
}

/* MODAL FORM REFINEMENT */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
  border-radius: 0 0 16px 16px;
  flex-shrink: 0;
}
/* Removed redundant auth-box/body definitions to avoid conflicts with centralized system at line 485 */

.catalog-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  transition: var(--transition);
}

.catalog-card:hover {
  border-color: var(--primary);
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background-color: var(--bg-secondary);
  padding: 4px;
  border-radius: 10px;
}

.auth-tab {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.active {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.auth-link {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.auth-err, .auth-ok {
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 16px;
  display: none;
}

.auth-err { background: rgba(220,53,69,0.1); color: #dc3545; }
.auth-ok { background: rgba(40,167,69,0.1); color: #28a745; }

/* TOASTS */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--text-primary);
  color: var(--bg-primary);
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 2000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* EQUIPAMENTO CARDS */
.equip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.equip-card {
  background-color: var(--bg-primary);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.equip-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.equip-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  background-color: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}

.equip-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.equip-card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.equip-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.equip-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.equip-card-id {
  font-size: 11px;
  color: var(--text-tertiary);
}

.equip-card-props {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.equip-prop {
  display: flex;
  flex-direction: column;
}

.equip-prop-label {
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.equip-prop-value {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.equip-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 0.5px solid var(--border);
}

/* UTILS */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.gap-20 { gap: 20px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-24 { margin-top: 24px; }
.mr-8 { margin-right: 8px; }

.img-fit {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bg-blue-light { background-color: rgba(26,111,212,0.1); }
.bg-orange-light { background-color: rgba(245,127,23,0.1); }
.bg-yellow-light { background-color: rgba(255,249,196,0.2); }
.bg-green-light { background-color: rgba(76,175,80,0.1); }
.bg-purple-light { background-color: rgba(124,77,255,0.1); }

.color-blue { color: var(--primary); }
.color-green { color: #2E7D32; }
.color-orange { color: #F57F17; }
.color-purple { color: #7c4dff; }

/* SIDEBAR FOOTER & PROFILE */
.sidebar-footer {
  padding: 12px 8px;
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
  position: sticky;
  bottom: 0;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
  overflow: hidden;
}

.user-profile:hover {
  background: var(--bg-secondary);
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  transition: opacity 0.2s;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-plan {
  font-size: 11px;
  color: var(--text-tertiary);
}

.sidebar.collapsed .user-info {
  opacity: 0;
  pointer-events: none;
}

/* CATALOG CARDS */
.catalog-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.catalog-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.catalog-header {
  height: 100px;
  background: linear-gradient(135deg, var(--primary-light), var(--bg-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.catalog-header i, .catalog-header svg {
  width: 40px;
  height: 40px;
}

.catalog-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cat-card-content {
  text-align: center;
  padding: 30px 20px;
}

.cat-card-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.cat-card-icon-wrapper i, .cat-card-icon-wrapper svg {
  width: 28px;
  height: 28px;
  color: white;
}

.cat-card-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.cat-card-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .cat-card-content {
    padding: 20px 16px;
  }
}

.catalog-status {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
}

.catalog-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
}

.catalog-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.catalog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.cat-tag {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.cat-tag.purple { background: var(--purple-light); color: var(--purple); }
.cat-tag.green { background: var(--green-light); color: var(--green); }
.cat-tag.blue { background: var(--primary-light); color: var(--primary); }

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* STATS CARD SMALL */
.stat-card-small {
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
  transition: all var(--transition);
}

.stat-card-small:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  border-color: var(--border-hover);
}

.stat-card-small.bg-blue-light   { border-color: rgba(26, 115, 232, 0.40); }
.stat-card-small.bg-orange-light  { border-color: rgba(249, 115, 22, 0.40); }
.stat-card-small.bg-yellow-light  { border-color: rgba(245, 158, 11, 0.40); }
.stat-card-small.bg-green-light   { border-color: rgba(16, 185, 129, 0.40); }
.stat-card-small.bg-purple-light  { border-color: rgba(139, 92, 246, 0.40); }
.stat-card-small.bg-red-light     { background-color: rgba(239, 68, 68, 0.07); border-color: rgba(239, 68, 68, 0.40); }

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background-color: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.stat-icon i, .stat-icon svg {
  width: 20px !important;
  height: 20px !important;
  color: var(--text-secondary) !important;
}

.stat-card-small.bg-blue-light .stat-icon   { background-color: rgba(26, 115, 232, 0.15); }
.stat-card-small.bg-orange-light .stat-icon  { background-color: rgba(249, 115, 22, 0.15); }
.stat-card-small.bg-green-light .stat-icon   { background-color: rgba(16, 185, 129, 0.15); }
.stat-card-small.bg-purple-light .stat-icon  { background-color: rgba(139, 92, 246, 0.15); }
.stat-card-small.bg-yellow-light .stat-icon  { background-color: rgba(245, 158, 11, 0.15); }
.stat-card-small.bg-red-light .stat-icon     { background-color: rgba(239, 68, 68, 0.15); }

.stat-card-small.bg-blue-light .stat-icon i   { color: var(--primary) !important; }
.stat-card-small.bg-orange-light .stat-icon i  { color: var(--orange) !important; }
.stat-card-small.bg-green-light .stat-icon i   { color: var(--green) !important; }
.stat-card-small.bg-purple-light .stat-icon i  { color: var(--purple) !important; }
.stat-card-small.bg-yellow-light .stat-icon i  { color: var(--yellow) !important; }
.stat-card-small.bg-red-light .stat-icon i     { color: var(--red) !important; }

/* Stat value colored text per variant */
.stat-card-small.bg-green-light .stat-value   { color: var(--green); }
.stat-card-small.bg-blue-light .stat-value    { color: var(--primary); }
.stat-card-small.bg-orange-light .stat-value  { color: var(--orange); }
.stat-card-small.bg-purple-light .stat-value  { color: var(--purple); }
.stat-card-small.bg-yellow-light .stat-value  { color: var(--yellow); }
.stat-card-small.bg-red-light .stat-value     { color: var(--red); }

.stat-content {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: center;
  flex-grow: 1;
  gap: 12px;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
}

/* PIPELINE PRODUCTION CARDS */
.pipeline-stage-card {
  flex: 1 1 calc(14% - 12px);
  min-width: 95px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--transition);
  opacity: 0.7;
}

.pipeline-stage-card.has-items {
  background: var(--bg-primary);
  border-color: var(--stage-color);
  opacity: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.pipeline-stage-card.has-items:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.pipeline-stage-icon-wrapper {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  color: var(--text-tertiary);
  transition: all var(--transition);
}

.dark .pipeline-stage-icon-wrapper {
  background: rgba(255, 255, 255, 0.06);
}

.pipeline-stage-card.has-items .pipeline-stage-icon-wrapper {
  color: var(--stage-color);
  background: var(--stage-light-color);
}

/* DROPDOWN MENUS (POP-UPS) */
.dropdown-container {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none; /* Oculta o original estático dentro dos cards */
}

/* O clone injetado via portal global de dropdowns */
.global-dropdown-menu {
  display: block;
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: dropdownFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.dropdown-item i, .dropdown-item svg {
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.dropdown-item:hover i, .dropdown-item:hover svg {
  color: var(--primary);
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============================================================
   CATALOG EDIT MODAL — Produto Search & Selected List
   ============================================================ */

/* Wrapper do campo de busca de produtos */
.prod-search-wrapper {
  position: relative;
}

/* Dropdown de resultados de busca */
.prod-search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  z-index: 200;
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  animation: dropdownFadeIn 0.15s cubic-bezier(0.16,1,0.3,1);
}

.prod-search-dropdown::-webkit-scrollbar { width: 4px; }
.prod-search-dropdown::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Item individual no dropdown */
.prod-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}

.prod-search-item:hover {
  background: var(--bg-secondary);
}

/* Thumbnail do item no dropdown — TAMANHO FIXO */
.prod-search-item img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

.prod-search-item .prod-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.prod-search-item .prod-item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prod-search-item .prod-item-price {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Lista de produtos selecionados */
.prod-selected-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 2px;
}

.prod-selected-list::-webkit-scrollbar { width: 4px; }
.prod-selected-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Card de produto selecionado */
.prod-selected-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.15s;
}

.prod-selected-item:hover {
  border-color: var(--primary);
}

/* Thumbnail do item selecionado — TAMANHO FIXO */
.prod-selected-item img {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg-primary);
}

.prod-selected-item .prod-sel-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.prod-selected-item .prod-sel-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prod-selected-item .prod-sel-price {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 1px;
}

.prod-sel-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.prod-sel-remove:hover {
  color: var(--danger);
  background: rgba(220,53,69,0.08);
}

/* Seção de configurações no modal */
.cat-config-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.cat-config-section label.switch-label {
  flex: 1;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.cat-config-section .switch-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cat-config-section .switch-desc {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Empty state dos produtos selecionados */
.prod-selected-empty {
  text-align: center;
  padding: 24px 12px;
  color: var(--text-tertiary);
  font-size: 0.82rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  margin-top: 10px;
}

/* PROMO GLOW EFFECT */
.promo-glow {
  animation: goldPulse 2s infinite !important;
  border: 1px solid rgba(255, 215, 0, 0.6) !important;
}

@keyframes goldPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
  70% { box-shadow: 0 0 15px 8px rgba(255, 215, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}



/* STEPPER FIXED WRAPPER */
.stepper-fixed-wrapper {
  height: 60vh;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}
.stepper-fixed-wrapper .step-content.active {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  padding-bottom: 16px;
}
.stepper-fixed-wrapper .step-content.active::-webkit-scrollbar { width: 4px; }
.stepper-fixed-wrapper .step-content.active::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

@media (max-width: 600px) {
  .stepper-fixed-wrapper {
    height: 70vh;
    min-height: 450px;
  }
}

/* ANIMATED PILL STEPPER */
.pill-stepper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 100%;
}
.pill-stepper-dots {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    padding: 0 4px;
}
.pill-stepper-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
    z-index: 10;
    background: var(--border);
    transition: background 0.3s ease;
}
.pill-stepper-dot.active {
    background: #fff;
}
.pill-stepper-overlay {
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
    background: var(--primary);
    border-radius: 12px;
    transition: width 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 5;
}
.pill-stepper-actions {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 4px;
    width: 100%;
    max-width: 380px;
}
.pill-btn-prev {
    padding: 12px 0;
    color: var(--text-primary);
    background: var(--glass-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    width: 0;
    border-width: 0;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s ease-in;
    cursor: pointer;
}
.pill-btn-prev.visible {
    opacity: 1;
    width: 64px;
    padding: 12px 16px;
    border-width: 1px;
}
.pill-btn-prev:hover {
    background: rgba(255, 255, 255, 0.05);
}
.pill-btn-next {
    flex: 1;
    padding: 12px 16px;
    color: #fff;
    background: var(--primary);
    border: none;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    min-width: 120px;
}
.pill-btn-next:hover {
    background: color-mix(in srgb, var(--primary) 85%, black);
    filter: brightness(0.92);
}

/* modal footer layout for pill stepper */
.modal-footer {
    display: none;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-primary);
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}
/* Theme Switch CSS */
.theme-switch {
  --toggle-size: 8px;
  --container-width: 5.625em;
  --container-height: 2.5em;
  --container-radius: 6.25em;
  --container-light-bg: #3D7EAE;
  --container-night-bg: #1D1F2C;
  --circle-container-diameter: 3.375em;
  --sun-moon-diameter: 2.125em;
  --sun-bg: #ECCA2F;
  --moon-bg: #C4C9D1;
  --spot-color: #959DB1;
  --circle-container-offset: calc((var(--circle-container-diameter) - var(--container-height)) / 2 * -1);
  --stars-color: #fff;
  --clouds-color: #F3FDFF;
  --back-clouds-color: #AACADF;
  --transition: .5s cubic-bezier(0, -0.02, 0.4, 1.25);
  --circle-transition: .3s cubic-bezier(0, -0.02, 0.35, 1.17);
}
.theme-switch, .theme-switch *, .theme-switch *::before, .theme-switch *::after {
  box-sizing: border-box; margin: 0; padding: 0; font-size: var(--toggle-size);
}
.theme-switch__container {
  width: var(--container-width); height: var(--container-height); background-color: var(--container-light-bg);
  border-radius: var(--container-radius); overflow: hidden; cursor: pointer;
  box-shadow: 0em -0.062em 0.062em rgba(0, 0, 0, 0.25), 0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
  transition: var(--transition); position: relative;
}
.theme-switch__container::before {
  content: ""; position: absolute; z-index: 1; inset: 0;
  box-shadow: 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset; border-radius: var(--container-radius);
}
.theme-switch__checkbox { display: none; }
.theme-switch__circle-container {
  width: var(--circle-container-diameter); height: var(--circle-container-diameter);
  background-color: rgba(255, 255, 255, 0.1); position: absolute; left: var(--circle-container-offset);
  top: var(--circle-container-offset); border-radius: var(--container-radius);
  box-shadow: inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), 0 0 0 0.625em rgba(255, 255, 255, 0.1);
  display: flex; transition: var(--circle-transition); pointer-events: none;
}
.theme-switch__sun-moon-container {
  pointer-events: auto; position: relative; z-index: 2; width: var(--sun-moon-diameter);
  height: var(--sun-moon-diameter); margin: auto; border-radius: var(--container-radius);
  background-color: var(--sun-bg);
  box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #a1872a inset;
  filter: drop-shadow(0.062em 0.125em 0.125em rgba(0, 0, 0, 0.25)); overflow: hidden; transition: var(--transition);
}
.theme-switch__moon {
  transform: translateX(100%); width: 100%; height: 100%; background-color: var(--moon-bg);
  border-radius: inherit;
  box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #969696 inset;
  transition: var(--transition); position: relative;
}
.theme-switch__spot {
  position: absolute; top: 0.75em; left: 0.312em; width: 0.75em; height: 0.75em; border-radius: var(--container-radius);
  background-color: var(--spot-color); box-shadow: 0em 0.0312em 0.062em rgba(0, 0, 0, 0.25) inset;
}
.theme-switch__spot:nth-of-type(2) { width: 0.375em; height: 0.375em; top: 0.937em; left: 1.375em; }
.theme-switch__spot:nth-last-of-type(3) { width: 0.25em; height: 0.25em; top: 0.312em; left: 0.812em; }
.theme-switch__clouds {
  width: 1.25em; height: 1.25em; background-color: var(--clouds-color); border-radius: var(--container-radius);
  position: absolute; bottom: -0.625em; left: 0.312em;
  box-shadow: 0.937em 0.312em var(--clouds-color), -0.312em -0.312em var(--back-clouds-color), 1.437em 0.375em var(--clouds-color), 0.5em -0.125em var(--back-clouds-color), 2.187em 0 var(--clouds-color), 1.25em -0.062em var(--back-clouds-color), 2.937em 0.312em var(--clouds-color), 2em -0.312em var(--back-clouds-color), 3.625em -0.062em var(--clouds-color), 2.625em 0em var(--back-clouds-color), 4.5em -0.312em var(--clouds-color), 3.375em -0.437em var(--back-clouds-color), 4.625em -1.75em 0 0.437em var(--clouds-color), 4em -0.625em var(--back-clouds-color), 4.125em -2.125em 0 0.437em var(--back-clouds-color);
  transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
}
.theme-switch__stars-container {
  position: absolute; color: var(--stars-color); top: -100%; left: 0.312em; width: 2.75em; height: auto;
  transition: var(--transition);
}
.theme-switch__checkbox:checked + .theme-switch__container { background-color: var(--container-night-bg); }
.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container { left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter)); }
.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container:hover { left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter) - 0.187em); }
.theme-switch__circle-container:hover { left: calc(var(--circle-container-offset) + 0.187em); }
.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__moon { transform: translate(0); }
.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__clouds { bottom: -4.062em; }
.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__stars-container { top: 50%; transform: translateY(-50%); }

/* ===== 3-STAGE THEME SWITCH (LIGHT / AUTO / DARK) ===== */
.theme-switch-3stage {
  --toggle-size: 8px;
  --container-width: 8.5em;
  --container-height: 2.8em;
  --container-radius: 6.25em;
  --container-light-bg: #3D7EAE;
  --container-auto-bg: #4B5563;
  --container-night-bg: #1D1F2C;
  --circle-container-diameter: 3.375em;
  --sun-moon-diameter: 2.125em;
  --sun-bg: #ECCA2F;
  --moon-bg: #C4C9D1;
  --auto-bg: #2563EB;
  --spot-color: #959DB1;
  --circle-container-offset: calc((var(--circle-container-diameter) - var(--container-height)) / 2 * -1);
  --stars-color: #fff;
  --clouds-color: #F3FDFF;
  --back-clouds-color: #AACADF;
  --transition: .5s cubic-bezier(0, -0.02, 0.4, 1.25);
  --circle-transition: .35s cubic-bezier(0, -0.02, 0.35, 1.17);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.theme-switch-3stage, .theme-switch-3stage *, .theme-switch-3stage *::before, .theme-switch-3stage *::after {
  box-sizing: border-box; margin: 0; padding: 0; font-size: var(--toggle-size);
}
.theme-switch-3stage .theme-switch__container {
  width: var(--container-width); height: var(--container-height);
  background-color: var(--container-light-bg); border-radius: var(--container-radius);
  overflow: hidden; cursor: pointer; position: relative;
  box-shadow: 0em -0.062em 0.062em rgba(0, 0, 0, 0.25), 0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
  transition: var(--transition);
}
.theme-switch-3stage .theme-switch__container::before {
  content: ""; position: absolute; z-index: 1; inset: 0;
  box-shadow: 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset; border-radius: var(--container-radius);
}
.theme-switch-3stage .theme-switch__circle-container {
  width: var(--circle-container-diameter); height: var(--circle-container-diameter);
  background-color: rgba(255, 255, 255, 0.1); position: absolute;
  left: var(--circle-container-offset); top: var(--circle-container-offset);
  border-radius: var(--container-radius);
  box-shadow: inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), 0 0 0 0.625em rgba(255, 255, 255, 0.1);
  display: flex; transition: var(--circle-transition); pointer-events: none;
}
.theme-switch-3stage .theme-switch__sun-moon-container {
  pointer-events: auto; position: relative; z-index: 2; width: var(--sun-moon-diameter);
  height: var(--sun-moon-diameter); margin: auto; border-radius: var(--container-radius);
  background-color: var(--sun-bg);
  box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #a1872a inset;
  filter: drop-shadow(0.062em 0.125em 0.125em rgba(0, 0, 0, 0.25)); overflow: hidden; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.theme-switch-3stage .theme-switch__auto-label {
  display: none; color: #ffffff; font-weight: 900; font-size: 1.35rem; font-family: 'Outfit', sans-serif;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5); z-index: 10; line-height: 1;
}

/* Positions per state */
/* Light state */
.theme-switch-3stage[data-theme="light"] .theme-switch__container { background-color: var(--container-light-bg); }
.theme-switch-3stage[data-theme="light"] .theme-switch__circle-container { left: var(--circle-container-offset); }
.theme-switch-3stage[data-theme="light"] .theme-switch__sun-moon-container { background-color: var(--sun-bg); }
.theme-switch-3stage[data-theme="light"] .theme-switch__moon { transform: translateX(100%); }
.theme-switch-3stage[data-theme="light"] .theme-switch__clouds { bottom: -0.625em; }
.theme-switch-3stage[data-theme="light"] .theme-switch__stars-container { top: -100%; }

/* Auto state */
.theme-switch-3stage[data-theme="auto"] .theme-switch__container { background-color: var(--container-auto-bg); }
.theme-switch-3stage[data-theme="auto"] .theme-switch__circle-container { left: calc(50% - (var(--circle-container-diameter) / 2)); }
.theme-switch-3stage[data-theme="auto"] .theme-switch__sun-moon-container {
  background-color: var(--auto-bg);
  box-shadow: 0.062em 0.062em 0.062em 0em rgba(255, 255, 255, 0.5) inset, 0em -0.062em 0.062em 0em #1d4ed8 inset;
}
.theme-switch-3stage[data-theme="auto"] .theme-switch__auto-label { display: block; }
.theme-switch-3stage[data-theme="auto"] .theme-switch__moon { transform: translateX(100%); }
.theme-switch-3stage[data-theme="auto"] .theme-switch__clouds { bottom: -2.2em; }
.theme-switch-3stage[data-theme="auto"] .theme-switch__stars-container { top: 20%; transform: translateY(-50%); opacity: 0.6; }

/* Dark state */
.theme-switch-3stage[data-theme="dark"] .theme-switch__container { background-color: var(--container-night-bg); }
.theme-switch-3stage[data-theme="dark"] .theme-switch__circle-container { left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter)); }
.theme-switch-3stage[data-theme="dark"] .theme-switch__sun-moon-container { background-color: var(--moon-bg); }
.theme-switch-3stage[data-theme="dark"] .theme-switch__moon { transform: translateX(0); }
.theme-switch-3stage[data-theme="dark"] .theme-switch__clouds { bottom: -4.062em; }
.theme-switch-3stage[data-theme="dark"] .theme-switch__stars-container { top: 50%; transform: translateY(-50%); opacity: 1; }

.theme-switch-3stage__labels {
  display: flex; justify-content: space-between; width: 100%; font-size: 0.75rem; font-weight: 700; color: var(--text-secondary); padding: 0 4px;
}
.theme-switch-3stage__labels span { cursor: pointer; transition: color 0.2s; }
.theme-switch-3stage[data-theme="light"] .lbl-light { color: var(--primary); font-weight: 800; }
.theme-switch-3stage[data-theme="auto"] .lbl-auto { color: var(--primary); font-weight: 800; }
.theme-switch-3stage[data-theme="dark"] .lbl-dark { color: var(--primary); font-weight: 800; }
/* VARIANT MODAL (SHOPEE STYLE) */
.variant-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.variant-modal-overlay.open {
    display: flex;
    opacity: 1;
}
.variant-modal-box {
    background: var(--bg-primary);
    width: 100%;
    max-width: 500px;
    border-radius: 16px 16px 0 0;
    padding: 16px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}
.variant-modal-overlay.open .variant-modal-box {
    transform: translateY(0);
}
.vm-header {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.vm-header-img {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    cursor: zoom-in;
    transition: opacity 0.2s, transform 0.2s;
}
.vm-header-img:hover {
    opacity: 0.9;
    transform: scale(1.03);
}
.vm-header-img:active {
    transform: scale(0.97);
}
.vm-header-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex: 1;
}
.vm-price {
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 700;
}
.vm-stock {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 4px;
}
.vm-close-btn {
    position: absolute;
    top: -4px;
    right: -4px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 8px;
}
.vm-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}
.vm-section-title {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 500;
}
.vm-options-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}
.vm-option-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.vm-option-btn img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}
.vm-option-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.vm-option-btn.selected {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(43, 108, 176, 0.05); /* light blue bg */
}
/* Variação indisponível — estilo Shopee */
.vm-option-btn.vm-option-unavailable {
    opacity: 0.45;
    filter: grayscale(40%);
    cursor: not-allowed;
    pointer-events: none; /* cancela clique via CSS também */
}
.vm-option-btn.vm-option-unavailable:hover {
    border-color: var(--border);
    color: var(--text-primary);
    background: var(--bg-secondary);
}
.vm-qty-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-bottom: 16px;
}
.vm-qty-controls {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.vm-qty-btn {
    background: var(--bg-secondary);
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
}
.vm-qty-btn:hover {
    background: var(--border);
}
.vm-qty-input {
    width: 48px;
    height: 32px;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: center;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9rem;
}
.vm-qty-input::-webkit-outer-spin-button,
.vm-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.vm-qty-input[type=number] {
  -moz-appearance: textfield;
}
.vm-qty-input:focus {
    outline: none;
}
.vm-footer {
    padding-top: 8px;
}
.vm-submit-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s;
}
.vm-submit-btn:hover {
    background: #1e4f85; /* darker blue */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.vm-submit-btn:active {
    transform: translateY(0);
    box-shadow: none;
}
.vm-submit-btn:disabled {
    background: var(--border);
    cursor: not-allowed;
    color: var(--text-tertiary);
    transform: none;
    box-shadow: none;
}

/* ========================================== */
/* LIGHTBOX NAVIGATION                        */
/* ========================================== */
.lightbox-nav-btn {
    position: absolute;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
}
.lightbox-nav-btn:hover {
    background: rgba(0,0,0,0.8);
}
.lightbox-nav-btn.lb-left {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}
.lightbox-nav-btn.lb-right {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

.lightbox-nav-btn.lb-up, .lightbox-nav-btn.lb-down {
    border-radius: 24px;
    width: auto;
    padding: 0 16px;
    font-size: 0.9rem;
    font-weight: 600;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
}
.lightbox-nav-btn.lb-up:hover, .lightbox-nav-btn.lb-down:hover {
    background: rgba(0,0,0,0.9);
}
.lightbox-nav-btn.lb-up {
    top: 20px;
}
.lightbox-nav-btn.lb-down {
    bottom: 20px;
    /* Adjust for text overlay */
    z-index: 20; 
}

@media (max-width: 768px) {
    /* Esconder botes no mobile pois usaremos gestos */
    .lightbox-nav-btn {
        display: none !important;
    }
}
