.woocommerce div.product form.cart td.value {
  display: flex;
  justify-content: flex-start; /* linksbündig, damit margin-left wirkt */
  padding-left: 0; /* auf Nummer sicher */
}


.woocommerce div.product form.cart .quantity { 
  min-width: 75%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  margin-top: 0.5em;
  box-sizing: border-box;
  margin-left: -20px; /* je nach Bedarf anpassen */
}

/* Mengenfeld-Eingabe an Dropdown-Optik angleichen */
.woocommerce div.product form.cart .quantity input.qty {
  width: 100%;
  height: 38px;
  padding: 8px 12px; /* identisch zu .variations select */
  font-size: 16px;
  border: 1px solid #ccc; /* wie bei select */
  border-radius: 6px; /* wie bei select */
  box-sizing: border-box;
  background-color: #fff;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

/* Mobile: transform entfernen, max-width reduzieren, zentrieren */
@media (max-width: 768px) {
.woocommerce div.product form.cart .quantity {
transform: none !important;
max-width: 310px; /* schmaler für Mobile */
width: 94%; /* optional, damit es nicht zu breit wird */
margin-left: auto;
margin-right: auto;
}
}

@media (max-width: 768px) {
  .woocommerce-cart table.cart .product-name dl.variation {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 8px;
    background: #f9f9f9;
    padding: 8px;
    border-radius: 6px;
    font-size: 13px;
  }

  .woocommerce-cart table.cart .product-name dl.variation dt,
  .woocommerce-cart table.cart .product-name dl.variation dd {
    margin: 0;
    padding: 2px 0;
  }

  .woocommerce-cart table.cart .product-name dl.variation dd p {
    margin: 0;
    padding: 0;
    font-weight: bold;
  }

  /* Thumbnail sichtbar machen, falls vorher display:none gesetzt */
  .woocommerce-cart table.cart .product-thumbnail {
    display: block !important;
    width: 60px !important;
  }

  /* Cart Items: Tabellenstruktur behalten */
  .woocommerce-cart .cart_item {
    display: table-row;
  }

  .woocommerce-cart .cart_item td {
    display: table-cell;
    vertical-align: middle;
    padding: 8px 4px;
  }

  /* Thumbnail Zelle fixieren und Bild zentrieren */
  .woocommerce-cart .cart_item td.product-thumbnail {
    width: 70px;
    padding: 4px 8px 4px 0;
    text-align: center;
    vertical-align: middle;
  }

  /* ::before Pseudoelemente entfernen */
  .woocommerce-cart .cart_item td.product-thumbnail::before {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
  }

  /* Bild mittig anzeigen */
  .woocommerce-cart .product-thumbnail img {
    display: inline-block !important;
    width: 60px !important;
    height: auto !important;
    border-radius: 4px !important;
    border: 1px solid #ccc !important;
  }

  .woocommerce-cart .cart_item td.product-name {
    width: auto;
  }

  /* Preis, Menge, Summe kompakter und kleinere Schrift */
  .woocommerce-cart .cart_item td.product-price,
  .woocommerce-cart .cart_item td.product-quantity,
  .woocommerce-cart .cart_item td.product-subtotal {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    min-height: 36px !important;
    text-align: right;
    white-space: nowrap;
  }

 /* Input-Feld Menge kleiner und kompakter */
  .woocommerce-cart .cart_item td.product-quantity .quantity-input-product-88957 {
    height: 30px !important;
    padding: 2px 2px !important;
    font-size: 14px !important;
  }

  /* +/- Buttons kleiner machen */
  .woocommerce-cart .cart_item td.product-quantity a.quantity-change {
    line-height: 30px !important;
    height: 28px !important;
    width: 28px !important;
    font-size: 14px !important;
  }
}

@media (max-width: 768px) {
  /* Container scrollbar machen */
  .woocommerce-checkout-review-order-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* sanftes Scrollen iOS */
  }

  /* Tabelle flexibler machen */
  .woocommerce-checkout-review-order-table table,
  .woocommerce-checkout-review-order-table thead,
  .woocommerce-checkout-review-order-table tbody,
  .woocommerce-checkout-review-order-table th,
  .woocommerce-checkout-review-order-table td,
  .woocommerce-checkout-review-order-table tr {
    display: table;
    width: 100%;
    table-layout: fixed; /* wichtig für Spaltenbreite */
    word-wrap: break-word;
  }

  /* Produktname und Zwischensumme etwas anpassen */
  .woocommerce-checkout-review-order-table th.product-name,
  .woocommerce-checkout-review-order-table td.product-name {
    width: 70%;
    padding-right: 10px;
  }

  .woocommerce-checkout-review-order-table th.product-total,
  .woocommerce-checkout-review-order-table td.product-total {
    width: 30%;
    text-align: right;
    white-space: nowrap;
  }

  /* Thumbnail kleiner und sauber */
  .wc-gzd-cart-item-thumbnail img {
    width: 50px;
    height: auto;
    border-radius: 4px;
    margin-right: 10px;
    vertical-align: middle;
  }

  /* Variation Details gut lesbar machen */
  .variation dt, .variation dd {
    font-size: 12px;
    margin: 2px 0;
  }
}



/* Abstand zwischen den Feldern reduzieren */
.woocommerce-billing-fields .form-row,
.woocommerce-shipping-fields .form-row,
.woocommerce-additional-fields .form-row {
  margin-bottom: 10px !important;
}

/* Eingabefelder – nicht zu klein, aber kompakter */
.woocommerce input.input-text,
.woocommerce textarea {
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.4;
}

/* Labels leicht optimieren – nicht zu klein */
.woocommerce .form-row label {
  font-size: 14.5px;
  font-weight: 500;
  margin-bottom: 3px;
}

/* Für mobile: noch etwas dichter */
@media (max-width: 767px) {
  .woocommerce-billing-fields .form-row,
  .woocommerce-shipping-fields .form-row {
    margin-bottom: 8px !important;
  }

  .woocommerce input.input-text,
  .woocommerce textarea {
    padding: 9px 10px;
  }

  .woocommerce .form-row label {
    font-size: 14px;
  }
}


@media (max-width: 767px) {
  /* Wrapper fullscreen machen */
  .search_wrapper {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    background: #fff;
    z-index: 9999;
    overflow-y: auto;
    padding: 60px 20px;
    box-sizing: border-box;
  }

  /* Suchfenster zentrieren & max Breite */
  .mfn-live-search-box {
    max-width: 800px;
    margin: 0 auto;
    height: auto !important;
    position: relative !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  /* Close-Button oben rechts im Wrapper */
  .mfn-close-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10000;
  }

  /* Body overflow verhindern wenn Suche aktiv */
  body.search-overlay-active {
    overflow: hidden !important;
  }

  /* Overlay entfernen, falls vorhanden */
  body.search-overlay-active::before,
  body.search-overlay-active .mfn-overlay {
    display: none !important;
  }

  /* Sticky Footer ausblenden, wenn Suche aktiv */
  body.search-overlay-active #sticky-price-footer {
    display: none !important;
  }
}


.yith-ywraq-mail-form-wrapper {
  background-color: #f9f9f9;
  padding: 30px;
  border-radius: 8px;
  max-width: 600px;
  margin: 0 auto;
}

.yith-ywraq-mail-form-wrapper form {
  width: 100%;
}

.yith-ywraq-mail-form-wrapper .form-row {
  width: 100%;
  display: block;
  margin-bottom: 15px;
}

.yith-ywraq-mail-form-wrapper .woocommerce-input-wrapper {
  width: 100%;
  display: block;
}

.yith-ywraq-mail-form-wrapper input[type="text"],
.yith-ywraq-mail-form-wrapper input[type="email"],
.yith-ywraq-mail-form-wrapper textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.yith-ywraq-mail-form-wrapper .raq-send-request-row {
  text-align: center;
}

.yith-ywraq-mail-form-wrapper .raq-send-request-row .button {
  display: inline-block;
  margin: 0 auto;
  padding: 10px 20px;
  background-color: #555;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.yith-ywraq-mail-form-wrapper .raq-send-request-row .button:hover {
  background-color: #333;
}

.update-list-wrapper {
  display: flex;
  justify-content: center;
}

.after-table-right {
  float: none !important;
  position: static !important;
  display: flex;
  justify-content: center;
  width: 100%; /* damit es den gesamten Container nimmt */
}


/* "Siehe PDF"-Button vollständig ausblenden */
#ywraq-list-to-pdf {
  display: none !important;
}

/*Mengenfeld ausgerichtet*/
.input-text.qty {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Mobile-Fix: Modal-Dialog nicht über Bildschirm hinausragen lassen */
@media screen and (max-width: 480px) {
  .ui-dialog.ywraq-quote-on-cart {
    width: 90vw !important;
    left: 5vw !important;
    right: auto !important;
    max-width: 100vw !important;
    box-sizing: border-box;
  }
}

/* Close-Button Desktop & Mobile */
.ui-dialog.ywraq-quote-on-cart .ui-dialog-titlebar-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  background: url('https://werbungundidee.de/wp-content/plugins/yith-woocommerce-request-a-quote-premium/assets/icons/ic_close.svg') no-repeat center center;
  background-size: 20px 20px;
  border: none;
  cursor: pointer;
  text-indent: -9999px;
  opacity: 1 !important;
  z-index: 1001;
}

.ui-dialog.ywraq-quote-on-cart .ui-dialog-titlebar-close:hover {
  opacity: 0.8;
  background-color: transparent;
  border: none;
}

/* Mobile-Fix Close-Button Position */
@media screen and (max-width: 480px) {
  .ui-dialog.ywraq-quote-on-cart .ui-dialog-titlebar-close {
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background-size: 18px 18px;
  }
}


/*Anfrageseite responsiv machen*/
/* Für Smartphones – Inhalte umbrechen */
@media screen and (max-width: 767px) {
  .ywraq-form-table-wrapper table.shop_table,
  .ywraq-form-table-wrapper thead,
  .ywraq-form-table-wrapper tbody,
  .ywraq-form-table-wrapper th,
  .ywraq-form-table-wrapper td,
  .ywraq-form-table-wrapper tr {
    display: block;
    width: 100%;
  }

  .ywraq-form-table-wrapper thead {
    display: none;
  }

  .ywraq-form-table-wrapper tr {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    padding: 10px;
  }

  .ywraq-form-table-wrapper td {
    text-align: left;
    padding: 10px;
    border: none;
    position: relative;
  }

  .ywraq-form-table-wrapper td::before {
    content: attr(data-title);
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: #333;
  }

  .ywraq-form-table-wrapper .product-thumbnail img {
    max-width: 100%;
    height: auto;
  }

  .ywraq-form-table-wrapper .product-remove {
    text-align: right;
  }
}

/* Für Tablets – Tabelle bleibt sichtbar, aber passt sich an */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .ywraq-form-table-wrapper table.shop_table {
    font-size: 0.9rem;
  }

  .ywraq-form-table-wrapper th,
  .ywraq-form-table-wrapper td {
    padding: 8px;
  }

  .ywraq-form-table-wrapper .product-thumbnail img {
    max-width: 80px;
    height: auto;
  }

  .ywraq-form-table-wrapper {
    overflow-x: auto;
  }
}
