/*
 * RoMi Enterprise ERP v6.30.0 — Mobile Commerce
 * Mobile-only presentation for WooCommerce orders, quotations, carts and
 * customer account tables. Desktop and print layouts remain unchanged.
 */
@media screen and (max-width: 782px) {
  body.woocommerce,
  body.woocommerce-page {
    overflow-x: hidden;
  }

  .woocommerce .woocommerce-order,
  .woocommerce .woocommerce-customer-details,
  .woocommerce .woocommerce-order-details,
  .woocommerce .woocommerce-MyAccount-content,
  .woocommerce .woocommerce-checkout,
  .woocommerce .cart-collaterals {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
  }

  /* Turn commerce tables into readable cards. */
  .woocommerce table.shop_table,
  .woocommerce table.woocommerce-table,
  .woocommerce table.order_details,
  .woocommerce table.my_account_orders,
  .woocommerce table.woocommerce-checkout-review-order-table,
  .woocommerce table.cart {
    background: transparent;
    border: 0 !important;
    border-collapse: separate !important;
    box-shadow: none;
    display: block;
    margin: 0 0 20px !important;
    overflow: visible;
    width: 100% !important;
  }

  .woocommerce table.shop_table thead,
  .woocommerce table.woocommerce-table thead,
  .woocommerce table.order_details thead,
  .woocommerce table.my_account_orders thead,
  .woocommerce table.woocommerce-checkout-review-order-table thead,
  .woocommerce table.cart thead {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }

  .woocommerce table.shop_table tbody,
  .woocommerce table.woocommerce-table tbody,
  .woocommerce table.order_details tbody,
  .woocommerce table.my_account_orders tbody,
  .woocommerce table.woocommerce-checkout-review-order-table tbody,
  .woocommerce table.cart tbody {
    display: grid;
    gap: 14px;
    width: 100%;
  }

  .woocommerce table.shop_table tbody tr,
  .woocommerce table.woocommerce-table tbody tr,
  .woocommerce table.order_details tbody tr,
  .woocommerce table.my_account_orders tbody tr,
  .woocommerce table.woocommerce-checkout-review-order-table tbody tr,
  .woocommerce table.cart tbody tr {
    background: #fff;
    border: 1px solid #dce3ec;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(7, 24, 47, .06);
    box-sizing: border-box;
    display: block;
    margin: 0;
    overflow: hidden;
    padding: 14px 16px;
    width: 100%;
  }

  .woocommerce table.shop_table tbody td,
  .woocommerce table.woocommerce-table tbody td,
  .woocommerce table.order_details tbody td,
  .woocommerce table.my_account_orders tbody td,
  .woocommerce table.woocommerce-checkout-review-order-table tbody td,
  .woocommerce table.cart tbody td {
    align-items: flex-start;
    border: 0 !important;
    border-bottom: 1px solid #edf1f6 !important;
    box-sizing: border-box;
    display: grid !important;
    font-size: 15px;
    gap: 12px;
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
    line-height: 1.55;
    min-height: 42px;
    padding: 11px 0 !important;
    text-align: left !important;
    width: 100% !important;
  }

  .woocommerce table.shop_table tbody td:last-child,
  .woocommerce table.woocommerce-table tbody td:last-child,
  .woocommerce table.order_details tbody td:last-child,
  .woocommerce table.my_account_orders tbody td:last-child,
  .woocommerce table.woocommerce-checkout-review-order-table tbody td:last-child,
  .woocommerce table.cart tbody td:last-child {
    border-bottom: 0 !important;
  }

  .woocommerce table.shop_table tbody td::before,
  .woocommerce table.woocommerce-table tbody td::before,
  .woocommerce table.order_details tbody td::before,
  .woocommerce table.my_account_orders tbody td::before,
  .woocommerce table.woocommerce-checkout-review-order-table tbody td::before,
  .woocommerce table.cart tbody td::before {
    color: #52627a;
    content: attr(data-romi-label);
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .05em;
    line-height: 1.35;
    text-transform: uppercase;
  }

  /* Product/item cells use the full card width. */
  .woocommerce td.product-name,
  .woocommerce td.woocommerce-table__product-name,
  .woocommerce td.product-remove,
  .woocommerce td.product-thumbnail,
  .woocommerce td.actions {
    display: block !important;
    grid-template-columns: 1fr !important;
  }

  .woocommerce td.product-name::before,
  .woocommerce td.woocommerce-table__product-name::before,
  .woocommerce td.product-thumbnail::before,
  .woocommerce td.product-remove::before,
  .woocommerce td.actions::before {
    content: none !important;
  }

  .woocommerce td.product-name a,
  .woocommerce td.woocommerce-table__product-name a {
    display: inline-block;
    font-size: 18px;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .woocommerce td.product-name p,
  .woocommerce td.product-name .wc-item-meta,
  .woocommerce td.product-name .variation,
  .woocommerce td.woocommerce-table__product-name p,
  .woocommerce td.woocommerce-table__product-name .wc-item-meta,
  .woocommerce td.woocommerce-table__product-name .variation {
    color: #56647a;
    font-size: 14px;
    line-height: 1.55;
    margin: 8px 0 0;
    overflow-wrap: anywhere;
  }

  .woocommerce td.product-thumbnail img,
  .woocommerce td.product-name img,
  .woocommerce td.woocommerce-table__product-name img {
    border-radius: 10px;
    float: none;
    height: auto;
    margin: 0 12px 8px 0;
    max-width: 76px;
    vertical-align: top;
    width: 76px;
  }

  .woocommerce td.product-total,
  .woocommerce td.woocommerce-table__product-total,
  .woocommerce td.product-subtotal,
  .woocommerce td.product-price,
  .woocommerce td.product-quantity {
    font-weight: 700;
  }

  .woocommerce td.product-total .woocommerce-Price-amount,
  .woocommerce td.woocommerce-table__product-total .woocommerce-Price-amount,
  .woocommerce td.product-subtotal .woocommerce-Price-amount,
  .woocommerce td.product-price .woocommerce-Price-amount {
    color: #07182f;
    font-size: 17px;
  }

  /* Totals become a clean summary card. */
  .woocommerce table.shop_table tfoot,
  .woocommerce table.woocommerce-table tfoot,
  .woocommerce table.order_details tfoot,
  .woocommerce table.woocommerce-checkout-review-order-table tfoot {
    background: #f5f8fc;
    border: 1px solid #dce3ec;
    border-radius: 16px;
    display: block;
    margin-top: 14px;
    overflow: hidden;
    padding: 10px 16px;
    width: 100%;
  }

  .woocommerce table.shop_table tfoot tr,
  .woocommerce table.woocommerce-table tfoot tr,
  .woocommerce table.order_details tfoot tr,
  .woocommerce table.woocommerce-checkout-review-order-table tfoot tr {
    align-items: center;
    border-bottom: 1px solid #dfe6ef;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 11px 0;
  }

  .woocommerce table.shop_table tfoot tr:last-child,
  .woocommerce table.woocommerce-table tfoot tr:last-child,
  .woocommerce table.order_details tfoot tr:last-child,
  .woocommerce table.woocommerce-checkout-review-order-table tfoot tr:last-child {
    border-bottom: 0;
  }

  .woocommerce table.shop_table tfoot th,
  .woocommerce table.shop_table tfoot td,
  .woocommerce table.woocommerce-table tfoot th,
  .woocommerce table.woocommerce-table tfoot td,
  .woocommerce table.order_details tfoot th,
  .woocommerce table.order_details tfoot td,
  .woocommerce table.woocommerce-checkout-review-order-table tfoot th,
  .woocommerce table.woocommerce-checkout-review-order-table tfoot td {
    border: 0 !important;
    display: block !important;
    padding: 0 !important;
    text-align: left !important;
    width: auto !important;
  }

  .woocommerce table.shop_table tfoot td,
  .woocommerce table.woocommerce-table tfoot td,
  .woocommerce table.order_details tfoot td,
  .woocommerce table.woocommerce-checkout-review-order-table tfoot td {
    color: #07182f;
    font-size: 16px;
    font-weight: 800;
    text-align: right !important;
  }

  .woocommerce .woocommerce-order-details__title,
  .woocommerce .woocommerce-column__title,
  .woocommerce .woocommerce-order-downloads__title {
    font-size: clamp(22px, 7vw, 30px);
    line-height: 1.2;
  }

  .woocommerce .woocommerce-customer-details address,
  .woocommerce .woocommerce-order-overview,
  .woocommerce .woocommerce-thankyou-order-details {
    border-radius: 16px;
    box-sizing: border-box;
    max-width: 100%;
  }

  .woocommerce .woocommerce-order-overview,
  .woocommerce .woocommerce-thankyou-order-details {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    padding: 0;
  }

  .woocommerce .woocommerce-order-overview li,
  .woocommerce .woocommerce-thankyou-order-details li {
    background: #f5f8fc;
    border: 1px solid #dce3ec;
    border-radius: 12px;
    box-sizing: border-box;
    float: none;
    margin: 0 !important;
    padding: 12px 14px !important;
    width: 100%;
  }

  .woocommerce .button,
  .woocommerce button.button,
  .woocommerce input.button,
  .woocommerce a.button {
    align-items: center;
    box-sizing: border-box;
    display: inline-flex;
    justify-content: center;
    min-height: 46px;
    padding: 11px 16px;
    text-align: center;
    white-space: normal;
  }

  .woocommerce td.actions .button,
  .woocommerce td.actions input,
  .woocommerce .woocommerce-order-details + .button,
  .woocommerce .woocommerce-MyAccount-content > .button {
    margin: 5px 0;
    width: 100%;
  }
}

@media screen and (max-width: 420px) {
  .woocommerce table.shop_table tbody td,
  .woocommerce table.woocommerce-table tbody td,
  .woocommerce table.order_details tbody td,
  .woocommerce table.my_account_orders tbody td,
  .woocommerce table.woocommerce-checkout-review-order-table tbody td,
  .woocommerce table.cart tbody td {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

@media print {
  /* Never apply the card conversion to printed quotations and invoices. */
  .woocommerce table.shop_table,
  .woocommerce table.woocommerce-table,
  .woocommerce table.order_details {
    display: table !important;
  }
}
