/* ============================================================
   Catálogo Hello Tully — design system
   Paleta: turquesa da marca + neutros claros + âmbar (ação)
   ============================================================ */
:root {
    --ht-primary: #12A5BC;
    --ht-primary-dark: #0B7383;
    --ht-primary-ink: #0B5560;
    --ht-tint: #E3F5F8;
    --ht-ink: #1C2B30;
    --ht-text: #41545A;
    --ht-muted: #7B8A8E;
    --ht-bg: #F4F8F9;
    --ht-card: #FFFFFF;
    --ht-line: #E2ECEE;
    --ht-amber: #FFB020;
    --ht-amber-hover: #F0A312;
    --ht-amber-ink: #412402;
    --ht-danger: #E24B4A;
    --ht-radius: 12px;
    --ht-shadow: 0 1px 3px rgba(28, 43, 48, .06);
}

html, body {
    height: 100%;
}

body {
    background-color: var(--ht-bg);
    color: var(--ht-text);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 15px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.ht-wrap,
.adm-shell {
    flex: 1 0 auto;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--ht-ink);
    font-weight: 600;
}

a {
    color: var(--ht-primary-dark);
}

/* ---------- Overrides Bootstrap (retinta o site inteiro) ---------- */
.text-success { color: var(--ht-primary-dark) !important; }
.bg-success { background-color: var(--ht-primary) !important; }
.btn-success, .btn-primary {
    background-color: var(--ht-primary) !important;
    border-color: var(--ht-primary) !important;
    color: #FFFFFF !important;
}
.btn-success:hover, .btn-primary:hover {
    background-color: var(--ht-primary-dark) !important;
    border-color: var(--ht-primary-dark) !important;
}
.btn-danger {
    background-color: var(--ht-danger) !important;
    border-color: var(--ht-danger) !important;
}
.btn-warning, .ht-btn-cta {
    background-color: var(--ht-amber) !important;
    border-color: var(--ht-amber) !important;
    color: var(--ht-amber-ink) !important;
    font-weight: 600;
}
.btn-warning:hover, .ht-btn-cta:hover {
    background-color: var(--ht-amber-hover) !important;
    border-color: var(--ht-amber-hover) !important;
    color: var(--ht-amber-ink) !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--ht-primary);
    box-shadow: 0 0 0 .2rem rgba(18, 165, 188, .18);
}
.btn { white-space: nowrap; }
.page-link { color: var(--ht-primary-dark); }
.page-item.active .page-link {
    background-color: var(--ht-primary);
    border-color: var(--ht-primary);
}

/* ---------- Topbar ---------- */
.ht-topbar {
    background: var(--ht-card);
    border-bottom: 1px solid var(--ht-line);
}
.ht-topbar .inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.ht-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.ht-brand img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.ht-brand .nome {
    font-weight: 700;
    color: var(--ht-ink);
    font-size: 17px;
    line-height: 1.1;
}
.ht-brand .tag {
    font-size: 11.5px;
    color: var(--ht-muted);
}
.ht-topbar .acoes {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}
.ht-chip {
    background: var(--ht-tint);
    color: var(--ht-primary-ink);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
}
.ht-chip i { margin-right: 5px; }
.ht-cart {
    position: relative;
    color: var(--ht-ink);
    text-decoration: none;
    font-size: 20px;
    padding: 4px 6px;
}
.ht-cart:hover { color: var(--ht-primary-dark); }
.ht-cart .badge-qtd {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--ht-amber);
    color: var(--ht-amber-ink);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    padding: 0 4px;
}
.ht-sair {
    color: var(--ht-muted);
    text-decoration: none;
    font-size: 13.5px;
    white-space: nowrap;
}
.ht-sair:hover { color: var(--ht-danger); }

/* ---------- Faixa de boas-vindas ---------- */
.ht-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 22px 24px 4px;
}
.ht-hero h1 {
    font-size: 21px;
    margin: 0;
}
.ht-hero p {
    color: var(--ht-muted);
    font-size: 14px;
    margin: 2px 0 0;
}

/* ---------- Estrutura ---------- */
.ht-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px 40px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.ht-menu {
    width: 218px;
    flex-shrink: 0;
    background: var(--ht-card);
    border: 1px solid var(--ht-line);
    border-radius: var(--ht-radius);
    padding: 10px;
    box-shadow: var(--ht-shadow);
}
.ht-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--ht-text);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 2px;
}
.ht-menu a i {
    width: 18px;
    text-align: center;
    color: var(--ht-muted);
    font-size: 15px;
}
.ht-menu a:hover {
    background: var(--ht-bg);
    color: var(--ht-ink);
}
.ht-menu a.active {
    background: var(--ht-tint);
    color: var(--ht-primary-ink);
    font-weight: 600;
}
.ht-menu a.active i { color: var(--ht-primary-dark); }
.ht-menu .sair-link { color: var(--ht-muted); }
.ht-menu .sair-link:hover { color: var(--ht-danger); background: #FDF0EF; }
.ht-conteudo {
    flex: 1;
    min-width: 0;
}

/* ---------- Cards ---------- */
.ht-card {
    background: var(--ht-card);
    border: 1px solid var(--ht-line);
    border-radius: var(--ht-radius);
    box-shadow: var(--ht-shadow);
    padding: 22px;
}
.ht-card-produto {
    background: var(--ht-card);
    border: 1px solid var(--ht-line);
    border-radius: var(--ht-radius);
    box-shadow: var(--ht-shadow);
    overflow: hidden;
    transition: transform .12s ease, box-shadow .12s ease;
    text-decoration: none;
    display: block;
    color: var(--ht-text);
}
.ht-card-produto:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(28, 43, 48, .10);
    color: var(--ht-ink);
}
.ht-card-produto img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--ht-tint);
}
.ht-card-produto .nome {
    padding: 12px 14px;
    font-weight: 600;
    color: var(--ht-ink);
    font-size: 14.5px;
    text-align: center;
}

/* ---------- Cards de categoria (home) ---------- */
.ht-grid-categorias {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}
.ht-cat-card {
    background: var(--ht-card);
    border: 1px solid var(--ht-line);
    border-radius: var(--ht-radius);
    box-shadow: var(--ht-shadow);
    padding: 26px 24px;
    text-decoration: none;
    color: var(--ht-text);
    transition: transform .12s ease, box-shadow .12s ease;
}
.ht-cat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(28, 43, 48, .10);
    color: var(--ht-text);
}
.ht-cat-card .icone {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--ht-tint);
    color: var(--ht-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 14px;
}
.ht-cat-card .titulo {
    font-weight: 700;
    color: var(--ht-ink);
    font-size: 17px;
    margin-bottom: 4px;
}
.ht-cat-card .sub {
    font-size: 13.5px;
    color: var(--ht-muted);
    margin-bottom: 16px;
}
.ht-cat-card .cta {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ht-primary-dark);
}
.ht-cat-card .cta i {
    font-size: 12px;
    margin-left: 4px;
    transition: transform .12s ease;
}
.ht-cat-card:hover .cta i { transform: translateX(3px); }

/* ---------- Tabelas ---------- */
.table thead th {
    background: var(--ht-bg);
    color: var(--ht-ink);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .02em;
    border-bottom: 1px solid var(--ht-line) !important;
}
.table td { vertical-align: middle; }

/* ---------- Rodapé ---------- */
.ht-footer {
    text-align: center;
    padding: 16px 24px 20px;
    color: var(--ht-muted);
    font-size: 12.5px;
    line-height: 1.6;
    border-top: 1px solid var(--ht-line);
    background: var(--ht-card);
}
.ht-footer .manutencao {
    font-size: 11.5px;
}

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
    .ht-wrap { flex-direction: column; }
    .ht-menu { width: 100%; display: flex; flex-wrap: wrap; gap: 4px; }
    .ht-menu a { margin-bottom: 0; }
    .ht-brand .tag { display: none; }
}
