/* =========================================================
   ACHOU! — Visual limpo e profissional
   Mantém todas as classes e a estrutura do sistema atual.
   ========================================================= */

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

:root {
    --bg: #f6f7fa;
    --surface: #ffffff;
    --text: #171923;
    --text-soft: #4a4f5c;
    --muted: #6b7180;
    --line: #e6e8ef;
    --brand: #f2500f;
    --brand-dark: #d5420a;
    --brand-soft: #fff1ea;
    --dark: #14161f;
    --green: #0f8a41;
    --green-soft: #e8f6ee;
    --radius: 16px;
    --shadow-sm: 0 1px 2px rgba(20, 22, 31, .05), 0 2px 8px rgba(20, 22, 31, .04);
    --shadow: 0 2px 4px rgba(20, 22, 31, .04), 0 10px 28px rgba(20, 22, 31, .07);
    --shadow-hover: 0 4px 8px rgba(20, 22, 31, .06), 0 18px 40px rgba(20, 22, 31, .12);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

:focus-visible {
    outline: 3px solid rgba(242, 80, 15, .45);
    outline-offset: 2px;
}

.container { width: min(1180px, 92%); margin-inline: auto; }

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--dark);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* =========================
   HEADER
   ========================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}

.nav {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text);
    font-size: 26px;
    font-weight: 850;
    letter-spacing: -1px;
    white-space: nowrap;
}

.brand span { font-size: 21px; }

.menu { display: flex; align-items: center; gap: 4px; }

.menu a {
    color: var(--text-soft);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 600;
    padding: 9px 14px;
    border-radius: 999px;
    white-space: nowrap;
    transition: color .2s ease, background .2s ease;
}

.menu a:hover { color: var(--brand-dark); background: var(--brand-soft); }

.search { margin-left: auto; position: relative; }

.search input {
    width: 320px;
    height: 44px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    background: #f3f4f8;
    color: var(--text);
    font-size: 14.5px;
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.search input::placeholder { color: #8b909c; }

.search input:focus {
    background: #fff;
    border-color: #f5a07d;
    box-shadow: 0 0 0 4px rgba(242, 80, 15, .12);
}

/* =========================
   FAIXA DE CATEGORIAS (abaixo do topo)
   ========================= */

.catbar {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.catbar-list {
    display: flex;
    gap: 8px;
    padding: 10px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.catbar-list::-webkit-scrollbar { display: none; }

.catbar-item {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.catbar-item span { font-size: 18px; line-height: 1; }

.catbar-item:hover {
    color: var(--brand-dark);
    background: var(--brand-soft);
    border-color: #f6c3ad;
}

@media (min-width: 761px) {
    .catbar-list { flex-wrap: wrap; justify-content: center; overflow: visible; }
}

/* =========================
   HERO
   ========================= */

.hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 76px;
    background:
        radial-gradient(600px 300px at 88% 20%, rgba(242, 80, 15, .10), transparent 70%),
        linear-gradient(180deg, #ffffff 0%, #fbf7f4 100%);
    border-bottom: 1px solid var(--line);
}

.hero .container { position: relative; z-index: 1; }

.hero h1 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(34px, 5.4vw, 58px);
    line-height: 1.04;
    letter-spacing: -1.8px;
    font-weight: 800;
    color: var(--text);
    text-wrap: balance;
}

.hero p {
    max-width: 560px;
    margin: 0 0 28px;
    color: var(--text-soft);
    font-size: 18px;
    line-height: 1.6;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 0;
    border-radius: 12px;
    padding: 12px 22px;
    background: var(--dark);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover {
    transform: translateY(-1px);
    background: var(--brand);
    box-shadow: 0 8px 20px rgba(242, 80, 15, .28);
}

.hero .btn { background: var(--brand); box-shadow: 0 6px 18px rgba(242, 80, 15, .28); }
.hero .btn:hover { background: var(--brand-dark); }

/* =========================
   SEÇÕES
   ========================= */

.section { padding: 52px 0 12px; }
.section + .section { padding-top: 36px; }

.section h2 {
    margin: 0 0 6px;
    font-size: clamp(22px, 2.6vw, 28px);
    line-height: 1.2;
    letter-spacing: -.6px;
    font-weight: 800;
}

.muted { margin: 0 0 24px; color: var(--muted); font-size: 14.5px; }

/* =========================
   PRODUTOS
   ========================= */

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: #dcdfe8;
}

.card-img {
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

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

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 16px 18px;
}

.badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 700;
}

.card h3 {
    margin: 6px 0 10px;
    color: var(--text);
    font-size: 15px;
    line-height: 1.35;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.35em * 3);
}

.old {
    min-height: 20px;
    color: #9a9fab;
    font-size: 13px;
    text-decoration: line-through;
}

.price {
    margin-top: 1px;
    color: var(--text);
    font-size: 24px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.5px;
}

.discount {
    align-self: flex-start;
    margin: 8px 0 14px;
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
}

.card .btn {
    width: 100%;
    margin-top: auto;
    background: var(--brand);
    box-shadow: none;
}

.card .btn:hover { background: var(--brand-dark); box-shadow: 0 6px 16px rgba(242, 80, 15, .28); }

/* =========================
   CATEGORIAS
   ========================= */

.categories {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.cat {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.cat:hover {
    transform: translateY(-3px);
    color: var(--brand-dark);
    border-color: #f6c3ad;
    box-shadow: var(--shadow);
}

.cat .icon { display: block; margin-bottom: 8px; font-size: 30px; line-height: 1; }

/* =========================
   PÁGINA DO PRODUTO
   ========================= */

.product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 52px 0;
}

.product-main img {
    width: 100%;
    max-height: 570px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.product-info { padding: 12px 0; }

.product-info h1 {
    margin: 8px 0 16px;
    font-size: clamp(28px, 3.6vw, 42px);
    line-height: 1.1;
    letter-spacing: -1.2px;
    font-weight: 800;
}

.big-price { margin: 20px 0; color: var(--text); font-size: 38px; font-weight: 800; letter-spacing: -1px; }

.stats { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); margin: 15px 0; }

/* --- Cabeçalhos de página, cards e estados vazios --- */

.section h1 {
    margin: 0 0 6px;
    font-size: clamp(28px, 3.4vw, 38px);
    line-height: 1.15;
    letter-spacing: -1px;
    font-weight: 800;
}

.section .container > p:not(.muted) { max-width: 720px; color: var(--text-soft); }

.card-img { text-decoration: none; color: inherit; }
.card-img span { font-size: 48px; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--brand-dark); }

.store { margin: 8px 0 14px; color: var(--muted); font-size: 12.5px; font-weight: 600; }

.catbar-item.is-active {
    color: var(--brand-dark);
    background: var(--brand-soft);
    border-color: #f6c3ad;
}

.empty {
    padding: 44px 20px;
    text-align: center;
    background: #fff;
    border: 1px dashed #d5d8e2;
    border-radius: var(--radius);
    color: var(--muted);
}

/* --- Página do produto --- */

.breadcrumb { padding: 22px 0 0; font-size: 13.5px; color: var(--muted); }
.breadcrumb a { color: var(--text-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-dark); }
.breadcrumb .sep { margin: 0 7px; }

.product { align-items: start; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); padding: 26px 0 34px; }

.product-main img { aspect-ratio: 1 / 1; padding: 14px; border-radius: 20px; }

.product-info { display: flex; flex-direction: column; align-items: flex-start; padding: 4px 0; }
.product-info h1 { margin: 8px 0 20px; }

.price-box {
    width: 100%;
    max-width: 440px;
    margin-bottom: 20px;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.price-box .old { min-height: 0; }
.price-box .big-price { margin: 2px 0 8px; font-size: 44px; line-height: 1.1; }
.price-box .discount { margin: 0; font-size: 13px; padding: 4px 10px; }

.product-info .btn {
    width: 100%;
    max-width: 440px;
    min-height: 58px;
    padding: 14px 24px;
    border-radius: 14px;
    background: var(--brand);
    font-size: 16px;
    box-shadow: 0 10px 24px rgba(242, 80, 15, .28);
}

.product-info .btn:hover { background: var(--brand-dark); box-shadow: 0 12px 28px rgba(242, 80, 15, .36); }

.trust {
    list-style: none;
    display: grid;
    gap: 10px;
    margin: 22px 0 0;
    padding: 0;
    color: var(--text-soft);
    font-size: 14px;
}

.trust li { display: flex; gap: 10px; align-items: flex-start; }

/* Descrição organizada, com "ver mais" sem JavaScript */
.product-desc { padding: 6px 0 20px; }

.desc-box {
    padding: 26px 28px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.desc-box h2 { margin: 0 0 14px; font-size: 22px; letter-spacing: -.4px; }

.desc-toggle { position: absolute; opacity: 0; pointer-events: none; }

.desc-text { position: relative; max-width: 78ch; color: var(--text-soft); font-size: 15.5px; line-height: 1.75; }
.desc-text p { margin: 0 0 14px; }
.desc-text ul { margin: 0 0 6px; padding-left: 20px; }
.desc-text li { margin-bottom: 10px; }
.desc-text li strong { color: var(--text); }

.is-long .desc-text { max-height: 230px; overflow: hidden; }
.is-long .desc-text::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 80px;
    background: linear-gradient(rgba(255, 255, 255, 0), #fff);
}

.desc-toggle:checked ~ .desc-text { max-height: none; overflow: visible; }
.desc-toggle:checked ~ .desc-text::after { display: none; }

.desc-more { display: inline-block; margin-top: 14px; color: var(--brand-dark); font-weight: 700; cursor: pointer; }
.desc-more .less { display: none; }
.desc-toggle:checked ~ .desc-more .more { display: none; }
.desc-toggle:checked ~ .desc-more .less { display: inline; }
.desc-toggle:focus-visible ~ .desc-more { outline: 3px solid rgba(242, 80, 15, .45); outline-offset: 3px; border-radius: 4px; }

@media (max-width: 760px) {
    .product { padding-top: 16px; }
    .price-box .big-price { font-size: 36px; }
    .price-box, .product-info .btn { max-width: none; }
    .desc-box { padding: 20px 18px; }
    .desc-text { font-size: 15px; }
}

/* =========================
   ADMIN
   ========================= */

.admin { background: #f4f5f9; min-height: 100vh; }

.admin-nav { background: var(--dark); color: #fff; padding: 15px 0; }

.admin-nav .container { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.admin-nav a { color: #fff; text-decoration: none; margin-left: 16px; opacity: .88; }
.admin-nav a:hover { opacity: 1; color: #ff9b70; }

.panel {
    background: #fff;
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: 16px;
    margin: 24px 0;
    box-shadow: var(--shadow-sm);
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid .full { grid-column: 1 / -1; }

.form-control {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #dfe2e9;
    border-radius: 10px;
    outline: none;
    background: #fff;
}

.form-control:focus { border-color: #f5a07d; box-shadow: 0 0 0 4px rgba(242, 80, 15, .10); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px; border-bottom: 1px solid #eee; text-align: left; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.kpi {
    background: #fff;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}

.kpi strong { display: block; font-size: 28px; }

/* =========================
   FOOTER
   ========================= */

.footer {
    margin-top: 64px;
    padding: 52px 0 24px;
    background: var(--dark);
    color: #d3d5dc;
}

.footer strong { color: #fff; font-size: 22px; letter-spacing: -.5px; }

.footer h4 { margin: 0 0 10px; color: #fff; font-size: 15px; font-weight: 700; }

.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; }

.footer p { max-width: 430px; margin: 10px 0 0; color: #a0a4b0; font-size: 14.5px; }

.footer a {
    display: block;
    margin: 8px 0;
    color: #d3d5dc;
    text-decoration: none;
    font-size: 14.5px;
    transition: color .2s ease;
}

.footer a:hover { color: #ff9b70; }

.copy {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid #2a2d38;
    color: #8b90a0;
    font-size: 13px;
    line-height: 1.6;
}

.copy p { max-width: none; margin: 0 0 6px; color: inherit; font-size: inherit; }

/* =========================
   RESPONSIVO
   ========================= */

@media (max-width: 1000px) {
    .nav { gap: 14px; }
    .menu { gap: 0; }
    .menu a { padding-inline: 10px; font-size: 14px; }
    .search input { width: 240px; }
    .grid { grid-template-columns: repeat(3, 1fr); }
    .categories { grid-template-columns: repeat(3, 1fr); }
    .kpis { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
    .nav { min-height: 62px; flex-wrap: wrap; gap: 8px 12px; padding: 10px 0 8px; }
    .brand { font-size: 24px; }

    /* Menu continua acessível no celular: faixa rolável abaixo da busca */
    .menu {
        order: 3;
        width: 100%;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }
    .menu::-webkit-scrollbar { display: none; }
    .menu a { background: #f3f4f8; padding: 8px 14px; }

    .search { order: 2; flex: 1; margin: 0; }
    .search input { width: 100%; }

    .hero { padding: 48px 0 52px; }
    .hero h1 { letter-spacing: -1.2px; }
    .hero p { font-size: 16px; }

    .product { grid-template-columns: 1fr; gap: 16px; }
    .product-info h1 { font-size: 30px; }

    .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 560px) {
    .container { width: min(94%, 1180px); }
    .section { padding: 36px 0 8px; }

    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .card { border-radius: 14px; }
    .card-body { padding: 12px 12px 14px; }
    .card h3 { font-size: 13.5px; }
    .price { font-size: 20px; }
    .card .btn { min-height: 42px; padding: 10px 8px; font-size: 13px; }

    .categories { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .cat { min-height: 100px; }

    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: auto; }

    .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
    .panel { padding: 17px; }

    .table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Telas grandes (monitores desktop) */
@media (min-width: 1400px) {
    .container { width: min(1320px, 92%); }
    .nav { min-height: 78px; }
    .menu a { font-size: 15.5px; }
    .search input { width: 360px; font-size: 15.5px; }
    .catbar-item { font-size: 15px; }
    .hero { padding: 88px 0 92px; }
    .hero p { font-size: 20px; }
    .section h2 { font-size: 30px; }
    .card h3 { font-size: 16px; }
    .price { font-size: 26px; }
    .card .btn { font-size: 15px; }
}

@media (min-width: 1800px) {
    .container { width: min(1480px, 90%); }
    .grid { gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
