:root {
  color-scheme: light;
  --page: #ECF0F4;
  --ink: #012E4B;
  --muted: #5f6b7a;
  --panel: #ffffff;
  --line: #d7dde5;
  --soft-line: #eceff3;
  --primary: #069C65;
  --primary-dark: #04784e;
  --special: #E67E22;
  --topbar: #012E4B;
  --header: #eeeeee;
  --shadow: 0 8px 24px rgba(31, 41, 55, 0.08);
}

html, body {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  color: var(--ink);
  background: var(--page);
  scroll-behavior: smooth;
}

body { position: relative; }

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 14px 34px;
}

.surface-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.site-main { display: grid; gap: 24px; }

.site-header {
  position: sticky;
  top: 12px;
  z-index: 100;
  margin-bottom: 20px;
  background: var(--topbar);
  border-color: var(--topbar);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
}

.brand-link, .brand-link:hover { box-shadow: none; transform: none; }
.site-logo { width: min(250px, 52vw); height: auto; display: block; }

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.footer-link {
  color: var(--topbar);
  text-decoration: none;
  font-weight: 700;
}

.nav-link {
  border-radius: 5px;
  padding: 10px 14px;
  font-size: 0.94rem;
}

.nav-link.active, .nav-link:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.nav-button {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.nav-user {
  color: #fff;
  font-weight: 800;
  padding: 10px 8px;
}

.special-link,
.special-button {
  background: var(--special);
  color: #fff;
}

.nav-toggle-input, .nav-toggle { display: none; }

.page-hero {
  padding: clamp(34px, 6vw, 72px);
  overflow: hidden;
  position: relative;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(0, 123, 255, 0.12);
}

.eyebrow {
  color: var(--topbar);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.page-title {
  max-width: 920px;
  font-weight: 800 !important;
  font-size: 3.5rem !important;
  letter-spacing: -0.04em !important;
  line-height: 1.03 !important;
  margin-bottom: 18px !important;
}

.page-intro {
  max-width: 850px;
  color: var(--muted);
  line-height: 1.8 !important;
  font-size: 1.08rem !important;
}

.body-copy { line-height: 1.75 !important; margin-bottom: 14px !important; color: var(--muted); }

.feature-section {
  display: grid;
  grid-template-columns: minmax(280px, 42%) 1fr;
  gap: clamp(22px, 4vw, 42px);
  align-items: center;
  padding: clamp(22px, 4vw, 34px);
}

.feature-reverse .feature-media { order: 2; }

.feature-media {
  min-height: 330px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: #e9eef7;
}

.feature-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  animation: featureFade 30s infinite;
}

.feature-image-1 { animation-delay: 0s; }
.feature-image-2 { animation-delay: 10s; }
.feature-image-3 { animation-delay: 20s; }

@keyframes featureFade {
  0% { opacity: 0; transform: scale(1.05); }
  5% { opacity: 1; transform: scale(1); }
  30% { opacity: 1; transform: scale(1.02); }
  36% { opacity: 0; transform: scale(1.04); }
  100% { opacity: 0; transform: scale(1.05); }
}

.content-grid {
  display: grid;
  gap: 24px;
}

.two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.content-card {
  padding: clamp(22px, 4vw, 34px);
}

.feature-card-large { grid-column: 1 / -1; }

.brand-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.brand-showcase-card {
  padding: 24px;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 22px;
  align-items: center;
}

.brand-showcase-logo {
  width: 150px;
  max-height: 110px;
  object-fit: contain;
  padding: 14px;
  border-radius: 8px;
  background: rgba(247, 250, 255, 0.9);
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.16));
}

.brand-overview { margin-top: 0; }

.partners-panel { padding: clamp(22px, 4vw, 34px); overflow: hidden; }
.section-heading { max-width: 850px; margin-bottom: 22px; }

.partner-carousel {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.partner-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: partnerMarquee 38s linear infinite;
}

.partner-logo-card {
  width: 180px;
  min-height: 120px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(247, 250, 255, 0.88);
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--primary-dark);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(29, 36, 48, 0.08);
}

.partner-logo {
  max-width: 116px;
  max-height: 56px;
  object-fit: contain;
  margin-bottom: 10px;
}

@keyframes partnerMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.contact-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-link { color: #0056b3 !important; font-weight: 800 !important; }
.contact-note { text-align: center; }

.cta-row {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.cta-button { min-width: 180px; }

.site-footer {
  margin-top: 32px;
  padding: 26px 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.footer-logo { width: 180px; height: auto; margin-bottom: 12px; }
.footer-contact, .footer-nav { display: grid; gap: 8px; }
.footer-fine-print { grid-column: 1 / -1; opacity: 0.8; border-top: 1px solid rgba(38,49,70,0.12); padding-top: 16px; }

button, a, .mud-button-root { transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease !important; }
button:hover, a:hover, .mud-button-root:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 123, 255, .22); }
.footer-link:hover { color: #0056b3; }

.mud-button-root {
  border-radius: 5px !important;
  text-transform: none !important;
  font-weight: 700 !important;
}

.mud-button-filled-primary {
  background: var(--primary) !important;
  color: #fff !important;
}

.mud-button-filled-primary:hover {
  background: var(--primary-dark) !important;
}

.mud-button-filled-tertiary {
  background: var(--special) !important;
  color: #fff !important;
}

.mud-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.mud-table thead .mud-table-cell {
  background: var(--header);
  color: var(--ink);
  font-weight: 800;
  border-bottom: 1px solid #ccc;
}

.mud-table .mud-table-cell {
  border-bottom: 1px solid var(--soft-line);
  padding: 10px;
}

.mud-input-control .mud-input-outlined-border {
  border-color: #c8d0da !important;
}

.mud-input-control .mud-input-root:focus-within .mud-input-outlined-border,
.mud-input-control .mud-input-root:hover .mud-input-outlined-border {
  border-color: var(--primary) !important;
}

@media (max-width: 980px) {
  .site-header-inner { align-items: flex-start; flex-wrap: wrap; }
  .site-nav { width: 100%; justify-content: center; }
  .feature-section, .brand-showcase-card { grid-template-columns: 1fr; }
  .feature-reverse .feature-media { order: 0; }
  .feature-media { min-height: 260px; }
  .brand-grid, .two-column, .contact-grid { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .page-shell { padding: 10px 8px 24px; }
  .site-header { top: 8px; }
  .site-header-inner { align-items: center; }
  .nav-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    background: rgba(0, 123, 255, 0.12);
    cursor: pointer;
  }
  .nav-toggle span { width: 20px; height: 2px; background: var(--primary-dark); border-radius: 2px; }
  .site-nav { display: none; flex-direction: column; align-items: stretch; }
  .nav-toggle-input:checked ~ .site-nav { display: flex; }
  .nav-link { text-align: center; }
  .page-hero, .content-card, .feature-section, .partners-panel, .site-footer { border-radius: 8px; }
  .page-title { font-size: 2.25rem !important; }
  .feature-media { min-height: 230px; }
  .brand-showcase-logo { width: 100%; max-width: 180px; justify-self: center; }
  .partner-logo-card { width: 150px; }
}

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

.flagship-brand-section {
  display: flex;
  justify-content: center;
}

.flagship-brand-card {
  width: min(100%, 920px);
  grid-template-columns: 230px 1fr;
  padding: clamp(28px, 5vw, 48px);
  text-align: left;
  position: relative;
  overflow: hidden;
}

.flagship-brand-card::before {
  content: "♛";
  position: absolute;
  right: clamp(18px, 4vw, 42px);
  top: clamp(8px, 2vw, 18px);
  color: rgba(0, 123, 255, 0.12);
  font-size: clamp(4rem, 11vw, 8rem);
  line-height: 1;
}

.flagship-brand-logo {
  width: 230px;
  max-height: 160px;
  justify-self: center;
}

.flagship-brand-copy {
  position: relative;
  z-index: 1;
}

.home-intro-slideshow {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  background: #101722;
  isolation: isolate;
}

.home-intro-slide-stage,
.home-intro-slide {
  position: absolute;
  inset: 0;
}

.home-intro-slide-stage {
  z-index: 0;
}

.home-intro-slide {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  animation: homeIntroFade 30s ease-in-out infinite;
}

.home-intro-slide-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 23, 34, 0.28), rgba(16, 23, 34, 0.62));
}

.home-intro-slide-1 { animation-delay: 0s; }
.home-intro-slide-2 { animation-delay: 5s; }
.home-intro-slide-3 { animation-delay: 10s; }
.home-intro-slide-4 { animation-delay: 15s; }
.home-intro-slide-5 { animation-delay: 20s; }
.home-intro-slide-6 { animation-delay: 25s; }

.home-intro-content {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 28px;
  padding: clamp(28px, 6vw, 56px);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  animation: homeIntroContentIn 900ms ease both;
}

.home-intro-logo {
  width: min(420px, 72vw);
  height: auto;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.2));
}

.home-intro-learn-more {
  color: var(--primary-dark);
  font-weight: 800 !important;
  font-size: 1.25rem !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase;
}

.home-intro-slideshow-closing {
  pointer-events: none;
  animation: homeIntroExit 900ms ease forwards;
}

.home-intro-slideshow-closing .home-intro-slide:nth-child(odd) {
  animation: homeIntroFlyLeft 900ms cubic-bezier(.7, 0, .2, 1) forwards;
}

.home-intro-slideshow-closing .home-intro-slide:nth-child(even) {
  animation: homeIntroFlyRight 900ms cubic-bezier(.7, 0, .2, 1) forwards;
}

.home-intro-slideshow-closing .home-intro-content {
  animation: homeIntroContentOut 620ms ease forwards;
}

@keyframes homeIntroFade {
  0% { opacity: 0; transform: scale(1.08); }
  5% { opacity: 1; transform: scale(1); }
  16% { opacity: 1; transform: scale(1.03); }
  22% { opacity: 0; transform: scale(1.06); }
  100% { opacity: 0; transform: scale(1.08); }
}

@keyframes homeIntroContentIn {
  from { opacity: 0; transform: translateY(22px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes homeIntroContentOut {
  to { opacity: 0; transform: translateY(-24px) scale(0.94); }
}

@keyframes homeIntroExit {
  to { background: transparent; }
}

@keyframes homeIntroFlyLeft {
  to { opacity: 0; transform: translateX(-120vw) rotate(-8deg) scale(1.08); }
}

@keyframes homeIntroFlyRight {
  to { opacity: 0; transform: translateX(120vw) rotate(8deg) scale(1.08); }
}

@media (max-width: 980px) {
  .flagship-brand-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 700px) {
  .home-intro-content { width: calc(100% - 48px); }
  .flagship-brand-logo { width: 100%; max-width: 230px; }
}

.store-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
}

.store-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 5px;
  background: var(--special);
  color: #fff;
}

.store-brand-text {
  font-size: 1.18rem;
}

.store-workspace {
  border-radius: 8px;
}

.header-brand-logo {
  display: block;
  width: auto;
  height: 80px;
  max-width: min(300px, 50vw)
  object-fit: contain;
}

.home-storefront {
  display: grid;
  gap: clamp(30px, 5vw, 58px);
  padding-bottom: 20px;
}

.home-brand-hero {
  display: grid;
  place-items: center;
  gap: 18px;
  padding: clamp(24px, 5vw, 50px) 20px 0;
  text-align: center;
}

.home-main-logo {
  display: block;
  width: min(900px, 94vw);
  max-height: 380px;
  object-fit: contain;
}

.home-brand-hero h1 {
  margin: 0;
  color: var(--topbar);
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  line-height: 1.2;
}

.home-wave-slogan span {
  display: inline-block;
  margin-right: .28em;
  transform-origin: center bottom;
  animation: homeSloganWave 7s ease-in-out infinite;
  animation-delay: calc(var(--wave-index) * 90ms);
}

.home-wave-slogan span:last-child { margin-right: 0; }

@keyframes homeSloganWave {
  0%, 72%, 100% { transform: translateY(0) rotate(0); }
  76% { transform: translateY(-5px) rotate(-1.5deg); }
  80% { transform: translateY(1px) rotate(1deg); }
  84% { transform: translateY(0) rotate(0); }
}

.home-sale-section {
  padding: 0 0 14px;
  overflow: hidden;
}

.home-section-heading-row {
  display: block;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.home-section-heading-row h2,
.home-newest-heading h2 {
  margin: 0;
  color: var(--topbar);
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  text-align: center;
}

.home-carousel-arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--topbar);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.home-carousel-arrow:disabled { opacity: .25; }

.home-sale-carousel {
  width: 100%;
  overflow: hidden;
  padding: 12px 0;
  mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
}

.home-sale-track {
  display: flex;
  gap: 10px;
  width: max-content;
  padding-left: 10px;
  animation: homeSaleMarquee 42s linear infinite;
  will-change: transform;
}

.home-sale-carousel:hover .home-sale-track { animation-play-state: paused; }

@keyframes homeSaleMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.home-sale-card {
  position: relative;
  width: 220px;
  min-width: 220px;
  display: grid;
  grid-template-rows: 135px auto auto auto;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
}

.home-sale-card img,
.home-newest-card img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.home-sale-ribbon {
  position: absolute;
  top: 18px;
  left: -42px;
  z-index: 2;
  width: 150px;
  padding: 6px 0;
  transform: rotate(-43deg);
  background: #c30000;
  color: #fff;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .04em;
}

.home-sale-prices {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}

.home-sale-prices del { color: #a8a8a8; font-weight: 800; }
.home-sale-prices strong { color: var(--special); font-size: 1.45rem; }
.home-sale-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-sale-card small { color: var(--muted); }

.home-product-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  background: #f7f8fa;
}

.home-welcome-section {
  display: grid;
  place-items: center;
  gap: 24px;
  text-align: center;
}

.home-welcome-copy {
  width: min(860px, 100%);
  display: grid;
  gap: 14px;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.8;
}

.home-welcome-copy p { margin: 0; }
.home-view-shop { min-width: 150px; }

.home-newest-section { display: grid; gap: 24px; }
.home-newest-heading { width: min(800px, 100%); margin: 0 auto; text-align: center; }
.home-newest-heading p { margin: 12px 0 0; line-height: 1.65; }

.home-newest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-newest-card {
  position: relative;
  min-width: 0;
  min-height: 320px;
  display: grid;
  grid-template-rows: 190px auto auto auto;
  align-items: center;
  gap: 6px;
  padding: 16px;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
}

.home-new-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 3px 7px;
  border-radius: 3px;
  background: #f04438;
  color: #fff;
  font-size: .67rem;
  font-weight: 900;
}

.home-newest-card > strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-newest-card > span:not(.home-new-badge):not(.home-product-placeholder) { font-size: .88rem; }

.home-service-note {
  width: min(900px, 100%);
  margin: 0 auto;
  text-align: center;
  line-height: 1.65;
}

.home-service-note a { color: var(--primary-dark); font-weight: 800; }

@media (max-width: 800px) {
  .header-brand-logo { height: 56px; max-width: 210px; }
  .home-sale-card { width: 190px; min-width: 190px; grid-template-rows: 120px auto auto auto; }
  .home-newest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .home-newest-grid { grid-template-columns: 1fr; }
  .home-newest-card { min-height: 300px; }
}

.diagnostics-card,
.upload-zone {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fbfcfe;
  height: 100%;
}

.diagnostics-detail-panel,
.diagnostics-output-panel {
  min-height: 360px;
}

.diagnostics-check-group {
  display: grid;
  gap: 8px;
}

.diagnostics-table .mud-table-cell {
  vertical-align: top;
}

.backend-output-window {
  height: 260px;
  overflow: auto;
  padding: 12px;
  border: 1px solid #162230;
  border-radius: 8px;
  background: #101722;
  color: #d8e2ee;
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.45;
}

.backend-output-line {
  display: grid;
  grid-template-columns: 72px 92px minmax(180px, 1fr);
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(216, 226, 238, 0.08);
}

.backend-output-time {
  color: #8fb5d6;
}

.backend-output-level {
  font-weight: 800;
}

.backend-output-level-information {
  color: #8ee4b8;
}

.backend-output-level-warning {
  color: #ffd166;
}

.backend-output-level-error,
.backend-output-level-critical {
  color: #ff8a8a;
}

.backend-output-message {
  overflow-wrap: anywhere;
}

.backend-output-category,
.backend-output-exception {
  grid-column: 3 / -1;
  color: #94a3b8;
  overflow-wrap: anywhere;
}

.backend-output-exception {
  color: #ffb4b4;
}

.backend-output-muted {
  display: block;
  color: #94a3b8;
  border-bottom: 0;
}

.upload-zone input[type="file"] {
  width: 100%;
  max-width: 100%;
}

.inventory-panel {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fbfcfe;
  height: 100%;
}

.inventory-list {
  display: grid;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
}

.compact-list {
  max-height: 240px;
}

.inventory-list-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.inventory-list-row strong,
.inventory-list-row small,
.inventory-list-metrics {
  display: block;
}

.inventory-list-row small,
.inventory-list-metrics small {
  color: var(--muted);
}

.inventory-list-row-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(6, 156, 101, 0.14);
}

.inventory-list-metrics {
  min-width: 80px;
  text-align: right;
}

.store-toolbar {
  gap: 16px;
  flex-wrap: wrap;
}

.store-toolbar .mud-input-control {
  min-width: min(100%, 360px);
}

.product-card {
  height: 100%;
  display: grid;
  gap: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.product-image-frame {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.product-image,
.product-image-placeholder {
  width: 100%;
  height: 180px;
  border-radius: 8px;
}

.product-image {
  object-fit: contain;
  background: #fff;
}

.product-image-placeholder {
  display: grid;
  place-items: center;
  border: 1px dashed #ccc;
  color: var(--muted);
  background: #fafafa;
  font-weight: 800;
}

.product-card .mud-typography-h6 {
  color: var(--topbar);
  font-weight: 800;
}

.sale-ribbon {
  position: absolute;
  top: 17px;
  right: -38px;
  z-index: 2;
  width: 140px;
  padding: 6px 0;
  transform: rotate(45deg);
  background: #c81e1e;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
  box-shadow: 0 4px 10px rgba(30, 41, 59, 0.22);
}

.catalog-pager {
  align-items: center;
}

.catalog-page-jump .mud-input-control {
  min-width: 92px;
  width: 110px;
}

.login-panel {
  width: min(100%, 520px);
  margin: 0 auto;
}

.product-image-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.product-image-manager-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 660px;
}

.product-image-manager-cell {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 118px;
  overflow: hidden;
  border: 2px solid var(--soft-line);
  border-radius: 10px;
  background: #fff;
  cursor: grab;
  transition: border-color .18s ease, opacity .18s ease, transform .18s ease;
}

.product-image-manager-cell:hover { border-color: var(--primary); }
.product-image-manager-cell[draggable="true"] { cursor: grab; user-select: none; }
.product-image-manager-cell[draggable="true"]:active { cursor: grabbing; }
.product-image-manager-cell.is-dragging { opacity: .45; transform: scale(.97); }
.product-image-drag-handle {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 7px;
  border-radius: 6px;
  color: white;
  background: rgba(18, 30, 45, .78);
  font-weight: 800;
  letter-spacing: -2px;
  pointer-events: none;
}
.product-image-move-buttons {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: flex;
  gap: 5px;
}
.product-image-move-buttons button {
  width: 32px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  color: white;
  background: rgba(18, 30, 45, .86);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
}
.product-image-move-buttons button:disabled { opacity: .35; cursor: default; }

.bulk-quantity-select {
  display: grid;
  gap: 4px;
  min-width: 150px;
  color: var(--mud-palette-text-secondary);
  font-size: .75rem;
}
.bulk-quantity-select select {
  min-height: 40px;
  padding: 8px 34px 8px 12px;
  border: 1px solid var(--mud-palette-lines-inputs);
  border-radius: 4px;
  background: var(--mud-palette-surface);
  color: var(--mud-palette-text-primary);
  font: inherit;
  font-size: .95rem;
  cursor: pointer;
}
.product-image-manager-cell img {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 118px !important;
  object-fit: contain;
}

.product-image-manager-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border-style: dashed;
  color: var(--muted);
  cursor: default;
}

.product-image-order,
.product-image-primary {
  position: absolute;
  left: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(1, 46, 75, .88);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
}

.product-image-order { top: 8px; }
.product-image-primary { bottom: 8px; background: rgba(6, 156, 101, .92); }

.product-image-delete {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(184, 28, 28, .94);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.confirm-dialog-backdrop,
.product-viewer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 20, 32, .76);
  backdrop-filter: blur(5px);
}

.confirm-dialog {
  width: min(92vw, 420px);
  display: grid;
  gap: 16px;
  padding: 24px;
}

.confirm-dialog img { width: 100%; height: 180px; object-fit: contain; border-radius: 8px; background: #f5f7fa; }

.inventory-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: stretch;
  padding: clamp(16px, 3vw, 34px);
  background: rgba(8, 20, 32, .76);
  backdrop-filter: blur(5px);
}

.inventory-modal {
  width: min(100%, 1080px);
  max-height: calc(100vh - 68px);
  margin: auto;
  padding: clamp(20px, 3vw, 34px);
  overflow: auto;
}

.floating-cart-shell {
  position: fixed;
  top: 92px;
  left: 18px;
  z-index: 1150;
}

.floating-cart-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(1, 46, 75, .24);
  cursor: pointer;
}

.floating-cart-badge {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--special);
  color: #fff;
  font-size: .78rem;
}

.floating-cart-panel {
  width: min(390px, calc(100vw - 36px));
  max-height: calc(100vh - 160px);
  margin-top: 10px;
  padding: 18px;
  overflow: auto;
  box-shadow: 0 22px 58px rgba(8, 20, 32, .28);
}

.floating-cart-heading,
.floating-cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.floating-cart-lines { display: grid; gap: 10px; margin: 14px 0; }
.floating-cart-line { display: grid; grid-template-columns: minmax(0, 1fr) 95px auto; gap: 8px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--soft-line); }
.floating-cart-line strong, .floating-cart-line small { display: block; }
.floating-cart-line small { color: var(--muted); }
.floating-cart-total { padding: 12px 0 16px; }

.product-viewer-backdrop { z-index: 1500; padding: 16px; overflow: hidden; }

.product-viewer {
  position: relative;
  box-sizing: border-box;
  width: min(1120px, calc(100vw - 32px));
  height: min(860px, calc(100vh - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: clamp(54px, 6vw, 72px) clamp(52px, 7vw, 82px) 34px;
  border-radius: 16px;
  background: #f6f8fb;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .34);
}

.product-viewer-content {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
}

.product-viewer-gallery { display: grid; min-width: 0; max-width: 100%; gap: 16px; place-items: center; overflow: hidden; }

.product-viewer-main-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: clamp(280px, 48vh, 520px);
  max-height: 520px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(1, 46, 75, .12);
}

.product-viewer-thumbnails {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.product-viewer-thumbnail {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  padding: 3px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}

.product-viewer-thumbnail.is-selected { border-color: var(--primary); }
.product-viewer-thumbnail img {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 92px !important;
  object-fit: contain;
}
.product-viewer-details { display: grid; gap: 16px; }

.product-viewer-close,
.product-viewer-arrow {
  position: fixed;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(1, 46, 75, .92);
  color: #fff;
  cursor: pointer;
}

.product-viewer-close { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; font-size: 1.6rem; }
.product-viewer-arrow { position: absolute; top: 50%; width: 44px; height: 44px; font-size: 2.2rem; transform: translateY(-50%); }
.product-viewer-arrow:hover { transform: translateY(-50%) scale(1.04); }
.product-viewer-arrow:disabled { opacity: .25; cursor: default; }
.product-viewer-arrow-left { left: 8px; }
.product-viewer-arrow-right { right: 8px; }

.catalog-active-filters { flex-wrap: wrap; }

.item-category-table {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--soft-line);
  border-radius: 10px;
  background: #fff;
}

.item-category-table > span,
.item-category-table > button {
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--soft-line);
  background: transparent;
}

.item-category-table > :nth-last-child(-n + 2) { border-bottom: 0; }
.category-remove-button { color: #c62828; font: 700 1.25rem/1 inherit; cursor: pointer; }

.category-items-dropdown { min-width: 240px; }
.category-items-dropdown summary { color: var(--primary); font-weight: 700; cursor: pointer; }
.category-items-dropdown p { margin: 10px 0 0; color: var(--muted); }
.category-items-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
  max-height: 260px;
  margin-top: 10px;
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}
.category-items-list span,
.category-items-list small { display: block; }
.category-items-list small { color: var(--muted); }

.product-viewer-page-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

@media (max-width: 800px) {
  .product-image-manager-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-viewer { padding: 58px 48px 26px; }
  .product-viewer-content { grid-template-columns: 1fr; align-items: start; }
  .product-viewer-main-image { height: min(42vh, 400px); }
  .product-viewer-thumbnails { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .floating-cart-shell { top: 76px; left: 10px; }
}
