/* ==========================================
   Admin Produtos
========================================== */

/* Cabeçalho */

.admin-page-header {
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 1rem;
}

.admin-page-header .h2 {
    font-size: 1.4rem;
}

/* Card */

.admin-card {
    border: 0;
    border-radius: 14px;
    background: #fff;

    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
}

/* Tabela */

.admin-table> :not(caption)>*>* {
    padding: 1rem 2rem;

    vertical-align: middle;
}

/* ==========================================
   Ações
========================================== */

.admin-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

.admin-action {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 28px;
    height: 28px;

    padding: 0;

    border: 0;
    background: transparent;

    text-decoration: none;

    cursor: pointer;

    transition: 0.18s ease;
}

.admin-action-edit {
    color: #0d6efd;
}

.admin-action-edit:hover {
    color: #0abd5a;
    transform: scale(1.15);
}

.admin-action-delete {
    color: #dc3545;
}

.admin-action-delete:hover {
    color: #d70808;
    transform: scale(1.15);
}

/* ==========================================
   Miniatura do produto
========================================== */

.admin-product-thumbnail {
    display: block;

    width: 56px;
    height: 56px;

    object-fit: cover;

    margin: 0 auto;

    border-radius: 10px;

    background: #fff;

    border: 1px solid #e5e5e5;
}

.admin-product-thumbnail-placeholder {
    display: flex;

    justify-content: center;
    align-items: center;

    width: 56px;
    height: 56px;

    margin: 0 auto;

    border-radius: 10px;

    background: #f8f9fa;

    border: 1px solid #e5e5e5;

    color: #adb5bd;

    font-size: 1.25rem;
}

/* ==========================================
   Badges
========================================== */

.admin-badge {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 24px;

    padding: 0.25rem 0.65rem;

    border-radius: 999px;

    font-size: 0.78rem;
    font-weight: 600;

    line-height: 1;

    white-space: nowrap;
}

/* Categoria */

.admin-badge-category {
    background: #f5efeb;
    color: #6b5a53;
}

/* Destaque */

.admin-badge-featured {
    background: #fff0c2;
    color: #8a6500;
}

/* Status ativo */

.admin-badge-active {
    background: #dff4e8;
    color: #18794e;
}

/* Status inativo */

.admin-badge-inactive {
    background: #eeeeee;
    color: #6c757d;
}

/* Estado neutro */

.admin-badge-neutral {
    min-width: 24px;

    padding-inline: 0.45rem;

    background: transparent;
    color: #8c8580;
}

/* ==========================================
   Tabela
========================================== */

.admin-table {
    margin-bottom: 0;
}

.admin-table thead th {
    padding: 1rem 1.5rem;

    font-size: 0.95rem;
    font-weight: 600;

    color: #5d4f4a;

    white-space: nowrap;
}

.admin-table tbody td {
    padding: 1rem 1.5rem;

    font-size: 0.95rem;

    color: #6b655f;

    vertical-align: middle;
}

.admin-table tbody tr {
    border-bottom: 1px solid #eee8e4;
}

.admin-table tbody tr:last-child {
    border-bottom: 0;
}

.admin-table tbody tr:hover {
    background-color: #faf8f6;
}

/* ==========================================
   Botao
========================================== */
.admin-page-header .btn-primary {
    padding-left: 1.25rem;
    padding-right: 1.25rem;

    border-radius: 1.4rem;
}

/* ==========================================
   Upload de imagens
========================================== */

.product-upload-area {
    min-height: 220px;

    box-sizing: border-box;
}

.product-upload-area.has-image {
    border-style: solid;
    border-color: #e5ddd7;
    background: #fff;
}

/* Preview da imagem principal */

.product-upload-area .upload-preview {
    display: block;

    width: 180px;
    height: 180px;

    object-fit: cover;

    border-radius: 12px;

    margin-bottom: 0.75rem;

    box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.08);
}

/* Preview das imagens adicionais */

.product-gallery-preview {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 0.75rem;

    margin-top: 1rem;
}

.product-gallery-preview:empty {
    display: none;
}

.product-gallery-preview img {
    display: block;

    width: 100%;
    aspect-ratio: 1 / 1;

    object-fit: cover;

    border-radius: 10px;

    border: 1px solid #e5ddd7;

    box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.05);
}

/* Drag & Drop */

.product-upload-area.dragover {
    border-color: #dc7867;

    background: #fff7f4;

    transform: scale(1.01);
}

/* ==========================================
   Campos de descrição
========================================== */

.product-description-group {
    margin-top: 1.5rem;
}

.product-description-group .form-label {
    margin-bottom: 0.5rem;
}

.product-description-group .form-control {
    min-height: 110px;
    resize: vertical;
}

/* ==========================================
   Configurações do produto
========================================== */

.product-settings {
    margin-top: 2rem;
    padding-top: 1.5rem;

    border-top: 1px solid #eee8e4;
}

.product-settings-title {
    margin-bottom: 1.25rem;

    font-size: 0.95rem;
    font-weight: 600;

    color: #5d4f4a;
}

.product-settings .form-label {
    margin-bottom: 0.5rem;
}

.product-options {
    display: flex;
    flex-direction: column;

    gap: 0.75rem;

    padding-top: 2rem;
}

.product-options .form-check {
    margin: 0;
}

.product-options .form-check-label {
    color: #5d5550;
}

/* ==========================================
   Ações do formulário
========================================== */

.product-form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;

    margin-top: 2rem;
    padding-top: 1.5rem;

    border-top: 1px solid #eee8e4;
}

.product-form-actions .btn {
    min-height: 44px;
    padding: 0.6rem 1.4rem;

    border-radius: 999px;
}

.product-form-actions .btn-primary {
    background-color: #dc7867;
    border-color: #dc7867;
}

.product-form-actions .btn-primary:hover {
    background-color: #cf6d5d;
    border-color: #cf6d5d;
}