/**
 * Order detail (sales/order/view) — KitUP reference: Montserrat/Poppins, grey table header,
 * status pills, airy rows, white info blocks, tab-style order section links.
 * Load after kitup-brand.css. Body class: kitup-order-view (sales_order_view.xml).
 */
html body.kitup-order-view.account,
html body.kitup-order-view[class*="customer-account"] {
    font-family: 'Montserrat', 'Poppins', ui-sans-serif, system-ui, sans-serif !important;
}

html body.kitup-order-view.account .column.main,
html body.kitup-order-view[class*="customer-account"] .column.main {
    font-family: 'Montserrat', 'Poppins', ui-sans-serif, system-ui, sans-serif !important;
}

/* Page title left, status / date / actions top-right */
html body.kitup-order-view.account .page-title-wrapper,
html body.kitup-order-view[class*="customer-account"] .page-title-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 16px 24px !important;
    margin-bottom: 20px !important;
}

html body.kitup-order-view.account .page-title-wrapper .kitup-order-title-meta,
html body.kitup-order-view[class*="customer-account"] .page-title-wrapper .kitup-order-title-meta {
    display: flex !important;
    flex-direction: column !important;
    align-items: end !important;
    text-align: end !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
    max-width: 100% !important;
}

@media (max-width: 767px) {
    html body.kitup-order-view.account .page-title-wrapper,
    html body.kitup-order-view[class*="customer-account"] .page-title-wrapper {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    html body.kitup-order-view.account .page-title-wrapper .kitup-order-title-meta,
    html body.kitup-order-view[class*="customer-account"] .page-title-wrapper .kitup-order-title-meta {
        align-items: start !important;
        text-align: start !important;
        width: 100% !important;
    }

    html body.kitup-order-view.account .page-title-wrapper .order-actions-toolbar,
    html body.kitup-order-view[class*="customer-account"] .page-title-wrapper .order-actions-toolbar {
        justify-content: start !important;
    }
}

html body.kitup-order-view.account .page-title-wrapper .page-title,
html body.kitup-order-view[class*="customer-account"] .page-title-wrapper .page-title {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    font-family: 'Montserrat', 'Poppins', ui-sans-serif, system-ui, sans-serif !important;
    color: #111827 !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}

html body.kitup-order-view.account .page-title-wrapper .order-status,
html body.kitup-order-view[class*="customer-account"] .page-title-wrapper .order-status {
    display: inline-block !important;
    margin-top: 0 !important;
}

html body.kitup-order-view.account .page-title-wrapper .kitup-order-status--shipped,
html body.kitup-order-view[class*="customer-account"] .page-title-wrapper .kitup-order-status--shipped {
    background: #0a114f !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    border-radius: 999px !important;
    padding: 7px 16px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
}

html body.kitup-order-view.account .page-title-wrapper .kitup-order-status--delivered,
html body.kitup-order-view[class*="customer-account"] .page-title-wrapper .kitup-order-status--delivered {
    background: #00d1b2 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    border-radius: 999px !important;
    padding: 7px 16px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
}

html body.kitup-order-view.account .page-title-wrapper .kitup-order-status--plain,
html body.kitup-order-view[class*="customer-account"] .page-title-wrapper .kitup-order-status--plain {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    font-weight: 400 !important;
    font-size: 15px !important;
    padding: 0 !important;
    background: transparent !important;
}

html body.kitup-order-view.account .page-title-wrapper .order-date,
html body.kitup-order-view[class*="customer-account"] .page-title-wrapper .order-date {
    font-family: 'Montserrat', 'Poppins', ui-sans-serif, system-ui, sans-serif !important;
    font-size: 14px !important;
    color: #374151 !important;
    line-height: 1.5 !important;
}

html body.kitup-order-view.account .page-title-wrapper .order-date .label,
html body.kitup-order-view[class*="customer-account"] .page-title-wrapper .order-date .label {
    font-weight: 600 !important;
    color: #111827 !important;
}

html body.kitup-order-view.account .page-title-wrapper .order-actions-toolbar,
html body.kitup-order-view[class*="customer-account"] .page-title-wrapper .order-actions-toolbar {
    margin-top: 0 !important;
    justify-content: end !important;
}

html body.kitup-order-view.account .order-actions-toolbar,
html body.kitup-order-view[class*="customer-account"] .order-actions-toolbar {
    margin-top: 8px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    align-items: center !important;
}

html body.kitup-order-view.account .order-actions-toolbar .action,
html body.kitup-order-view[class*="customer-account"] .order-actions-toolbar .action {
    font-family: 'Montserrat', 'Poppins', ui-sans-serif, system-ui, sans-serif !important;
    font-size: 14px !important;
}

/* Order Shipments tab: heading + Print / Track on one row */
html body.kitup-order-view .order-details-items.shipments .kitup-shipment-order-title,
html body.kitup-order-view[class*="customer-account"] .order-details-items.shipments .kitup-shipment-order-title {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px 20px !important;
    margin: 0 0 12px 0 !important;
}

html body.kitup-order-view .order-details-items.shipments .kitup-shipment-order-title-text,
html body.kitup-order-view[class*="customer-account"] .order-details-items.shipments .kitup-shipment-order-title-text {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #111827 !important;
}

html body.kitup-order-view .order-details-items.shipments .kitup-shipment-order-title-actions,
html body.kitup-order-view[class*="customer-account"] .order-details-items.shipments .kitup-shipment-order-title-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px 18px !important;
    flex: 0 0 auto !important;
}

html body.kitup-order-view .order-details-items.shipments .kitup-shipment-order-title-actions .action,
html body.kitup-order-view[class*="customer-account"] .order-details-items.shipments .kitup-shipment-order-title-actions .action {
    margin: 0 !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
}

html body.kitup-order-view .order-details-items.shipments .kitup-shipment-actions-toolbar-top,
html body.kitup-order-view[class*="customer-account"] .order-details-items.shipments .kitup-shipment-actions-toolbar-top {
    margin-bottom: 20px !important;
}

/* Refunds tab: Refund # heading + Print Refund on one row */
html body.kitup-order-view .order-details-items.creditmemo .kitup-refund-order-title,
html body.kitup-order-view[class*="customer-account"] .order-details-items.creditmemo .kitup-refund-order-title {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px 20px !important;
    margin: 0 0 14px 0 !important;
    padding-bottom: 0 !important;
    border: none !important;
}

html body.kitup-order-view .order-details-items.creditmemo .kitup-refund-order-title-text,
html body.kitup-order-view[class*="customer-account"] .order-details-items.creditmemo .kitup-refund-order-title-text {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #111827 !important;
}

html body.kitup-order-view .order-details-items.creditmemo .kitup-refund-order-title-actions,
html body.kitup-order-view[class*="customer-account"] .order-details-items.creditmemo .kitup-refund-order-title-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px 18px !important;
    flex: 0 0 auto !important;
}

html body.kitup-order-view .order-details-items.creditmemo .kitup-refund-order-title-actions .action,
html body.kitup-order-view[class*="customer-account"] .order-details-items.creditmemo .kitup-refund-order-title-actions .action {
    margin: 0 !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
}

html body.kitup-order-view .order-details-items.creditmemo .kitup-creditmemo-actions-toolbar-top,
html body.kitup-order-view[class*="customer-account"] .order-details-items.creditmemo .kitup-creditmemo-actions-toolbar-top {
    margin-bottom: 20px !important;
}

/* Section nav: Items Ordered / Invoices / Shipments / Refunds */
html body.kitup-order-view.account .items.order-links,
html body.kitup-order-view[class*="customer-account"] .items.order-links {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px 4px !important;
    list-style: none !important;
    margin: 0 0 20px 0 !important;
    padding: 0 0 12px 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
    font-family: 'Montserrat', 'Poppins', ui-sans-serif, system-ui, sans-serif !important;
}

html body.kitup-order-view.account .items.order-links > li,
html body.kitup-order-view[class*="customer-account"] .items.order-links > li {
    margin: 0 !important;
    padding: 0 12px 0 0 !important;
}

html body.kitup-order-view.account .items.order-links > li > strong,
html body.kitup-order-view[class*="customer-account"] .items.order-links > li > strong {
    font-weight: 600 !important;
    color: #111827 !important;
    padding: 8px 12px !important;
    display: inline-block !important;
    border-radius: 6px !important;
    background: #f3f4f6 !important;
}

html body.kitup-order-view.account .items.order-links > li > a,
html body.kitup-order-view[class*="customer-account"] .items.order-links > li > a {
    color: #515b6b !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    padding: 8px 12px !important;
    display: inline-block !important;
    border-radius: 6px !important;
}

html body.kitup-order-view.account .items.order-links > li > a:hover,
html body.kitup-order-view[class*="customer-account"] .items.order-links > li > a:hover {
    color: #111827 !important;
    background: #f3f4f6 !important;
}

/* Items ordered block */
/* Force real table layout (some theme “responsive” rules set .data.table td { display:block }, which hides rows). */
html body.kitup-order-view .order-details-items .table-order-items {
    display: table !important;
    width: 100% !important;
}

html body.kitup-order-view .order-details-items .table-order-items thead {
    display: table-header-group !important;
}

html body.kitup-order-view .order-details-items .table-order-items tbody {
    display: table-row-group !important;
}

html body.kitup-order-view .order-details-items .table-order-items tfoot {
    display: table-footer-group !important;
}

html body.kitup-order-view .order-details-items .table-order-items tr {
    display: table-row !important;
}

html body.kitup-order-view .order-details-items .table-order-items > thead > tr > th,
html body.kitup-order-view .order-details-items .table-order-items > tbody > tr > td,
html body.kitup-order-view .order-details-items .table-order-items > tfoot > tr > th,
html body.kitup-order-view .order-details-items .table-order-items > tfoot > tr > td {
    display: table-cell !important;
}

html body.kitup-order-view.account .order-details-items.ordered,
html body.kitup-order-view[class*="customer-account"] .order-details-items.ordered {
    font-family: 'Montserrat', 'Poppins', ui-sans-serif, system-ui, sans-serif !important;
}

html body.kitup-order-view.account .order-details-items .order-title,
html body.kitup-order-view[class*="customer-account"] .order-details-items .order-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin-bottom: 14px !important;
    padding-bottom: 0 !important;
    border: none !important;
}

html body.kitup-order-view.account .order-details-items .order-title strong,
html body.kitup-order-view[class*="customer-account"] .order-details-items .order-title strong {
    font-weight: 700 !important;
}

html body.kitup-order-view.account .order-details-items .table-wrapper.order-items,
html body.kitup-order-view[class*="customer-account"] .order-details-items .table-wrapper.order-items {
    width: 100% !important;
    max-width: 100% !important;
}

html body.kitup-order-view.account .order-details-items .table-order-items,
html body.kitup-order-view[class*="customer-account"] .order-details-items .table-order-items {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border: none !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    font-family: 'Montserrat', 'Poppins', ui-sans-serif, system-ui, sans-serif !important;
}

/* Line items table: product/name 45%; SKU, Price, Qty, Subtotal share remaining 55% */
html body.kitup-order-view .order-details-items .table-order-items > thead > tr > th.col.name,
html body.kitup-order-view .order-details-items .table-order-items > tbody > tr > td.col.name {
    width: 45% !important;
}

html body.kitup-order-view .order-details-items .table-order-items > thead > tr > th.col.sku,
html body.kitup-order-view .order-details-items .table-order-items > tbody > tr > td.col.sku {
    width: 13.75% !important;
}

html body.kitup-order-view .order-details-items .table-order-items > thead > tr > th.col.price,
html body.kitup-order-view .order-details-items .table-order-items > tbody > tr > td.col.price {
    width: 13.75% !important;
}

html body.kitup-order-view .order-details-items .table-order-items > thead > tr > th.col.qty,
html body.kitup-order-view .order-details-items .table-order-items > tbody > tr > td.col.qty {
    width: 13.75% !important;
}

html body.kitup-order-view .order-details-items .table-order-items > thead > tr > th.col.subtotal,
html body.kitup-order-view .order-details-items .table-order-items > tbody > tr > td.col.subtotal {
    width: 13.75% !important;
}

/* Refunds (credit memo): 7 columns — explicit widths sum to 100% (avoids crushed discount/total + tfoot overlap) */
html body.kitup-order-view .order-details-items .table-order-items.creditmemo > thead > tr > th.col.name,
html body.kitup-order-view .order-details-items .table-order-items.creditmemo > tbody > tr > td.col.name {
    width: 28% !important;
}

html body.kitup-order-view .order-details-items .table-order-items.creditmemo > thead > tr > th.col.sku,
html body.kitup-order-view .order-details-items .table-order-items.creditmemo > tbody > tr > td.col.sku {
    width: 11% !important;
}

html body.kitup-order-view .order-details-items .table-order-items.creditmemo > thead > tr > th.col.price,
html body.kitup-order-view .order-details-items .table-order-items.creditmemo > tbody > tr > td.col.price {
    width: 11% !important;
}

html body.kitup-order-view .order-details-items .table-order-items.creditmemo > thead > tr > th.col.qty,
html body.kitup-order-view .order-details-items .table-order-items.creditmemo > tbody > tr > td.col.qty {
    width: 9% !important;
}

html body.kitup-order-view .order-details-items .table-order-items.creditmemo > thead > tr > th.col.subtotal,
html body.kitup-order-view .order-details-items .table-order-items.creditmemo > tbody > tr > td.col.subtotal {
    width: 13% !important;
}

html body.kitup-order-view .order-details-items .table-order-items.creditmemo > thead > tr > th.col.discount,
html body.kitup-order-view .order-details-items .table-order-items.creditmemo > tbody > tr > td.col.discount {
    width: 14% !important;
}

html body.kitup-order-view .order-details-items .table-order-items.creditmemo > thead > tr > th.col.total,
html body.kitup-order-view .order-details-items .table-order-items.creditmemo > tbody > tr > td.col.total {
    width: 14% !important;
}

html body.kitup-order-view .order-details-items .table-order-items.creditmemo > tbody > tr > td.col.discount,
html body.kitup-order-view .order-details-items .table-order-items.creditmemo > tbody > tr > td.col.total {
    font-size: 14px !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
}

html body.kitup-order-view .order-details-items .table-order-items.creditmemo > tbody > tr > td.col.discount .price,
html body.kitup-order-view .order-details-items .table-order-items.creditmemo > tbody > tr > td.col.total .price {
    font-size: 14px !important;
    font-weight: 400 !important;
}

html body.kitup-order-view.account .order-details-items .table-order-items.creditmemo > tfoot > tr > th.mark,
html body.kitup-order-view[class*="customer-account"] .order-details-items .table-order-items.creditmemo > tfoot > tr > th.mark {
    text-align: right !important;
    vertical-align: middle !important;
    white-space: normal !important;
}

html body.kitup-order-view.account .order-details-items .table-order-items.creditmemo > tfoot > tr > td.amount,
html body.kitup-order-view[class*="customer-account"] .order-details-items .table-order-items.creditmemo > tfoot > tr > td.amount {
    text-align: right !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

html body.kitup-order-view .order-details-items .table-order-items.creditmemo > tfoot > tr > th.mark strong,
html body.kitup-order-view .order-details-items .table-order-items.creditmemo > tfoot > tr > td.amount strong {
    font-weight: 600 !important;
}

html body.kitup-order-view .order-details-items .table-order-items.creditmemo > tfoot > tr.grand_total > th.mark,
html body.kitup-order-view .order-details-items .table-order-items.creditmemo > tfoot > tr.grand_total > td.amount {
    font-size: 16px !important;
    font-weight: 700 !important;
}

html body.kitup-order-view .order-details-items .table-wrapper.order-items-creditmemo {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
}

html body.kitup-order-view .order-details-items .table-order-items .kitup-order-item-details {
    min-width: 0 !important;
}

html body.kitup-order-view.account .order-details-items .table-order-items > thead > tr > th,
html body.kitup-order-view[class*="customer-account"] .order-details-items .table-order-items > thead > tr > th {
    background: #f3f4f6 !important;
    color: #111827 !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    padding: 14px 16px !important;
    border: none !important;
    text-align: left !important;
    vertical-align: middle !important;
}

html body.kitup-order-view.account .order-details-items .table-order-items > thead > tr > th:first-child,
html body.kitup-order-view[class*="customer-account"] .order-details-items .table-order-items > thead > tr > th:first-child {
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
}

html body.kitup-order-view.account .order-details-items .table-order-items > thead > tr > th:last-child,
html body.kitup-order-view[class*="customer-account"] .order-details-items .table-order-items > thead > tr > th:last-child {
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

html body.kitup-order-view.account .order-details-items .table-order-items > tbody > tr > td,
html body.kitup-order-view[class*="customer-account"] .order-details-items .table-order-items > tbody > tr > td {
    color: #111827 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    padding: 18px 16px !important;
    border: none !important;
    border-top: none !important;
    vertical-align: top !important;
    background: transparent !important;
    overflow-wrap: break-word !important;
}

html body.kitup-order-view.account .order-details-items .table-order-items .product-item-name,
html body.kitup-order-view[class*="customer-account"] .order-details-items .table-order-items .product-item-name {
    font-weight: 600 !important;
    color: #111827 !important;
}

/* Line item Price & Subtotal: same scale as Qty column (14px / normal weight; tame theme .price rules) */
html body.kitup-order-view .order-details-items .table-order-items > tbody > tr > td.col.price,
html body.kitup-order-view .order-details-items .table-order-items > tbody > tr > td.col.subtotal {
    font-size: 14px !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
}

html body.kitup-order-view .order-details-items .table-order-items > tbody > tr > td.col.price .price-excluding-tax,
html body.kitup-order-view .order-details-items .table-order-items > tbody > tr > td.col.subtotal .price-excluding-tax,
html body.kitup-order-view .order-details-items .table-order-items > tbody > tr > td.col.price .cart-price,
html body.kitup-order-view .order-details-items .table-order-items > tbody > tr > td.col.subtotal .cart-price,
html body.kitup-order-view .order-details-items .table-order-items > tbody > tr > td.col.price .price,
html body.kitup-order-view .order-details-items .table-order-items > tbody > tr > td.col.subtotal .price {
    font-size: 14px !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
}

html body.kitup-order-view .order-details-items .table-order-items > tbody > tr > td.col.price .price *,
html body.kitup-order-view .order-details-items .table-order-items > tbody > tr > td.col.subtotal .price * {
    font-size: inherit !important;
    line-height: inherit !important;
    font-weight: inherit !important;
}

/* Line items: thumbnail + product name (order view, invoice, shipment, credit memo, carrier tracking table) */
html body.account .table-order-items .kitup-order-item-product,
html body[class*="customer-account"] .table-order-items .kitup-order-item-product,
html body.account .box-order-shipping-information .kitup-order-item-product,
html body[class*="customer-account"] .box-order-shipping-information .kitup-order-item-product {
    display: flex !important;
    align-items: flex-start !important;
    gap: 14px !important;
}

html body.account .table-order-items .kitup-order-item-photo img,
html body[class*="customer-account"] .table-order-items .kitup-order-item-photo img,
html body.account .box-order-shipping-information .kitup-order-item-photo img,
html body[class*="customer-account"] .box-order-shipping-information .kitup-order-item-photo img {
    width: 72px !important;
    height: 72px !important;
    max-width: 72px !important;
    object-fit: contain !important;
    border-radius: 6px !important;
    border: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
    display: block !important;
    box-sizing: border-box !important;
}

html body.account .table-order-items .kitup-order-item-photo-link,
html body[class*="customer-account"] .table-order-items .kitup-order-item-photo-link,
html body.account .box-order-shipping-information .kitup-order-item-photo-link,
html body[class*="customer-account"] .box-order-shipping-information .kitup-order-item-photo-link {
    display: inline-block !important;
    line-height: 0 !important;
    text-decoration: none !important;
}

html body.account .table-order-items .kitup-order-item-photo-link:hover img,
html body[class*="customer-account"] .table-order-items .kitup-order-item-photo-link:hover img,
html body.account .box-order-shipping-information .kitup-order-item-photo-link:hover img,
html body[class*="customer-account"] .box-order-shipping-information .kitup-order-item-photo-link:hover img {
    border-color: #00d1b2 !important;
}

html body.account .table-order-items .kitup-order-item-details,
html body[class*="customer-account"] .table-order-items .kitup-order-item-details,
html body.account .box-order-shipping-information .kitup-order-item-details,
html body[class*="customer-account"] .box-order-shipping-information .kitup-order-item-details {
    flex: 1 1 0 !important;
    min-width: 0 !important;
}

html body.account .table-order-items .kitup-order-item-details .product-item-name,
html body[class*="customer-account"] .table-order-items .kitup-order-item-details .product-item-name {
    display: block !important;
    margin-bottom: 4px !important;
}

html[dir="rtl"] body.account .table-order-items .kitup-order-item-product,
html[dir="rtl"] body[class*="customer-account"] .table-order-items .kitup-order-item-product,
html[dir="rtl"] body.account .box-order-shipping-information .kitup-order-item-product,
html[dir="rtl"] body[class*="customer-account"] .box-order-shipping-information .kitup-order-item-product {
    flex-direction: row-reverse !important;
}

/* CarrierMapping “Tracking by item” table — explicit image column */
html body.account .kitup-tracking-by-item .kitup-col-thumb,
html body[class*="customer-account"] .kitup-tracking-by-item .kitup-col-thumb {
    width: 88px !important;
    max-width: 88px !important;
    vertical-align: middle !important;
}

html body.account .kitup-tracking-by-item .kitup-tracking-line-thumb,
html body[class*="customer-account"] .kitup-tracking-by-item .kitup-tracking-line-thumb {
    width: 72px !important;
    height: 72px !important;
    max-width: 72px !important;
    object-fit: contain !important;
    border-radius: 6px !important;
    border: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
    display: block !important;
    box-sizing: border-box !important;
}

html body.account .kitup-tracking-by-item .kitup-tracking-thumb-link,
html body[class*="customer-account"] .kitup-tracking-by-item .kitup-tracking-thumb-link {
    display: inline-block !important;
    line-height: 0 !important;
    text-decoration: none !important;
}

html body.kitup-order-view.account .order-details-items .table-order-items > tfoot > tr > th,
html body.kitup-order-view.account .order-details-items .table-order-items > tfoot > tr > td,
html body.kitup-order-view[class*="customer-account"] .order-details-items .table-order-items > tfoot > tr > th,
html body.kitup-order-view[class*="customer-account"] .order-details-items .table-order-items > tfoot > tr > td {
    font-size: 14px !important;
    padding: 12px 16px !important;
    border: none !important;
    border-top: 1px solid #e5e7eb !important;
    background: transparent !important;
}

html body.kitup-order-view.account .order-details-items .table-order-items > tfoot > tr.grand_total .amount,
html body.kitup-order-view.account .order-details-items .table-order-items > tfoot > tr.grand_total .mark,
html body.kitup-order-view[class*="customer-account"] .order-details-items .table-order-items > tfoot > tr.grand_total .amount,
html body.kitup-order-view[class*="customer-account"] .order-details-items .table-order-items > tfoot > tr.grand_total .mark {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #111827 !important;
}

/* Order information: shipping / billing / payment */
html body.kitup-order-view.account .block-order-details-view,
html body.kitup-order-view[class*="customer-account"] .block-order-details-view {
    margin-top: 28px !important;
    padding: 20px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #fff !important;
    font-family: 'Montserrat', 'Poppins', ui-sans-serif, system-ui, sans-serif !important;
}

html body.kitup-order-view.account .block-order-details-view .block-title,
html body.kitup-order-view[class*="customer-account"] .block-order-details-view .block-title {
    border-bottom: 1px solid #e5e7eb !important;
    padding-bottom: 12px !important;
    margin-bottom: 16px !important;
}

html body.kitup-order-view.account .block-order-details-view .block-title strong,
html body.kitup-order-view[class*="customer-account"] .block-order-details-view .block-title strong {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #111827 !important;
}

html body.kitup-order-view.account .block-order-details-view .box-title,
html body.kitup-order-view[class*="customer-account"] .block-order-details-view .box-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    margin-bottom: 8px !important;
}

html body.kitup-order-view.account .block-order-details-view .box-content,
html body.kitup-order-view[class*="customer-account"] .block-order-details-view .box-content {
    font-size: 14px !important;
    color: #374151 !important;
    line-height: 1.55 !important;
}

html body.kitup-order-view.account .block-order-details-view .box,
html body.kitup-order-view[class*="customer-account"] .block-order-details-view .box {
    margin-bottom: 18px !important;
}

html body.kitup-order-view.account .block-order-details-view .box:last-child,
html body.kitup-order-view[class*="customer-account"] .block-order-details-view .box:last-child {
    margin-bottom: 0 !important;
}

/* Comments block if present */
html body.kitup-order-view.account .block-order-comments,
html body.kitup-order-view[class*="customer-account"] .block-order-comments {
    margin-bottom: 20px !important;
    font-family: 'Montserrat', 'Poppins', ui-sans-serif, system-ui, sans-serif !important;
}

/* Bottom back link */
html body.kitup-order-view.account .order-details-items .actions-toolbar,
html body.kitup-order-view[class*="customer-account"] .order-details-items .actions-toolbar {
    margin-top: 24px !important;
    padding-top: 16px !important;
    border-top: 1px solid #e5e7eb !important;
}

html body.kitup-order-view.account .order-details-items .actions-toolbar .action.back,
html body.kitup-order-view[class*="customer-account"] .order-details-items .actions-toolbar .action.back {
    font-size: 14px !important;
    color: #111827 !important;
    text-decoration: none !important;
}

/* Two-column grid: explicit placement + LTR tracks (fixes bs_rtl4 where html is rtl via CSS only). */
body.account .block-order-details-view .block-content.kitup-order-info-grid,
body[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid,
html body.kitup-order-view.account .block-order-details-view .block-content.kitup-order-info-grid,
html body.kitup-order-view[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid {
    direction: ltr !important;
}

@media only screen and (min-width: 768px) {
    body.account .block-order-details-view .block-content.kitup-order-info-grid,
    body[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid,
    html body.kitup-order-view.account .block-order-details-view .block-content.kitup-order-info-grid,
    html body.kitup-order-view[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        column-gap: 24px !important;
        row-gap: 20px !important;
        align-items: start !important;
    }

    body.account .block-order-details-view .block-content.kitup-order-info-grid .box,
    body[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid .box,
    html body.kitup-order-view.account .block-order-details-view .block-content.kitup-order-info-grid .box,
    html body.kitup-order-view[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid .box {
        margin-bottom: 0 !important;
        min-width: 0 !important;
    }

    /* Physical: addresses row 1, methods row 2 */
    body.account .block-order-details-view .block-content.kitup-order-info-grid:not(.kitup-order-info-grid--virtual) .box-order-shipping-address,
    body[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid:not(.kitup-order-info-grid--virtual) .box-order-shipping-address,
    html body.kitup-order-view.account .block-order-details-view .block-content.kitup-order-info-grid:not(.kitup-order-info-grid--virtual) .box-order-shipping-address,
    html body.kitup-order-view[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid:not(.kitup-order-info-grid--virtual) .box-order-shipping-address {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }

    body.account .block-order-details-view .block-content.kitup-order-info-grid:not(.kitup-order-info-grid--virtual) .box-order-billing-address,
    body[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid:not(.kitup-order-info-grid--virtual) .box-order-billing-address,
    html body.kitup-order-view.account .block-order-details-view .block-content.kitup-order-info-grid:not(.kitup-order-info-grid--virtual) .box-order-billing-address,
    html body.kitup-order-view[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid:not(.kitup-order-info-grid--virtual) .box-order-billing-address {
        grid-column: 2 !important;
        grid-row: 1 !important;
    }

    body.account .block-order-details-view .block-content.kitup-order-info-grid:not(.kitup-order-info-grid--virtual) .box-order-shipping-method,
    body[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid:not(.kitup-order-info-grid--virtual) .box-order-shipping-method,
    html body.kitup-order-view.account .block-order-details-view .block-content.kitup-order-info-grid:not(.kitup-order-info-grid--virtual) .box-order-shipping-method,
    html body.kitup-order-view[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid:not(.kitup-order-info-grid--virtual) .box-order-shipping-method {
        grid-column: 1 !important;
        grid-row: 2 !important;
    }

    body.account .block-order-details-view .block-content.kitup-order-info-grid:not(.kitup-order-info-grid--virtual) .box-order-billing-method,
    body[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid:not(.kitup-order-info-grid--virtual) .box-order-billing-method,
    html body.kitup-order-view.account .block-order-details-view .block-content.kitup-order-info-grid:not(.kitup-order-info-grid--virtual) .box-order-billing-method,
    html body.kitup-order-view[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid:not(.kitup-order-info-grid--virtual) .box-order-billing-method {
        grid-column: 2 !important;
        grid-row: 2 !important;
    }

    /* Virtual: billing | payment */
    body.account .block-order-details-view .block-content.kitup-order-info-grid--virtual .box-order-billing-address,
    body[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid--virtual .box-order-billing-address,
    html body.kitup-order-view.account .block-order-details-view .block-content.kitup-order-info-grid--virtual .box-order-billing-address,
    html body.kitup-order-view[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid--virtual .box-order-billing-address {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }

    body.account .block-order-details-view .block-content.kitup-order-info-grid--virtual .box-order-billing-method,
    body[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid--virtual .box-order-billing-method,
    html body.kitup-order-view.account .block-order-details-view .block-content.kitup-order-info-grid--virtual .box-order-billing-method,
    html body.kitup-order-view[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid--virtual .box-order-billing-method {
        grid-column: 2 !important;
        grid-row: 1 !important;
    }
}

@media only screen and (max-width: 767px) {
    body.account .block-order-details-view .block-content.kitup-order-info-grid,
    body[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid,
    html body.kitup-order-view.account .block-order-details-view .block-content.kitup-order-info-grid,
    html body.kitup-order-view[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        row-gap: 18px !important;
    }

    body.account .block-order-details-view .block-content.kitup-order-info-grid .box,
    body[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid .box,
    html body.kitup-order-view.account .block-order-details-view .block-content.kitup-order-info-grid .box,
    html body.kitup-order-view[class*="customer-account"] .block-order-details-view .block-content.kitup-order-info-grid .box {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
    }
}

html[dir="rtl"] body.kitup-order-view.account .block-order-details-view .kitup-order-info-grid .box-title,
html[dir="rtl"] body.kitup-order-view.account .block-order-details-view .kitup-order-info-grid .box-content,
html[dir="rtl"] body.kitup-order-view[class*="customer-account"] .block-order-details-view .kitup-order-info-grid .box-title,
html[dir="rtl"] body.kitup-order-view[class*="customer-account"] .block-order-details-view .kitup-order-info-grid .box-content {
    direction: rtl !important;
    text-align: start !important;
}
