/* ==========================================================================
   1. VARIÁVEIS E ESTILOS BASE
   ========================================================================== */
:root {
    --ink: #111;
    --gold: #c6a15b;
    --ivory: #f8f5ef;
    --beige: #e8dfd0;
    --paper: #fffdf9;
    --muted: #706b63;
    --line: #ded7cb;
    --serif: 'Playfair Display', Georgia, serif;
    --sans: 'DM Sans', Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--ivory);
    color: var(--ink);
    font: 16px/1.65 var(--sans);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    top: -5rem;
    left: 1rem;
    background: var(--ivory);
    color: var(--ink);
    padding: .7rem;
    z-index: 99;
}

.skip-link:focus {
    top: 1rem;
}

/* ==========================================================================
   2. CABEÇALHO E NAVEGAÇÃO
   ========================================================================== */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem clamp(1rem, 5vw, 5rem);
    border-bottom: 1px solid #1112;
}

.brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    text-decoration: none;
}

.brand img {
    width: 46px;
}

.brand-name {
    font: 1rem var(--serif);
    letter-spacing: .18em;
}

.brand-name small {
    display: block;
    font: 500 .56rem var(--sans);
    letter-spacing: .24em;
    color: var(--muted);
}

.main-nav {
    display: flex;
    justify-content: flex-end;
    gap: clamp(.7rem, 2vw, 1.7rem);
    flex-wrap: wrap;
}

.main-nav a {
    text-decoration: none;
    font-size: .85rem;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
    color: #8d6b2c;
}

.nav-contact {
    border: 1px solid;
    padding: .45rem .75rem;
}

/* ==========================================================================
   3. SEÇÕES EDITORIAIS E COMPONENTES
   ========================================================================== */
.hero {
    min-height: min(730px, 78vh);
    display: flex;
    align-items: center;
    background: #171614;
    color: var(--ivory);
    position: relative;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 52%;
}

.hero:before {
    content: '';
    position: absolute;
    z-index: 1;
    inset: 0;
    background: linear-gradient(90deg, #0e0e0ef0, #0e0e0ebd 38%, #0e0e0e0a);
}

.hero-copy {
    position: relative;
    z-index: 2;
    width: min(660px, 90%);
    margin-left: clamp(1.2rem, 10vw, 10rem);
    padding: 5rem 0;
}

.eyebrow {
    color: var(--gold);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.hero h1 {
    font: 400 clamp(2.8rem, 6vw, 5.8rem)/1.07 var(--serif);
    max-width: 680px;
    letter-spacing: -.03em;
    margin: .75rem 0 1.2rem;
}

.hero p {
    max-width: 460px;
    color: #e7e1d6;
    font-size: 1.06rem;
}

.actions {
    display: flex;
    gap: .8rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: .65rem 1.15rem;
    border: 1px solid var(--gold);
    background: var(--gold);
    color: #151310;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
}

.button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.button.secondary {
    background: transparent;
    color: var(--ivory);
    border-color: #f8f5efaa;
}

.button.dark {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--ivory);
}

.section {
    padding: clamp(3.5rem, 8vw, 7rem) clamp(1rem, 6vw, 6rem);
}

.section-inner {
    max-width: 1200px;
    margin: auto;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 2rem;
    margin-bottom: 2rem;
}

.section-heading h2,
.split h2,
.editorial h2 {
    font: 400 clamp(2rem, 4vw, 3.1rem)/1.15 var(--serif);
    margin: .3rem 0;
}

.section-heading p {
    max-width: 420px;
    color: var(--muted);
    margin: 0;
}

/* ==========================================================================
   4. GRADES E CATÁLOGO DE PRODUTOS
   ========================================================================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

.category-card {
    position: relative;
    overflow: hidden;
    background: #2d2923;
    color: white;
    min-height: 320px;
    text-decoration: none;
}

.category-card img {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    object-fit: cover;
    transition: transform .5s;
}

.category-card:hover img {
    transform: scale(1.04);
}

.category-card:after {
    content: '';
    position: absolute;
    inset: 40% 0 0;
    background: linear-gradient(transparent, #000b);
}

.category-card span {
    position: absolute;
    z-index: 1;
    left: 1.2rem;
    bottom: 1rem;
    font: 1.4rem var(--serif);
}

.category-card small {
    display: block;
    color: #f3e9d4;
    font: 500 .65rem var(--sans);
    letter-spacing: .1em;
    text-transform: uppercase;
}

.editorial {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(2rem, 6vw, 6rem);
    padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 8vw, 8rem);
    background: #eee8dd;
}

.editorial img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.editorial-copy {
    max-width: 500px;
}

.editorial-copy p,
.content p,
.content li {
    color: #48443d;
}

.note {
    font-size: .83rem;
    color: var(--muted);
}

.band {
    background: var(--ink);
    color: var(--ivory);
    padding: 4rem 1rem;
    text-align: center;
}

.band h2 {
    font: 400 clamp(2rem, 4vw, 3rem) var(--serif);
}

.band p {
    color: #d8d2c8;
}

/* ==========================================================================
   5. PÁGINAS INTERNAS E INFORMAÇÕES LEGAIS
   ========================================================================== */
.page-hero {
    padding: clamp(3.4rem, 7vw, 6.5rem) clamp(1rem, 8vw, 8rem) 3rem;
    background: var(--beige);
}

.page-hero .eyebrow {
    color: #80612c;
}

.page-hero h1 {
    font: 400 clamp(2.5rem, 5vw, 4.5rem)/1.1 var(--serif);
    margin: .4rem 0;
}

.page-hero p {
    max-width: 680px;
    color: #4e4941;
}

.content {
    max-width: 900px;
    margin: auto;
    padding: 3rem clamp(1rem, 5vw, 3rem) 6rem;
}

.content h2 {
    font: 400 1.65rem var(--serif);
    margin: 2.3rem 0 .6rem;
}

.content a {
    color: #71531f;
    text-underline-offset: 3px;
}

.content ul {
    padding-left: 1.2rem;
}

.legal-callout {
    padding: 1.2rem 1.4rem;
    border-left: 3px solid var(--gold);
    background: #f0ebe2;
    margin: 1.5rem 0;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.catalog-card {
    background: var(--paper);
    border: 1px solid #e9e3d8;
}

.catalog-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.catalog-card-body {
    padding: 1.15rem;
}

.catalog-card h2 {
    font: 400 1.4rem var(--serif);
    margin: .2rem 0;
}

.catalog-card p {
    color: var(--muted);
    font-size: .9rem;
}

.catalog-card a {
    color: #71531f;
}

.tag {
    display: inline-block;
    color: #71531f;
    border: 1px solid #c6a15b;
    padding: .16rem .45rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .62rem;
    font-weight: 700;
}

/* ==========================================================================
   6. CONTATO E FORMULÁRIOS
   ========================================================================== */
.contact-layout {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 3rem;
}

.contact-details {
    background: var(--ink);
    color: var(--ivory);
    padding: 2rem;
    height: max-content;
}

.contact-details h2 {
    font: 400 1.8rem var(--serif);
    margin-top: 0;
}

.contact-details dt {
    color: var(--gold);
    font-size: .72rem;
    letter-spacing: .13em;
    text-transform: uppercase;
    margin-top: 1.1rem;
}

.contact-details dd {
    margin: .25rem 0;
    overflow-wrap: anywhere;
}

.contact-details a {
    color: var(--ivory);
}

.contact-form label {
    display: block;
    font-weight: 600;
    font-size: .86rem;
    margin: 0 0 .35rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: .8rem;
    border: 1px solid #bcb3a5;
    background: #fffdf9;
    font: inherit;
    margin-bottom: 1rem;
}

.contact-form textarea {
    min-height: 145px;
    resize: vertical;
}

.form-status {
    min-height: 1.5rem;
    color: #4b3b1e;
    font-size: .9rem;
}

/* ==========================================================================
   7. RODAPÉ
   ========================================================================== */
.site-footer {
    background: #111;
    color: var(--ivory);
    padding: 3rem clamp(1rem, 6vw, 6rem) 1.4rem;
}

.footer-top {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr 1fr;
    gap: 2rem;
}

.footer-brand {
    font: 1.35rem var(--serif);
    letter-spacing: .12em;
}

.site-footer p,
.site-footer address {
    font-size: .84rem;
    color: #c8c1b6;
    font-style: normal;
}

.site-footer h2 {
    font-size: .7rem;
    color: var(--gold);
    letter-spacing: .15em;
    text-transform: uppercase;
}

.footer-links {
    display: grid;
    gap: .4rem;
}

.footer-links a,
.site-footer a {
    font-size: .82rem;
    color: #e2ddd5;
    text-decoration: none;
}

.footer-links a:hover,
.site-footer a:hover {
    color: var(--gold);
    text-decoration: underline;
}

#cookie-settings {
    border: 0;
    background: none;
    color: #e2ddd5;
    padding: 0;
    text-align: left;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}

#cookie-settings:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    border-top: 1px solid #393733;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #a9a39a;
    font-size: .75rem;
}

/* ==========================================================================
   8. PREFERÊNCIAS DE PRIVACIDADE E COOKIES
   ========================================================================== */
.cookie-banner {
    position: fixed;
    z-index: 20;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    max-width: 900px;
    margin: auto;
    background: #fffdf9;
    color: var(--ink);
    box-shadow: 0 12px 48px #0003;
    border: 1px solid var(--line);
    padding: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-banner[hidden],
.cookie-dialog[hidden] {
    display: none;
}

.cookie-banner p {
    font-size: .83rem;
    margin: 0;
    max-width: 520px;
}

.cookie-buttons {
    display: flex;
    gap: .45rem;
    flex-wrap: wrap;
}

.cookie-buttons button,
.cookie-dialog button {
    border: 1px solid #827966;
    background: transparent;
    padding: .55rem .7rem;
    font: 600 .76rem var(--sans);
    cursor: pointer;
}

.cookie-buttons .accept,
.cookie-dialog-card .cookie-dialog-actions button:last-child {
    background: var(--ink);
    color: white;
    border-color: var(--ink);
}

.cookie-dialog {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: #0008;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.cookie-dialog-card {
    width: min(500px, 100%);
    background: var(--ivory);
    padding: 1.5rem;
}

.cookie-dialog-card h2 {
    font: 1.7rem var(--serif);
}

.cookie-dialog-card label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .7rem 0;
    border-bottom: 1px solid var(--line);
}

.cookie-dialog-card p {
    font-size: .86rem;
    color: var(--muted);
}

.cookie-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1rem;
}

/* ==========================================================================
   9. COMPONENTES ADICIONAIS
   ========================================================================== */
.not-found {
    text-align: center;
    padding: 8rem 1rem;
}

.not-found h1 {
    font: 5rem var(--serif);
}

details {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

summary {
    cursor: pointer;
    font-weight: 600;
}

details p {
    color: var(--muted);
    margin-bottom: 0;
}

/* ==========================================================================
   10. RESPONSIVIDADE
   ========================================================================== */
@media (max-width: 850px) {
    .site-header {
        flex-wrap: wrap;
    }

    .main-nav {
        justify-content: flex-start;
        width: 100%;
        gap: .6rem 1rem;
    }

    .category-grid,
    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    body {
        font-size: 15px;
    }

    .brand img {
        width: 40px;
    }

    .site-header {
        padding: 1rem;
    }

    .main-nav {
        gap: .45rem .9rem;
    }

    .hero {
        min-height: 640px;
    }

    .hero-image {
        object-position: 58% center;
    }

    .hero:before {
        background: linear-gradient(90deg, #0e0e0ee8, #0e0e0e66);
    }

    .hero-copy {
        margin-left: 1.25rem;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .section-heading {
        display: block;
    }

    .section-heading p {
        margin-top: .6rem;
    }

    .category-grid,
    .catalog-grid {
        gap: .65rem;
    }

    .category-card {
        min-height: 230px;
    }

    .category-card span {
        font-size: 1.1rem;
        left: .8rem;
    }

    .category-card small {
        font-size: .58rem;
    }

    .editorial {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .editorial img {
        height: 330px;
    }

    .page-hero {
        padding: 3rem 1.2rem 2rem;
    }

    .content {
        padding: 2rem 1.15rem 4rem;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .footer-top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem 1rem;
    }

    .footer-bottom {
        display: block;
    }

    .cookie-banner {
        left: .5rem;
        right: .5rem;
        bottom: .5rem;
        display: block;
        max-height: 85vh;
        overflow-y: auto;
    }

    .cookie-buttons {
        margin-top: .8rem;
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
    }

    .cookie-buttons button {
        flex: 1 1 8rem;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .catalog-card-body {
        padding: .8rem;
    }

    .catalog-card h2 {
        font-size: 1.12rem;
    }
}

/* ==========================================================================
   11. PREFERÊNCIA POR MOVIMENTO REDUZIDO
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
