h6 {
    padding-top : 10px;
}

.product-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-import-button {
    font-weight: 500;
    padding: 6px 14px;
}

.yoco-import-modal-body {
    min-height: 140px;
}

.yoco-import-intro {
    margin-bottom: 1rem;
    color: #495057;
}

.yoco-import-file-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.yoco-import-file-icon {
    font-size: 2rem;
    color: #198754;
    flex-shrink: 0;
}

.yoco-import-file-name {
    font-weight: 600;
    word-break: break-all;
}

.yoco-import-file-size {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 2px;
}

.yoco-import-file-format {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    background-color: #e7f1ff;
    color: #0d6efd;
}

.yoco-import-file-format.is-unknown {
    background-color: #fff3cd;
    color: #856404;
}

.yoco-import-progress-status {
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.yoco-import-progress {
    height: 1.25rem;
}

.yoco-import-progress-detail {
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-size: 0.875rem;
}

.modal-body {
    text-align: left;
}

/* Product modal tabs */
.product-modal-tabs {
    border-bottom-color: #dee2e6;
}

.product-modal-tab-panel {
    padding-bottom: 10px;
}

.product-modal-tab-panel label {
    margin-top: 10px;
}

.product-modal-tab-panel label:first-child {
    margin-top: 0;
}

.product-modal-tab-panel-empty {
    min-height: 80px;
}

.product-optional-label {
    font-weight: 400;
    color: #6c757d;
    font-size: 0.875rem;
}

.product-loyalty-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e9ecef;
}

.product-loyalty-switch-label {
    flex: 1;
    min-width: 0;
}

.product-loyalty-switch-hint {
    display: block;
    margin-top: 2px;
}

.product-loyalty-expiry-section {
    margin-top: 14px;
}

.product-loyalty-expiry-section label {
    margin-top: 0;
}

/* Product modal: money fields on their own row with space above */
.product-modal-money-block {
    padding-top: 14px;
    margin-top: 4px;
}

/* Max-length hints under product description and gift name */
.product-field-max-hint {
    display: block;
    text-align: right;
    color: #dc3545;
    margin-top: 2px;
}

/* .product-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
} */

.product-table {
    padding-top: 20px;
    max-height: calc(100vh - 240px); /* Adjust based on header, title, padding, and add button */
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    scrollbar-color: #4169E1 #e0e0e0; /* Firefox: thumb and track */
    scrollbar-width: thin;
}

.product-table-inner {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 12px;
}

/* Webkit browsers (Chrome, Safari, Edge) - Horizontal scrollbar */
.product-table-inner::-webkit-scrollbar {
    height: 8px;
}

.product-table-inner::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 4px;
}

.product-table-inner::-webkit-scrollbar-thumb {
    background: #4169E1;
    border-radius: 4px;
}

.product-table-inner::-webkit-scrollbar-thumb:hover {
    background: #3151B8;
}

.product-table-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: #6c757d;
    font-size: 13px;
    font-weight: 500;
    width: 100%;
}

.table-record-count {
    background-color: #f1f5ff;
    color: #0d6efd;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 0.3px;
}

.product-bulk-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #dc3545;
    border-radius: 8px;
    background: #fff;
    color: #dc3545;
    cursor: pointer;
    line-height: 1;
}

.product-bulk-delete-btn:hover {
    background: #dc3545;
    color: #fff;
}

.product-bulk-delete-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.product-select-col {
    text-align: center;
    vertical-align: middle;
}

.product-row-select,
.product-select-all {
    cursor: pointer;
    margin: 0;
}

.product-table-content {
    min-width: 940px;
}

#productsTable {
    margin-bottom: 0;
    width: 100%;
    min-width: 940px;
    border-collapse: collapse;
    table-layout: fixed;
}

#productsTable thead {
    display: table;
    width: 100%;
    min-width: 940px;
    table-layout: fixed;
}

#productsTable thead tr {
    display: table-row;
}

#productsTable thead th {
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #dee2e6;
    display: table-cell;
}

/* Nine columns: Select, Code, Description, Product value, Points limit, Reward name, Reward value, Loyalty, Actions */
#productsTable thead th:nth-child(1) { width: 4%; }   /* Select */
#productsTable thead th:nth-child(2) { width: 9%; }   /* Product Code */
#productsTable thead th:nth-child(3) { width: 16%; } /* Product Description */
#productsTable thead th:nth-child(4) { width: 10%; } /* Product Value */
#productsTable thead th:nth-child(5) { width: 11%; } /* Points Limit */
#productsTable thead th:nth-child(6) { width: 15%; } /* Reward Name */
#productsTable thead th:nth-child(7) { width: 9%; }  /* Reward Value */
#productsTable thead th:nth-child(8) { width: 14%; } /* Loyalty Points */
#productsTable thead th:nth-child(9) { width: 12%; } /* Actions */

#productsTable tbody {
    display: block;
    overflow-y: auto;
    overflow-x: visible;
    -webkit-overflow-scrolling: touch;
    max-height: calc(100vh - 300px); /* Adjust based on header, title, padding, add button, and table header */
    width: 100%;
    scrollbar-color: #4169E1 #e0e0e0; /* Firefox: thumb and track */
    scrollbar-width: thin;
}

/* Webkit browsers (Chrome, Safari, Edge) - Vertical scrollbar */
#productsTable tbody::-webkit-scrollbar {
    width: 8px;
}

#productsTable tbody::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 4px;
}

#productsTable tbody::-webkit-scrollbar-thumb {
    background: #4169E1;
    border-radius: 4px;
}

#productsTable tbody::-webkit-scrollbar-thumb:hover {
    background: #3151B8;
}

#productsTable tbody tr {
    display: table;
    width: 100%;
    min-width: 940px;
    table-layout: fixed;
}

#productsTable tbody td {
    display: table-cell;
}

#productsTable tbody td:nth-child(1) { width: 4%; }
#productsTable tbody td:nth-child(2) { width: 9%; }
#productsTable tbody td:nth-child(3) { width: 16%; }
#productsTable tbody td:nth-child(4) { width: 10%; }
#productsTable tbody td:nth-child(5) { width: 11%; }
#productsTable tbody td:nth-child(6) { width: 15%; }
#productsTable tbody td:nth-child(7) { width: 9%; }
#productsTable tbody td:nth-child(8) { width: 14%; }
#productsTable tbody td:nth-child(9) { width: 12%; }

.product-loyalty-cell {
    line-height: 1.35;
    white-space: normal;
    overflow: visible;
    vertical-align: top;
}

#productsTable tbody td:nth-child(8),
#productsTable thead th:nth-child(8) {
    white-space: normal;
    overflow: visible;
}

.product-loyalty-switch-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.product-loyalty-switch-pill.is-on {
    background-color: #d1e7dd;
    color: #0f5132;
}

.product-loyalty-switch-pill.is-off {
    background-color: #e9ecef;
    color: #6c757d;
}

.product-loyalty-expiry {
    display: block;
    margin-top: 4px;
    font-size: 0.8125rem;
    color: #495057;
}

.product-loyalty-expiry.is-expired {
    color: #dc3545;
    font-weight: 600;
}

/* Points Limit column */
#productsTable tbody td:nth-child(5) {
    text-align: left;
    white-space: nowrap;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

#productsTable tbody td:nth-child(6) {
    padding-left: 0.35rem;
}

/* Points Limit header: one line, even horizontal padding */
#productsTable thead th:nth-child(5) {
    text-align: left;
    white-space: nowrap;
    padding-left: 1rem;
    padding-right: 1rem;
}

#productsTable thead th:nth-child(6) {
    padding-left: 0;
}

.action-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.product-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.product-action-btn i {
    font-size: 17px;
    line-height: 1;
}

.product-action-btn:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.product-action-btn--view {
    color: #198754;
    border-color: #198754;
}

.product-action-btn--view:hover {
    color: #fff;
    background: #198754;
    border-color: #198754;
}

.product-action-btn--edit {
    color: #0d6efd;
    border-color: #0d6efd;
}

.product-action-btn--edit:hover {
    color: #fff;
    background: #0d6efd;
    border-color: #0d6efd;
}

.product-action-btn--delete {
    color: #dc3545;
    border-color: #dc3545;
}

.product-action-btn--delete:hover {
    color: #fff;
    background: #dc3545;
    border-color: #dc3545;
}

.product-comments {
    padding-top: 20px;
}

.product-search-container {
    padding: 15px 0;
}

.product-search-input {
    max-width: 400px;
}
