/* assets/css/style.css */
:root {
    --primary-blue: #004d99;
    --secondary-blue: #003366;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --content-max-width: 1200px;
}

body {
    background-color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
}

#seasonal-effects {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.seasonal-particle {
    position: absolute;
    top: -2rem;
    display: block;
    user-select: none;
    animation-name: seasonal-fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.seasonal-winter {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-shadow: 0 0 3px rgba(0, 77, 153, 0.35);
}

.seasonal-autumn {
    color: rgba(181, 91, 34, 0.48);
    font-size: 1rem;
}

@keyframes seasonal-fall {
    0% {
        transform: translate3d(0, -2rem, 0) rotate(0deg);
        opacity: 0;
    }
    12% {
        opacity: 0.7;
    }
    88% {
        opacity: 0.7;
    }
    100% {
        transform: translate3d(var(--drift), 105vh, 0) rotate(var(--rotation));
        opacity: 0;
    }
}

main{
    max-width: var(--content-max-width);
}

.bg-primary-dark {
    background-color: var(--primary-blue) !important;
}

.bg-secondary-dark {
    background-color: var(--secondary-blue) !important;
}

.text-primary-dark {
    color: var(--primary-blue) !important;
}

/* Header */
.main-header {
    border-bottom: 2px solid #fff;
    background-color: var(--site-header-background, var(--primary-blue)) !important;
    color: var(--site-header-text, var(--light-bg));
}

.main-header .contact-info,
.main-header .contact-info a {
    color: var(--site-header-text, var(--light-bg)) !important;
}

.closure-notice {
    position: relative;
    z-index: 2;
    padding-top: 0.65rem;
}

.closure-notice-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.6rem 1rem;
    border: 1px solid rgba(181, 91, 34, 0.35);
    border-left: 4px solid #b55b22;
    border-radius: 0.25rem;
    background-color: #fff8f1;
    color: #70401f;
    font-size: 0.92rem;
}

.closure-notice-inline {
    padding: 0.65rem 0.75rem;
    border-left: 3px solid #b55b22;
    background-color: #fff8f1;
    color: #70401f;
    font-size: 0.9rem;
}

.navbar{
    .container-fluid{
        max-width: var(--content-max-width);
    }
}


.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: bold;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.global-search-trigger {
    white-space: nowrap;
}

.global-search-group-title {
    margin: 1.25rem 0 0.5rem;
    color: var(--secondary-blue);
    font-size: 0.9rem;
    font-weight: 700;
}

.global-search-target {
    scroll-margin-top: 1rem;
}

.global-search-target:target {
    animation: global-search-highlight 4.5s ease-out;
}

.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1030;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 180ms ease;
}

.back-to-top[hidden] {
    display: none;
}

@keyframes global-search-highlight {
    0%, 35% {
        outline: 3px solid #003366;
        outline-offset: 2px;
        background-color: #d8e6f2;
    }
    100% {
        outline-color: transparent;
        background-color: transparent;
    }
}

/* Sidebar */
.sidebar-menu {
    border: 1px solid var(--secondary-blue);
}

.sidebar-nav .nav-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.4rem 1rem;
    font-size: 0.95rem;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

.nav-link{
    font-size: smaller;
}

/* Mobile Sidebar inside Offcanvas */
.sidebar-nav-mobile .nav-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
}

.sidebar-nav-mobile .nav-link:hover,
.sidebar-nav-mobile .nav-link.active,
.offcanvas-body .navbar-nav .nav-link:hover,
.offcanvas-body .navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Promoções Sidebar */
.promo-card {
    transition: transform 0.2s;
}

.promo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
}

/* Products Lists */

.subfamily-title{
    background-color: none!important;
    color: #003366 !important;
    font-weight: 700;
}
.border-bottom-dashed {
    border-bottom: 1px dashed #ccc;
}

.list-group-item {
    background-color: transparent;
    border: none;
    border-bottom: solid 1px #ddd!important;
}

.list-group-item:hover {
    background-color: #bad7f38c ;
    border: none;
    cursor:pointer;
}

.product-name{
    font-weight: bold;
    font-size: larger;
    margin-bottom: 0px;
    color: #003366;
}

.whitespace-nowrap {
    white-space: nowrap;
}

/* Utilities */
.max-h-100 {
    max-height: 100%;
}

.computer-name {
    text-align: right;
}

/* Layout da Lista de Computadores */
.pc-image {
    max-height: 220px;
    object-fit: contain;
}

.pc-title {
    color: #000;
    font-size: 1.25rem;
    font-weight: bolder;
}

.pc-specs {
    font-size: 0.95rem;
    color: #575757  !important;
    line-height: 1.4;
}

.pc-price {
    color: #004d99 !important;
}

.pc-obs {
    color: #666;
    font-size: 0.85rem;
}

.product-image-wrap {
    position: relative;
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
    margin-right: 1rem;
    z-index: 1;
}

.product-item:hover {
    z-index: 2;
}

.product-thumbnail {
    display: block;
    max-width: 100px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: pointer;
}

.product-image-zoom {
    cursor: pointer;
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(300px, calc(100vw - 32px));
    height: min(300px, calc(100vw - 32px));
    padding: 8px;
    background: #fff;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.96);
    transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}

.product-image-zoom img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-image-wrap:hover .product-image-zoom {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 767.98px) {
    .product-image-wrap {
        display: none;
    }
}

/* Altera a cor do ícone dos botões do Carousel (Anterior e Próximo) */
.carousel-control-next-icon,
.carousel-control-prev-icon {
    /* Aplica a cor azul transparente (#0033668c) usando máscara SVG */
    background-image: none !important;
    background-color: #0033668c !important;
    -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

/* Espelhamento para o botão de voltar (Anterior) */
.carousel-control-prev-icon {
    transform: rotate(180deg);
}

.carousel-control:hover{
    background-color: #dfe5ec8c !important;
}

/* Botão Flutuante de Impressão (Ancorado no canto da main-content) */
.btn-print-float,
.btn-search-float {
    position: absolute;
    top: 5px;
    right: 15px;
    z-index: 20;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #87afd7c4;
    border: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-search-float {
    right: 58px;
}

.btn-print-float:hover,
.btn-search-float:hover {
    background-color: var(--secondary-blue, #003366);
    transform: scale(1.1);
}

.btn-dark-blue{
    border-color: #013765!important;
    color:#013765!important;
}

.btn-dark-blue:hover{
    background-color: #013765!important;
    color:#c7d2dd!important;
}

/* Efeito Hover nos Cards de Download */
.card-download-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-download-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Regras Estáveis de Impressão */
@media print {
    @page {
        margin: 10mm 12mm 10mm 12mm; /* Margens de papel seguras */
        size: A4 portrait;
    }

    /* Esconde elementos normais do site */
    header, 
    footer, 
    aside, 
    .offcanvas, 
    .d-print-none {
        display: none !important;
    }

    /* Torna o cabeçalho de impressão visível */
    .print-header {
        display: block !important;
        width: 100% !important;
    }

    /* Força o container e todas as colunas a usarem 100% da largura do papel sem ultrapassar */
    html, body, main, .container-fluid, .row, .col-12, .col-lg-7, .main-content, .printable-area {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Evita quebras de linha estranhas em palavras longas */
    .print-header p, .print-header td {
        word-break: normal !important;
        white-space: normal !important;
    }

    /* Reduz o tamanho geral da fonte na impressão */
    body {
        font-size: 11px !important;
        line-height: 1.2 !important;
        color: #000 !important;
    }

    /* Reduz o tamanho dos títulos das famílias e subfamílias */
    .family-title {
        font-size: 13px !important;
        padding: 4px 8px !important;
        margin-bottom: 8px !important;
        background-color: #004d99 !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .subfamily-title {
        font-size: 11px !important;
        padding: 2px 0 !important;
        margin-bottom: 6px !important;
    }

    /* Ajusta a lista de produtos (descrição e preço) */
    .product-desc {
        font-size: 10px !important;
    }

    .product-name {
        font-size: 10.5px !important;
    }

    .product-price {
        font-size: 11px !important;
    }

    /* Reduz o espaçamento entre linhas de produtos para caber mais na folha */
    .list-group-item {
        padding-top: 2px !important;
        padding-bottom: 2px !important;
    }

    .subfamily-section {
        margin-bottom: 10px !important;
    }

    .family-section {
        margin-bottom: 15px !important;
    }

    /* Garante que as linhas do Bootstrap usam Flexbox horizontal */
    .pc-card .row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }

    /* Coluna da Imagem (fixa em ~30% à esquerda) */
    .pc-card .col-12.col-md-4 {
        width: 30% !important;
        max-width: 30% !important;
        flex: 0 0 30% !important;
        text-align: left !important;
        margin-bottom: 0 !important;
    }

    /* Coluna do Texto (fixa em ~70% à direita e alinhada à direita) */
    .pc-card .col-12.col-md-8 {
        width: 70% !important;
        max-width: 70% !important;
        flex: 0 0 70% !important;
        text-align: right !important;
        padding-right: 10px !important;
    }

    /* Reduz proporcionalmente a imagem para caber perfeitamente na folha */
    .pc-image {
        max-height: 140px !important;
        width: auto !important;
    }

    /* Garante alinhamento à direita dos dados técnicos e preços */
    .pc-title, 
    .pc-specs, 
    .pc-price-wrapper, 
    .pc-obs {
        text-align: right !important;
    }
}

.not-found-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, #f7faff 0%, #eaf2fa 100%);
}

.not-found-header {
    display: flex;
    align-items: center;
    min-height: 88px;
    padding: 0.75rem max(1.25rem, calc((100vw - 1200px) / 2));
    background-color: var(--primary-blue);
    border-bottom: 3px solid var(--secondary-blue);
}

.not-found-header img {
    display: block;
    width: min(220px, 65vw);
    max-height: 64px;
}

.not-found-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.25rem 5rem;
    text-align: center;
}

.not-found-icon {
    display: grid;
    place-items: center;
    width: 72px;
    aspect-ratio: 1;
    margin-bottom: 1rem;
    border: 1px solid #c6d9ec;
    border-radius: 50%;
    background: #fff;
    color: var(--primary-blue);
    font-size: 2rem;
}

.not-found-code {
    margin: 0;
    color: var(--primary-blue);
    font-size: 6.5rem;
    font-weight: 800;
    line-height: 1;
}

.not-found-content h1 {
    margin: 0.75rem 0 0;
    color: var(--secondary-blue);
    font-size: 2.25rem;
    font-weight: 700;
}

.not-found-message {
    max-width: 34rem;
    margin: 0.75rem 0 1.5rem;
    color: #4b5968;
    font-size: 1.05rem;
}

.not-found-home {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1.1rem;
    border-radius: 0.25rem;
    background: var(--primary-blue);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 150ms ease;
}

.not-found-home:hover {
    background: var(--secondary-blue);
    color: #fff;
}

@media (max-width: 575.98px) {
    .not-found-header {
        min-height: 72px;
    }

    .not-found-content {
        padding-bottom: 3rem;
    }

    .not-found-code {
        font-size: 4rem;
    }

    .not-found-content h1 {
        font-size: 1.5rem;
    }
}

.config-products-page {
    min-height: 100vh;
    background: #f4f7fa;
    color: #263746;
}

.config-products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    padding: 0.75rem max(1.25rem, calc((100vw - 1440px) / 2));
    border-bottom: 3px solid var(--secondary-blue);
    background: var(--primary-blue);
}

.config-products-header img {
    display: block;
    width: 190px;
    max-width: 58vw;
    max-height: 54px;
}

.config-products-header-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 600;
}

.config-products-session {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    font-size: 0.85rem;
}

.config-products-session form {
    margin: 0;
}

.config-products-main {
    /* width: min(100% - 2rem, 1440px);
    margin: 2rem auto 4rem; */
    max-width: 100vw !important;
    margin: 20px;
}

.config-products-login-main {
    width: min(100% - 2rem, 430px);
    margin: 8vh auto 4rem;
    padding: 2rem;
    border-top: 4px solid var(--primary-blue);
    background: #fff;
    box-shadow: 0 8px 28px rgba(25, 53, 78, 0.1);
}

.config-products-login-main h1 {
    margin: 0;
    color: var(--secondary-blue);
    font-size: 1.65rem;
    font-weight: 700;
}

.config-products-login-main .config-products-eyebrow {
    margin-bottom: 0.4rem;
}

.config-products-login-main .config-products-intro {
    margin: 0.45rem 0 1.25rem;
}

.config-products-login-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: #eaf2fa;
    color: var(--primary-blue);
    font-size: 1.35rem;
}

.config-products-login-form .form-label {
    margin-bottom: 0.35rem;
    color: var(--secondary-blue);
    font-weight: 600;
}

.config-products-login-form .form-control {
    min-height: 42px;
}

.config-products-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #d6e0e8;
}

.config-products-eyebrow {
    margin: 0 0 0.35rem;
    color: #54708a;
    font-size: 0.75rem;
    font-weight: 700;
}

.config-products-titlebar h1 {
    margin: 0;
    color: var(--secondary-blue);
    font-size: 1.8rem;
    font-weight: 700;
}

.config-products-intro {
    margin: 0.4rem 0 0;
    color: #607080;
}

.config-products-home {
    display: grid;
    flex: 0 0 40px;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid #cbd8e3;
    border-radius: 4px;
    color: var(--primary-blue);
    font-size: 1.15rem;
    text-decoration: none;
}

.config-products-home:hover {
    background: #e7eff7;
    color: var(--secondary-blue);
}

.config-products-tabs {
    margin-bottom: 1rem;
    border-bottom-color: #cbd8e3;
}

.config-products-tabs .nav-link {
    color: var(--secondary-blue);
    font-weight: 600;
}

.config-products-tabs .nav-link.active {
    color: var(--primary-blue);
}

.config-products-tab-content {
    padding-top: 0.5rem;
}

.config-site-banner-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 96px;
    padding: 0.75rem;
    border: 1px solid #d6e0e8;
    border-radius: 0.35rem;
    background: #f8fafc;
}

.config-site-banner-preview img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.config-menu-form h2 {
    margin: 0 0 0.75rem;
    color: var(--secondary-blue);
    font-size: 1.1rem;
    font-weight: 700;
}

.config-menu-current {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #d6e0e8;
    border-radius: 0.35rem;
    background: #fff;
}

.config-menu-table {
    margin-bottom: 0;
    min-width: 1080px;
}

.config-tables-table {
    min-width: 960px;
}

.config-tables-table td:nth-child(2) {
    min-width: 190px;
}

.config-audit-table-wrap {
    width: 100%;
    overflow-x: hidden;
}

.config-audit-table {
    width: 100%;
    table-layout: fixed;
    font-size: 0.85rem;
}

.config-audit-table th,
.config-audit-table td {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.config-audit-column-datetime {
    width: 15%;
}

.config-audit-column-username {
    width: 10%;
}

.config-audit-column-event {
    width: 13%;
}

.config-audit-column-ip {
    width: 12%;
}

.config-audit-column-tab {
    width: 9%;
}

.config-audit-column-file {
    width: 15%;
}

.config-audit-column-details {
    width: 26%;
}

.config-search-dashboard-frame {
    display: block;
    width: 100%;
    min-height: 80vh;
    border: 0;
    background: #f3f6fb;
}

.config-tables-table td:nth-child(3) {
    min-width: 320px;
}

.config-tables-table td:nth-child(4) {
    min-width: 270px;
}

.config-menu-table th {
    color: var(--secondary-blue);
    font-size: 0.82rem;
    white-space: nowrap;
}

.config-menu-table td:first-child {
    width: 190px;
}

.config-menu-table td:nth-child(2) {
    width: 115px;
}

.config-menu-table td:nth-child(3) {
    width: 145px;
}

.config-menu-table td:nth-child(4),
.config-menu-table td:nth-child(5) {
    min-width: 180px;
}

.config-menu-table td:nth-child(6),
.config-menu-table td:nth-child(7) {
    width: 100px;
    text-align: center;
}

.config-menu-order {
    white-space: nowrap;
}

.config-menu-order button {
    padding: 0.2rem 0.35rem;
    color: var(--secondary-blue);
}

.config-menu-order button:disabled {
    opacity: 0.35;
}

.config-menu-row-number {
    display: inline-block;
    min-width: 2.4rem;
    color: #607080;
    font-weight: 700;
}

.config-menu-drag-row {
    cursor: grab;
}

.config-menu-row-even > td {
    background-color: #f5f8fb;
}

.config-menu-row-drop-before > td {
    box-shadow: inset 0 3px 0 var(--primary-blue);
}

.config-menu-row-drop-after > td {
    box-shadow: inset 0 -3px 0 var(--primary-blue);
}

.config-menu-add-row-cell {
    padding: 0 !important;
}

.config-menu-add-row {
    width: 100%;
}

.config-tables-file {
    margin-bottom: 0.25rem;
}

.config-tables-current-file {
    display: block;
    margin-bottom: 0.35rem;
    color: #596b7a;
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

.config-menu-csv-name {
    background-color: #f1f4f7;
    color: #596b7a;
    font-family: var(--bs-font-monospace);
}

.config-products-select {
    display: flex;
    align-items: end;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.config-products-select .form-label {
    flex: 0 0 auto;
    margin: 0 0 0.55rem;
    color: var(--secondary-blue);
    font-weight: 700;
}

.config-products-select-controls {
    display: flex;
    flex: 1;
    gap: 0.5rem;
    max-width: 620px;
}

.config-products-button-primary,
.config-products-button-secondary {
    min-height: 38px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.config-products-button-primary {
    background: var(--primary-blue);
    color: #fff;
}

.config-products-button-primary:hover {
    background: var(--secondary-blue);
    color: #fff;
}

.config-products-button-secondary {
    border: 1px solid #b9c9d7;
    background: #fff;
    color: var(--secondary-blue);
}

.config-products-button-secondary:hover {
    border-color: var(--primary-blue);
    background: #eaf2fa;
    color: var(--secondary-blue);
}

.config-products-editor-toolbar,
.config-products-actions,
.config-products-file-label {
    display: flex;
    align-items: center;
}

.config-products-editor-toolbar {
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid #d6e0e8;
    border-bottom: 1px solid #d6e0e8;
}

.config-products-file-label {
    gap: 0.55rem;
    color: var(--secondary-blue);
    font-weight: 700;
}

.config-products-file-label > i {
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.config-products-file-label small {
    color: #657687;
    font-size: 0.8rem;
    font-weight: 400;
}

.config-products-actions {
    gap: 0.5rem;
}

.config-products-table-wrap {
    max-width: 100%;
    overflow: auto;
    border-bottom: 1px solid #d6e0e8;
    background: #fff;
}

.config-products-table {
    min-width: 780px;
    margin: 0;
    vertical-align: top;
}

.config-products-structured-table {
    width: 100%;
    min-width: 1004px;
    table-layout: fixed;
}

.config-products-structured-table th:first-child {
    width: 260px;
}

.config-products-structured-table th:nth-child(n + 2) {
    width: 18%;
}

.config-products-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 0.7rem;
    background: #eaf1f7;
    color: var(--secondary-blue);
    font-size: 0.82rem;
    white-space: nowrap;
}

.config-products-table td {
    min-width: 170px;
    padding: 0.55rem;
}

.config-products-structured-table > tbody > tr > td {
    min-width: 0;
    padding: 0.75rem;
}

.config-products-product-grid {
    display: grid;
    grid-template-columns: 260px repeat(4, minmax(0, 1fr));
    grid-template-areas:
        "image family subfamily name price"
        "image description description obs obs";
    row-gap: 0.75rem;
    align-items: start;
}

.config-products-product-image {
    grid-area: image;
    min-width: 0;
}

.config-products-product-name {
    grid-area: name;
}

.config-products-product-family {
    grid-area: family;
}

.config-products-product-subfamily {
    grid-area: subfamily;
}

.config-products-product-price {
    grid-area: price;
}

.config-products-product-description {
    grid-area: description;
}

.config-products-product-obs {
    grid-area: obs;
}

.config-products-product-field {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding-left: 7px;
}

.config-products-product-description,
.config-products-product-obs {
    display: flex;
    flex-direction: column;
}

.config-products-product-field > label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--secondary-blue);
    font-size: 0.8rem;
    font-weight: 700;
}

.config-products-product-grid .csv-cell-price {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.config-products-product-grid .csv-cell-long {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    flex: 1;
}

.config-products-page .csv-cell::placeholder {
    color: #8493a1;
    opacity: 1;
}

.config-products-table > tbody > tr:nth-child(odd) > * {
    --bs-table-bg: #e5edf5;
    background-color: #e5edf5;
}

.config-products-table > tbody > tr:nth-child(even) > * {
    --bs-table-bg: #fff;
    background-color: #fff;
}

.config-products-data-row > td {
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.config-menu-row > td {
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.config-products-data-row.config-products-row-dragging > td,
.config-menu-row.config-products-row-dragging > td {
    opacity: 0.55;
    transform: scale(0.995);
}

.config-products-data-row.config-products-row-drop-before > td,
.config-menu-row.config-products-row-drop-before > td {
    box-shadow: inset 0 3px 0 var(--primary-blue);
}

.config-products-data-row.config-products-row-drop-after > td,
.config-menu-row.config-products-row-drop-after > td {
    box-shadow: inset 0 -3px 0 var(--primary-blue);
}

.config-products-data-row.config-products-row-placed > td,
.config-menu-row.config-products-row-placed > td {
    animation: config-products-row-placement 320ms ease-out;
}

@keyframes config-products-row-placement {
    0% {
        background-color: #b9d8f2;
    }
    100% {
        background-color: var(--bs-table-bg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .config-products-data-row > td {
        transition: none;
    }

    .config-menu-row > td {
        transition: none;
    }

    .config-products-data-row.config-products-row-placed > td,
    .config-menu-row.config-products-row-placed > td {
        animation: none;
    }
}

.config-products-table .csv-cell-long {
    min-width: 260px;
    min-height: 9rem;
    resize: vertical;
}

.config-products-table .csv-cell-price {
    width: 10ch;
    min-width: 8ch;
    max-width: 100%;
}

.config-products-table .image-upload-tools {
    display: grid;
    gap: 0.4rem;
    min-width: 250px;
    margin-top: 0.45rem;
}

.image-upload-label {
    display: block;
    color: var(--secondary-blue);
    font-size: 0.76rem;
    font-weight: 700;
}

.image-upload-new {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.2rem;
    padding-top: 0.5rem;
    border-top: 1px solid #cbd6e0;
}

.config-products-table .image-upload-tools input,
.config-products-table .image-upload-tools select {
    max-width: 280px;
    font-size: 0.78rem;
}

.existing-image-picker {
    max-width: 280px;
}

.existing-image-picker .csv-existing-image-search {
    width: 100%;
}

.existing-image-results {
    z-index: 1080;
    overflow-y: auto;
    border: 1px solid #cbd6e0;
    border-radius: 0.4rem;
    background: #fff;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.18);
}

.existing-image-option {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.55rem;
    border: 0;
    border-bottom: 1px solid #edf1f4;
    background: #fff;
    color: #263746;
    text-align: left;
    font-size: 0.78rem;
}

.existing-image-option:last-child {
    border-bottom: 0;
}

.existing-image-option:hover,
.existing-image-option:focus-visible {
    background: #eaf1f7;
    outline: none;
}

.existing-image-option img,
.existing-image-preview img {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid #d6e0e8;
    border-radius: 0.25rem;
    background: #fff;
    object-fit: contain;
}

.existing-image-option span,
.existing-image-preview span {
    overflow-wrap: anywhere;
}

.existing-image-empty {
    margin: 0;
    padding: 0.65rem;
    color: #596b7b;
    font-size: 0.78rem;
}

.existing-image-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 280px;
    margin-top: 0.4rem;
    color: #596b7b;
    font-size: 0.72rem;
}

.existing-image-preview[hidden] {
    display: none;
}

.existing-image-clear {
    display: grid;
    width: 1.75rem;
    height: 1.75rem;
    flex: 0 0 1.75rem;
    place-items: center;
    margin-left: auto;
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
    color: #596b7b;
}

.existing-image-clear:hover {
    background: #fff0f0;
    color: #821d25;
}

.config-products-row-toolbar {
    display: flex;
    align-items: center;
    gap: 0.05rem;
    margin: 0 0 0.45rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #d6e0e8;
}

.config-products-row-number {
    min-width: 2rem;
    color: #596b7b;
    font-size: 0.72rem;
    font-weight: 700;
}

.config-products-row-toolbar .btn {
    display: inline-grid;
    width: 1.3rem;
    height: 1.45rem;
    flex: 0 0 1.3rem;
    place-items: center;
    padding: 0;
    font-size: 0.75rem;
}

.config-products-move-up,
.config-products-move-down,
.config-products-drag-row {
    color: var(--secondary-blue);
}

.config-products-move-up:hover:not(:disabled),
.config-products-move-down:hover:not(:disabled),
.config-products-drag-row:hover {
    background: #eaf2fa;
    color: var(--primary-blue);
}

.config-products-move-up:disabled,
.config-products-move-down:disabled {
    color: #aab5bf;
    opacity: 0.55;
}

.config-products-drag-row {
    cursor: grab;
}

.config-products-drag-row:active {
    cursor: grabbing;
}

.config-products-duplicate-row {
    color: var(--secondary-blue);
}

.config-products-duplicate-row:hover {
    background: #eaf2fa;
    color: var(--primary-blue);
}

.config-products-add-row-cell {
    padding: 0.6rem !important;
    background: #eaf1f7;
}

.config-products-add-row {
    width: 100%;
    border: 1px dashed #9aafc1;
    background: #fff;
    color: var(--secondary-blue);
    font-weight: 600;
}

.config-products-add-row:hover,
.config-products-add-row:focus-visible {
    border-color: var(--primary-blue);
    background: #f4f8fc;
    color: var(--primary-blue);
}

.config-products-remove-row {
    color: #a72a32;
}

.config-products-remove-row:hover {
    background: #fff0f0;
    color: #821d25;
}

.config-products-note {
    margin: 0.75rem 0;
    color: #596b7b;
    font-size: 0.85rem;
}

.config-products-bottom-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.5rem;
}

@media (max-width: 640px) {
    .config-products-header {
        min-height: 64px;
    }

    .config-products-header-label {
        font-size: 0.78rem;
    }

    .config-products-main {
        width: calc(100% - 1.25rem);
        margin-top: 1.25rem;
    }

    .config-products-titlebar h1 {
        font-size: 1.5rem;
    }

    .config-products-select {
        align-items: stretch;
        flex-direction: column;
        gap: 0.4rem;
    }

    .config-products-select-controls {
        max-width: none;
    }

    .config-products-editor-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .config-products-actions {
        width: 100%;
    }

    .config-products-actions .btn {
        flex: 1;
    }

}