/* =============================================================================
   DrisoCards – Global Stylesheet
   Material Design 3 with royal blue brand + gold accents in components
   ============================================================================= */

/* ─── 1. Design tokens (MD3 custom properties) ─────────────────────────────── */

:root {
  /* Colour roles — royal blue family, gold accents via --chrome-gold-* */
  --md-sys-color-primary:             #2563EB;
  --md-sys-color-on-primary:          #FFFFFF;
  --md-sys-color-primary-container:   #EFF6FF;
  --md-sys-color-on-primary-container:#1E3A8A;

  --md-sys-color-secondary:           #3B82F6;
  --md-sys-color-on-secondary:        #FFFFFF;

  --md-sys-color-surface:             #FAFAFA;
  --md-sys-color-surface-variant:     #F1F5F9;
  --md-sys-color-on-surface:          #1C1B1F;
  --md-sys-color-on-surface-variant:  #666666;

  --md-sys-color-outline:             #E0E0E0;
  --md-sys-color-outline-variant:     #CAC4D0;

  --md-sys-color-error:               #B00020;
  --md-sys-color-on-error:            #FFFFFF;
  --md-sys-color-error-container:     #FFDAD6;

  --md-sys-color-success:             #2E7D32;
  --md-sys-color-on-success:          #FFFFFF;
  --md-sys-color-success-container:   #C8E6C9;

  --md-sys-color-warning:             #E65100;
  --md-sys-color-warning-container:   #FFE0B2;

  /* Typeface */
  --md-ref-typeface-brand:  'Roboto', sans-serif;
  --md-ref-typeface-plain:  'Roboto', sans-serif;

  /* Elevation (box shadows) */
  --md-sys-elevation-1: 0 1px 2px rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.08);
  --md-sys-elevation-2: 0 2px 6px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
  --md-sys-elevation-3: 0 4px 12px rgba(0,0,0,.14);

  /* Shape */
  --md-sys-shape-extra-small:  4px;
  --md-sys-shape-small:        8px;
  --md-sys-shape-medium:       12px;
  --md-sys-shape-large:        16px;
  --md-sys-shape-extra-large:  28px;
  --md-sys-shape-full:         9999px;

  --font-chrome: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Sticky offset: blue bar + gold line (panel is position:absolute, does not change height) */
  --layout-top-chrome-h: 100px;

  --chrome-gold-mid: #d4a84b;
  --chrome-gold-bright: #f0d78c;
}

@media (max-width: 640px) {
  :root {
    --layout-top-chrome-h: 152px;
  }
}

/* ─── 2. Reset & base ───────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--layout-top-chrome-h) + 12px);
}

body {
  font-family: var(--md-ref-typeface-brand);
  background-color: var(--md-sys-color-surface-variant);
  color: var(--md-sys-color-on-surface);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Ligature icons (Google Fonts stylesheet); reinforce so inherited body font never shows raw names like "expand_more". */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}

a {
  color: var(--md-sys-color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ─── 3. App Header (brand gradient + Verkaufen → Produkte) ───────────────────── */

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 10px;
  background-color: var(--md-sys-color-surface-variant);
  font-family: var(--font-chrome);
  isolation: isolate;
}

.app-header a {
  text-decoration: none;
}

/* Constrained blue bar (same max-width as .main-content), not full-bleed */
.app-header__band {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.96);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(59, 130, 246, 0.38) 0%, transparent 52%),
    radial-gradient(80% 85% at 0% 100%, rgba(212, 168, 75, 0.16) 0%, transparent 50%),
    linear-gradient(168deg, #2563eb 0%, #1d4ed8 40%, #1e3a8a 78%, #0f172a 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 10px 28px rgba(15, 23, 42, 0.28);
}

.app-header__sheen {
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  border-radius: 14px 14px 0 0;
  height: 52%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 100%);
  opacity: 0.7;
}

.app-header__wrap {
  position: relative;
  padding: 12px 16px 14px;
}

.app-header__bar {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px 20px;
  min-height: 52px;
}

.app-header__logo {
  justify-self: start;
  display: flex;
  align-items: center;
  min-width: 0;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.28));
  transition: opacity 180ms ease, transform 180ms ease;
}

.app-header__logo:hover {
  opacity: 0.95;
}

.app-header__logo:active {
  transform: scale(0.99);
}

.app-header__logo-img {
  display: block;
  width: min(210px, 48vw);
  height: 42px;
  object-fit: cover;
  object-position: center center;
}

.app-header__primary {
  justify-self: center;
  min-width: 0;
}

.app-header__cta-wrap {
  justify-self: end;
}

.app-header__goldline {
  height: 3px;
  margin: 0;
  border: none;
  flex-shrink: 0;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(212, 168, 75, 0.45) 16%,
    var(--chrome-gold-bright) 40%,
    var(--chrome-gold-mid) 52%,
    var(--chrome-gold-bright) 64%,
    rgba(212, 168, 75, 0.45) 84%,
    transparent 100%
  );
  box-shadow: 0 1px 5px rgba(212, 168, 75, 0.25);
}

/* Verkaufen trigger + dropdown ─────────────────────────────────────────────── */

.app-header__sell {
  position: relative;
  min-width: 0;
}

.app-header__sell > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  margin: 0;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.app-header__sell > summary::-webkit-details-marker {
  display: none;
}

.app-header__sell-summary-icon.material-symbols-outlined {
  font-size: 20px;
  opacity: 0.92;
}

.app-header__sell-chevron.material-symbols-outlined {
  font-size: 20px;
  margin-left: 2px;
  opacity: 0.85;
  transition: transform 200ms ease;
}

.app-header__sell[open] > summary .app-header__sell-chevron {
  transform: rotate(180deg);
}

.app-header__sell > summary:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.14);
}

.app-header__sell > summary:focus-visible {
  outline: 2px solid var(--chrome-gold-bright);
  outline-offset: 3px;
}

.app-header__sell-panel {
  position: absolute;
  z-index: 200;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 10px);
  width: min(264px, calc(100vw - 32px));
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--md-sys-color-outline-variant);
  background-color: #ffffff;
  box-shadow:
    var(--md-sys-elevation-2),
    0 14px 40px rgba(15, 23, 42, 0.14);
}

.app-header__sell-hint {
  margin: 0 8px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--md-sys-color-on-surface-variant);
}

.app-header__sell-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-header__sell-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
  border: 1px solid transparent;
  background-color: transparent;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.app-header__sell-link:hover {
  text-decoration: none;
  background-color: var(--md-sys-color-surface-variant);
}

.app-header__sell-link:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

.app-header__sell-link-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.app-header__sell-link-label {
  flex: 1;
}

.app-header__sell-link--current:hover {
  background-color: #dbeafe;
}

.app-header__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.15;
  color: #0f172a;
  background: linear-gradient(165deg, var(--chrome-gold-bright) 0%, var(--chrome-gold-mid) 100%);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.35) inset, 0 8px 22px rgba(0, 0, 0, 0.25);
  transition: filter 160ms ease, transform 160ms ease;
}

.app-header__cta:hover {
  filter: brightness(1.06);
  text-decoration: none;
}

.app-header__cta:active {
  transform: scale(0.98);
}

.app-header__cta:focus-visible {
  outline: 2px solid var(--chrome-gold-bright);
  outline-offset: 3px;
}

.app-header__cta-icon.material-symbols-outlined {
  font-size: 19px;
  color: #1e293b;
}

@media (max-width: 640px) {
  .app-header__bar {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto;
  }

  .app-header__logo {
    grid-column: 1;
    grid-row: 1;
  }

  .app-header__primary {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    width: auto;
    display: flex;
    justify-content: flex-end;
  }

  .app-header__sell > summary {
    width: auto;
    max-width: none;
    justify-content: center;
  }

  .app-header__sell-panel {
    right: 0;
    left: auto;
    transform: none;
    width: min(264px, calc(100vw - 32px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-header__logo,
  .app-header__cta,
  .app-header__sell-chevron,
  .app-header__sell-link {
    transition: none;
  }
}

/* ─── 5. Main content area ──────────────────────────────────────────────────── */

.main-content {
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ─── Site footer (legal links) ─────────────────────────────────────────────── */

.site-footer {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 24px;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  font-size: 13px;
  color: var(--md-sys-color-on-surface-variant);
}

.site-footer__link {
  color: var(--md-sys-color-primary);
  font-weight: 500;
  text-decoration: none;
}

.site-footer__link:hover {
  text-decoration: underline;
}

.site-footer__sep {
  color: var(--md-sys-color-outline);
  user-select: none;
}

/* ─── Legal document pages (AGB, etc.) ──────────────────────────────────────── */

.legal-doc__header {
  margin-bottom: 20px;
}

.legal-doc__title {
  font-size: 1.25rem;
  line-height: 1.35;
}

.legal-doc__meta {
  margin-top: 8px;
}

.legal-doc__body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--md-sys-color-on-surface);
}

.legal-doc__section + .legal-doc__section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

.legal-doc__h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
  color: var(--md-sys-color-on-surface);
}

.legal-doc__body p {
  margin: 0 0 0.65rem;
}

.legal-doc__body p:last-child {
  margin-bottom: 0;
}

/* ─── 6. Section card ───────────────────────────────────────────────────────── */

.section-card {
  background-color: #FFFFFF;
  border-radius: var(--md-sys-shape-large);
  box-shadow: var(--md-sys-elevation-1);
  padding: 20px;
  border: 1px solid var(--md-sys-color-outline);
}

/* Stack sell-page sections with consistent vertical rhythm (main column is not a flex child of .main-content). */
.page-layout__main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-header__text {
  flex: 1;
  min-width: 0;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
  line-height: 1.3;
}

.section-subtitle {
  font-size: 14px;
  color: var(--md-sys-color-on-surface-variant);
  margin-top: 2px;
  line-height: 1.4;
}

/* Verkaufen: expandable section cards (accordion) */
.section-card--collapsible .section-header--collapsible {
  margin-bottom: 0;
  align-items: flex-start;
}

.section-title--toggle {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.section-card__toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
  border-radius: var(--md-sys-shape-small);
  transition: background-color 150ms ease;
}

.section-card__toggle:hover {
  background-color: rgba(37, 99, 235, 0.06);
}

.section-card__toggle:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

.section-card__toggle-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.section-card__toggle-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
  line-height: 1.3;
}

.section-card__toggle .section-subtitle {
  margin-top: 0;
}

.section-card__chevron {
  flex-shrink: 0;
  font-size: 22px;
  color: var(--md-sys-color-on-surface-variant);
  transition: transform 200ms ease;
  margin-top: 2px;
}

.section-card__toggle[aria-expanded="true"] .section-card__chevron {
  transform: rotate(180deg);
}

.section-card--collapsible .section-card__body {
  padding-top: 14px;
  margin-top: 12px;
  border-top: 1px solid var(--md-sys-color-outline);
}

.section-card--collapsible .section-card__body[hidden] {
  display: none !important;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

@media (prefers-reduced-motion: reduce) {
  .section-card__chevron {
    transition: none;
  }
}

/* ─── 7. Info button ────────────────────────────────────────────────────────── */

.info-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--md-sys-shape-full);
  border: 1.5px solid var(--md-sys-color-outline);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.info-btn:hover {
  background-color: var(--md-sys-color-surface-variant);
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-primary);
}

.info-btn .material-symbols-outlined {
  font-size: 18px;
}

/* ─── 8. Form elements ──────────────────────────────────────────────────────── */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Use only on native <select> — text fields should use .form-input */
select.form-select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  padding-right: 32px;
  border: 1.5px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-small);
  background-color: #FFFFFF;
  color: var(--md-sys-color-on-surface);
  font-size: 14px;
  font-family: inherit;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  transition: border-color 150ms ease;
}

select.form-select:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

@media (max-width: 480px) {
  .manual-add-lang-row {
    grid-template-columns: 1fr !important;
  }
}

/* ─── 9. Search input ───────────────────────────────────────────────────────── */

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper .material-symbols-outlined {
  position: absolute;
  left: 12px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 20px;
  pointer-events: none;
  z-index: 1;
}

.search-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  border: 1.5px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-full);
  background-color: var(--md-sys-color-surface-variant);
  color: var(--md-sys-color-on-surface);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.search-input::placeholder {
  color: var(--md-sys-color-on-surface-variant);
}

.search-input:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ─── 10. Manual add link ───────────────────────────────────────────────────── */

.manual-add-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1.5px dashed var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-medium);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
  background: transparent;
  width: 100%;
  text-align: center;
}

.manual-add-link:hover {
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-primary);
  background-color: var(--md-sys-color-primary-container);
}

.manual-add-link .material-symbols-outlined {
  font-size: 18px;
}

/* ─── 11. Language tabs (pill style) ────────────────────────────────────────── */

.language-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.language-tab {
  height: 32px;
  padding: 0 16px;
  border-radius: var(--md-sys-shape-full);
  border: 1.5px solid var(--md-sys-color-outline);
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.language-tab:hover:not(.language-tab--active) {
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-primary);
}

.language-tab--active {
  background-color: var(--md-sys-color-primary);
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

/* ─── 12. Card search results ───────────────────────────────────────────────── */

.card-results {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-medium);
  overflow: visible;
}

@media (max-width: 768px) {
  #card-results:not([hidden]).card-results--keyboard-open {
    padding-bottom: var(--driso-keyboard-inset, 0px);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}

.card-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background-color: #FFFFFF;
  cursor: pointer;
  transition: background-color 100ms ease;
  position: relative;
}

.card-result-item:has(.card-result-item__image:hover),
.card-result-item:has(.card-result-item__image-placeholder:hover) {
  z-index: 4;
}

.card-result-item:hover,
.card-result-item:focus-visible {
  background-color: var(--md-sys-color-surface-variant);
}

.card-result-item__image {
  width: 44px;
  height: 62px;
  border-radius: var(--md-sys-shape-extra-small);
  object-fit: cover;
  background-color: var(--md-sys-color-surface-variant);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transform-origin: center center;
  transition: transform 0.22s ease;
}

.card-result-item__image:hover {
  transform: scale(3);
  z-index: 2;
}

.card-result-item__image-placeholder {
  width: 44px;
  height: 62px;
  border-radius: var(--md-sys-shape-extra-small);
  background-color: var(--md-sys-color-surface-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--md-sys-color-outline-variant);
  position: relative;
  z-index: 1;
  transform-origin: center center;
  transition: transform 0.22s ease;
}

.card-result-item__image-placeholder:hover {
  transform: scale(3);
  z-index: 2;
}

.card-result-item__info {
  flex: 1;
  min-width: 0;
}

.card-result-item__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-result-item__meta {
  font-size: 12px;
  color: var(--md-sys-color-on-surface-variant);
  margin-top: 2px;
}

.card-result-item__price {
  font-size: 15px;
  font-weight: 700;
  color: var(--md-sys-color-primary);
  flex-shrink: 0;
}

/* ─── 13. Price display ─────────────────────────────────────────────────────── */

.price-display {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.price-display__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 500;
}

.price-display__value {
  font-size: 28px;
  font-weight: 700;
  color: var(--md-sys-color-primary);
  line-height: 1.1;
}

.price-display__value--bulk {
  color: var(--md-sys-color-warning);
  font-size: 20px;
}

/* ─── 14. Condition chips ───────────────────────────────────────────────────── */

.condition-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.condition-chip {
  height: 36px;
  padding: 0 16px;
  border-radius: var(--md-sys-shape-full);
  border: 1.5px solid var(--md-sys-color-outline);
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.condition-chip:hover:not(.condition-chip--active) {
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-primary);
  background-color: var(--md-sys-color-primary-container);
}

.condition-chip--active {
  background-color: var(--md-sys-color-primary);
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

/* ─── 15. Graded card selector ──────────────────────────────────────────────── */

.graded-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-medium);
  background-color: var(--md-sys-color-surface-variant);
}

.graded-selector__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
}

.graded-selector__input {
  width: 70px;
  height: 36px;
  padding: 0 10px;
  border: 1.5px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-small);
  font-size: 14px;
  font-family: inherit;
  text-align: center;
}

.graded-selector__input:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
}

/* ─── 16. Bulk category rows ────────────────────────────────────────────────── */

.bulk-category-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--md-sys-color-outline);
}

.bulk-category-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.bulk-category-row.sealed-product-row {
  position: relative;
}

.bulk-category-row.sealed-product-row:has(.sealed-product-row__thumb:hover),
.bulk-category-row.sealed-product-row:has(.sealed-product-row__thumb-placeholder:hover) {
  z-index: 4;
}

.sealed-product-row__thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--md-sys-shape-extra-small);
  object-fit: cover;
  background-color: var(--md-sys-color-surface-variant);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transform-origin: center center;
  transition: transform 0.22s ease;
}

.sealed-product-row__thumb:hover {
  transform: scale(3);
  z-index: 2;
}

.sealed-product-row__thumb-placeholder {
  width: 56px;
  height: 56px;
  border-radius: var(--md-sys-shape-extra-small);
  background-color: var(--md-sys-color-surface-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--md-sys-color-outline-variant);
  position: relative;
  z-index: 1;
  transform-origin: center center;
  transition: transform 0.22s ease;
}

.sealed-product-row__thumb-placeholder:hover {
  transform: scale(3);
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .card-result-item__image,
  .card-result-item__image-placeholder,
  .sealed-product-row__thumb,
  .sealed-product-row__thumb-placeholder {
    transition: none;
  }

  .card-result-item__image:hover,
  .card-result-item__image-placeholder:hover,
  .sealed-product-row__thumb:hover,
  .sealed-product-row__thumb-placeholder:hover {
    transform: none;
  }
}

.sealed-product-row__thumb-placeholder .material-symbols-outlined {
  font-size: 28px;
}

.bulk-category-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

.bulk-category-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.bulk-row-warning {
  margin: 0;
  width: 100%;
  font-size: 12px;
  line-height: 1.35;
  color: var(--md-sys-color-error);
  text-align: right;
}

.bulk-category-price {
  font-size: 13px;
  color: var(--md-sys-color-on-surface-variant);
  white-space: nowrap;
}

.bulk-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.bulk-counter__core,
.bulk-counter__steps {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bulk-counter__value {
  min-width: 28px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

.bulk-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--md-sys-shape-full);
  border: 1.5px solid var(--md-sys-color-outline);
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--md-sys-color-on-surface);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
  flex-shrink: 0;
}

.bulk-btn:hover {
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-primary);
  background-color: var(--md-sys-color-primary-container);
}

.bulk-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

.bulk-btn--step {
  width: auto;
  min-width: 38px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--md-sys-shape-small);
}

.bulk-btn--step[data-action="increment-hundred"] {
  min-width: 44px;
}

/** Wider control for labels (search, load more) — base .bulk-btn is 32×32 for +/- steps. */
.bulk-btn--text {
  width: auto;
  min-width: max-content;
  height: 40px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.bulk-btn--primary {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border-color: var(--md-sys-color-primary);
}

.bulk-btn--primary:hover {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border-color: var(--md-sys-color-primary);
  filter: brightness(0.95);
}

.bulk-add-lang-btn {
  width: auto;
  min-width: max-content;
  height: 38px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  gap: 6px;
  background: var(--md-sys-color-primary);
  color: #fff;
  border-color: var(--md-sys-color-primary);
}

.bulk-add-lang-btn .material-symbols-outlined {
  font-size: 16px;
}

.bulk-add-lang-btn:hover {
  background: var(--md-sys-color-primary);
  color: #fff;
  border-color: var(--md-sys-color-primary);
  filter: brightness(0.95);
}

.bulk-add-lang-btn--success {
  background: var(--md-sys-color-success, #2E7D32) !important;
  color: #fff !important;
  border-color: var(--md-sys-color-success, #2E7D32) !important;
  filter: none !important;
}

.bulk-add-lang-btn--error {
  background: var(--md-sys-color-error) !important;
  color: var(--md-sys-color-on-error) !important;
  border-color: var(--md-sys-color-error) !important;
  filter: none !important;
}

.sealed-load-more-wrap {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

/** [hidden] alone loses to `display:flex` above; keep load-more bar off until JS shows it. */
.sealed-load-more-wrap[hidden] {
  display: none !important;
}

/* ─── 17. Sell list (cart) ──────────────────────────────────────────────────── */

.sell-list {
  background-color: #FFFFFF;
  border-radius: var(--md-sys-shape-large);
  border: 1px solid var(--md-sys-color-outline);
  box-shadow: var(--md-sys-elevation-1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sell-list__header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--md-sys-color-outline);
}

.sell-list__title {
  font-size: 16px;
  font-weight: 700;
}

.sell-list__body {
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
}

.sell-list__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--md-sys-color-outline);
  transition: background-color 100ms ease;
}

.sell-list__item:last-child {
  border-bottom: none;
}

.sell-list__item:hover {
  background-color: var(--md-sys-color-surface-variant);
}

.sell-list__item-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sell-list__item-meta {
  font-size: 11px;
  color: var(--md-sys-color-on-surface-variant);
}

.sell-list__item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--md-sys-color-primary);
  flex-shrink: 0;
}

.sell-list__item-remove {
  width: 28px;
  height: 28px;
  border-radius: var(--md-sys-shape-full);
  border: none;
  background: none;
  cursor: pointer;
  color: var(--md-sys-color-on-surface-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 100ms ease, color 100ms ease;
  flex-shrink: 0;
}

.sell-list__item-remove:hover {
  background-color: var(--md-sys-color-error-container);
  color: var(--md-sys-color-error);
}

.sell-list__item-remove .material-symbols-outlined {
  font-size: 16px;
}

.sell-list__empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
}

.sell-list__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 2px solid var(--md-sys-color-outline);
  background-color: var(--md-sys-color-surface-variant);
}

.sell-list__total-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

.sell-list__total-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--md-sys-color-primary);
}

.sell-list__cta {
  padding: 12px 20px 16px;
}

/* ─── 18. Info modal ────────────────────────────────────────────────────────── */

.info-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.info-modal-overlay--visible {
  opacity: 1;
  pointer-events: all;
}

.info-modal {
  background-color: #FFFFFF;
  border-radius: var(--md-sys-shape-extra-large);
  box-shadow: var(--md-sys-elevation-3);
  max-width: 480px;
  width: 100%;
  padding: 24px;
  transform: scale(0.92) translateY(12px);
  transition: transform 200ms ease;
}

.info-modal-overlay--visible .info-modal {
  transform: scale(1) translateY(0);
}

.info-modal__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--md-sys-color-on-surface);
}

.info-modal__body {
  font-size: 14px;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.6;
}

.info-modal__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ─── 19. Utility / shared ──────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--md-sys-shape-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--bulk {
  background-color: var(--md-sys-color-warning-container);
  color: var(--md-sys-color-warning);
}

.badge--single {
  background-color: var(--md-sys-color-success-container);
  color: var(--md-sys-color-success);
}

.badge--graded {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-primary);
}

.text-muted {
  color: var(--md-sys-color-on-surface-variant);
}

.text-error {
  color: var(--md-sys-color-error);
}

.text-success {
  color: var(--md-sys-color-success);
}

.divider {
  border: none;
  border-top: 1px solid var(--md-sys-color-outline);
  margin: 16px 0;
}

/* ─── Sell page context (where you are) ─────────────────────────────────────── */

.sell-page-header {
  margin-bottom: 20px;
  padding: 18px 18px 16px;
  border-radius: var(--md-sys-shape-large);
  background: linear-gradient(145deg, var(--md-sys-color-primary-container) 0%, #ffffff 65%);
  border: 1px solid rgba(37, 99, 235, 0.16);
  box-shadow: var(--md-sys-elevation-1);
}

.sell-page-header__crumbs {
  margin-bottom: 14px;
}

.sell-page-header__crumb-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--md-sys-color-on-surface-variant);
}

.sell-page-header__crumb a {
  color: var(--md-sys-color-primary);
  font-weight: 500;
  text-decoration: none;
}

.sell-page-header__crumb a:hover {
  text-decoration: underline;
}

.sell-page-header__crumb--sep {
  color: var(--md-sys-color-outline);
  user-select: none;
}

.sell-page-header__crumb--current {
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

.sell-page-header__main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.sell-page-header__icon {
  font-size: clamp(2rem, 6vw, 2.5rem);
  line-height: 1;
  flex-shrink: 0;
}

.sell-page-header__copy {
  min-width: 0;
}

.sell-page-header__title {
  font-family: var(--font-chrome);
  margin: 0 0 8px;
  font-size: clamp(1.28rem, 3.6vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--md-sys-color-on-surface);
}

.sell-page-header__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--md-sys-color-on-surface-variant);
}

/* Material Web component overrides */
md-filled-button {
  --md-filled-button-container-color: var(--md-sys-color-primary);
  --md-filled-button-label-text-color: var(--md-sys-color-on-primary);
}

md-outlined-button {
  --md-outlined-button-outline-color: var(--md-sys-color-outline);
  --md-outlined-button-label-text-color: var(--md-sys-color-primary);
}

/* ─── 20. Desktop two-column layout ─────────────────────────────────────────── */

@media (min-width: 769px) {
  .page-layout--two-col {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
  }

  /* Sidebar stretches to full row height so the sticky sell-list inside
     has room to scroll along with the user. With `align-items: start` on
     the grid, the aside would otherwise shrink to its content's height,
     making position:sticky have nothing to stick within. */
  .page-layout__sidebar {
    align-self: stretch;
    position: sticky;
    top: calc(var(--layout-top-chrome-h) + 20px);
    height: calc(100dvh - var(--layout-top-chrome-h) - 40px);
  }

  .sell-list {
    max-height: 100%;
  }

  .sell-list__body {
    max-height: none;
    flex: 1;
    overflow-y: auto;
  }
}

/* ─── 21. Mobile adjustments ────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .app-header__bar {
    align-items: center;
    justify-content: space-between;
  }

  .sell-page-header {
    padding: 14px;
    margin-bottom: 14px;
  }

  .sell-page-header__title {
    font-size: 1.22rem;
  }

  .main-content {
    padding: 12px 12px 120px;
  }

  .section-card {
    padding: 16px;
    border-radius: var(--md-sys-shape-medium);
  }

  .section-title {
    font-size: 16px;
  }

  .section-card__toggle-heading {
    font-size: 16px;
  }

  .price-display__value {
    font-size: 24px;
  }

  .page-layout__sidebar {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  /* Sell list becomes a bottom sheet on mobile */
  .sell-list {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    border-radius: var(--md-sys-shape-extra-large) var(--md-sys-shape-extra-large) 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,.18);
    /* Above .app-header (100); below modals (.info-modal-overlay 200) */
    z-index: 150;
    max-height: 50dvh;
    border-bottom: none;
    touch-action: manipulation;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .sell-list__body {
    max-height: calc(50dvh - 60px - 56px - 60px);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }

  .sell-list--collapsed {
    max-height: 64px;
    overflow: hidden;
  }

  .sell-list--collapsed .sell-list__body,
  .sell-list--collapsed .sell-list__total,
  .sell-list--collapsed .sell-list__cta {
    display: none;
  }

  body.sell-list-sheet-open {
    overflow: hidden;
  }

  .sell-list-backdrop {
    position: fixed;
    inset: 0;
    z-index: 149;
    background-color: rgba(0, 0, 0, 0.38);
    border: none;
    margin: 0;
    padding: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .sell-list-backdrop[hidden] {
    display: none !important;
  }

  /* Tall dialogs: scroll inside viewport (keyboard / small phones) */
  .info-modal-overlay.info-modal-overlay--visible {
    align-items: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: max(16px, env(safe-area-inset-top, 0px));
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }

  .info-modal {
    border-radius: var(--md-sys-shape-extra-large) var(--md-sys-shape-extra-large) var(--md-sys-shape-large) var(--md-sys-shape-large);
    max-height: min(90dvh, calc(100dvh - 32px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 400px) {
  .condition-chips {
    gap: 6px;
  }

  .condition-chip {
    padding: 0 12px;
    font-size: 12px;
  }

  .language-tab {
    padding: 0 12px;
    font-size: 12px;
  }
}

/* ─── 22. Buttons ────────────────────────────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 24px;
  border-radius: var(--md-sys-shape-full);
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: background-color 150ms ease, box-shadow 150ms ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary:hover {
  background-color: #1D4ED8;
  text-decoration: none;
  color: #FFFFFF;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 24px;
  border-radius: var(--md-sys-shape-full);
  background-color: transparent;
  color: var(--md-sys-color-primary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1.5px solid var(--md-sys-color-primary);
  cursor: pointer;
  transition: background-color 150ms ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-secondary:hover {
  background-color: var(--md-sys-color-primary-container);
  text-decoration: none;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 24px;
  border-radius: var(--md-sys-shape-full);
  background-color: transparent;
  color: var(--md-sys-color-error);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1.5px solid var(--md-sys-color-error);
  cursor: pointer;
  transition: background-color 150ms ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-danger:hover {
  background-color: var(--md-sys-color-error-container);
  text-decoration: none;
}

/* ─── 23. Status pipeline ────────────────────────────────────────────────────── */

.status-pipeline {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  padding: 4px 0 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.status-pipeline::-webkit-scrollbar {
  display: none;
}

.status-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 64px;
  position: relative;
}

.status-step::before {
  content: '';
  position: absolute;
  top: 11px;
  left: calc(-50% + 14px);
  right: calc(50% + 14px);
  height: 2px;
  background-color: var(--md-sys-color-outline);
}

.status-step:first-child::before {
  display: none;
}

.status-step__dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--md-sys-color-outline);
  background-color: #FFFFFF;
  z-index: 1;
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-step--done .status-step__dot {
  background-color: var(--md-sys-color-success);
  border-color: var(--md-sys-color-success);
  color: #FFFFFF;
  font-size: 14px;
}

.status-step--done::before {
  background-color: var(--md-sys-color-success);
}

.status-step--active .status-step__dot {
  background-color: var(--md-sys-color-primary);
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.status-step--rejected .status-step__dot {
  background-color: var(--md-sys-color-error);
  border-color: var(--md-sys-color-error);
}

.status-step__label {
  font-size: 10px;
  text-align: center;
  margin-top: 6px;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.3;
  padding: 0 2px;
}

.status-step--active .status-step__label {
  color: var(--md-sys-color-primary);
  font-weight: 700;
}

.status-step--done .status-step__label {
  color: var(--md-sys-color-success);
}

.status-step--rejected .status-step__label {
  color: var(--md-sys-color-error);
  font-weight: 700;
}

/* ─── 24. Order item rows ────────────────────────────────────────────────────── */

.order-item-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--md-sys-color-outline);
}

.order-item-row:last-child {
  border-bottom: none;
}

.order-item-row__main {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: start;
}

.order-item-row__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

.order-item-row__meta {
  font-size: 12px;
  color: var(--md-sys-color-on-surface-variant);
  margin-top: 2px;
}

.order-item-row__prices {
  text-align: right;
  font-size: 13px;
}

.order-item-row__price-customer {
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

.order-item-row__price-admin {
  font-size: 12px;
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: line-through;
}

.order-item-row__price-admin--new {
  color: var(--md-sys-color-warning);
  text-decoration: none;
  font-weight: 700;
}

.order-item-row__notes {
  margin-top: 8px;
  font-size: 12px;
  color: var(--md-sys-color-warning);
  background-color: var(--md-sys-color-warning-container);
  padding: 6px 10px;
  border-radius: var(--md-sys-shape-extra-small);
}

.order-item-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--md-sys-shape-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.order-item-status--ungeprueft {
  background-color: #F5F5F5;
  color: #757575;
}

.order-item-status--geprueft {
  background-color: var(--md-sys-color-success-container);
  color: var(--md-sys-color-success);
}

.order-item-status--abweichung {
  background-color: var(--md-sys-color-warning-container);
  color: var(--md-sys-color-warning);
}

.order-item-status--abgelehnt {
  background-color: var(--md-sys-color-error-container);
  color: var(--md-sys-color-error);
}

/* ─── 25. Abweichung highlight ───────────────────────────────────────────────── */

.abweichung-highlight {
  background-color: #FFF8E1;
  border-left: 3px solid var(--md-sys-color-warning);
  padding-left: 10px;
  margin-left: -4px;
  border-radius: 0 var(--md-sys-shape-extra-small) var(--md-sys-shape-extra-small) 0;
}

/* ─── 26. Alerts ─────────────────────────────────────────────────────────────── */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--md-sys-shape-medium);
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid transparent;
}

.alert--success {
  background-color: var(--md-sys-color-success-container);
  color: var(--md-sys-color-success);
  border-color: rgba(46, 125, 50, 0.3);
}

.alert--warning {
  background-color: var(--md-sys-color-warning-container);
  color: var(--md-sys-color-warning);
  border-color: rgba(230, 81, 0, 0.3);
}

.alert--error {
  background-color: var(--md-sys-color-error-container);
  color: var(--md-sys-color-error);
  border-color: rgba(176, 0, 32, 0.3);
}

/* ─── 27. Checkout form ──────────────────────────────────────────────────────── */

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-section-heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--md-sys-color-on-surface-variant);
  border-bottom: 1px solid var(--md-sys-color-outline);
  padding-bottom: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1.5px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-small);
  background-color: #FFFFFF;
  color: var(--md-sys-color-on-surface);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 150ms ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-input.is-error {
  border-color: var(--md-sys-color-error);
}

.form-input-error {
  font-size: 12px;
  color: var(--md-sys-color-error);
  margin-top: 2px;
}

.checkout-iban-field__box {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--md-sys-color-primary);
  background: color-mix(in srgb, var(--md-sys-color-primary) 6%, transparent);
  border-radius: var(--md-sys-shape-small);
  padding: 4px 14px;
}

.checkout-iban-field__box:focus-within {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.checkout-iban-field__box:has(.is-error) {
  border-color: var(--md-sys-color-error);
  background: color-mix(in srgb, var(--md-sys-color-error) 6%, transparent);
}

.checkout-iban-field__icon {
  flex-shrink: 0;
  font-size: 22px;
  color: var(--md-sys-color-primary);
}

.checkout-iban-field__box:has(.is-error) .checkout-iban-field__icon {
  color: var(--md-sys-color-error);
}

.checkout-iban-field__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 8px 0;
}

.checkout-iban-field__input:focus {
  border: none;
  box-shadow: none;
}

.checkout-iban-field__hint {
  margin-top: 8px;
  margin-bottom: 0;
  max-width: 40rem;
}

.captcha-placeholder {
  padding: 8px 0;
}

.form-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.5;
  cursor: pointer;
}

.form-checkbox-row input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--md-sys-color-primary);
  cursor: pointer;
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ─── 28. Order summary table ────────────────────────────────────────────────── */

.order-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.order-summary-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--md-sys-color-on-surface-variant);
  border-bottom: 2px solid var(--md-sys-color-outline);
}

.order-summary-table td {
  padding: 10px;
  border-bottom: 1px solid var(--md-sys-color-outline);
  vertical-align: middle;
}

.order-summary-table tr:last-child td {
  border-bottom: none;
}

.order-summary-table .total-row td {
  border-top: 2px solid var(--md-sys-color-outline);
  font-weight: 700;
  font-size: 15px;
  padding-top: 14px;
}

.order-summary-table .total-row td:last-child {
  color: var(--md-sys-color-primary);
}

/* ─── 29. Info sidebar box ───────────────────────────────────────────────────── */

.info-sidebar-box {
  background-color: var(--md-sys-color-primary-container);
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: var(--md-sys-shape-medium);
  padding: 16px;
  font-size: 13px;
  color: var(--md-sys-color-on-primary-container);
}

.info-sidebar-box__title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-sidebar-box ul {
  padding-left: 18px;
  line-height: 1.7;
}

/* ─── 30. Confirmation page ──────────────────────────────────────────────────── */

.confirmation-icon {
  font-size: 64px;
  color: var(--md-sys-color-success);
  text-align: center;
  display: block;
  margin-bottom: 8px;
}

.next-steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  counter-reset: steps;
}

.next-steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 14px;
  color: var(--md-sys-color-on-surface);
  line-height: 1.5;
  counter-increment: steps;
}

.next-steps-list li::before {
  content: counter(steps);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--md-sys-color-primary);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ─── 31. Order status page ──────────────────────────────────────────────────── */

/* Bug 18 — mobile: action buttons vs passive status UI on /status/ */
@media (max-width: 768px) {
  .order-status-page .action-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .order-status-page .action-bar .btn-primary,
  .order-status-page .action-bar .btn-danger {
    min-height: 44px;
    padding: 10px 20px;
    font-weight: 600;
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .order-status-page .action-bar .btn-danger {
    background-color: var(--md-sys-color-error);
    color: var(--md-sys-color-on-error);
    border-color: var(--md-sys-color-error);
  }

  .order-status-page .action-bar .btn-danger:hover {
    background-color: #9a0007;
    color: var(--md-sys-color-on-error);
  }

  .order-status-page .status-step__label {
    font-weight: 400;
  }

  .order-status-page .status-step--active .status-step__label {
    font-weight: 700;
  }

  .order-status-page .order-item-status {
    pointer-events: none;
  }

  .order-status-page .alert[role="status"] {
    background: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface-variant);
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 400;
    pointer-events: none;
  }
}

/* ─── 31b. Order status page (layout) ─────────────────────────────────────────── */

.order-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--md-sys-color-on-surface-variant);
  margin-top: 8px;
}

.order-header-meta strong {
  color: var(--md-sys-color-on-surface);
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.items-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--md-sys-color-on-surface-variant);
  border-bottom: 2px solid var(--md-sys-color-outline);
  white-space: nowrap;
}

.items-table td {
  padding: 10px;
  border-bottom: 1px solid var(--md-sys-color-outline);
  vertical-align: top;
}

.items-table tr.abweichung-highlight td {
  background-color: #FFF8E1;
}

.items-table tr.abgelehnt-row td {
  opacity: 0.6;
  text-decoration: line-through;
}

.items-table .notes-row td {
  padding-top: 0;
  padding-bottom: 12px;
  text-decoration: none;
  opacity: 1;
}

.items-table tfoot td {
  border-top: 2px solid var(--md-sys-color-outline);
  font-weight: 700;
  font-size: 14px;
  padding-top: 14px;
}

.items-table tfoot td:last-child {
  color: var(--md-sys-color-primary);
}

/* =============================================================================
   Phase 5 – Polish: responsive improvements, transitions, print styles
   ============================================================================= */

/* ─── Smooth transitions ────────────────────────────────────────────────────── */

.language-tab,
.condition-chip,
.bulk-btn,
.btn-primary,
.btn-secondary,
.sell-list__cta {
  transition: all 0.18s ease;
}

.card-result-item {
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.card-result-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.18);
}

/* ─── Loading skeleton ──────────────────────────────────────────────────────── */

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes skeleton-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.skeleton-card { height: 80px; margin-bottom: 8px; }
.skeleton-text { height: 16px; margin-bottom: 8px; width: 70%; }

/* ─── Toast notification ────────────────────────────────────────────────────── */

.toast-container {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  z-index: 10000; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  background: #1C1B1F; color: #fff;
  padding: 12px 20px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  animation: toastIn .25s ease;
  pointer-events: auto;
}
.toast--success { background: #1B5E20; }
.toast--error   { background: #B00020; }
@keyframes toastIn { from { opacity:0; transform: translateY(12px); } to { opacity:1; transform: translateY(0); } }

/* ─── SEO: visually hidden but available to screen readers ─────────────────── */

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ─── Focus styles (accessibility) ─────────────────────────────────────────── */

:focus-visible {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── Print styles ──────────────────────────────────────────────────────────── */

@media print {
  .app-header,
  .sell-list,
  .info-btn,
  .manual-add-link, .bulk-category-row .bulk-counter,
  .sealed-section, #cookie-banner { display: none !important; }
  .main-content { padding: 0; max-width: 100%; }
  .section-card { box-shadow: none; border: 1px solid #ddd; }
  .section-card--collapsible .section-card__body[hidden] {
    display: block !important;
    margin-top: 12px !important;
    padding-top: 14px !important;
    border-top: 1px solid #ddd !important;
  }
}

/* ─── Status page pipeline (mobile) ────────────────────────────────────────── */

@media (max-width: 600px) {
  /* Bulk row: label on top, counter full width below (iPhone ~390px) */
  .bulk-category-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .bulk-category-name {
    flex: none;
  }

  .bulk-category-aside {
    align-items: center;
    width: 100%;
  }

  .bulk-row-warning {
    width: 100%;
    text-align: center;
  }

  /* Compact toolbar: centered (−)(n)(+) | +10 +100 */
  .bulk-counter {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    padding: 6px 12px;
    min-height: 44px;
    box-sizing: border-box;
    border-radius: var(--md-sys-shape-medium);
    background: var(--md-sys-color-surface-variant);
    border: 1px solid var(--md-sys-color-outline);
  }

  .bulk-counter__core {
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
  }

  .bulk-counter__value {
    min-width: 24px;
    font-size: 14px;
  }

  .bulk-counter__steps {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    align-self: stretch;
    gap: 6px;
    padding-left: 10px;
    border-left: 1px solid var(--md-sys-color-outline);
  }

  .bulk-counter__steps .bulk-btn--step {
    width: 44px;
    min-width: 44px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    border-radius: var(--md-sys-shape-full);
    flex: 0 0 auto;
  }

  .status-pipeline {
    flex-direction: column;
    gap: 8px;
  }
  .status-pipeline::before { display: none; }
}

/* ─── Admin responsive ──────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-table { font-size: 13px; }
  .admin-table th, .admin-table td { padding: 8px 10px; }
}

/* ─── Input focus within cards ──────────────────────────────────────────────── */

.admin-price-input:focus {
  outline: 2px solid var(--md-sys-color-primary);
  border-radius: 4px;
}

/* ─── Abweichung highlight ──────────────────────────────────────────────────── */

.abweichung-highlight td {
  background: #FFF8E1 !important;
}
.abgelehnt-row td {
  text-decoration: line-through;
  color: #999;
}

/* ─── Empty state ───────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--md-sys-color-on-surface-variant);
}
.empty-state__icon {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}
.empty-state__title {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
}
.empty-state__text {
  font-size: 14px;
  line-height: 1.6;
}

/* ─── Home game grid ─────────────────────────────────────────────────────────── */

.home-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.home-game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  border: 2px solid var(--md-sys-color-outline);
  border-radius: 12px;
  background: var(--md-sys-color-surface-variant);
  text-decoration: none;
  color: var(--md-sys-color-on-surface);
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.home-game-card:hover {
  border-color: var(--md-sys-color-primary);
  background: var(--md-sys-color-primary-container);
  box-shadow: 0 2px 12px rgba(37,99,235,.14);
}

.home-game-card--featured {
  border-color: var(--md-sys-color-primary);
  background: var(--md-sys-color-primary-container);
}

.home-game-card__icon {
  font-size: 36px;
  line-height: 1;
}

.home-game-card__label {
  font-weight: 600;
  font-size: 15px;
  text-align: center;
}

.home-game-card__badge {
  font-size: 11px;
  color: var(--md-sys-color-on-surface-variant);
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 20px;
  padding: 2px 8px;
  text-align: center;
}
