:root {
    --bg: #f8f5f2;
    --surface: #ffffff;
    --surface-soft: #fcfaf8;
    --text: #231815;
    --muted: #746860;
    --line: #e9dfd7;
    --primary: #8b6914;
    --primary-2: #b4882d;
    --primary-soft: #f3ead7;
    --dark: #16110f;
    --success: #2e7d32;
    --danger: #c62828;
    --warning: #ad7a11;
    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 26px;
    --shadow-sm: 0 8px 20px rgba(35, 24, 21, 0.05);
    --shadow: 0 18px 45px rgba(35, 24, 21, 0.08);
    --container: 1280px;
    --transition: .25s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(180deg, #f7f2ed 0%, #fcfaf8 100%);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

img,
svg,
video {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition), opacity var(--transition), transform var(--transition);
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

ul,
ol {
    margin: 0;
    padding: 0;
}

p {
    margin: 0 0 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 .85rem;
    line-height: 1.2;
    color: var(--text);
}

.container {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.section {
    padding: 42px 0;
}

.section-sm {
    padding: 28px 0;
}

.section-lg {
    padding: 64px 0;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.section-head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 20px;
}

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

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

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.auto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.card,
.catalog-content,
.catalog-sidebar {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card {
    padding: 22px;
}

.catalog-content,
.catalog-sidebar {
    padding: 26px;
}

.catalog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
}

.catalog-layout.compact {
    grid-template-columns: 280px minmax(0, 1fr);
}

.catalog-sidebar.sticky {
    position: sticky;
    top: 100px;
}

.btn,
.btn-card,
button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.btn:hover,
.btn-card:hover,
button[type="submit"]:hover {
    transform: translateY(-1px);
}

.btn-primary,
.btn-card,
button[type="submit"] {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 12px 28px rgba(139, 105, 20, 0.2);
}

.btn-secondary {
    background: #f2ebe5;
    color: #5d483f;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}

.badge,
.badge-desconto,
.badge-destaque {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.badge {
    background: var(--primary-soft);
    color: var(--primary);
}

.badge-desconto {
    background: var(--danger);
    color: #fff;
}

.badge-destaque {
    background: var(--primary);
    color: #fff;
}

.alert {
    margin: 0 auto 16px;
    padding: 16px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    width: min(var(--container), calc(100% - 32px));
}

.alert-success {
    background: #edf7ef;
    border-color: #d6ebd9;
    color: #1f5f2a;
}

.alert-danger {
    background: #fff1f1;
    border-color: #f0d4d4;
    color: #8f2c2c;
}

.alert-warning {
    background: #fff8eb;
    border-color: #f0dfb4;
    color: #8f6710;
}

.alert-info {
    background: #eef4ff;
    border-color: #d9e6ff;
    color: #2a4c87;
}

.filter-group {
    margin-bottom: 16px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #3c2d28;
}

.filter-group input,
.filter-group select,
.filter-group textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.filter-group textarea {
    min-height: 120px;
    resize: vertical;
}

.filter-group input:focus,
.filter-group select:focus,
.filter-group textarea:focus {
    border-color: #c8a55d;
    box-shadow: 0 0 0 4px rgba(200, 165, 93, 0.12);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

.table th,
.table td {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.table th {
    color: #58453c;
    font-size: .92rem;
    font-weight: 800;
}

.empty-state {
    padding: 40px 24px;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--muted);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.produtos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.produto-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.produto-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.produto-media {
    position: relative;
    display: block;
    aspect-ratio: .9 / 1;
    background: #f1e9e2;
    overflow: hidden;
}

.produto-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.produto-card:hover .produto-media img {
    transform: scale(1.04);
}

.produto-media .badge-desconto,
.produto-media .badge-destaque,
.produto-media .badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
}

.produto-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    flex: 1;
}

.produto-categoria {
    color: var(--primary);
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 800;
}

.produto-titulo {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    min-height: 48px;
}

.produto-precos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.preco-antigo {
    color: #9b8c83;
    text-decoration: line-through;
}

.preco-atual {
    color: #201511;
    font-size: 1.08rem;
    font-weight: 800;
}

.produto-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.produto-actions > a,
.produto-actions > span,
.produto-actions > form {
    flex: 1;
}

.produto-actions > a,
.produto-actions > span {
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 14px;
    background: #f3ece6;
    color: #5f493f;
    text-align: center;
    font-weight: 700;
}

.status-aguardando,
.status-pago,
.status-separacao,
.status-enviado,
.status-entregue,
.status-cancelado,
.status-padrao {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
}

.status-aguardando { background: #fff4dc; color: #8a640f; }
.status-pago { background: #eaf7ed; color: #21622d; }
.status-separacao { background: #eef4ff; color: #335f9b; }
.status-enviado { background: #ede9ff; color: #5a46a3; }
.status-entregue { background: #e7f8f1; color: #1f6e53; }
.status-cancelado { background: #fff1f1; color: #933434; }
.status-padrao { background: #f1ece8; color: #675851; }

.site-header-minimal,
.site-footer-minimal {
    background: var(--surface);
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--muted);
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

@media (max-width: 1100px) {
    .grid-4,
    .grid-3,
    .catalog-layout,
    .catalog-layout.compact {
        grid-template-columns: 1fr 1fr;
    }

    .catalog-sidebar.sticky {
        position: static;
        top: auto;
    }
}

@media (max-width: 780px) {
    .section,
    .section-lg {
        padding: 32px 0;
    }

    .container {
        width: min(var(--container), calc(100% - 24px));
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .grid-4,
    .grid-3,
    .grid-2,
    .catalog-layout,
    .catalog-layout.compact {
        grid-template-columns: 1fr;
    }

    .produto-actions {
        flex-direction: column;
    }

    .alert {
        width: min(var(--container), calc(100% - 24px));
    }
}
