/* ==========================================================================
   Der Wickel – Ergänzungen für WordPress, WooCommerce, Germanized, Contact Form 7
   ========================================================================== */

/* Admin-Leiste (nur für eingeloggte Redakteure sichtbar) */
@media (min-width: 783px) { .admin-bar .dw-header { top: 32px; } }
@media (max-width: 782px) { .admin-bar .dw-header { top: 0; } }

/* ---------- Fließtext-Seiten (Über uns u. a.) ---------- */
.dw-prose { max-width: 820px; }
.dw-prose img { height: auto; border-radius: var(--dw-r); }
.entry-content > *:first-child { margin-top: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.2em; }
.entry-content li { margin-bottom: .4em; }
.entry-content table { border-collapse: collapse; width: 100%; }
.entry-content table td, .entry-content table th { border-bottom: 1px solid var(--dw-line); padding: 10px 8px; text-align: left; vertical-align: top; }
.dw-legal__body h1:empty { display: none; }

/* ---------- Produktseite: Pflichtangaben ---------- */
.dw-price-note .dw-legal-note { display: inline; }
.dw-price-note .dw-legal-note p { display: inline; margin: 0 .35em 0 0; max-width: none; }
.dw-price-note .dw-legal-note a { color: inherit; }
.dw-btn.is-busy { opacity: .7; pointer-events: none; }

/* ---------- Hinweise (WooCommerce) ---------- */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews, .wc-block-components-notice-banner {
  list-style: none; margin: 0 0 24px; padding: 16px 20px; border-radius: var(--dw-r-sm);
  background: var(--dw-tuerkis-soft); color: var(--dw-ink); border: 0; font-size: var(--dw-fs-sm);
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
}
.woocommerce-error { background: #FDECEC; color: #7A1D1D; flex-direction: column; align-items: flex-start; }
.woocommerce-message::before, .woocommerce-info::before, .woocommerce-error::before { display: none !important; }
.woocommerce-message .button, .woocommerce-info .button { order: 2; margin-left: auto; }

/* ---------- Buttons in WooCommerce ---------- */
.dw-wc .button, .dw-wc button.button, .dw-wc input.button, .dw-wc a.button, .dw-wc #place_order, .dw-wc .checkout-button,
.woocommerce-message .button, .woocommerce-info .button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.4em;
  font: 500 1rem/1 var(--dw-body); color: #fff !important; background: var(--dw-ink) !important;
  border: 1px solid var(--dw-ink); border-radius: 999px !important; text-decoration: none; cursor: pointer;
  transition: background-color .25s var(--dw-ease), border-color .25s var(--dw-ease);
}
.dw-wc .button:hover, .dw-wc #place_order:hover, .dw-wc .checkout-button:hover { background: var(--dw-link) !important; border-color: var(--dw-link); }
.dw-wc .button:disabled, .dw-wc .button.disabled { opacity: .45 !important; cursor: not-allowed; }
.dw-wc .checkout-button, .dw-wc #place_order { width: 100%; min-height: 56px; font-size: 1.05rem; }

/* ---------- Formularfelder ---------- */
.dw-wc input.input-text, .dw-wc input[type=text], .dw-wc input[type=email], .dw-wc input[type=tel], .dw-wc input[type=password], .dw-wc input[type=number],
.dw-wc select, .dw-wc textarea, .dw-wc .select2-container .select2-selection--single,
.dw-cf7 input[type=text], .dw-cf7 input[type=email], .dw-cf7 input[type=tel], .dw-cf7 select, .dw-cf7 textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; font: 400 1rem/1.4 var(--dw-body); color: var(--dw-ink);
  background: var(--dw-bg-2); border: 1px solid transparent; border-radius: var(--dw-r-sm);
  transition: border-color .25s, box-shadow .25s, background-color .25s; box-sizing: border-box;
}
.dw-wc textarea, .dw-cf7 textarea { min-height: 140px; resize: vertical; }
.dw-wc input:focus, .dw-wc select:focus, .dw-wc textarea:focus, .dw-cf7 input:focus, .dw-cf7 select:focus, .dw-cf7 textarea:focus {
  outline: none; background: #fff; border-color: var(--dw-tuerkis); box-shadow: 0 0 0 4px rgba(68,163,188,.18);
}
.dw-wc .select2-container .select2-selection--single { display: flex; align-items: center; padding: 0 16px; }
.dw-wc .select2-container .select2-selection--single .select2-selection__rendered { padding: 0; line-height: 1.4; color: var(--dw-ink); }
.dw-wc .select2-container .select2-selection--single .select2-selection__arrow { height: 100%; right: 10px; }
.dw-wc label { font-size: var(--dw-fs-sm); font-weight: 500; }
.dw-wc .form-row { margin: 0 0 16px; padding: 0; }
.dw-wc .required { color: var(--dw-link); text-decoration: none; border: 0; }
.dw-wc input[type=checkbox], .dw-wc input[type=radio] { accent-color: var(--dw-link); width: 18px; height: 18px; vertical-align: -3px; margin-right: 8px; }

/* ---------- Warenkorb ---------- */
.dw-wc .dw-minorder { margin-bottom: 24px; }
.dw-wc .dw-starter--mini { margin-bottom: 28px; }
.dw-wc table.shop_table { width: 100%; border-collapse: collapse; border: 0; border-radius: 0; margin: 0 0 32px; font-size: 1rem; }
.dw-wc table.shop_table th { font: 500 var(--dw-fs-sm)/1.3 var(--dw-body); color: var(--dw-ink-soft); text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--dw-line); }
.dw-wc table.shop_table td { padding: 18px 10px; border-top: 0; border-bottom: 1px solid var(--dw-line); vertical-align: middle; }
.dw-wc table.cart img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--dw-r-sm); }
.dw-wc table.cart .product-name a { color: var(--dw-ink); text-decoration: none; font-weight: 500; }
.dw-wc table.cart .product-remove a.remove { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; color: var(--dw-ink-soft) !important; background: var(--dw-bg-2); text-decoration: none; font-size: 1.2rem; }
.dw-wc table.cart .product-remove a.remove:hover { background: #FDECEC; color: #7A1D1D !important; }
.dw-wc .quantity .qty { width: 84px; min-height: 44px; text-align: center; padding: 8px; }
.dw-wc table.cart td.actions { padding-top: 22px; }
.dw-wc table.cart td.actions .coupon { display: flex; gap: 8px; flex-wrap: wrap; float: left; }
.dw-wc table.cart td.actions .coupon .input-text { width: 220px; min-height: 48px; }
.dw-wc table.cart td.actions > .button { float: right; background: transparent !important; color: var(--dw-ink) !important; border-color: var(--dw-line); }
.dw-wc .cart-collaterals { display: flex; justify-content: flex-end; }
.dw-wc .cart_totals { width: 100%; max-width: 480px; background: var(--dw-bg-2); border-radius: var(--dw-r); padding: 28px; float: none !important; }
.dw-wc .cart_totals h2 { font-size: 1.5rem; }
.dw-wc .cart_totals table.shop_table td, .dw-wc .cart_totals table.shop_table th { padding: 12px 0; background: none; }
.dw-wc .cart_totals .order-total td, .dw-wc .cart_totals .order-total th { font-size: 1.15rem; font-weight: 600; border-bottom: 0; }
.dw-wc .wc-proceed-to-checkout { padding: 8px 0 0; }
.dw-wc .cart-empty { font-size: var(--dw-fs-md); }
.dw-wc .return-to-shop .button { margin-top: 8px; }
@media (max-width: 768px) {
  .dw-wc table.shop_table_responsive thead { display: none; }
  .dw-wc table.shop_table_responsive tr { display: block; border-bottom: 1px solid var(--dw-line); padding: 10px 0; }
  .dw-wc table.shop_table_responsive td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 6px 0; text-align: right; }
  .dw-wc table.shop_table_responsive td::before { content: attr(data-title); font-weight: 500; color: var(--dw-ink-soft); text-align: left; }
  .dw-wc table.cart td.product-thumbnail, .dw-wc table.cart td.product-remove { justify-content: flex-start; }
  .dw-wc table.cart td.product-thumbnail::before, .dw-wc table.cart td.product-remove::before, .dw-wc table.cart td.actions::before { display: none; }
  .dw-wc table.cart td.actions { display: block; }
  .dw-wc table.cart td.actions .coupon, .dw-wc table.cart td.actions > .button { float: none; width: 100%; margin-bottom: 10px; }
  .dw-wc table.cart td.actions .coupon .input-text { flex: 1; width: auto; }
  .dw-wc .cart_totals { max-width: none; padding: 22px; }
  /* 1.0.6: Summenblock auf dem Handy volle Breite (WooCommerce setzt sonst 48 %), Zeilentitel kommen aus data-title */
  .dw-wc .cart-collaterals .cart_totals { width: 100% !important; }
  .dw-wc .cart_totals table.shop_table { width: 100%; }
  .dw-wc .cart_totals table.shop_table_responsive tbody th { display: none; }
}

/* ---------- Kasse ---------- */
.dw-wc form.checkout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0 clamp(28px, 5vw, 72px); align-items: start; }
.dw-wc form.checkout > .woocommerce-NoticeGroup, .dw-wc form.checkout > .wc-gzd-checkout-notice { grid-column: 1 / -1; }
.dw-wc form.checkout #customer_details { grid-column: 1; grid-row: 1 / span 3; }
.dw-wc form.checkout #order_review_heading, .dw-wc form.checkout #order_review { grid-column: 2; }
.dw-wc #customer_details .col-1, .dw-wc #customer_details .col-2 { width: 100%; float: none; }
.dw-wc #customer_details h3 { font-size: 1.5rem; margin: 0 0 18px; }
.dw-wc #customer_details .col-2 { margin-top: 24px; }
.dw-wc .woocommerce-billing-fields__field-wrapper, .dw-wc .woocommerce-shipping-fields__field-wrapper { display: flex; flex-wrap: wrap; gap: 0 16px; }
.dw-wc .form-row-first, .dw-wc .form-row-last { width: calc(50% - 8px) !important; float: none !important; }
.dw-wc .form-row-wide, .dw-wc .woocommerce-billing-fields__field-wrapper > .form-row:not(.form-row-first):not(.form-row-last) { width: 100%; }
.dw-wc #order_review_heading { font-size: 1.5rem; margin: 0 0 18px; }
.dw-wc #order_review { background: var(--dw-bg-2); border-radius: var(--dw-r); padding: 28px; position: sticky; top: calc(var(--dw-head-offset) + 24px); }
.dw-wc #order_review table.shop_table td, .dw-wc #order_review table.shop_table th { padding: 10px 0; background: none; }
.dw-wc #order_review .order-total td, .dw-wc #order_review .order-total th { font-size: 1.15rem; font-weight: 600; }
.dw-wc #payment { background: transparent !important; border-radius: 0; }
.dw-wc #payment ul.payment_methods { list-style: none; padding: 0 !important; margin: 0 0 16px; border: 0 !important; }
.dw-wc #payment ul.payment_methods li { padding: 14px 0; border-bottom: 1px solid var(--dw-line); }
.dw-wc #payment ul.payment_methods li label { font-size: 1rem; }
.dw-wc #payment div.payment_box { background: #fff !important; border-radius: var(--dw-r-sm); font-size: var(--dw-fs-sm); margin: 10px 0 0 !important; padding: 14px 16px !important; color: var(--dw-ink-soft) !important; }
.dw-wc #payment div.payment_box::before { display: none !important; }
.dw-wc #payment .place-order { padding: 16px 0 0 !important; margin: 0 !important; }
.dw-wc .woocommerce-terms-and-conditions-wrapper, .dw-wc .wc-gzd-checkbox-placeholder, .dw-wc .legal { font-size: var(--dw-fs-sm); color: var(--dw-ink-soft); }
.dw-wc .wc-gzd-checkbox-placeholder p, .dw-wc .legal p { max-width: none; }
.dw-wc .checkout_coupon, .dw-wc .woocommerce-form-login { background: var(--dw-bg-2); border: 0 !important; border-radius: var(--dw-r); padding: 22px !important; margin: 0 0 28px !important; }
@media (max-width: 960px) {
  .dw-wc form.checkout { grid-template-columns: 1fr; }
  .dw-wc form.checkout #customer_details, .dw-wc form.checkout #order_review_heading, .dw-wc form.checkout #order_review { grid-column: 1; grid-row: auto; }
  .dw-wc #order_review { position: relative; top: 0; }
  .dw-wc .form-row-first, .dw-wc .form-row-last { width: 100% !important; }
}

/* ---------- Bestellbestätigung & Konto ---------- */
.dw-wc .woocommerce-order-overview { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 0 0 32px; }
.dw-wc .woocommerce-order-overview li { font-size: var(--dw-fs-sm); color: var(--dw-ink-soft); }
.dw-wc .woocommerce-order-overview li strong { display: block; color: var(--dw-ink); font-size: 1rem; }
.dw-wc .woocommerce-thankyou-order-received { font-size: var(--dw-fs-md); font-family: var(--dw-head); }
.dw-wc .woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; display: grid; gap: 2px; }
.dw-wc .woocommerce-MyAccount-navigation a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--dw-ink-soft); text-decoration: none; }
.dw-wc .woocommerce-MyAccount-navigation .is-active a { background: var(--dw-tuerkis-soft); color: var(--dw-ink); }
.dw-wc .woocommerce-MyAccount-navigation { float: left; width: 230px; }
.dw-wc .woocommerce-MyAccount-content { margin-left: 270px; }
@media (max-width: 860px) { .dw-wc .woocommerce-MyAccount-navigation { float: none; width: auto; margin-bottom: 24px; } .dw-wc .woocommerce-MyAccount-content { margin-left: 0; } }
.dw-wc .col2-set::after, .dw-wc .clear { clear: both; }

/* ---------- Kontaktformular (Contact Form 7) ---------- */
.dw-cf7 form p { margin: 0 0 16px; max-width: none; }
.dw-cf7 label { display: block; font-size: var(--dw-fs-sm); font-weight: 500; }
.dw-cf7 label br { display: none; }
.dw-cf7 .wpcf7-form-control-wrap { display: block; margin-top: 6px; }
.dw-cf7 input[type=text], .dw-cf7 input[type=email], .dw-cf7 input[type=tel], .dw-cf7 select, .dw-cf7 textarea { background: #fff; border-color: var(--dw-line); }
.dw-cf7 .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.dw-cf7 .wpcf7-acceptance label, .dw-cf7 .wpcf7-checkbox label { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; }
.dw-cf7 .wpcf7-form-control-wrap:has(.wpcf7-acceptance) { display: inline-block; margin: 0 10px 0 0; vertical-align: -4px; }
.dw-cf7 input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--dw-link); flex: none; }
.dw-cf7 input[type=submit] {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 1.6em;
  font: 500 1rem/1 var(--dw-body); color: #fff; background: var(--dw-ink); border: 1px solid var(--dw-ink); border-radius: 999px; cursor: pointer;
}
.dw-cf7 input[type=submit]:hover { background: var(--dw-link); border-color: var(--dw-link); }
.dw-cf7 .wpcf7-not-valid-tip { color: #B42318; font-size: var(--dw-fs-xs); margin-top: 6px; }
.dw-cf7 .wpcf7-response-output { margin: 16px 0 0 !important; padding: 14px 18px !important; border-radius: var(--dw-r-sm); border: 0 !important; background: var(--dw-tuerkis-soft); font-size: var(--dw-fs-sm); }
.dw-cf7 form.invalid .wpcf7-response-output, .dw-cf7 form.failed .wpcf7-response-output { background: #FDECEC; color: #7A1D1D; }
.dw-cf7 .wpcf7-spinner { margin: 0 12px; }

/* WooCommerce-Standardansicht für Produkte, die das Theme nicht kennt */
.dw-wrap .product .summary .price { font-family: var(--dw-head); font-size: 1.6rem; }

/* 1.0.2: Kopfnavigation zwischen 981 und 1180 px nicht umbrechen */
.dw-nav a { white-space: nowrap; }
@media (min-width: 981px) and (max-width: 1180px) { .dw-nav a { padding: 8px 10px; font-size: .9rem; } }

/* 1.0.2: Danke-Seite – Bankverbindung ruhiger */
.dw-wc .wc-bacs-bank-details-heading,
.dw-wc .woocommerce-order-details__title,
.dw-wc .woocommerce-column__title { font-size: var(--dw-fs-md); margin: 32px 0 12px; }
.dw-wc .wc-bacs-bank-details-account-name { font-size: 1rem; margin: 0 0 8px; }
.dw-wc ul.wc-bacs-bank-details { list-style: none; padding: 16px 20px; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 12px 40px; background: var(--dw-bg-2); border-radius: 14px; }
.dw-wc ul.wc-bacs-bank-details li { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--dw-muted, #5b6b70); }
.dw-wc ul.wc-bacs-bank-details li strong { display: block; font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--dw-ink); }

/* 1.0.3: WPML-Sprachumschalter unter dem Footer ausblenden (DE/EN steht schon im Kopf) */
.wpml-ls-statics-footer { display: none !important; }
