/* Kundenkonto (DES-70): Anmelden und Registrieren in zwei Spalten, Konto mit Menü links, Übersicht mit Kacheln,
   Bestellungen als Karten, Statusleiste. Lädt nur auf „Mein Konto“ (functions.php). Vorlagen: woocommerce/myaccount/*.php. */
.sg-konto { max-width: 1280px; margin: 0 auto; padding: 48px 48px 96px; color: var(--text); }
.sg-konto > .wp-block-post-title { margin: 0 0 32px; font-size: clamp(28px, 4vw, 40px); line-height: 1.12; }
.sg-konto * { box-sizing: border-box; }
.sg-konto .woocommerce { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 0 56px; align-items: start; }
.sg-konto .woocommerce::before, .sg-konto .woocommerce::after { content: none; }
.sg-konto .woocommerce > * { grid-column: 1 / -1; }
.sg-konto .woocommerce > .woocommerce-MyAccount-navigation { grid-column: 1; float: none; width: auto; }
.sg-konto .woocommerce > .woocommerce-MyAccount-content { grid-column: 2; float: none; width: auto; min-width: 0; }

/* Hinweise von Woo (Fehler, Erfolg) */
.sg-konto .woocommerce-notices-wrapper:empty { display: none; }
.sg-konto :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) { list-style: none; margin: 0 0 24px; padding: 14px 18px; border: 1px solid var(--linie); border-left: 4px solid var(--welt); border-radius: var(--radius); background: #fff; font-size: 16px; line-height: 1.45; }
.sg-konto :is(.woocommerce-error, .woocommerce-message, .woocommerce-info)::before { content: none; }
.sg-konto .woocommerce-error { border-left-color: var(--fehler); background: var(--fehler-flaeche); }
.sg-konto :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) a { color: var(--text); font-weight: 600; }
.sg-konto :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) .button { float: none; margin-left: 12px; background: none; padding: 0; min-height: 0; color: var(--text); text-decoration: underline; }

/* Formulare */
.sg-konto form, .sg-konto .woocommerce form:is(.login, .register, .lost_reset_password, .checkout_coupon) { margin: 0; padding: 0; border: 0; border-radius: 0; }
.sg-konto .woocommerce form.lost_reset_password, .sg-konto .woocommerce form.woocommerce-ResetPassword { max-width: 480px; padding: 40px; border: 1px solid var(--linie); border-radius: var(--radius); background: #fff; }
.sg-konto .form-row { display: block; float: none; width: auto; margin: 0 0 18px; padding: 0; }
.sg-konto .form-row label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 15px; line-height: 1.3; }
.sg-konto .form-row label .required { color: var(--text); text-decoration: none; }
.sg-konto :is(input.input-text, input[type="email"], input[type="password"], input[type="tel"], select, textarea) { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--linie-bedienung); border-radius: var(--radius); background: #fff; color: var(--text); font: inherit; font-size: 16px; }
.sg-konto textarea { padding: 12px 14px; min-height: 96px; }
.sg-konto :is(input, select, textarea):focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.sg-konto .password-input { position: relative; display: block; }
.sg-konto .password-input input { padding-right: 52px; }
.sg-konto :is(.show-password-input, .sg-pw-auge) { position: absolute; top: 0; right: 0; width: 48px; height: 48px; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.sg-konto .show-password-input { background-image: none !important; }   /* Woo setzt dort sein eigenes Symbol (Hintergrund oder ::before) mit höherer Spezifität */
.sg-konto .show-password-input::before { content: none !important; display: none !important; }
.sg-konto :is(.show-password-input, .sg-pw-auge)::after { content: ""; width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--auge) center / contain no-repeat; mask: var(--auge) center / contain no-repeat;
  --auge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.sg-konto :is(.show-password-input.display-password, .sg-pw-auge[aria-pressed="true"])::after { --auge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M4 4l16 16'/%3E%3C/svg%3E"); }
.sg-konto .woocommerce :is(a.button, button.button, .sg-an-btn, button[type="submit"]) { color: var(--auf, #fff); }
.sg-konto .woocommerce .sg-an-btn--hell { color: var(--welt); }
.sg-konto .woocommerce .sg-an-btn--hell:hover { color: var(--auf, #fff); }
.sg-konto :is(.button, .sg-an-btn, button[type="submit"]) { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 1px solid var(--welt); border-radius: var(--radius); background: var(--welt); color: var(--auf, #fff); font: inherit; font-weight: 600; font-size: 16px; line-height: 1.2; text-decoration: none; cursor: pointer; }
.sg-konto :is(.button, .sg-an-btn, button[type="submit"]):hover { background: var(--welt-hover); border-color: var(--welt-hover); color: var(--auf, #fff); }
.sg-konto fieldset { margin: 32px 0 0; padding: 24px 0 0; border: 0; border-top: 1px solid var(--linie); }
.sg-konto legend { padding: 0; font-weight: 600; font-size: 18px; }
.sg-konto .woocommerce-form-row em, .sg-konto .form-row em { display: block; margin-top: 6px; font-style: normal; font-size: 14px; color: var(--text-leise); }
.sg-konto .woocommerce-privacy-policy-text p, .sg-an-hinweis { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: var(--text-leise); }
.sg-konto .woocommerce-privacy-policy-text a { color: var(--text); }

/* Anmelden und Registrieren */
.sg-konto-gast .sg-konto .woocommerce > .woocommerce-notices-wrapper { max-width: 960px; }
.sg-an { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; max-width: 960px; border: 1px solid var(--linie); border-radius: var(--radius); background: #fff; overflow: hidden; }
.sg-an--einzeln { grid-template-columns: minmax(0, 1fr); max-width: 480px; }
.sg-an-spalte { padding: 40px; }
.sg-an-neu { background: var(--flaeche-welt, var(--greige)); border-left: 1px solid var(--linie); }
.sg-an h2 { margin: 0 0 24px; font-size: 24px; line-height: 1.15; }
.sg-konto .sg-an-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.sg-konto .sg-an-zeile label { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 0; font-weight: 400; cursor: pointer; }
.sg-an-zeile input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--welt); }
.sg-an-vergessen { font-size: 15px; color: var(--text); text-underline-offset: 3px; }
.sg-an .sg-an-btn { width: 100%; }
.sg-an-vorteile { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; }
.sg-an-vorteile li { position: relative; padding-left: 30px; font-size: 16px; line-height: 1.4; }
.sg-an-vorteile li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; background: var(--welt); -webkit-mask: var(--haken) center / contain no-repeat; mask: var(--haken) center / contain no-repeat;
  --haken: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E"); }
.sg-an-reg > summary { list-style: none; }
.sg-an-reg > summary::-webkit-details-marker { display: none; }
.sg-konto .sg-an-btn--hell { background: #fff; color: var(--welt); }
.sg-konto .sg-an-btn--hell:hover { background: var(--welt); color: var(--auf, #fff); }
.sg-an-reg[open] > summary { display: none; }
.sg-an-reg > summary:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.sg-an-reg .sg-an-hinweis { margin: 0; }
/* Passwort vergessen und neu setzen: schmale Karte wie die Anmeldung */
.sg-konto :is(.woocommerce-ResetPassword, .lost_reset_password) { max-width: 480px; padding: 40px; border: 1px solid var(--linie); border-radius: var(--radius); background: #fff; }
.sg-konto :is(.woocommerce-ResetPassword, .lost_reset_password) > p:first-child { margin: 0 0 20px; font-size: 16px; line-height: 1.5; }

/* Menü des Kontos */
.sg-konto .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.sg-konto .woocommerce-MyAccount-navigation li { margin: 0; padding: 0; border-bottom: 1px solid var(--linie); }
.sg-konto .woocommerce-MyAccount-navigation a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 4px; font-size: 16px; line-height: 1.3; color: var(--text); text-decoration: none; }
.sg-konto .woocommerce-MyAccount-navigation a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sg-konto .woocommerce-MyAccount-navigation li.is-active a { font-weight: 700; box-shadow: inset 3px 0 0 var(--welt); padding-left: 14px; text-decoration: none; }
.sg-konto .woocommerce-MyAccount-navigation-link--customer-logout a { color: var(--text-leise); }
.sg-konto .woocommerce-MyAccount-content > :first-child { margin-top: 0; }
.sg-konto .woocommerce-MyAccount-content h2 { margin: 0 0 16px; font-size: 22px; font-weight: 600; line-height: 1.2; }
.sg-konto .woocommerce-MyAccount-content :is(.woocommerce-order-details, .woocommerce-customer-details) { margin-top: 32px; }
.sg-ko-datum { margin: 0 0 20px; }
.sg-konto .woocommerce-MyAccount-content h3 { font-size: 18px; line-height: 1.2; }
.sg-konto .woocommerce-MyAccount-content p { font-size: 16px; line-height: 1.5; }

/* Übersicht */
.sg-ko-hallo { margin: 0 0 32px; font-size: 21px; line-height: 1.35; }
.sg-ko-block { margin-bottom: 40px; }
.sg-ko-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sg-konto .sg-ko-kopf h2 { margin: 0; }
.sg-ko-kopf a { font-weight: 600; font-size: 15px; color: var(--welt); text-underline-offset: 3px; }
.sg-ko-leer { margin: 0; padding: 24px; border: 1px dashed var(--linie-bedienung); border-radius: var(--radius); background: #fff; }
.sg-ko-kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sg-ko-kachel { display: flex; flex-direction: column; gap: 8px; padding: 24px; border: 1px solid var(--linie); border-radius: var(--radius); background: #fff; color: var(--text); text-decoration: none; }
.sg-ko-kachel:hover { border-color: var(--text); }
.sg-konto .sg-ko-kachel h2 { margin: 0; font-size: 18px; }
.sg-konto .sg-ko-kachel p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text-leise); overflow-wrap: anywhere; }
.sg-ko-kachel > span { margin-top: auto; padding-top: 8px; font-weight: 600; font-size: 15px; color: var(--welt); text-decoration: underline; text-underline-offset: 3px; }

/* Bestellkarte */
.sg-ko-liste { display: grid; gap: 16px; }
.sg-ko-karte { border: 1px solid var(--linie); border-radius: var(--radius); background: #fff; overflow: hidden; }
.sg-ko-karte > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 24px; background: var(--flaeche-welt, var(--greige)); border-bottom: 1px solid var(--linie); }
.sg-konto .sg-ko-karte h3 { margin: 0; font-size: 17px; line-height: 1.2; }
.sg-konto .sg-ko-karte header p { margin: 2px 0 0; font-size: 14px; line-height: 1.3; color: var(--text-leise); }
.sg-konto .sg-ko-karte p.sg-ko-stand { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; font-size: 15px; color: var(--text); }
.sg-ko-stand i { width: 9px; height: 9px; border-radius: 50%; background: var(--lieferbar); flex: none; }
.sg-ko-stand.is-ende i { background: var(--text-leise); }
.sg-ko-inhalt { display: flex; align-items: center; gap: 20px; padding: 20px 24px; }
.sg-ko-bilder { display: flex; gap: 8px; flex: none; }
.sg-ko-bild { display: block; width: 72px; height: 72px; border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; background: #fff; }
.sg-ko-bild img { display: block; width: 100%; height: 100% !important; object-fit: cover; }
.sg-ko-mehr { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border: 1px solid var(--linie); border-radius: var(--radius); font-weight: 600; font-size: 15px; color: var(--text-leise); }
.sg-konto .sg-ko-zeile { margin: 0; font-size: 15px; line-height: 1.45; }
.sg-ko-karte > footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 24px; border-top: 1px solid var(--linie); }
.sg-konto .sg-ko-karte footer p { margin: 0; display: flex; align-items: baseline; gap: 12px; font-size: 15px; }
.sg-ko-karte footer p span { color: var(--text-leise); }
.sg-ko-karte footer p b { font-size: 17px; }
.sg-ko-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 1px solid var(--welt); border-radius: var(--radius); color: var(--welt); font-weight: 600; font-size: 15px; text-decoration: none; }
.sg-ko-btn:hover { background: var(--welt); color: var(--auf, #fff); }

/* Statusleiste der Detailseite */
.sg-ko-status { margin: 0 0 32px; padding: 28px 24px 24px; border: 1px solid var(--linie); border-radius: var(--radius); background: #fff; }
.sg-ko-schritte { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sg-ko-schritte li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-size: 14px; line-height: 1.3; color: var(--text-leise); }
.sg-ko-schritte li::before { content: ""; position: absolute; top: 10px; right: 50%; width: 100%; height: 2px; background: var(--linie); }
.sg-ko-schritte li:first-child::before { content: none; }
.sg-ko-schritte i { position: relative; z-index: 1; width: 22px; height: 22px; border: 2px solid var(--linie-bedienung); border-radius: 50%; background: #fff; }
.sg-ko-schritte li.is-fertig::before, .sg-ko-schritte li.is-aktuell::before { background: var(--welt); }
.sg-ko-schritte li.is-fertig i, .sg-ko-schritte li.is-aktuell i { border-color: var(--welt); background: var(--welt); }
.sg-ko-schritte li.is-fertig i::after { content: ""; position: absolute; inset: 2px; background: #fff; -webkit-mask: var(--haken) center / contain no-repeat; mask: var(--haken) center / contain no-repeat;
  --haken: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E"); }
.sg-ko-schritte li.is-aktuell { color: var(--text); font-weight: 600; }
.sg-ko-schritte li.is-fertig { color: var(--text); }
.sg-ko-sendung { display: inline-flex; margin-top: 20px; font-weight: 600; color: var(--welt); text-underline-offset: 3px; }
.sg-ko-ende { padding: 16px 20px; border: 1px solid var(--linie); border-radius: var(--radius); background: #fff; }
.sg-konto mark { background: none; color: inherit; font-weight: 600; }

/* Bestelldetails und Adressen (Woo-Markup) */
.sg-konto table.shop_table { width: 100%; margin: 0 0 32px; border: 1px solid var(--linie); border-radius: var(--radius); border-collapse: separate; border-spacing: 0; background: #fff; font-size: 15px; }
.sg-konto table.shop_table :is(th, td) { padding: 14px 18px; border: 0; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: top; line-height: 1.45; }
.sg-konto table.shop_table tr:last-child > :is(th, td) { border-bottom: 0; }
.sg-konto table.shop_table :is(th, td):last-child { text-align: right; }
.sg-konto table.shop_table a { color: var(--text); }
.sg-konto .woocommerce-customer-details address, .sg-konto .woocommerce-Address address { padding: 20px 24px; border: 1px solid var(--linie); border-radius: var(--radius); background: #fff; font-style: normal; font-size: 15px; line-height: 1.6; }
.sg-konto :is(.woocommerce-Addresses, .woocommerce-columns--addresses) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.sg-konto :is(.woocommerce-Addresses, .woocommerce-columns--addresses)::before, .sg-konto :is(.woocommerce-Addresses, .woocommerce-columns--addresses)::after { content: none; }
.sg-konto :is(.woocommerce-Address, .woocommerce-column) { float: none; width: auto; }
.sg-konto .woocommerce-Address-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sg-konto .woocommerce-Address-title :is(h2, h3) { margin: 0; font-size: 18px; }
.sg-konto .woocommerce-Address-title a { font-weight: 600; font-size: 15px; color: var(--welt); text-underline-offset: 3px; }

@media (max-width: 900px) {
  .sg-konto .woocommerce { grid-template-columns: 200px minmax(0, 1fr); gap: 0 32px; }
}
@media (max-width: 760px) {
  .sg-konto { padding: 28px 16px 64px; }
  .sg-konto > .wp-block-post-title { margin-bottom: 20px; }
  .sg-konto .woocommerce { display: flex; flex-direction: column; align-items: stretch; gap: 24px; }
  .sg-konto .woocommerce > * { min-width: 0; }
  .sg-konto .woocommerce-MyAccount-content h2 { font-size: 19px; }
  /* Unterseiten: Menü als Leiste zum Wischen über dem Inhalt */
  .sg-konto .woocommerce > .woocommerce-MyAccount-navigation { margin: 0 -16px; }
  .sg-konto .woocommerce-MyAccount-navigation ul { display: flex; gap: 8px; padding: 0 16px; border: 0; overflow-x: auto; scrollbar-width: none; }
  .sg-konto .woocommerce-MyAccount-navigation li { flex: none; border: 0; }
  .sg-konto .woocommerce-MyAccount-navigation a { min-height: 40px; padding: 0 14px; border: 1px solid var(--linie-bedienung); border-radius: 20px; background: #fff; font-size: 14px; white-space: nowrap; }
  .sg-konto .woocommerce-MyAccount-navigation li.is-active a { padding-left: 14px; box-shadow: none; border-color: var(--welt); background: var(--welt); color: var(--auf, #fff); }
  /* Startseite des Kontos: Menü als Zeilenliste unter dem Inhalt (Muster Zalando) */
  .sg-konto-start .sg-konto .woocommerce > .woocommerce-MyAccount-navigation { order: 2; margin: 0; }
  .sg-konto-start .sg-konto .woocommerce-MyAccount-navigation ul { display: block; padding: 0; border-top: 1px solid var(--linie); overflow: visible; }
  .sg-konto-start .sg-konto .woocommerce-MyAccount-navigation li { border-bottom: 1px solid var(--linie); }
  .sg-konto-start .sg-konto .woocommerce-MyAccount-navigation li.is-active { display: none; }
  .sg-konto-start .sg-konto .woocommerce-MyAccount-navigation a { min-height: 56px; padding: 0 4px; border: 0; border-radius: 0; background: none; font-size: 17px; font-weight: 500; }
  .sg-konto-start .sg-konto .woocommerce-MyAccount-navigation a::after { content: ""; width: 18px; height: 18px; flex: none; background: currentColor; -webkit-mask: var(--pfeil) center / contain no-repeat; mask: var(--pfeil) center / contain no-repeat;
    --pfeil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E"); }
  .sg-ko-hallo { margin-bottom: 24px; font-size: 18px; }
  .sg-ko-kacheln { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .sg-ko-kachel { padding: 18px; }
  .sg-an { grid-template-columns: minmax(0, 1fr); }
  .sg-an-spalte { padding: 24px 18px; }
  .sg-an-neu { border-left: 0; border-top: 1px solid var(--linie); }
  .sg-konto .sg-an-zeile { flex-direction: column; align-items: flex-start; }
  .sg-konto :is(.woocommerce-ResetPassword, .lost_reset_password) { padding: 24px 18px; }
  .sg-ko-karte > header, .sg-ko-inhalt, .sg-ko-karte > footer { padding-left: 16px; padding-right: 16px; }
  .sg-ko-inhalt { flex-direction: column; align-items: flex-start; gap: 12px; }
  .sg-ko-bild, .sg-ko-mehr { width: 60px; height: 60px; }
  .sg-ko-btn { width: 100%; }
  .sg-ko-status { padding: 20px 8px 18px; }
  .sg-ko-schritte li { font-size: 12px; }
  .sg-konto :is(.woocommerce-Addresses, .woocommerce-columns--addresses) { grid-template-columns: minmax(0, 1fr); }
  .sg-konto table.shop_table :is(th, td) { padding: 12px; }
}
