/* KM Agrartechnik Shop-Engine: Ergänzungen für Kasse, Bestellbestätigung, Kundentyp-Popup und Formulare.
   Nutzt die Variablen und Bausteine aus assets/css/style.css. */
.hk-co { padding-bottom: 60px; }
.hk-co .steps { margin-top: 18px; }
.hk-co-h1 { margin: 0 0 18px; }
.hk-mode { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: space-between; background: var(--g50); border: 1px solid var(--g100); border-radius: var(--r); padding: 12px 14px; margin: 4px 0 18px; font-size: 14px; }
.hk-sub { margin-top: 16px; }
.hk-sub[hidden], [data-co-altfields][hidden] { display: none !important; }
.hk-off { opacity: .6; cursor: not-allowed; background: #fafaf7; }
.hk-off input { cursor: not-allowed; }
.hk-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--warn); background: var(--acc-100); border-radius: 999px; padding: 3px 10px; }
.hk-badge .ic { width: 14px; height: 14px; color: var(--warn); }
.hk-note { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; font-size: 14px; color: var(--ink-2); }
.hk-note .ic { width: 20px; height: 20px; flex: none; color: var(--g500); margin-top: 1px; }
.hk-terms { align-items: flex-start !important; line-height: 1.5; margin-top: 6px; }
.hk-terms input { margin-top: 3px; }
.hk-small { font-size: 12.5px; line-height: 1.5; margin: 10px 0 0; }
.hk-alert { display: flex; gap: 12px; background: #fdecea; border: 1px solid #f5c6c0; border-left: 4px solid var(--sale); color: #5c1a14; border-radius: var(--r); padding: 14px 16px; margin: 0 0 18px; }
.hk-alert .ic { color: var(--sale); width: 22px; height: 22px; flex: none; }
.hk-alert ul { margin: 6px 0 0; padding-left: 18px; }
.hk-invalid input, .hk-invalid select, .hk-invalid textarea, input.hk-invalid, select.hk-invalid { border-color: var(--sale) !important; background: #fff8f7; }
label.hk-invalid { color: var(--sale); }
.hk-sum .hk-line { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.hk-sum .hk-line img { width: 52px; height: 52px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.hk-sum .hk-line > div { min-width: 0; }
.hk-sum .hk-line b { display: block; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.hk-sum .hk-line small { display: block; font-size: 12.5px; margin-top: 2px; }
.hk-sum .hk-line span { font-weight: 700; white-space: nowrap; }
.hk-sum .hk-line:not(:has(img)) { grid-template-columns: 1fr auto; }
.hk-sum .sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14.5px; }
.hk-sum .sum-row.total { border-top: 2px solid var(--line); margin-top: 6px; padding-top: 12px; font-size: 17px; }
.hk-sum .delivery { margin-top: 16px; display: grid; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.hk-sum .delivery > div { display: flex; gap: 8px; align-items: center; }
.hk-sum .delivery .ic { width: 18px; height: 18px; color: var(--g500); }
.hk-sum .btn .ic { width: 20px; height: 20px; }
.hk-empty .empty { text-align: center; padding: 40px 0 70px; }
.hk-empty .empty .ic { width: 48px; height: 48px; color: var(--g500); }

/* Bestellbestätigung */
.hk-thanks-head { text-align: center; padding: 36px 22px; }
.hk-thanks-head h1 { margin: 12px 0 8px; }
.hk-ok { width: 72px; height: 72px; border-radius: 50%; background: var(--acc); display: grid; place-items: center; margin: 0 auto; color: var(--g950); }
.hk-ok .ic { width: 34px; height: 34px; }
.hk-bank { margin-top: 12px; }
.hk-bank td { font-weight: 700; overflow-wrap: anywhere; }

/* Kundentyp-Popup */
.hk-modal { position: fixed; inset: 0; z-index: 5000; background: rgba(12, 26, 18, .62); display: grid; place-items: center; padding: 16px; }
body.hk-modal-open { overflow: hidden; }
.hk-modal-box { background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-3); width: min(560px, 100%); padding: 28px 26px 22px; text-align: center; max-height: calc(100vh - 32px); overflow: auto; }
.hk-modal-box h2 { margin: 0 0 6px; }
.hk-modal-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.hk-modal-opts button { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 1.5px solid var(--line-2); border-radius: var(--r); padding: 18px 14px; background: #fff; cursor: pointer; font: inherit; color: var(--ink); transition: .15s; }
.hk-modal-opts button:hover, .hk-modal-opts button:focus-visible { border-color: var(--g600); background: var(--g50); outline: none; }
.hk-modal-opts .ic { width: 34px; height: 34px; color: var(--g500); }
.hk-modal-opts b { font-size: 17px; }
.hk-modal-opts span { font-size: 13px; color: var(--muted); line-height: 1.4; }

/* Formulare nach dem Absenden */
.hk-sent { display: flex; gap: 14px; align-items: flex-start; padding: 6px 0; }
.hk-sent .ic { width: 34px; height: 34px; flex: none; color: #fff; background: var(--ok); border-radius: 50%; padding: 6px; }
.hk-sent p { margin: 4px 0 0; }

@media (max-width: 980px) {
  .hk-sum { position: static; }
}
@media (max-width: 640px) {
  .hk-co .form-card { padding: 18px 16px; }
  .hk-co .opt-card { align-items: flex-start; padding: 12px 14px; }
  .hk-co .opt-card .pr { white-space: nowrap; }
  .hk-co .steps { margin-bottom: 16px; }
  .hk-mode { font-size: 13.5px; }
  .hk-modal-opts { grid-template-columns: 1fr; }
  .hk-modal-box { padding: 22px 18px 18px; }
  .hk-thanks-head { padding: 26px 16px; }
  .hk-bank th { width: 42%; }
}

[hidden] { display: none !important; }

/* Rechtsseiten */
.hk-legal { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; align-items: start; padding-bottom: 50px; }
.hk-legal .prose h2 { font-size: 26px; }
.hk-legal .prose h3 { font-size: 19px; }
.hk-legal .prose p, .hk-legal .prose li { line-height: 1.65; overflow-wrap: anywhere; }
.hk-legal-nav { position: sticky; top: 100px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 2px; }
.hk-legal-nav h4 { margin: 0 0 8px; }
.hk-legal-nav a:not(.btn) { padding: 7px 10px; border-radius: var(--r-sm); font-size: 14px; color: var(--ink-2); }
.hk-legal-nav a:not(.btn):hover, .hk-legal-nav a[aria-current] { background: var(--g50); color: var(--g800); font-weight: 600; }
.hk-legal-nav .btn .ic { width: 16px; height: 16px; }
.hk-wf p { margin: 0 0 14px; }
.hk-wf-line { border-bottom: 1px solid var(--line-2); min-height: 2.4em; }
.hk-wf-fill { display: inline-block; min-width: 220px; border-bottom: 1px solid var(--line-2); }
@media (max-width: 980px) { .hk-legal { grid-template-columns: 1fr; gap: 24px; } .hk-legal-nav { position: static; } }
@media (max-width: 640px) { .hk-legal .prose h2 { font-size: 22px; } .hk-wf-fill { min-width: 140px; } }
@media print { .header, .nav, .topbar, .footer, .hk-legal-nav, .page-head-plain .crumbs, .cookie, .btn { display: none !important; } }

/* Einheitliches Dropdown-Design (alle Shopseiten, Kasse, Finder, Suche, Filter) */
select:not([multiple]):not([size]) {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232a5a3f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px 16px;
  padding-right: 38px !important; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  cursor: pointer; font-weight: 500; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
select:not([multiple]):not([size]):hover { border-color: var(--g500); }
select:not([multiple]):not([size]):focus-visible { outline: none; border-color: var(--g600); box-shadow: 0 0 0 3px rgba(245, 179, 1, .35); }
select:disabled { cursor: not-allowed; opacity: .6; }
select option { color: var(--ink); background: #fff; font-weight: 400; }
.field select, .toolbar select, .compat select { background-color: #fff; border-radius: var(--r-sm); }

/* Kategorie-Auswahl in der Kopfsuche: Segment am Suchfeld */
.search select {
  height: auto; align-self: stretch; max-width: 190px; min-width: 150px;
  background-color: var(--g50); border: 1.5px solid var(--line-2); border-right: 1px solid var(--line-2);
  border-radius: var(--r-sm) 0 0 var(--r-sm); padding-left: 16px; font-size: 14px; font-weight: 600; color: var(--g800);
  background-position: right 10px center; padding-right: 34px !important;
}
.search select:hover { background-color: var(--g100); border-color: var(--line-2); }
.search select:focus-visible { position: relative; z-index: 1; }

/* Aufnahme-Finder auf dunklem Grund */
.finder select {
  height: 52px; border: 2px solid transparent; border-radius: var(--r); padding-left: 16px; font-size: 15px; font-weight: 600;
  background-color: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .12);
}
.finder select:hover { border-color: var(--acc); }
.finder select:focus-visible { border-color: var(--acc); box-shadow: 0 0 0 4px rgba(245, 179, 1, .35); }
.finder label { letter-spacing: .08em; }
@media (max-width: 640px) { .search select { min-width: 0; max-width: 130px; padding-left: 12px; font-size: 13px; } }

/* Aufgeklappte Auswahlliste im Shop-Design (engine.js) */
.hk-dd { position: fixed; z-index: 6000; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 18px 44px rgba(17, 37, 26, .22), 0 3px 8px rgba(17, 37, 26, .08); overflow-y: auto; overscroll-behavior: contain; max-width: min(420px, calc(100vw - 16px)); font-size: 14.5px; animation: hkdd-in .12s ease-out; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.hk-dd.up { animation-name: hkdd-up; }
.hk-dd.on-dark { border-color: var(--acc); }
@keyframes hkdd-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes hkdd-up { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.hk-dd [role=option] { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border-radius: var(--r-sm); color: var(--ink); cursor: pointer; line-height: 1.3; user-select: none; }
.hk-dd [role=option] span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hk-dd [role=option] svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--g600); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.hk-dd [role=option].act { background: var(--g50); color: var(--g900); }
.hk-dd [role=option][aria-selected=true] { font-weight: 700; color: var(--g800); background: linear-gradient(90deg, var(--acc-100), #fff 85%); box-shadow: inset 3px 0 0 var(--acc); }
.hk-dd [role=option][aria-selected=true].act { background: linear-gradient(90deg, #ffeeb0, var(--g50) 85%); }
.hk-dd [role=option][aria-selected=true] svg { visibility: visible; }
.hk-dd [role=option][aria-disabled=true] { color: var(--muted); cursor: default; opacity: .55; }
.hk-dd .grp { padding: 10px 12px 4px; font: 700 11px/1.2 var(--ff); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hk-dd .in-grp { padding-left: 20px; }
select[aria-expanded=true] { border-color: var(--g600) !important; box-shadow: 0 0 0 3px rgba(245, 179, 1, .35); }
.finder select[aria-expanded=true] { border-color: var(--acc) !important; }

/* Herstellerlogos in Karten und Filter: feste Hoehe (Absicherung zu style.css) */
.card .brand img, .brand-mini { height: 20px !important; width: auto !important; max-width: 110px !important; object-fit: contain; object-position: left center; display: block; }
.fcheck .sw-logo, .sw-logo { height: 20px !important; width: auto !important; max-width: 120px !important; object-fit: contain; object-position: left center; }

/* Footer-Siegel: Icon und Text exakt mittig im Kreis */
.seals { gap: 12px; flex-wrap: wrap; }
.seal { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 86px !important; height: 86px !important; padding: 10px 8px !important; text-align: center; line-height: 1.18 !important; font-size: 11px !important; hyphens: manual; text-wrap: balance; }
.seal .ic { margin: 0 !important; flex: none; }
@media (max-width: 640px) { .seals { justify-content: flex-start; } }

.hk-sum .sum-row.hk-dep { color: var(--g700); background: var(--acc-100); border-radius: var(--r-sm); padding: 8px 10px; margin-top: 6px; }

.hk-credits { font-size: 13px; color: var(--muted); padding-left: 18px; }
.hk-credits li { margin-bottom: 6px; line-height: 1.5; }
