/* Booking details: keep every label paired with its value. */
body.woocommerce-cart .woocommerce dl.variation,
body.woocommerce-checkout .woocommerce dl.variation {
  display: grid !important;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: .35rem .75rem;
  align-items: baseline;
  width: 100%;
  min-width: 0;
  margin: .75rem 0 0 !important;
  padding: 0 !important;
  text-align: left;
  box-sizing: border-box;
}
body.woocommerce-cart .woocommerce dl.variation dt,
body.woocommerce-cart .woocommerce dl.variation dd,
body.woocommerce-checkout .woocommerce dl.variation dt,
body.woocommerce-checkout .woocommerce dl.variation dd {
  float: none !important;
  clear: none !important;
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.6;
  text-align: left !important;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.woocommerce-cart .woocommerce dl.variation dd p,
body.woocommerce-checkout .woocommerce dl.variation dd p {
  margin: 0 !important;
  padding: 0 !important;
  line-height: inherit;
}
body.woocommerce-cart .product-wrapper .product-body .cart_item .product-detail .product-image {
  flex: 0 0 80px;
  width: 80px;
}
body.woocommerce-cart .product-wrapper .product-body .cart_item .product-detail .product-image a img,
body.woocommerce-cart .woocommerce-cart-form .product-thumbnail img {
  width: 80px !important;
  max-width: 80px !important;
  height: auto !important;
}
body.woocommerce-cart .product-name-price { min-width: 0; flex: 1 1 0; }
/* Keep title and quantity columns balanced after metadata moves under the title. */
body.woocommerce-checkout .woocommerce-checkout #order_review table .product-detail {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: .5rem;
  min-width: 0;
}
body.woocommerce-checkout .woocommerce-checkout #order_review table .product-detail > .product-name {
  flex: 1 1 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
body.woocommerce-checkout .woocommerce-checkout #order_review table .product-detail > .product-quantity {
  flex: 0 0 3rem;
}
body.woocommerce-checkout .woocommerce-checkout #order_review table .product-detail > dl.variation {
  flex: 0 0 100%;
  order: 3;
}
@media (max-width: 767px) {
  /* Keep product, quantity and subtotal in the same columns on small screens. */
  body.woocommerce-checkout .woocommerce-checkout #order_review table .product-detail {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 2rem max-content;
    column-gap: .4rem;
    align-items: start;
  }
  body.woocommerce-checkout .woocommerce-checkout #order_review table .product-detail > .product-name {
    grid-column: 1;
    grid-row: 1;
  }
  body.woocommerce-checkout .woocommerce-checkout #order_review table .product-detail > .product-quantity {
    grid-column: 2;
    grid-row: 1;
  }
  body.woocommerce-checkout .woocommerce-checkout #order_review table .product-detail > .product-total {
    grid-column: 3;
    grid-row: 1;
    white-space: nowrap;
    text-align: right;
    align-self: start;
  }
  body.woocommerce-checkout .woocommerce-checkout #order_review table tbody td.product-total {
    vertical-align: top;
    white-space: nowrap;
  }

  body.woocommerce-cart .product-wrapper .product-body .cart_item .product-detail {
    display: flex !important;
    align-items: flex-start;
    padding: .75rem;
    box-sizing: border-box;
    gap: .75rem;
  }
  body.woocommerce-cart .product-wrapper .product-body .cart_item .product-detail .product-name-price {
    padding: 0;
  }
  body.woocommerce-cart .product-wrapper .product-body .cart_item .product-detail .product-image {
    margin: 0;
    flex-basis: 60px;
    width: 60px;
  }
  body.woocommerce-cart .product-wrapper .product-body .cart_item .product-detail .product-image a img {
    width: 60px !important;
    max-width: 60px !important;
  }
  body.woocommerce-cart .woocommerce dl.variation,
  body.woocommerce-checkout .woocommerce dl.variation {
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: .5rem;
    font-size: .85rem;
  }
  /* Preserve the five shipping columns; scroll the figure instead of crushing them. */
  body.miyajima-english-notation .entry-content .wp-block-table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.miyajima-english-notation .entry-content .wp-block-table table {
    display: table !important;
    width: 100% !important;
    min-width: 720px;
    table-layout: fixed !important;
    border-collapse: collapse;
  }
  body.miyajima-english-notation .entry-content .wp-block-table th,
  body.miyajima-english-notation .entry-content .wp-block-table td {
    display: table-cell !important;
    width: auto !important;
    height: auto !important;
    padding: .65rem .75rem !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal !important;
    line-height: 1.6 !important;
    vertical-align: top;
  }
}
