/*
|--------------------------------------------------------------------------
| POSTECH.CLOUD V3.4 - Products + Sales Returns Polish
|--------------------------------------------------------------------------
| Scope:
| - Product list
| - Product quick view
| - Sell returns
| - Their filters, submenu, tables, DataTables toolbar
| Does NOT touch POS / printing / controllers / routes / DB.
*/

:root {
    --pc34-navy: #0d3155;
    --pc34-navy-deep: #082540;
    --pc34-blue: #1678e8;
    --pc34-blue-soft: #3a97ff;
    --pc34-gold: #f2ad19;
    --pc34-green: #20b77a;
    --pc34-green-soft: #eefbf6;
    --pc34-bg: #f5f8fc;
    --pc34-card: #ffffff;
    --pc34-text: #17324f;
    --pc34-muted: #6f8297;
    --pc34-border: #d9e5f1;
    --pc34-border-soft: #e7eef5;
    --pc34-shadow: 0 9px 26px rgba(13,49,85,.07);
}

/* =========================================================
   Shared products / sell returns canvas
   ========================================================= */
.postech-products-page,
.postech-sell-return-page {
    background: var(--pc34-bg) !important;
}

.postech-products-page-header,
.postech-sell-return-page-header {
    padding-bottom: 10px !important;
}

.postech-products-page-header h1,
.postech-sell-return-page-header h1 {
    color: var(--pc34-navy-deep) !important;
    font-weight: 950 !important;
}

.postech-products-page-header h1 small {
    margin-inline-start: 8px !important;
    color: var(--pc34-muted) !important;
    font-weight: 700 !important;
}

/* =========================================================
   Horizontal business submenu
   ========================================================= */
.postech-products-page .horizontal-scroll,
.postech-sell-return-page .horizontal-scroll {
    height: 54px !important;
    min-height: 54px !important;
    margin-bottom: 15px !important;
    padding: 6px 7px !important;
    background: #fff !important;
    border: 1px solid var(--pc34-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 5px 16px rgba(13,49,85,.05) !important;
    overflow: hidden !important;
}

.postech-products-page .horizontal-scroll .storys-container,
.postech-sell-return-page .horizontal-scroll .storys-container {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: 100% !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 0 !important;
    overflow-x: auto !important;
    scrollbar-width: thin !important;
    scrollbar-color: #b8c8d8 transparent !important;
}

.postech-products-page .horizontal-scroll .storys-container::-webkit-scrollbar,
.postech-sell-return-page .horizontal-scroll .storys-container::-webkit-scrollbar {
    height: 4px !important;
}

.postech-products-page .horizontal-scroll .sub-menu-item,
.postech-sell-return-page .horizontal-scroll .sub-menu-item {
    flex: 0 0 auto !important;
    min-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 8px 15px !important;
    color: #718499 !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    font-size: 11.5px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

.postech-products-page .horizontal-scroll .sub-menu-item:hover,
.postech-sell-return-page .horizontal-scroll .sub-menu-item:hover {
    color: var(--pc34-blue) !important;
    background: #eef6ff !important;
    border-color: #c8def4 !important;
}

.postech-products-page .horizontal-scroll .sub-menu-item.active,
.postech-sell-return-page .horizontal-scroll .sub-menu-item.active {
    color: #fff !important;
    background: linear-gradient(135deg, var(--pc34-blue-soft), var(--pc34-blue)) !important;
    border-color: var(--pc34-blue) !important;
    border-bottom: 1px solid var(--pc34-blue) !important;
    box-shadow: inset 0 -3px 0 var(--pc34-gold), 0 5px 12px rgba(22,120,232,.14) !important;
}

/* =========================================================
   Filter cards
   ========================================================= */
.postech-products-page > .row:first-of-type .box,
.postech-sell-return-page > .box,
.postech-sell-return-page > .row .box {
    background: #fff !important;
    border: 1px solid var(--pc34-border) !important;
    border-radius: 13px !important;
    box-shadow: 0 6px 19px rgba(13,49,85,.055) !important;
}

.postech-products-page .box-header,
.postech-sell-return-page .box-header {
    color: var(--pc34-navy) !important;
    background: #fbfdff !important;
    border-bottom-color: var(--pc34-border-soft) !important;
}

.postech-products-page .form-group label,
.postech-sell-return-page .form-group label {
    color: #36526e !important;
    font-size: 11.5px !important;
    font-weight: 800 !important;
}

.postech-products-page .form-control,
.postech-sell-return-page .form-control,
.postech-products-page .select2-selection,
.postech-sell-return-page .select2-selection {
    min-height: 37px !important;
    color: var(--pc34-text) !important;
    background: #fff !important;
    border-color: #ceddea !important;
    border-radius: 8px !important;
}

.postech-products-page .form-control:focus,
.postech-sell-return-page .form-control:focus {
    border-color: #72b4f3 !important;
    box-shadow: 0 0 0 3px rgba(22,120,232,.08) !important;
}

/* =========================================================
   Product main card / tabs
   ========================================================= */
.postech-products-card {
    background: #fff !important;
    border: 1px solid var(--pc34-border) !important;
    border-radius: 14px !important;
    box-shadow: var(--pc34-shadow) !important;
    overflow: hidden !important;
}

.postech-products-card > .nav-tabs {
    min-height: 53px !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    padding: 0 14px !important;
    background: #fff !important;
    border-bottom: 1px solid var(--pc34-border-soft) !important;
}

.postech-products-card > .nav-tabs > li {
    margin: 0 !important;
}

.postech-products-card > .nav-tabs > li > a {
    min-height: 46px !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 11px 14px !important;
    color: #6b7f93 !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 3px solid transparent !important;
    font-size: 12.5px !important;
    font-weight: 850 !important;
}

.postech-products-card > .nav-tabs > li.active > a {
    color: var(--pc34-navy-deep) !important;
    background: #f8fbff !important;
    border-bottom-color: var(--pc34-gold) !important;
}

.postech-products-card .tab-content {
    padding: 17px 15px 14px !important;
    background: #fff !important;
}

/* Product action buttons: Excel = gold accent, Add = blue */
.postech-products-page #product_list_tab > a[href*="download"],
.postech-products-page #product_list_tab > a[href*="excel"] {
    min-height: 40px !important;
    padding: 8px 14px !important;
    color: #fff !important;
    background: linear-gradient(135deg, #f7bd32, var(--pc34-gold)) !important;
    border: 1px solid #df9709 !important;
    border-radius: 9px !important;
    box-shadow: 0 6px 14px rgba(242,173,25,.17) !important;
    font-size: 12px !important;
    font-weight: 900 !important;
}

.postech-products-page #product_list_tab > a[href*="/products/create"] {
    min-height: 40px !important;
    padding: 8px 14px !important;
    color: #fff !important;
    background: linear-gradient(135deg, var(--pc34-blue-soft), var(--pc34-blue)) !important;
    border: 1px solid #0e69ce !important;
    border-radius: 9px !important;
    box-shadow: 0 6px 14px rgba(22,120,232,.16) !important;
    font-size: 12px !important;
    font-weight: 900 !important;
}

/* =========================================================
   DataTables common toolbar
   ========================================================= */
.postech-products-page .dataTables_wrapper,
.postech-sell-return-page .dataTables_wrapper {
    color: var(--pc34-text) !important;
}

.postech-products-page .dataTables_filter input,
.postech-sell-return-page .dataTables_filter input {
    width: 190px !important;
    height: 37px !important;
    padding: 6px 11px !important;
    color: var(--pc34-text) !important;
    background: #fff !important;
    border: 1px solid #ceddea !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.postech-products-page .dataTables_length select,
.postech-sell-return-page .dataTables_length select {
    height: 35px !important;
    min-width: 65px !important;
    color: var(--pc34-text) !important;
    background: #fff !important;
    border: 1px solid #ceddea !important;
    border-radius: 8px !important;
}

.postech-products-page .dt-buttons .btn,
.postech-products-page .dt-button,
.postech-sell-return-page .dt-buttons .btn,
.postech-sell-return-page .dt-button {
    width: 38px !important;
    min-width: 38px !important;
    height: 36px !important;
    min-height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 2px !important;
    padding: 0 !important;
    color: var(--pc34-navy) !important;
    background: #f6f9fc !important;
    border: 1px solid #d3e0ec !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.postech-products-page .dt-buttons .btn:hover,
.postech-sell-return-page .dt-buttons .btn:hover {
    color: var(--pc34-blue) !important;
    background: #edf6ff !important;
    border-color: #bcd8f4 !important;
}

/* =========================================================
   Product + return tables
   ========================================================= */
#product_table,
#sell_return_table {
    width: 100% !important;
    background: #fff !important;
    border: 1px solid var(--pc34-border) !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}

#product_table thead th,
#sell_return_table thead th {
    height: 45px !important;
    padding: 9px 10px !important;
    color: #3d5873 !important;
    background: #f1f6fb !important;
    border-top: 0 !important;
    border-bottom: 1px solid #d5e2ee !important;
    border-inline-end: 1px solid #e2eaf2 !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    font-weight: 900 !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

#product_table tbody td,
#sell_return_table tbody td {
    padding: 9px 10px !important;
    color: #24415e !important;
    background: #fff !important;
    border-top: 0 !important;
    border-bottom: 1px solid #e7eef5 !important;
    border-inline-end: 1px solid #edf2f6 !important;
    font-size: 11.5px !important;
    font-weight: 650 !important;
    vertical-align: middle !important;
}

#product_table tbody tr:nth-child(even) td,
#sell_return_table tbody tr:nth-child(even) td {
    background: #fbfdff !important;
}

#product_table tbody tr:hover td,
#sell_return_table tbody tr:hover td {
    background: #eef6ff !important;
}

#product_table img {
    max-width: 42px !important;
    max-height: 42px !important;
    object-fit: contain !important;
    border: 1px solid #e0e8f0 !important;
    border-radius: 7px !important;
    background: #fff !important;
}

#product_table tfoot td,
#sell_return_table tfoot td {
    color: #405a73 !important;
    background: #f8fbfd !important;
    border-color: #e0e9f2 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
}

#product_table .tw-dw-btn {
    min-height: 31px !important;
    border-radius: 7px !important;
    font-size: 10.5px !important;
}

/* Sell return widget */
.postech-sell-return-page > .box.box-primary {
    background: #fff !important;
    border: 1px solid var(--pc34-border) !important;
    border-radius: 14px !important;
    box-shadow: var(--pc34-shadow) !important;
    overflow: hidden !important;
}

.postech-sell-return-page > .box.box-primary > .box-header {
    min-height: 56px !important;
    padding: 13px 16px !important;
    background: #fff !important;
    border-bottom: 1px solid var(--pc34-border-soft) !important;
}

.postech-sell-return-page > .box.box-primary .box-title {
    color: var(--pc34-navy-deep) !important;
    font-weight: 950 !important;
}

/* Pagination */
.postech-products-page .pagination > li > a,
.postech-products-page .pagination > li > span,
.postech-sell-return-page .pagination > li > a,
.postech-sell-return-page .pagination > li > span {
    min-width: 33px !important;
    height: 33px !important;
    margin: 0 2px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--pc34-navy) !important;
    background: #fff !important;
    border: 1px solid #d5e1ed !important;
    border-radius: 7px !important;
}

.postech-products-page .pagination > .active > a,
.postech-products-page .pagination > .active > span,
.postech-sell-return-page .pagination > .active > a,
.postech-sell-return-page .pagination > .active > span {
    color: #fff !important;
    background: var(--pc34-blue) !important;
    border-color: var(--pc34-blue) !important;
}

/* =========================================================
   Product quick view modal
   ========================================================= */
.postech-product-view-modal {
    width: min(95vw, 1240px) !important;
    max-width: 1240px !important;
    margin: 22px auto !important;
}

.postech-product-view-modal .modal-content {
    background: #fff !important;
    border: 1px solid var(--pc34-border) !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 65px rgba(8,37,64,.19) !important;
    overflow: hidden !important;
}

.postech-product-view-modal .modal-header {
    min-height: 61px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 18px !important;
    background: #fff !important;
    border-bottom: 1px solid var(--pc34-border) !important;
}

.postech-product-view-modal .modal-title {
    color: var(--pc34-navy-deep) !important;
    font-size: 18px !important;
    font-weight: 950 !important;
}

.postech-product-view-modal .modal-header .close {
    width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--pc34-navy) !important;
    background: #f5f8fb !important;
    border: 1px solid #d7e3ee !important;
    border-radius: 8px !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.postech-product-view-body {
    padding: 16px 18px 12px !important;
    background: #fff !important;
}

.postech-product-summary-row {
    display: flex !important;
    align-items: stretch !important;
    gap: 17px !important;
    margin: 0 0 14px !important;
}

.postech-product-info {
    flex: 1 1 auto !important;
    width: auto !important;
    padding: 0 !important;
}

.postech-product-image-panel {
    flex: 0 0 30% !important;
    width: 30% !important;
    max-width: 330px !important;
    padding: 0 !important;
}

.postech-product-image-panel .thumbnail {
    height: 100% !important;
    min-height: 250px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 14px !important;
    background: #f8fafc !important;
    border: 1px solid var(--pc34-border) !important;
    border-radius: 12px !important;
}

.postech-product-image-panel .thumbnail img {
    max-width: 100% !important;
    max-height: 270px !important;
    object-fit: contain !important;
}

.postech-product-info {
    display: flex !important;
    flex-wrap: wrap !important;
    align-content: flex-start !important;
    gap: 10px !important;
}

.postech-product-info-card {
    flex: 1 1 calc(33.333% - 10px) !important;
    width: auto !important;
    min-width: 190px !important;
    padding: 12px 13px !important;
    color: #49627a !important;
    background: #f9fbfd !important;
    border: 1px solid #e0e8f0 !important;
    border-radius: 10px !important;
    font-size: 11.5px !important;
    line-height: 1.85 !important;
}

.postech-product-info-card b,
.postech-product-info-card strong {
    color: #1d3b58 !important;
    font-weight: 900 !important;
}

.postech-product-description {
    flex: 1 0 100% !important;
    width: 100% !important;
    padding: 11px 12px !important;
    color: #5c7186 !important;
    background: #fff !important;
    border: 1px dashed #d8e4ef !important;
    border-radius: 9px !important;
    font-size: 11.5px !important;
    line-height: 1.8 !important;
}

.postech-product-view-modal .table-responsive {
    margin-top: 10px !important;
    border: 1px solid var(--pc34-border) !important;
    border-radius: 10px !important;
    overflow-x: auto !important;
}

.postech-product-view-modal table.table {
    margin: 0 !important;
    background: #fff !important;
}

.postech-product-view-modal table.table tr.bg-green,
.postech-product-view-modal table.table .bg-green {
    color: #13885c !important;
    background: var(--pc34-green-soft) !important;
}

.postech-product-view-modal table.table tr.bg-green th {
    color: #14845a !important;
    background: var(--pc34-green-soft) !important;
    border-color: #ccefe0 !important;
    font-size: 10.5px !important;
    font-weight: 900 !important;
    vertical-align: middle !important;
}

.postech-product-view-modal table.table td {
    padding: 9px 10px !important;
    color: #294763 !important;
    background: #fff !important;
    border-color: #e4ebf2 !important;
    font-size: 11px !important;
    vertical-align: middle !important;
}

.postech-product-view-modal h4,
.postech-product-view-modal strong {
    color: var(--pc34-navy-deep) !important;
}

.postech-product-view-footer {
    min-height: 61px !important;
    padding: 11px 18px !important;
    background: #fbfdff !important;
    border-top: 1px solid var(--pc34-border) !important;
}

.postech-product-view-footer .tw-dw-btn-primary {
    min-height: 38px !important;
    padding: 7px 14px !important;
    color: #fff !important;
    background: linear-gradient(135deg, var(--pc34-blue-soft), var(--pc34-blue)) !important;
    border: 1px solid #0f6acf !important;
    border-radius: 8px !important;
}

.postech-product-view-footer .tw-dw-btn-neutral {
    min-height: 38px !important;
    padding: 7px 14px !important;
    color: var(--pc34-navy) !important;
    background: #fff !important;
    border: 1px solid #ccdbe8 !important;
    border-radius: 8px !important;
}

/* print-safe */
@media print {
    .postech-product-view-modal {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    .postech-product-view-modal .modal-content {
        border: 0 !important;
        box-shadow: none !important;
    }

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

/* responsive */
@media (max-width: 900px) {
    .postech-product-summary-row {
        display: block !important;
    }

    .postech-product-info,
    .postech-product-image-panel {
        width: 100% !important;
        max-width: none !important;
    }

    .postech-product-image-panel {
        margin-top: 12px !important;
    }

    .postech-product-info-card {
        flex-basis: calc(50% - 10px) !important;
    }
}

@media (max-width: 575px) {
    .postech-product-info-card {
        flex-basis: 100% !important;
    }

    .postech-products-page .dataTables_filter input,
    .postech-sell-return-page .dataTables_filter input {
        width: 145px !important;
    }
}
