/* Basic styles for the product table and modal */
.d9-product-table-wrap {
    font-family: Arial, sans-serif;
    margin: 12px;
}

.d9-product-table table {
    border-collapse: collapse;
    width: 100%;
}

.d9-product-table th, .d9-product-table td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: middle;
    text-align: left;
}

.d9-product-table th {
    background: #f6f6f6;
}

.d9-zoomable {
    cursor: zoom-in;
    max-width: 120px;
    height: auto;
    object-fit: contain;
    transition: transform 0.15s ease, box-shadow 0.12s ease;
}

/* Floating preview used on hover (appended to body) */
.d9-hover-preview {
    position: fixed;
    pointer-events: none;
    width: 320px;
    max-width: 40vw;
    height: auto;
    box-shadow: 0 12px 28px rgba(0,0,0,0.35);
    border-radius: 6px;
    z-index: 999999;
    background: #fff;
}

/* Price header note display */
.price-header small {
    font-size: 11px;
    color: #666;
    display: block;
}

/* Buttons */
.d9-btn {
    padding: 8px 12px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
}

.d9-btn.primary {
    background: #2b7cff;
    color: #fff;
    border-color: #1a6be8;
}

/* Pagination */
.d9-pagination {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.d9-page-btn, .d9-page-number {
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    display: inline-block;
}
.d9-page-btn.disabled {
    opacity: 0.45;
    cursor: default;
}
.d9-page-number.current {
    background: #2b7cff;
    color: #fff;
    border-color: #1a6be8;
}

/* Modal */
.d9-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.d9-modal-content {
    background: #fff;
    padding: 18px;
    border-radius: 6px;
    width: 320px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}

.d9-modal-content h3 {
    margin-top: 0;
}

.d9-modal-content input[type="text"] {
    width: 100%;
    padding: 8px;
    margin: 8px 0 12px 0;
    box-sizing: border-box;
}

/* PDF styles (improve appearance in PDF) */
.d9-pdf-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    table-layout: auto;
}

.d9-pdf-table th, .d9-pdf-table td {
    border: 1px solid #bbb;
    padding: 6px;
    text-align: left;
}

.d9-pdf-brand {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 12px;
    text-align: center; /* Center brand name in PDF */
}

/* Ensures images fit within PDF cell */
.d9-pdf-table img {
    max-width: 180px;
    height: auto;
    object-fit: contain;
}