body {
  background: var(--surface-body);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

/* Catalog */
.app-container {
  align-items: stretch;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  min-width: 260px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--border-subtle);
  box-shadow: 10px 0 28px rgba(31, 24, 20, 0.05);
}

.sidebar-brand-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.9rem 1rem 0.75rem;
  text-align: center;
}

.sidebar-brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.sidebar-brand-logo {
  height: 44px;
}

.category-nav {
  padding: 0.65rem 0.65rem 1.5rem;
  gap: 0.28rem;
}

.machine-tree-item {
  padding: 0.25rem;
  border-radius: 14px;
  background: rgba(248, 246, 244, 0.72);
  border: 1px solid rgba(67, 56, 49, 0.07);
}

.machine-tree-item:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(67, 56, 49, 0.1);
}

.machine-tree-item.active {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(253, 105, 25, 0.22);
  box-shadow: 0 2px 14px rgba(253, 105, 25, 0.07);
}

.category-btn,
.category-group-btn,
.category-child-btn {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
}

.category-group-btn,
.category-child-btn {
  color: var(--text-secondary);
}

.category-btn {
  min-height: 40px;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  align-items: center;
  color: var(--text-primary);
}

.category-btn:hover {
  background: rgba(248, 246, 244, 0.85);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.category-btn.active {
  background: rgba(255, 252, 248, 0.98);
  border-color: rgba(253, 105, 25, 0.18);
  color: var(--text-primary);
}

.machine-btn-label {
  gap: 0.45rem;
  min-width: 0;
  flex-wrap: wrap;
  word-break: break-word;
}

.machine-btn-label .sidebar-item-icon {
  display: none;
}

.machine-btn-chevron,
.category-group-chevron {
  color: var(--text-light);
}

.machine-children {
  padding: 0 0.2rem 0.3rem 0.4rem;
}

.machine-children.visible {
  overflow: visible;
}

.machine-children.visible .machine-children-inner {
  overflow: visible;
}

.category-group.expanded .category-group-children-wrap {
  overflow: visible;
}

.machine-children::before {
  left: 0.55rem;
  background: rgba(67, 56, 49, 0.12);
}

.category-group {
  margin-top: 0.14rem;
  border-radius: 8px;
  background: transparent;
  border: none;
}

.category-group-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.36rem 0.55rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  overflow: hidden;
  color: var(--text-secondary);
}

.category-group-btn .category-child-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  min-width: 0;
  flex: 1;
}

.category-group-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
}

.category-group-btn.active {
  background: rgba(253, 105, 25, 0.07);
  border-color: rgba(253, 105, 25, 0.14);
  color: var(--color-brand-600);
  font-weight: 600;
}

.category-group-children {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0 0.3rem 0.35rem;
}

.category-child-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 28px;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  font-size: 0.77rem;
  font-weight: 400;
  text-align: left;
  overflow: hidden;
  color: var(--text-muted);
}

.category-child-btn .category-child-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  min-width: 0;
  flex: 1;
}

.category-child-btn:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-secondary);
  border-color: transparent;
}

.category-child-btn.active {
  background: rgba(253, 105, 25, 0.09);
  color: var(--color-brand-600);
  font-weight: 500;
}

.category-group-action {
  background: var(--surface-1);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.main-content {
  flex: 1;
  padding: 0.85rem 1rem 1.8rem;
  background: transparent;
}

.main-content > :is(.hero, .search-section, .authority-indicator, .results-header, .grid, .pagination-controls, .nenhum-resultado-mensagem, .main-footer) {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

.hero {
  min-height: clamp(110px, 15vh, 170px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(22, 18, 16, 0.96) 0%, rgba(36, 29, 25, 0.9) 100%);
  box-shadow: var(--shadow-elevated);
  margin-bottom: 0.5rem;
}

@keyframes heroInitialGlow {

  0%,
  100% {
    box-shadow:
      0 28px 60px rgba(31, 24, 20, 0.12),
      0 0 0 1px rgba(253, 105, 25, 0.05);
  }

  50% {
    box-shadow:
      0 32px 68px rgba(31, 24, 20, 0.15),
      0 0 28px rgba(253, 105, 25, 0.07);
  }
}

.main-content.page-initial .hero {
  animation: heroInitialGlow 10s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .main-content.page-initial .hero {
    animation: none;
    box-shadow: var(--shadow-elevated);
  }
}

.hero-bg {
  background-size: cover;
  background-position: center center;
  opacity: 0.68;
  filter: saturate(0.9) contrast(1.02);
}

.hero-bg::after {
  background: linear-gradient(180deg, rgba(18, 14, 11, 0.12) 0%, rgba(18, 14, 11, 0.26) 100%);
}

.main-header {
  display: flex;
  justify-content: flex-start;
  padding: 0;
  min-height: 0;
}

.menu-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%);
  color: #fff;
  opacity: 0.96;
  box-shadow: var(--shadow-card-hover);
  z-index: 99999;
}

.menu-toggle:hover {
  opacity: 1;
}

.hero-content {
  display: grid;
  align-items: center;
  min-height: clamp(65px, 9vh, 110px);
  padding: clamp(0.2rem, 0.4vw, 0.3rem) 0 clamp(0.55rem, 1.2vw, 0.9rem);
}

.hero-headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100%, 760px);
  margin: 0 auto;
  text-align: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.45rem, 1vw, 0.8rem);
  padding: 0;
}

.hero-eyebrow {
  display: inline-block;
  gap: 0.55rem;
  padding: 0;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 239, 226, 0.78);
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 48px;
  height: 1px;
  margin: 0 auto 0.55rem;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 220, 196, 0.82) 50%, rgba(255, 255, 255, 0) 100%);
}

.hero-overlay {
  background:
    linear-gradient(180deg, rgba(13, 10, 8, 0.64) 0%, rgba(13, 10, 8, 0.38) 36%, rgba(13, 10, 8, 0.52) 100%);
}

.hero-title {
  width: min(100%, 13ch);
  max-width: none;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.55rem);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.045em;
  text-align: center;
  text-wrap: balance;
  color: #fff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.46),
    0 10px 26px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
  display: block;
  width: min(100%, 54ch);
  margin: 0;
  font-size: clamp(1rem, 1.35vw, 1.1rem);
  line-height: 1.72;
  color: rgba(255, 248, 241, 0.94);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3), 0 2px 14px rgba(0, 0, 0, 0.18);
}

.hero-actions {
  display: none;
}

.hero[data-hero-variant='machine'] .hero-eyebrow {
  color: rgba(255, 223, 197, 0.9);
}

.hero[data-hero-variant='machine'] .hero-subtitle {
  color: rgba(255, 241, 229, 0.96);
}

.hero[data-hero-variant='machine'] .hero-title {
  width: min(100%, 12ch);
  font-size: clamp(2.1rem, 4.7vw, 3.2rem);
}

.hero[data-hero-variant='context'] .hero-eyebrow {
  color: rgba(234, 225, 217, 0.74);
}

.hero[data-hero-variant='context'] .hero-subtitle {
  width: min(100%, 54ch);
  color: rgba(246, 239, 232, 0.92);
}

.hero[data-hero-variant='context'] .hero-title {
  width: min(100%, 15ch);
  font-size: clamp(1.85rem, 4vw, 2.85rem);
}

.hero[data-hero-variant='history'] .hero-title {
  width: min(100%, 12ch);
  font-size: clamp(2rem, 4.2vw, 3rem);
  color: rgba(255, 248, 241, 0.98);
}

.hero[data-hero-variant='history'] .hero-eyebrow {
  color: rgba(229, 212, 191, 0.78);
}

.hero[data-hero-variant='history'] .hero-subtitle {
  color: rgba(244, 231, 219, 0.94);
}

.hero-secondary-btn,
.hero-link-btn {
  display: none;
}

.hero-secondary-btn:hover,
.hero-link-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.search-section {
  margin-top: 0.35rem;
  padding: 0 0 0.55rem;
  background: transparent;
  border: 0;
}

.search-section-inner {
  width: 100%;
  max-width: var(--content-max);
}

.search-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1rem;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1.15rem;
  border-radius: 24px;
  border: 1px solid rgba(67, 56, 49, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(252, 248, 245, 0.96) 100%);
  box-shadow: 0 18px 46px rgba(67, 56, 49, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.search-input-wrapper {
  display: block;
  flex: 1 1 420px;
  width: auto;
  min-width: min(100%, 280px);
  order: 2;
}

.search-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-left: 0;
  order: 3;
}

.search-field-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 56px;
}

.search-panel .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.15rem;
  color: rgba(67, 56, 49, 0.45);
  pointer-events: none;
}

.search-panel .search-shortcut-hint {
  display: none;
}

.search-panel #pesquisa {
  width: 100%;
  height: 56px;
  padding: 0 3.25rem 0 3rem;
  border-radius: 18px;
  font-size: 0.98rem;
  border: 1px solid rgba(67, 56, 49, 0.12);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.search-panel #pesquisa::placeholder {
  color: rgba(67, 56, 49, 0.5);
}

.search-panel #pesquisa:focus {
  outline: none;
  background: #fff;
  border-color: rgba(253, 105, 25, 0.3);
  box-shadow: 0 0 0 4px rgba(253, 105, 25, 0.12);
}

.search-clear-btn {
  width: 32px;
  height: 32px;
  right: 0.75rem;
  border-radius: 999px;
  background: rgba(67, 56, 49, 0.07);
}

.search-submit-btn {
  width: auto;
  min-width: 118px;
  height: 56px;
  padding: 0 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, #fd7f32 0%, #fd6919 100%);
  color: #fff;
  border: 0;
  box-shadow: 0 16px 28px rgba(253, 105, 25, 0.24);
}

.search-submit-btn:hover {
  background: linear-gradient(180deg, #fd7f32 0%, #f05c0f 100%);
  transform: translateY(-1px);
}

.search-actions .search-submit-btn {
  margin-left: auto;
}

.search-toolbar {
  display: flex;
  align-items: center;
  width: auto;
  flex: 0 0 auto;
  order: 1;
}

.search-mode-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: auto;
  flex: 0 0 auto;
  max-width: 100%;
  padding: 0.3rem;
  border-radius: 18px;
  border: 1px solid rgba(67, 56, 49, 0.08);
  background: rgba(246, 241, 237, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 14px 30px -28px rgba(28, 20, 16, 0.24);
}

.search-mode-controls > .view-btn {
  width: auto;
  max-width: none;
  justify-self: auto;
  align-self: auto;
}

.search-panel .view-btn {
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: var(--text-secondary);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  box-shadow: none;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.search-panel .view-btn:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.search-panel .view-btn .material-symbols-outlined {
  font-size: 1.2rem;
  line-height: 1;
}

.search-panel .view-btn.active {
  background: #fff;
  border-color: rgba(253, 105, 25, 0.2);
  color: var(--color-brand-600);
  box-shadow: 0 10px 20px -14px rgba(67, 56, 49, 0.22), 0 0 0 1px rgba(253, 105, 25, 0.05);
}

.search-mode-controls > .view-btn.active {
  width: 48px;
  border-radius: 14px;
}

.search-panel .view-btn:active {
  transform: scale(0.985);
}

.view-btn-text {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.search-history-btn {
  min-width: 48px;
}

.search-panel .search-history-btn.active {
  background: #fff;
  border-color: rgba(253, 105, 25, 0.2);
  color: var(--color-brand-600);
  box-shadow: 0 10px 20px -14px rgba(67, 56, 49, 0.22), 0 0 0 1px rgba(253, 105, 25, 0.05);
}

.search-tags {
  width: 100%;
  gap: 0.55rem;
}

.search-tag {
  min-height: 36px;
  padding: 0.45rem 0.6rem 0.45rem 0.75rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
}

.authority-indicator {
  justify-content: center;
  gap: 0.8rem;
  max-width: 860px;
  margin: 0 auto 0.2rem;
  padding: 0.5rem 0 0;
}

.authority-item {
  min-height: 42px;
  min-width: clamp(180px, 22vw, 230px);
  padding: 0.7rem 1rem;
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(91, 74, 65, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(250, 246, 242, 0.82) 100%);
  box-shadow: 0 14px 30px -24px rgba(28, 20, 16, 0.22);
  backdrop-filter: blur(10px);
  color: var(--text-secondary);
}

.authority-item::before {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.82) 18%, rgba(255, 255, 255, 0.92) 50%, rgba(255, 255, 255, 0.82) 82%, rgba(255, 255, 255, 0) 100%);
  opacity: 0.9;
}

.authority-item:not(:last-child) {
  margin-right: 0;
  padding-right: 1rem;
  border-right: 0;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.65rem;
  margin-top: 0.55rem;
  margin-bottom: 0.5rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(91, 74, 65, 0.14);
  position: relative;
}

.results-header::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: clamp(84px, 16vw, 140px);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(253, 105, 25, 0.95) 0%, rgba(253, 105, 25, 0.28) 100%);
}

.results-header-main {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.results-section-intro {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: opacity 180ms ease;
}

.results-section-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-brand-600);
}

.results-section-title {
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.results-section-subtitle {
  margin: 0;
  max-width: 62ch;
  font-size: 0.85rem;
  line-height: var(--lh-copy-sm);
  color: var(--text-secondary);
}

.breadcrumb {
  margin-bottom: 0;
}

.results-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.results-count {
  margin: 0;
  padding: 0.42rem 0.82rem;
  border-radius: 999px;
  border: 1px solid rgba(253, 105, 25, 0.16);
  background: linear-gradient(180deg, rgba(253, 105, 25, 0.12) 0%, rgba(253, 105, 25, 0.04) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
}

.mobile-filter-btn {
  min-height: 46px;
  padding: 0.78rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-1);
  box-shadow: var(--shadow-surface);
}

.grid {
  gap: 0.85rem;
}

.grid.maquinas-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.9rem;
}

.machine-card {
  display: flex;
  flex-direction: column;
  min-height: 200px;
  border-radius: 22px;
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.machine-card::before {
  height: 4px;
}

.machine-card-media {
  width: 100%;
  min-height: 190px;
  background: #fff;
  border-right: 0;
  border-bottom: 1px solid var(--border-subtle);
}

.machine-card-body {
  gap: 0.65rem;
  padding: 1.1rem 1.15rem 1.2rem;
}

.machine-card-title {
  font-size: 1.05rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.machine-card-subdesc {
  font-size: 0.9rem;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  display: -webkit-box;
  overflow: hidden;
}

.card {
  border-radius: 22px;
  border-color: var(--border-subtle);
}

.card-media {
  padding: 0.65rem;
  background: #fff;
}

.card-media::before {
  background: #fff;
  opacity: 1;
}

.card-media-frame {
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(28, 20, 16, 0.04), 0 12px 24px -24px rgba(28, 20, 16, 0.12);
}

.card-image {
  padding: 0;
  background: transparent;
  filter: drop-shadow(0 4px 10px rgba(28, 20, 16, 0.05));
}

.card:hover .card-image {
  filter: drop-shadow(0 6px 14px rgba(28, 20, 16, 0.06));
}

.card-content {
  padding: 0.85rem 0.9rem 0.8rem;
  gap: 0.4rem;
}

.card-codigo {
  font-size: 1rem;
}

.card-descricao {
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-size: 0.96rem;
  font-weight: 420;
}

.card-oem {
  margin-top: auto;
  font-size: 0.82rem;
  line-height: var(--lh-copy-sm);
  color: var(--text-secondary);
}

.card-copy-btn {
  top: 0.85rem;
  right: 0.85rem;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(67, 56, 49, 0.08);
}

.grid.list-view {
  gap: 0.95rem;
}

.grid.list-view .card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  align-items: center;
}

.grid.list-view .card-media {
  height: 100%;
  background: #fff;
  border-bottom: 0;
  border-right: 1px solid var(--border-subtle);
}

.grid.list-view .card-content {
  min-width: 0;
  padding-right: 4rem;
}

.grid.list-view .card-copy-btn {
  position: static;
  margin-right: 1rem;
}

.pagination-controls {
  justify-content: center;
  gap: 0.65rem;
  padding-top: 1rem;
}

.pagination-btn {
  min-width: 42px;
  height: 42px;
  border-radius: 14px;
}

.nenhum-resultado-mensagem .empty-content,
.error-message {
  max-width: 520px;
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}

.main-footer {
  margin-top: 2rem;
  padding-top: 2rem;
}

.footer-content {
  max-width: 640px;
}

.fixed-action-buttons {
  right: 1rem;
  bottom: 1rem;
}

.back-to-top-button,
.whatsapp-bubble {
  box-shadow: var(--shadow-card-hover);
}

.premium-modal-backdrop {
  background: rgba(25, 20, 16, 0.56);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.premium-modal-box {
  max-width: 1040px;
  height: min(640px, 82vh);
  max-height: 82vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
}

.premium-main-image-wrapper {
  padding: 0.5rem;
  min-height: 300px;
}

.premium-main-image {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 18px rgba(31, 24, 20, 0.08));
}

.premium-thumb-btn {
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-1);
}

.premium-thumb-btn.active {
  border-color: var(--color-brand-500);
  box-shadow: 0 0 0 1px var(--color-brand-500), var(--shadow-1);
}

.premium-modal-info-panel {
  padding: 1.5rem 1.5rem 1.25rem;
}

.premium-product-title {
  font-size: 1.3rem;
}

.premium-specs-section {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.premium-spec-row {
  border-bottom-color: var(--border-subtle);
}

.premium-btn-icon {
  border-radius: var(--radius-xs);
}

/* Admin */
.admin-layout {
  max-width: min(1480px, calc(100vw - 2rem));
  padding: 1rem 0 2rem;
}

.admin-header {
  padding: 1.3rem 1.4rem;
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.2rem;
}

.admin-header-copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-header-copy h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.admin-header-copy p,
.auth-copy {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: var(--lh-copy-sm);
}

.auth-card {
  max-width: 420px;
  border-radius: 24px;
  box-shadow: var(--shadow-3);
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.auth-card input {
  min-height: 50px;
  border-width: 1px;
  border-color: var(--admin-border);
  border-radius: 14px;
}

.dashboard-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-tabs {
  position: sticky;
  top: 1rem;
  z-index: 10;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.7rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-surface);
}

.tab-btn {
  min-height: 42px;
  padding: 0.7rem 1rem;
  border-radius: 14px;
}

.tab-btn.active {
  background: var(--color-brand-50);
  color: var(--color-brand-600);
  box-shadow: inset 0 0 0 1px var(--border-accent);
}

.tab-panel {
  margin-top: 0;
  padding: 1.3rem;
  border-radius: 24px;
  border: 1px solid var(--admin-border);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-card);
}

.toolbar {
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 0.95rem;
  border: 1px solid var(--admin-border);
  border-radius: 18px;
  background: var(--admin-surface-2);
}

.search-box,
.toolbar select {
  min-height: 48px;
  border-width: 1px;
  border-color: var(--admin-border);
  border-radius: 14px;
  background: #fff;
}

.search-box {
  padding: 0 0.9rem;
}

.search-box input {
  min-height: 46px;
}

.toolbar select,
.form-row input,
.form-row select,
.form-row textarea,
.danger-card input[type="text"] {
  border-width: 1px;
  border-color: var(--admin-border);
  border-radius: 14px;
  background: #fff;
}

.btn-primary,
.btn-outline,
.btn-danger,
.btn-edit,
.btn-del,
.btn-row-move {
  min-height: 42px;
  padding: 0.72rem 1rem;
  border-radius: 14px;
  font-weight: 600;
}

.btn-primary {
  background: var(--admin-primary);
  box-shadow: 0 12px 20px rgba(253, 105, 25, 0.18);
}

.btn-primary:hover {
  background: var(--admin-primary-dark);
  transform: translateY(-1px);
}

.btn-outline {
  color: var(--text-primary);
  border: 1px solid var(--admin-border);
  background: #fff;
}

.btn-outline:hover {
  background: var(--surface-2);
}

.btn-danger {
  background: var(--color-danger-600);
}

.btn-edit {
  background: var(--color-brand-50);
  color: var(--color-brand-600);
}

.btn-del {
  background: #fef0f0;
  color: var(--color-danger-600);
}

.backup-status,
.restore-card,
.danger-card {
  border-width: 1px;
  border-radius: 18px;
}

.backup-status {
  align-items: flex-start;
}

.danger-card {
  background: #fff8f8;
}

.table-wrap {
  border-radius: 20px;
  box-shadow: none;
}

.admin-table {
  table-layout: auto;
  min-width: 820px;
}

.admin-table th,
.admin-table td {
  padding: 0.95rem 1rem;
  border-bottom-color: var(--admin-border);
}

.admin-table th {
  background: var(--admin-surface-2);
  color: var(--text-secondary);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-table tr:hover td {
  background: rgba(253, 105, 25, 0.03);
}

.desc-cell {
  max-width: 340px;
  color: var(--text-secondary);
  line-height: var(--lh-copy-sm);
}

.actions-wrap {
  gap: 0.5rem;
}

.table-thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 30px;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-pill.active {
  background: var(--color-success-50);
  color: var(--color-success-600);
  border-color: rgba(22, 138, 75, 0.15);
}

.status-pill.inactive {
  background: #f7f4f2;
  color: var(--text-muted);
  border-color: rgba(67, 56, 49, 0.08);
}

.status-pill.global {
  background: var(--color-info-50);
  color: var(--color-info-600);
  border-color: rgba(29, 78, 216, 0.12);
}

.pagination {
  margin-top: 1rem;
}

.pagination button {
  min-height: 42px;
  border-width: 1px;
  border-radius: 14px;
}

.modal {
  z-index: 1100;
}

.modal-backdrop {
  background: rgba(31, 24, 20, 0.5);
  backdrop-filter: blur(10px);
}

.modal-content {
  border-radius: 24px;
  box-shadow: var(--shadow-modal);
  max-width: 580px;
}

.modal-content.modal-md {
  max-width: 700px;
}

.modal-content.modal-lg {
  max-width: 980px;
}

.modal-header {
  padding: 1.1rem 1.35rem;
  background: rgba(255, 255, 255, 0.9);
}

.modal-close {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

#peca-form,
#maquina-form,
#filtro-form,
#taxonomia-form {
  gap: 1rem;
  padding: 1.3rem;
}

.form-section-heading {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.25rem;
}

.form-section-heading h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.form-section-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-row label {
  margin-bottom: 0;
  color: var(--text-secondary);
}

.classificacoes-wrap,
.especificacoes-wrap {
  gap: 0.7rem;
}

.classificacao-row,
.especificacao-row {
  padding: 0.8rem;
  border-width: 1px;
  border-radius: 18px;
  background: var(--admin-surface-2);
}

.classificacao-row select,
.especificacao-row input {
  border-width: 1px;
  border-radius: 12px;
}

.form-imagem-zone {
  border-width: 1px;
  border-radius: 18px;
  background: var(--admin-surface-2);
}

.form-imagem-preview img {
  max-width: 240px;
  max-height: 180px;
  border-width: 1px;
  border-radius: 16px;
}

.form-actions {
  position: sticky;
  bottom: 0;
  padding-top: 1rem;
  margin-top: 0.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.92) 24%, rgba(255, 255, 255, 1) 100%);
}

.modal-body {
  padding: 1.2rem 1.35rem 0;
}

.dialog-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--color-brand-50);
  color: var(--color-brand-600);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#modal-delete-message {
  margin: 0.85rem 0 0;
  font-size: 1rem;
  color: var(--text-primary);
}

#modal-delete-warning {
  margin-top: 0.55rem;
}

@media (max-width: 1180px) {
  .sidebar {
    width: 240px;
    min-width: 240px;
  }

  .grid.list-view .card {
    grid-template-columns: 150px minmax(0, 1fr) auto;
  }
}

@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    height: 100vh;
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    background: rgba(31, 24, 20, 0.4);
    backdrop-filter: blur(4px);
  }

  .results-header {
    flex-direction: column;
    align-items: stretch;
    margin-top: 1.05rem;
    padding-top: 0.72rem;
  }

  .search-input-wrapper {
    flex-basis: 100%;
    order: 1;
  }

  .search-actions {
    order: 3;
    margin-left: auto;
  }

  .search-toolbar {
    order: 2;
  }

  .mobile-filter-btn.visible {
    display: inline-flex;
    align-self: flex-start;
  }

  .premium-modal-box {
    flex-direction: column;
    max-height: 94vh;
  }

  .premium-modal-gallery,
  .premium-modal-info-panel {
    width: 100%;
  }

  .admin-layout {
    max-width: calc(100vw - 1rem);
  }

  .admin-header {
    gap: 1rem;
    align-items: stretch;
  }

  .backup-status {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 0.85rem 0.85rem 2rem;
  }

  .hero {
    min-height: 166px;
    border-radius: 24px;
  }

  .hero-content {
    min-height: 108px;
    padding-top: 0.42rem;
    padding-bottom: 1.1rem;
  }

  .hero-title {
    width: min(100%, 13ch);
    font-size: clamp(1.5rem, 4.9vw, 2.08rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
  }

  .hero-copy {
    gap: 0.72rem;
  }

  .hero-eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }

  .hero-eyebrow::before {
    width: 38px;
    margin-bottom: 0.45rem;
  }

  .hero-subtitle {
    width: min(100%, 46ch);
    font-size: 0.9rem;
    line-height: 1.62;
  }

  .hero[data-hero-variant='context'] .hero-title,
  .hero[data-hero-variant='history'] .hero-title {
    width: min(100%, 14ch);
  }

  .search-section {
    margin-top: 0.6rem;
  }

  .search-panel {
    padding: 0.9rem;
    border-radius: 20px;
  }

  .search-input-wrapper {
    flex-basis: 100%;
  }

  .search-submit-btn {
    min-width: 110px;
  }

  .results-header-main {
    gap: 0.7rem;
  }

  .results-meta {
    gap: 0.55rem;
  }

  .results-section-title {
    font-size: 1.15rem;
  }

  .results-section-subtitle {
    font-size: 0.9rem;
  }

  .search-mode-controls {
    width: auto;
    padding: 0.3rem;
    gap: 0.28rem;
  }

  .search-history-btn,
  .search-panel .view-btn {
    width: 46px;
    min-width: 46px;
    min-height: 46px;
    padding: 0;
  }

  .grid.maquinas-grid,
  .grid {
    grid-template-columns: 1fr;
  }

  .machine-card {
    min-height: 0;
  }

  .machine-card-media {
    width: 100%;
    min-height: 170px;
  }

  .grid.list-view .card {
    grid-template-columns: 1fr;
  }

  .grid.list-view .card-media {
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
  }

  .mobile-filter-btn.visible {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 430px) {
  .results-header {
    margin-top: 0.82rem;
    margin-bottom: 0.6rem;
    gap: 0.65rem;
  }

  .results-section-kicker {
    font-size: 0.67rem;
    letter-spacing: 0.12em;
  }

  .results-section-title {
    font-size: 1.02rem;
  }

  .results-section-subtitle {
    font-size: 0.84rem;
    line-height: 1.56;
  }

  .search-panel {
    gap: 0.65rem;
  }

  .search-toolbar {
    flex: 1 1 auto;
    min-width: 0;
  }

  .search-mode-controls {
    width: 100%;
    justify-content: flex-start;
    padding: 0.24rem;
    gap: 0.2rem;
    border-radius: 16px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .search-mode-controls::-webkit-scrollbar {
    display: none;
  }

  .search-history-btn,
  .search-panel .view-btn {
    width: 44px;
    min-width: 44px;
    min-height: var(--touch-target-min);
    padding: 0;
    border-radius: 13px;
  }

  .search-mode-controls > .view-btn.active {
    width: 44px;
    border-radius: 13px;
  }

  .search-panel .view-btn .material-symbols-outlined {
    font-size: 1.05rem;
  }

  .mobile-filter-btn.visible {
    min-height: 44px;
    padding: 0.72rem 0.9rem;
    border-radius: 13px;
  }
}

@media (max-width: 360px) {
  .search-submit-btn {
    min-width: 92px;
    padding: 0 0.8rem;
  }

  .search-history-btn,
  .search-panel .view-btn {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
  }

  .grid.list-view .card-copy-btn {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    margin-right: 0;
  }

  .authority-indicator {
    gap: 0.65rem;
    padding-top: 0.2rem;
  }

  .authority-item {
    width: 100%;
    min-width: 0;
    justify-content: center;
    min-height: 40px;
    padding: 0.68rem 0.9rem;
  }

  .authority-item::before {
    left: 12px;
    right: 12px;
  }

  .admin-tabs {
    top: 0.5rem;
  }

  .tab-panel {
    padding: 1rem;
  }

  .toolbar {
    padding: 0.85rem;
  }

  .classificacao-row,
  .especificacao-row {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .hero-actions {
    display: none;
  }

  .hero {
    min-height: 152px;
  }

  .hero-content {
    min-height: 102px;
    padding-top: 0.34rem;
    padding-bottom: 0.96rem;
  }

  .hero-title {
    width: min(100%, 11ch);
    font-size: clamp(1.34rem, 6vw, 1.78rem);
    line-height: 1.12;
  }

  .hero-eyebrow {
    max-width: 100%;
    font-size: 0.64rem;
  }

  .hero-subtitle {
    font-size: 0.84rem;
  }

  .hero[data-hero-variant='context'] .hero-title {
    width: min(100%, 13ch);
  }

  .authority-indicator {
    gap: 0.55rem;
    padding-bottom: 0.95rem;
  }

  .authority-item {
    font-size: 0.79rem;
    padding: 0.6rem 0.75rem;
  }

  .authority-item .material-symbols-outlined {
    font-size: 17px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-secondary-btn,
  .hero-link-btn,
  .mobile-filter-btn {
    width: 100%;
    justify-content: center;
  }

  .premium-modal-backdrop,
  .modal {
    padding: 0.6rem;
  }

  .premium-modal-box,
  .modal-content {
    border-radius: 20px;
  }
}
