/* CARD PRODUTO */
.product {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* CAIXA FIXA DA IMAGEM - NÃO EMPURRA O LAYOUT */
.product-image-box,
.product-card-image,
.product-image,
.related-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 160px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image-box img,
.product-card-image img,
.product-image img,
.related-card-image img,
.product img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    display: block;
}

/* TEXTO CARD */
.product h3 {
    font-size: 14px;
    margin: 10px 0;
}

.product p {
    font-size: 18px;
    color: #030303;
    font-weight: bold;
    margin: 0;
}

/* MODAL DE DESCRIÇÃO NO CARD */
.product-link {
    display: flex;
    flex: 1;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

.product-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
}

.product-actions form,
.product-description-header form,
.product-description-actions form {
    margin: 0;
}

.product-buy-btn,
.product-detail-btn {
    min-width: 92px;
    text-align: center;
    border: 0;
    cursor: pointer;
    font-size: 14px;
}

.product-detail-btn {
    background: #3483fa;
}

.product-detail-btn:hover {
    background: #2968c8;
}

.product-description-dialog {
    width: min(640px, calc(100vw - 40px));
    max-height: min(80vh, 720px);
    overflow-y: auto;
    border: 0;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.25);
}

.product-description-dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.product-description-content {
    background: #fff;
    padding: 22px;
    text-align: left;
}

.product-description-header {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.product-description-header h2 {
    font-size: 20px;
    line-height: 1.3;
    margin: 0;
}

.product-description-close {
    border: 0;
    background: transparent;
    color: #666;
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
    padding: 0;
}

.product-description-close:hover {
    color: #111;
}

.product-description-code {
    color: #666;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
}

.product-description-text {
    color: #333;
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 18px;
    white-space: normal;
}

.product-description-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid #eee;
    padding-top: 14px;
}

.product-page-btn {
    background: #00a650;
}

.product-page-btn:hover {
    background: #008f45;
}

.product-modal-close-btn {
    background: #666;
    border: 0;
    cursor: pointer;
}

.product-modal-close-btn:hover {
    background: #444;
}

@media (max-width: 480px) {
    .product-actions,
    .product-description-actions {
        flex-direction: column;
    }

    .product-buy-btn,
    .product-detail-btn,
    .product-page-btn,
    .product-modal-close-btn {
        width: 100%;
    }
}


/* DETAIL */
.product-detail {
    max-width: 1000px;
    margin: auto;
}

.product-main {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.product-main .product-image {
    max-width: 360px;
    flex: 0 0 360px;
}

.product-info {
    flex: 1;
    min-width: 280px;
}

.price {
    font-size: 24px;
    color: #000;
    font-weight: bold;
}

/* MOBILE IMAGEM */
@media (max-width: 768px) {
    .product-image-box,
    .product-card-image,
    .product-image,
    .related-card-image {
        aspect-ratio: 1 / 1;
        min-height: 150px;
    }

    .product-main .product-image {
        max-width: 100%;
        flex: 1 1 100%;
    }
}

/* FILTROS */
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filters select,
.filters input {
    padding: 6px;
}




/* 🔍 SEARCH PADRÃO */
.search-input {
    width: 100%;
    padding: 8px;
    margin-top: 10px;
    border: 1px solid #1f1d1d;
    border-radius: 6px;
    font-size: 14px;
}

/* FOCO */
.search-input:focus {
    border-color: #3483fa;
    outline: none;
}

/* LABEL */
.search-input label {
    font-weight: 500;
}

/* INICIO product_list.html */
/* CONTAINER */
.ml-container {
    display: flex;
    align-items: flex-start;
    gap: 15px;

    /* remove centralização */
    margin: 0;
    padding: 10px 10px;
}

/* SIDEBAR */
/* 🔥 SIDEBAR */
.ml-sidebar {
    width: 220px;
    min-width: 200px;

    padding: 10px;
    background: #fff;
}

.ml-sidebar h3 {
    margin-bottom: 10px;
}

.ml-sidebar label {
    display: block;
    margin-top: 10px;
    font-size: 14px;
}

.ml-sidebar select {
    width: 100%;
    padding: 6px;
    margin-top: 5px;
}

/* PRODUTOS */
.ml-products {
    flex: 1;
}

/* HEADER */
.ml-header {
    margin-bottom: 10px;
}

/* GRID */
.ml-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* MOBILE */
@media (max-width: 768px) {

    .ml-container {
        flex-direction: column;
    }

    .ml-sidebar {
        width: 100%;
        order: -1; /* sobe filtros */
    }

    .ml-products {
        width: 100%;
    }

    .ml-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* FIM product_list.html */

/* INICIO ordenação + paginação + UX top */
/* TOOLBAR */
.ml-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.ml-toolbar select {
    padding: 6px;
}

/* PAGINAÇÃO */
.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination a {
    margin: 5px;
    padding: 6px 10px;
    background: #eee;
    text-decoration: none;
    border-radius: 4px;
}

.pagination span {
    margin: 0 10px;
}
/* FIM ordenação + paginação + UX top */


/* quote_detail.html */
.quote-container {
    max-width: 900px;
    margin: auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

.quote-header {
    margin-bottom: 15px;
}

.status {
    padding: 4px 8px;
    border-radius: 4px;
}

.status-draft {
    background: #eee;
}

.status-sent {
    background: #ffe600;
}

.status-approved {
    background: #00a650;
    color: white;
}

/* TABELA */
.quote-table table {
    width: 100%;
    border-collapse: collapse;
}

.quote-table th,
.quote-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

/* FORM */
.edit-form input {
    width: 70px;
    padding: 5px;
    margin-right: 5px;
}

.btn-small {
    padding: 5px 8px;
    background: #3483fa;
    color: white;
    border: none;
    border-radius: 4px;
}

/* TOTAL */
.quote-total {
    text-align: right;
    margin-top: 15px;
}

.quote-total span {
    color: #00a650;
}

/* AÇÕES */
.quote-actions {
    margin-top: 20px;
    text-align: right;
}


/* INICIO--> dashboard.html */
.dashboard-container {
    padding: 10px;
}

.dashboard-header {
    margin-bottom: 20px;
}

.dashboard-header p {
    color: #666;
    margin-top: 5px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dashboard-card {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
}

.quote-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quote-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.quote-item:last-child {
    border-bottom: none;
}

.quote-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.btn-small {
    display: inline-block;
    padding: 8px 12px;
    background: #3483fa;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-small:hover {
    background: #2968c8;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .quote-item {
        flex-direction: column;
    }
}
/* FIM--> dashboard.html */


/* INICIO MY_DATA MY_AREA */ 
.account-container {
    max-width: 1100px;
    margin: 0 auto;
}

.account-header {
    margin-bottom: 20px;
}

.account-header p {
    color: #666;
    margin-top: 5px;
}

.account-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.account-card {
    background: #fff;
    border-radius: 8px;
    padding: 18px;
}

.account-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.account-list li {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.account-list li:last-child {
    border-bottom: none;
}

.account-form {
    background: #fff;
    border-radius: 8px;
    padding: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 6px;
    font-weight: 600;
}

.form-group input,
.form-group select {
    padding: 9px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.form-actions {
    margin-top: 20px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .account-list li {
        flex-direction: column;
    }
}
/* FIM MY_DATA MY_AREA */ 

/* --- ESTILO REVISADO DO CARRINHO --- */

.cart-table table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

/* Alinhamento Geral: Produto (esquerda), demais (centro) */
.cart-table th, 
.cart-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    text-align: center; /* Centraliza tudo por padrão */
}

/* Alinha o nome do Produto à esquerda */
.cart-table th:first-child, 
.cart-table td:first-child {
    text-align: left;
}

/* FOCO NA COLUNA QTD: th e td iguais */
.col-qty {
    width: 160px;       /* Largura idêntica para os dois */
    min-width: 160px;
    text-align: center !important;
}

/* Garantir que o cabeçalho da Qtd siga a classe col-qty */
.cart-table th.col-qty {
    text-align: center;
}

.qty-control {
    display: inline-flex; /* Use inline-flex para não forçar 100% da largura */
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.qty-control form {
    margin: 0;
    display: flex;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.qty-btn:hover {
    background: #f0f0f0;
}

.qty-value {
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

/* RELACIONADOS-PRODUCT_DETAIL.HTML */
.related-products-section {
    margin-top: 40px;
}

.section-header {
    margin-bottom: 18px;
}

.section-header h2 {
    margin-bottom: 4px;
}

.section-header p {
    color: #666;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
}

.related-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 14px;
}

.related-card a {
    color: inherit;
    text-decoration: none;
}

.related-card img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    margin-bottom: 10px;
}

.related-card h3 {
    font-size: 15px;
    margin-bottom: 6px;
}

.related-card p {
    color: #666;
    font-size: 13px;
    margin-bottom: 8px;
}

.related-card form {
    margin-top: 12px;
}
/* FIM */

/* INICIO CATALOG .HTML */
.admin-page {
    max-width: 1280px;
    margin: 0 auto;
}

.admin-breadcrumb {
    font-size: 13px;
    color: #777;
    margin-bottom: 14px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
}

.admin-header h1 {
    margin: 0;
    font-size: 28px;
}

.admin-header p {
    margin: 6px 0 0;
    color: #666;
}

.admin-panel,
.admin-form {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.admin-toolbar {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.admin-search {
    display: flex;
    gap: 8px;
    max-width: 520px;
}

.admin-search input {
    flex: 1;
    padding: 9px 11px;
    border: 1px solid #cfd4dc;
    border-radius: 6px;
}

.admin-search button,
.admin-btn-primary,
.admin-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 13px;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    border: 1px solid transparent;
}

.admin-search button,
.admin-btn-primary {
    background: #0c4a6e;
    color: #fff;
}

.admin-btn-secondary {
    background: #fff;
    color: #374151;
    border-color: #cfd4dc;
}

.admin-table-wrap {
    overflow-x: auto;
    border-radius: 8px; /* Opcional: arredonda os cantos do container */
    border: 1px solid #e5e7eb;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px; /* Aumentei um pouco para facilitar a leitura */
}

.admin-table th {
    background: #f9fafb;
    color: #4b5563; /* Tom de cinza um pouco mais suave */
    font-weight: 600;
    text-align: left;
    padding: 16px 20px; /* Aumentado: mais respiro nas laterais e altura */
    border-bottom: 2px solid #f3f4f6; /* Borda levemente mais grossa para o header */
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-size: 12px;
}

.admin-table td {
    padding: 18px 20px; /* Aumentado: o 18px dá uma altura confortável para a linha */
    border-bottom: 1px solid #edf0f3;
    vertical-align: middle;
    color: #1f2937;
}

/* Melhora a separação visual no hover */
.admin-table tr:hover td {
    background: #f8fafc;
}

.text-right {
    text-align: right !important;
}

.muted {
    color: #6b7280;
}

.small {
    font-size: 12px;
    margin-top: 3px;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-ok {
    background: #dcfce7;
    color: #166534;
}

.badge-off {
    background: #fee2e2;
    color: #991b1b;
}

.admin-link {
    color: #0c4a6e;
    font-weight: 700;
    text-decoration: none;
}

.empty-row {
    text-align: center;
    color: #777;
    padding: 30px !important;
}

.admin-form {
    padding: 18px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}

.admin-field {
    display: flex;
    flex-direction: column;
}

.admin-field label {
    font-weight: 700;
    margin-bottom: 6px;
    color: #374151;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #cfd4dc;
    border-radius: 6px;
    background: #fff;
}

.admin-field textarea {
    min-height: 110px;
}

.admin-field select[multiple] {
    min-height: 130px;
}

.admin-field small {
    color: #777;
    margin-top: 4px;
}

.admin-field-checkbox {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.admin-field-checkbox label {
    margin-bottom: 0;
}

.admin-field-checkbox input {
    width: auto;
}

.field-error,
.form-errors {
    margin-top: 6px;
    color: #b91c1c;
    font-size: 13px;
}

.admin-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-search {
        flex-direction: column;
    }
}
/* FIM CATALOG .HTML */
