/* Compact YITH quote list. Preserve native item, quantity and AJAX selectors. */
#yith-ywraq-form {
  margin: 0 0 28px;
  max-width: 100%;
}
#yith-ywrq-table-list {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  font-size: 14px;
}
#yith-ywrq-table-list .twt-quote-col-remove { width: 48px; }
#yith-ywrq-table-list .twt-quote-col-thumbnail { width: 104px; }
#yith-ywrq-table-list .twt-quote-col-quantity { width: 108px; }
#yith-ywrq-table-list .twt-quote-col-total { width: 144px; }
#yith-ywrq-table-list thead th {
  padding: 14px 12px;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  background: #f6f7f8;
  color: #333;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
#yith-ywrq-table-list tbody td {
  padding: 12px;
  border: 0;
  border-bottom: 1px solid #eceef0;
  vertical-align: middle;
  background: #fff;
  text-align: left;
}
#yith-ywrq-table-list tbody tr:last-child > td {
  border-bottom: 0;
}
#yith-ywrq-table-list td.product-remove {
  padding-left: 10px;
  padding-right: 0;
  text-align: center;
}
#yith-ywrq-table-list .product-remove a.remove {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  border: 1px solid #f1d4d7;
  border-radius: 50%;
  background: #fff;
  color: #d90016 !important;
  text-decoration: none;
  font-size: 20px;
  line-height: 1;
}
#yith-ywrq-table-list .product-remove a.remove:hover {
  background: #d90016;
  border-color: #d90016;
  color: #fff !important;
}
#yith-ywrq-table-list td.product-thumbnail > a {
  display: flex;
  width: 80px;
  height: 80px;
  align-items: center;
  justify-content: center;
}
#yith-ywrq-table-list td.product-thumbnail img {
  display: block !important;
  width: 80px !important;
  height: 80px !important;
  max-width: 80px !important;
  max-height: 80px !important;
  margin: 0 !important;
  object-fit: contain;
  object-position: center;
  border-radius: 6px;
}
#yith-ywrq-table-list td.product-name {
  overflow-wrap: anywhere;
  line-height: 1.5;
}
#yith-ywrq-table-list td.product-name > a {
  color: #242424;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
#yith-ywrq-table-list td.product-name > a:hover {
  color: #d90016;
  text-decoration: underline;
}
#yith-ywrq-table-list .twt-quote-item-meta,
#yith-ywrq-table-list dl.variation {
  margin: 6px 0 0;
  padding: 0;
  color: #666;
  font-size: 12px;
  line-height: 1.5;
}
#yith-ywrq-table-list .twt-quote-item-meta dt,
#yith-ywrq-table-list .twt-quote-item-meta dd {
  display: inline;
  float: none;
  margin: 0;
}
#yith-ywrq-table-list .twt-quote-item-meta dt { font-weight: 600; }
#yith-ywrq-table-list .twt-quote-item-meta dd p { display: inline; margin: 0; }
#yith-ywrq-table-list th.product-quantity,
#yith-ywrq-table-list td.product-quantity { text-align: center; }
#yith-ywrq-table-list td.product-quantity .quantity { margin: 0; }
#yith-ywrq-table-list td.product-quantity .qty {
  width: 68px !important;
  min-width: 0;
  max-width: 100%;
  height: 40px;
  padding: 7px 6px;
  border: 1px solid #dfe2e6;
  border-radius: 6px;
  text-align: center;
  font-size: 14px;
  box-sizing: border-box;
}
#yith-ywrq-table-list th.product-subtotal,
#yith-ywrq-table-list td.product-subtotal {
  text-align: right;
  white-space: nowrap;
}
#yith-ywrq-table-list td.product-subtotal {
  color: #242424;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
#yith-ywrq-table-list td.actions {
  padding: 14px;
  text-align: right;
  background: #fafafa;
}
#yith-ywrq-table-list td.actions .button {
  float: none;
  width: auto;
  margin: 0;
  padding: 9px 16px;
  border: 1px solid #d90016;
  border-radius: 6px;
  background: #fff;
  color: #d90016;
  font-size: 13px;
  font-weight: 600;
}
#yith-ywrq-table-list td.actions .button:hover { background: #d90016; color: #fff; }
#yith-ywrq-table-list a:focus-visible,
#yith-ywrq-table-list input:focus-visible { outline: 2px solid #d90016; outline-offset: 3px; }

@media (max-width: 768px) {
  #yith-ywrq-table-list { display: block; table-layout: auto; }
  #yith-ywrq-table-list colgroup,
  #yith-ywrq-table-list thead { display: none; }
  #yith-ywrq-table-list tbody { display: block; }
  #yith-ywrq-table-list tr.cart_item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px 12px;
    position: relative;
    padding: 16px 14px;
    border-bottom: 1px solid #eceef0;
    background: #fff;
  }
  #yith-ywrq-table-list tr.cart_item:last-child { border-bottom: 0; }
  #yith-ywrq-table-list tr.cart_item > td {
    display: block !important;
    width: auto !important;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left !important;
    min-width: 0;
  }
  #yith-ywrq-table-list tr.cart_item > td::before { display: none; }
  #yith-ywrq-table-list tr.cart_item > td.product-remove {
    position: absolute;
    top: 12px;
    right: 12px;
  }
  #yith-ywrq-table-list tr.cart_item > td.product-thumbnail {
    grid-column: 1;
    grid-row: 1 / span 3;
    align-self: start;
  }
  #yith-ywrq-table-list td.product-thumbnail > a { width: 64px; height: 64px; }
  #yith-ywrq-table-list td.product-thumbnail img {
    width: 64px !important;
    height: 64px !important;
    max-width: 64px !important;
    max-height: 64px !important;
  }
  #yith-ywrq-table-list tr.cart_item > td.product-name {
    grid-column: 2;
    grid-row: 1;
    padding-right: 30px;
  }
  #yith-ywrq-table-list tr.cart_item > td.product-quantity,
  #yith-ywrq-table-list tr.cart_item > td.product-subtotal {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    grid-column: 2;
  }
  #yith-ywrq-table-list tr.cart_item > td.product-quantity { grid-row: 2; }
  #yith-ywrq-table-list tr.cart_item > td.product-subtotal { grid-row: 3; }
  #yith-ywrq-table-list tr.cart_item > td.product-quantity::before,
  #yith-ywrq-table-list tr.cart_item > td.product-subtotal::before {
    content: attr(data-title);
    display: block;
    float: none;
    color: #666;
    font-size: 12px;
    font-weight: 500;
  }
  #yith-ywrq-table-list tbody > tr:not(.cart_item) { display: block; }
  #yith-ywrq-table-list td.actions { display: block; }
  #yith-ywrq-table-list td.actions::before { display: none; }
}
