/* ==========================================================================
   Product Variants — Front-office
   ========================================================================== */

.product-variants-linked {
    margin: 15px 0 20px;
    padding: 0;
}

.pv-group-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #333;
}

.pv-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
}

.pv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 280px;
}

.pv-table thead th {
    background: #f8f8f8;
    border-bottom: 2px solid #e0e0e0;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #555;
    white-space: nowrap;
}

.pv-table tbody tr {
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.15s;
}

.pv-table tbody tr:last-child {
    border-bottom: none;
}

.pv-table tbody tr:hover {
    background-color: #fafafa;
}

.pv-row--active {
    background-color: #f5f5f5;
}

.pv-table td {
    padding: 10px 12px;
    vertical-align: middle;
}

.pv-col-radio {
    width: 40px;
    text-align: center;
}

.pv-col-price {
    text-align: right;
    white-space: nowrap;
}

.pv-product-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pv-product-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Radio styling */
.pv-table input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #333;
}

/* ==========================================================================
   Product Variants — Back-office
   ========================================================================== */

.pv-admin-panel {
    padding: 15px;
}

.pv-admin-panel .pv-field {
    margin-bottom: 15px;
}

.pv-admin-panel .pv-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.pv-admin-panel .pv-field input[type="text"] {
    width: 100%;
    max-width: 400px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
}

.pv-search-wrapper {
    position: relative;
    max-width: 400px;
}

.pv-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 3px 3px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pv-search-results.active {
    display: block;
}

.pv-search-result-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    gap: 10px;
}

.pv-search-result-item:hover {
    background: #f0f0f0;
}

.pv-search-result-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 3px;
}

.pv-search-result-item .pv-result-info {
    flex: 1;
}

.pv-search-result-item .pv-result-name {
    font-weight: 600;
    font-size: 13px;
}

.pv-search-result-item .pv-result-ref {
    font-size: 12px;
    color: #888;
}

.pv-linked-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    max-width: 500px;
}

.pv-linked-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    margin-bottom: 5px;
    gap: 10px;
}

.pv-linked-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 3px;
}

.pv-linked-item .pv-linked-info {
    flex: 1;
}

.pv-linked-item .pv-linked-name {
    font-weight: 600;
    font-size: 13px;
}

.pv-linked-item .pv-linked-ref {
    font-size: 12px;
    color: #888;
}

.pv-linked-item .pv-remove-btn {
    background: none;
    border: none;
    color: #d9534f;
    font-size: 18px;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

.pv-linked-item .pv-remove-btn:hover {
    color: #c9302c;
}

/* Responsive mobile */
@media (max-width: 767px) {
    .pv-table {
        font-size: 13px;
        min-width: 280px;
    }

    .pv-table thead th,
    .pv-table td {
        padding: 8px;
    }

    .pv-product-thumb {
        width: 30px;
        height: 30px;
    }

}
