.product-view-dialog {
    width: min(1240px, calc(100% - 30px));
    margin: 24px auto;
}

.product-view-modal {
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(14, 29, 55, 0.25);
}

.product-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 82px;
    padding: 16px 24px;
    border-bottom: 1px solid #e6ebf3;
    background: #fff;
}

.product-view-header::before,
.product-view-header::after {
    display: none;
    content: none;
}

.product-view-heading {
    display: flex;
    align-items: center;
    min-width: 0;
    margin-right: auto;
    gap: 14px;
    text-align: left;
}

.product-view-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 11px;
    background: #eaf9f1;
    color: #1aaa67;
    font-size: 20px;
}

.product-view-heading .modal-title {
    overflow: hidden;
    color: #172846;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-view-subtitle {
    display: block;
    margin-top: 3px;
    color: #7b879c;
    font-size: 11px;
    font-weight: 600;
}

.product-view-header .product-view-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    float: none;
    margin: 0 0 0 auto;
    flex: 0 0 36px;
    border-radius: 9px;
    background: #f3f5f8;
    color: #46546b;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    opacity: 1;
    text-shadow: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.product-view-header .product-view-close:hover,
.product-view-header .product-view-close:focus {
    background: #e9edf3;
    color: #172846;
    opacity: 1;
    outline: none;
}

.product-view-body {
    max-height: calc(100vh - 190px);
    padding: 18px 24px;
    overflow-y: auto;
    background: #f8fafc;
}

.product-view-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 16px;
}

.product-view-card {
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid #e2e8f1;
    border-radius: 11px;
    box-shadow: 0 3px 12px rgba(30, 50, 80, 0.03);
}

.product-view-information {
    padding: 18px;
}

.product-view-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-view-info-section {
    min-width: 0;
    padding: 0 18px;
    border-right: 1px solid #e5eaf2;
}

.product-view-info-section:first-child {
    padding-left: 0;
}

.product-view-info-section:last-child {
    padding-right: 0;
    border-right: 0;
}

.product-view-info-section h4,
.product-view-description h4,
.product-view-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: #1e304f;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.product-view-info-section h4 i,
.product-view-description h4 i,
.product-view-section-title i {
    color: #1769e8;
    font-size: 13px;
}

.product-view-info-section:nth-child(2) h4 i {
    color: #13aa67;
}

.product-view-info-section:nth-child(3) h4 i {
    color: #7559f5;
}

.product-view-fields {
    margin: 0;
}

.product-view-fields > div {
    display: grid;
    grid-template-columns: minmax(105px, 0.9fr) minmax(0, 1.1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.product-view-fields > div:last-child {
    margin-bottom: 0;
}

.product-view-fields dt,
.product-view-fields dd {
    margin: 0;
    line-height: 1.45;
}

.product-view-fields dt {
    color: #31415d;
    font-size: 10.5px;
    font-weight: 700;
}

.product-view-fields dd {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #4c5d79;
    font-size: 10.5px;
    font-weight: 500;
}

.product-view-fields > .product-view-field-wide {
    display: block;
    margin-top: 13px;
}

.product-view-field-wide dt {
    margin-bottom: 4px;
}

.product-view-status {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
}

.product-view-status.is-enabled {
    background: #def6e9;
    color: #168552;
}

.product-view-status.is-disabled {
    background: #f0f2f6;
    color: #718096;
}

.product-view-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 5px 8px;
    border-radius: 6px;
    background: #eaf4ff;
    color: #1769e8;
    font-size: 10px;
    font-weight: 600;
}

.product-view-download:hover,
.product-view-download:focus {
    color: #0e53b9;
    text-decoration: none;
}

.product-view-description {
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid #e5eaf2;
    color: #52617a;
    font-size: 11px;
    line-height: 1.6;
}

.product-view-description h4 {
    margin-bottom: 8px;
}

.product-view-description p:last-child {
    margin-bottom: 0;
}

.product-view-image-card {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    min-height: 260px;
    padding: 14px;
}

.product-view-image-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 220px;
    padding: 12px;
    overflow: hidden;
    border: 1px dashed #cfdaea;
    border-radius: 9px;
    background: linear-gradient(145deg, #f8fbff, #f1f5fb);
}

.product-view-image-frame img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 205px;
    object-fit: contain;
}

.product-view-image-card > span {
    margin-top: 9px;
    color: #7b879b;
    font-size: 10px;
    font-weight: 600;
}

.product-view-section {
    padding: 14px;
}

.product-view-section-title {
    margin-bottom: 10px;
    font-size: 12px;
}

.product-view-section > .row {
    margin: 0;
}

.product-view-section > .row > [class*='col-'] {
    padding-right: 0;
    padding-left: 0;
}

.product-view-section > .row > .col-md-12 > h4 {
    margin: 2px 0 10px;
    color: #4b5c77;
    font-size: 11px;
    font-weight: 700;
}

.product-view-section br:first-child,
.product-view-section > br:first-child {
    display: none;
}

.product-view-modal .table-responsive {
    margin: 0;
    overflow-x: auto;
    border: 0;
    border-radius: 8px;
}

.product-view-modal table.table {
    width: 100%;
    margin: 0;
    border: 1px solid #dde5ef;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    background: #fff !important;
}

.product-view-modal table.table th,
.product-view-modal table.table td {
    padding: 9px 10px !important;
    border: 0 !important;
    border-right: 1px solid #e2e8f0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #33445f;
    font-size: 10px;
    line-height: 1.4;
    vertical-align: middle;
}

.product-view-modal table.table th:last-child,
.product-view-modal table.table td:last-child {
    border-right: 0 !important;
}

.product-view-modal table.table tr:last-child > td,
.product-view-modal table.table tfoot tr:last-child > td {
    border-bottom: 0 !important;
}

.product-view-modal table.table thead th,
.product-view-modal table.table tr.bg-green > th {
    background: #effaf5 !important;
    color: #18734a !important;
    font-weight: 700;
    text-align: left;
}

.product-view-modal table.table tbody tr:nth-child(even) td {
    background: #fbfcfe;
}

.product-view-modal table.table tbody tr:hover td {
    background: #f4f8ff;
}

.product-view-modal table.table tfoot td {
    background: #f3f6fa !important;
    color: #30415d;
    font-weight: 700;
}

.product-view-modal table.table .img-thumbnail {
    border-color: #dce4ef;
    border-radius: 6px;
}

.product-view-stock #view_product_stock_details:empty {
    min-height: 42px;
    border-radius: 7px;
    background: linear-gradient(90deg, #f3f6fa 25%, #f8fafc 50%, #f3f6fa 75%);
    background-size: 200% 100%;
    animation: product-view-loading 1.4s infinite;
}

@keyframes product-view-loading {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.product-view-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 24px;
    border-top: 1px solid #e4e9f1;
    background: #fff;
}

.product-view-footer .btn {
    min-width: 92px;
    margin: 0 !important;
    padding: 8px 16px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
}

.product-view-print {
    border-color: #1769e8;
    background: #1769e8;
    color: #fff;
    box-shadow: 0 5px 14px rgba(23, 105, 232, 0.2);
}

.product-view-print:hover,
.product-view-print:focus {
    border-color: #0f5ccd;
    background: #0f5ccd;
    color: #fff;
}

.product-view-dismiss {
    border: 1px solid #d8e0eb;
    background: #fff;
    color: #45546d;
}

.product-view-dismiss:hover,
.product-view-dismiss:focus {
    border-color: #c5cfdd;
    background: #f7f9fc;
    color: #243652;
}

@media (max-width: 991px) {
    .product-view-overview {
        grid-template-columns: 1fr;
    }

    .product-view-image-card {
        min-height: 220px;
    }

    .product-view-image-frame {
        min-height: 180px;
    }
}

@media (max-width: 767px) {
    .product-view-dialog {
        width: calc(100% - 16px);
        margin: 8px auto;
    }

    .product-view-header {
        min-height: 70px;
        padding: 12px 14px;
    }

    .product-view-heading .modal-title {
        font-size: 17px;
    }

    .product-view-body {
        max-height: calc(100vh - 145px);
        padding: 12px;
    }

    .product-view-info-grid {
        grid-template-columns: 1fr;
    }

    .product-view-info-section,
    .product-view-info-section:first-child,
    .product-view-info-section:last-child {
        padding: 14px 0;
        border-right: 0;
        border-bottom: 1px solid #e5eaf2;
    }

    .product-view-info-section:first-child {
        padding-top: 0;
    }

    .product-view-info-section:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .product-view-footer {
        padding: 10px 12px;
    }
}

@media print {
    @page {
        size: auto;
        margin: 7mm;
    }

    html,
    body {
        font-size: 8px !important;
    }

    .product-view-dialog {
        width: 100%;
        margin: 0;
    }

    .product-view-modal {
        overflow: visible;
        border-radius: 0;
        box-shadow: none;
    }

    .product-view-header {
        min-height: 0;
        padding: 4px 0 7px;
    }

    .product-view-title-icon {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
        border-radius: 5px;
        font-size: 13px;
    }

    .product-view-heading {
        gap: 7px;
    }

    .product-view-heading .modal-title {
        font-size: 15px;
    }

    .product-view-subtitle {
        margin-top: 1px;
        font-size: 7px;
    }

    .product-view-body {
        max-height: none;
        padding: 7px 0 0;
        overflow: visible;
        background: #fff;
    }

    .product-view-overview {
        grid-template-columns: minmax(0, 1fr) 150px;
        gap: 7px;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .product-view-card {
        margin-bottom: 7px;
        border-color: #cfd6df;
        border-radius: 5px;
        box-shadow: none;
    }

    .product-view-information,
    .product-view-section {
        padding: 7px;
    }

    .product-view-info-section {
        padding: 0 8px;
    }

    .product-view-info-section h4,
    .product-view-description h4,
    .product-view-section-title {
        gap: 4px;
        margin-bottom: 5px;
        font-size: 8px;
    }

    .product-view-info-section h4 i,
    .product-view-description h4 i,
    .product-view-section-title i {
        font-size: 8px;
    }

    .product-view-fields > div {
        grid-template-columns: minmax(72px, 0.9fr) minmax(0, 1.1fr);
        gap: 5px;
        margin-bottom: 3px;
    }

    .product-view-fields dt,
    .product-view-fields dd {
        font-size: 7px;
        line-height: 1.25;
    }

    .product-view-fields > .product-view-field-wide {
        margin-top: 4px;
    }

    .product-view-field-wide dt {
        margin-bottom: 2px;
    }

    .product-view-status,
    .product-view-download {
        padding: 1px 4px;
        font-size: 7px;
    }

    .product-view-description {
        margin-top: 6px;
        padding-top: 5px;
        font-size: 7px;
        line-height: 1.3;
    }

    .product-view-image-card {
        min-height: 120px;
        padding: 6px;
    }

    .product-view-image-frame {
        min-height: 105px;
        padding: 5px;
        border-radius: 4px;
    }

    .product-view-image-frame img {
        max-height: 100px;
    }

    .product-view-image-card > span {
        margin-top: 3px;
        font-size: 7px;
    }

    .product-view-section > .row > .col-md-12 > h4 {
        margin: 1px 0 4px;
        font-size: 7px;
    }

    .product-view-modal table.table th,
    .product-view-modal table.table td {
        padding: 3px 4px !important;
        font-size: 6.5px;
        line-height: 1.2;
    }

    .product-view-modal table.table,
    .product-view-modal .table-responsive {
        border-radius: 3px;
    }

    .product-view-modal table.table thead {
        display: table-header-group;
    }

    .product-view-modal table.table tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .product-view-footer {
        display: none !important;
    }
}
