/* ============================================================
   Agro Ilha Agropet — Loja Virtual
   Design system / estilos globais
   Paleta Agro Ilha: verde #315030 + oliva #688551 sobre branco,
   creme #F3F2E7 nas seções e topo em #2A4529.
   Cores amostradas dos mockups oficiais da marca.
   ============================================================ */

/* ---------------- Variáveis ----------------
   Paleta da marca: marrom + salmão sobre fundo branco.
   --primaria   ações e âncoras escuras (botões, rodapé, texto forte)
   --topbar     barra superior, um marrom mais quente
   --accent     salmão decorativo (logo, palavra destacada, artes)
   --accent-txt acento aplicado a texto: o salmão não tem contraste
                suficiente sobre claro, então texto de acento usa o marrom
   ------------------------------------------- */
:root {
    --primaria:     #315030;   /* verde da marca: botões, barras, rodapé */
    --primaria-2:   #3E6640;   /* hover */
    --primaria-esc: #243C24;   /* pressionado */
    --topbar:       #2A4529;   /* barra superior, um verde mais fechado */
    --accent:       #688551;   /* oliva: destaques e artes */
    --accent-hover: #7A9862;
    --accent-soft:  #E8EEE0;
    --accent-txt:   #2A4C2B;   /* acento em texto, com contraste */
    --caramelo:     #D9D0A5;   /* neutro quente da marca */
    --vinho:        #A8442F;   /* terracota: remover, erro, favorito */
    --creme:        #F3F2E7;   /* seções claras e rodapé */
    --creme-2:      #F8F7F0;
    --bg:           #FFFFFF;
    --branco:       #FFFFFF;
    --texto:        #2F3A2F;
    --texto-medio:  #5A6659;
    --texto-leve:   #97A297;
    --borda:        #E3E7DF;
    --borda-2:      #F0F2EC;
    --sombra:       0 2px 10px rgba(0,0,0,.06);
    --sombra-hover: 0 10px 28px rgba(0,0,0,.12);
    --radius:       14px;
    --radius-sm:    9px;
    --transition:   .25s ease;
    --container:    1240px;
    --topbar-h:     38px;
    --header-h:     84px;
}

/* ---------------- Reset ---------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--texto);
    background: var(--bg);
    line-height: 1.5;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 18px;
}

/* ---------------- Botões ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-weight: 700;
    font-size: .95rem;
    padding: .8rem 1.4rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    line-height: 1;
    white-space: nowrap;
}
.btn--primary { background: var(--primaria); color: #fff; }
.btn--primary:hover { background: var(--primaria-2); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(49,80,48,.28); }
.btn--outline { background: #fff; color: var(--primaria); border: 2px solid var(--primaria); }
.btn--outline:hover { background: var(--primaria); color: #fff; }
.btn--block { width: 100%; }
.btn--lg { padding: 1rem 1.8rem; font-size: 1rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------------- Chips de variação ---------------- */
.chip-size {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 30px; height: 26px; padding: 0 7px;
    border: 1px solid var(--borda); border-radius: 6px;
    font-size: .72rem; font-weight: 700; color: var(--texto-medio);
    background: #fff;
}
.chip-color {
    display: inline-block; width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid #fff; box-shadow: 0 0 0 1px var(--borda);
}

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
    background: var(--topbar);
    color: #fff;
    font-size: .82rem;
    height: var(--topbar-h);
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.topbar__list { display: flex; gap: 2rem; }
.topbar a, .topbar span { display: inline-flex; align-items: center; gap: .45rem; color: #fff; opacity: .95; }
.topbar a:hover { opacity: 1; color: var(--accent-hover); }
.topbar__phone { font-weight: 700; }

/* free-shipping bar (rola dentro da topbar à esquerda em telas grandes) */
.shipbar { font-weight: 600; color: #fff; }
.shipbar strong { color: var(--accent-hover); }

/* ============================================================
   HEADER
   ============================================================ */
.header {
    background: var(--branco);
    border-bottom: 1px solid var(--borda);
    position: sticky; top: 0; z-index: 200;
    transition: box-shadow var(--transition);
}
.header.is-stuck { box-shadow: var(--sombra); }
.header__main { display: flex; align-items: center; gap: 1.5rem; height: var(--header-h); }

.logo { display: flex; align-items: baseline; gap: .12em; font-weight: 800; flex-shrink: 0; }
.logo__agro { font-size: 1.7rem; color: var(--primaria); letter-spacing: -.5px; }
.logo__ilha { font-size: 1.7rem; color: var(--accent); letter-spacing: -.5px; }
.logo small { display: block; font-size: .58rem; letter-spacing: 2px; color: var(--texto-leve); font-weight: 600; text-transform: uppercase; }

/* busca */
.search { flex: 1; position: relative; max-width: 760px; }
.search input {
    width: 100%; height: 50px; padding: 0 56px 0 18px;
    border: 1px solid var(--borda); border-radius: 10px; background: #fff;
    font-size: .95rem; transition: var(--transition);
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(104,133,81,.35); }
.search__btn {
    position: absolute; right: 6px; top: 6px; width: 40px; height: 38px;
    border-radius: 8px; background: var(--primaria); color: #fff; font-size: 1rem;
    display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.search__btn:hover { background: var(--accent); }

/* ações do header */
.header__actions { display: flex; align-items: center; gap: 1.4rem; flex-shrink: 0; }
.haction { display: flex; align-items: center; gap: .55rem; color: var(--texto); }
.haction i { font-size: 1.4rem; color: var(--primaria); }
.haction:hover { color: var(--accent-txt); }
.haction:hover i { color: var(--accent-txt); }
.haction__text { display: flex; flex-direction: column; line-height: 1.15; font-size: .8rem; }
.haction__text b { font-size: .82rem; }
.cart-btn { position: relative; }
.cart-badge {
    position: absolute; top: -8px; right: -10px; min-width: 19px; height: 19px;
    padding: 0 5px; border-radius: 10px; background: var(--accent); color: #fff;
    font-size: .68rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* barra de departamentos */
.deptbar { background: var(--creme); border-bottom: 1px solid var(--borda); }
.deptbar .container { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.dept-toggle { display: flex; align-items: center; gap: .7rem; font-weight: 700; color: var(--primaria); font-size: 1rem; }
.dept-toggle i { font-size: 1.15rem; }
.deptbar__links { display: flex; gap: .4rem; align-items: center; }
.deptbar__links > a { padding: .5rem .8rem; font-weight: 600; font-size: .9rem; color: var(--texto-medio); border-radius: 7px; }
.deptbar__links > a:hover { color: var(--accent-txt); background: #fff; }
.btn-inst { background: var(--primaria); color: #fff !important; padding: .6rem 1.1rem !important; border-radius: 9px; display: inline-flex; gap: .5rem; align-items: center; }
.btn-inst:hover { background: var(--primaria-2); }

/* mega menu (departamentos) */
.megamenu {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 190;
    background: #fff; border-bottom: 1px solid var(--borda); box-shadow: var(--sombra);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
}
.megamenu.is-open { max-height: 520px; }
.megamenu__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; padding: 1.4rem 0; }
.megamenu__item { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border-radius: 10px; font-weight: 600; font-size: .9rem; transition: var(--transition); }
.megamenu__item:hover { background: var(--creme); color: var(--accent-txt); }
.megamenu__dot { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.megamenu__dot svg { width: 20px; height: 20px; }

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero {
    margin: 1.4rem 0;
    /* Sai do container e ocupa a tela toda: é o que permite os banners
       vizinhos vazarem para a esquerda e para a direita do slide central. */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    --slide-w: min(1054px, calc(100vw - 7rem));
    --slide-gap: 48px;
}
.slider { position: relative; overflow: hidden; padding-bottom: 34px; }
.slider__track { display: flex; gap: var(--slide-gap); transition: transform .55s ease; will-change: transform; }
.slide {
    flex: 0 0 var(--slide-w);
    min-height: 360px; display: flex; align-items: center;
    padding: 3rem 4rem; position: relative; color: #fff;
    border-radius: 18px; overflow: hidden;
}
.slide__content { max-width: 50%; position: relative; z-index: 2; }
.slide h2 { font-size: 2.6rem; font-weight: 800; line-height: 1.05; margin-bottom: 1rem; text-transform: uppercase; }
.slide p { font-size: 1.1rem; margin-bottom: 1.6rem; max-width: 26rem; }
.slide__deco { position: absolute; inset: 0; opacity: .25; font-size: 22rem; display: flex; align-items: center; justify-content: flex-end; padding-right: 3rem; }
/* Slide em imagem (banner enviado pelo admin) */
/* O espaço do hero tem proporção fixa (1152x401, a medida das artes): assim
   um banner enviado fora de medida se ajusta ao quadro em vez de mudar a
   altura do carrossel e fazer os slides pularem. */
.slide--img { min-height: 0; padding: 0; display: block; aspect-ratio: 1152 / 401; }
.slide--img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.slider__arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
    width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.85);
    color: var(--primaria); display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
    box-shadow: var(--sombra); transition: var(--transition);
}
.slider__arrow:hover { background: #fff; color: var(--accent-txt); }
.slider__arrow { top: calc(50% - 17px); }  /* desconta o espaço dos dots */
.slider__arrow--prev { left: calc(50% - var(--slide-w) / 2 + 16px); }
.slider__arrow--next { right: calc(50% - var(--slide-w) / 2 + 16px); }
.slider__dots { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 5; }
.slider__dots button { width: 10px; height: 10px; border-radius: 50%; background: var(--borda); transition: var(--transition); }
.slider__dots button.is-active { background: var(--primaria); width: 26px; border-radius: 5px; }

/* ============================================================
   CARDS PROMO
   ============================================================ */
.promo-grid { display: grid; gap: 1.2rem; margin: 1.6rem 0; }
.promo-grid--2 { grid-template-columns: 1fr 1fr; }
.promo-grid--4 { grid-template-columns: repeat(4, 1fr); }
.promo {
    border-radius: 16px; padding: 2rem; min-height: 200px; position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center; color: #fff;
    transition: var(--transition);
}
.promo:hover { transform: translateY(-4px); box-shadow: var(--sombra-hover); }
.promo small { font-size: .75rem; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; opacity: .9; }
.promo h3 { font-size: 1.7rem; font-weight: 800; line-height: 1.05; margin: .4rem 0 1rem; }
.promo .btn { align-self: flex-start; }
/* Card promo em imagem (banner enviado pelo admin) */
.promo--img { padding: 0; overflow: hidden; display: block; }
.promo--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.promo--mini { min-height: 150px; padding: 1.4rem; align-items: center; text-align: center; }
.promo--mini h3 { font-size: 1.15rem; }
.promo__deco { position: absolute; right: -10px; bottom: -20px; font-size: 7rem; opacity: .18; }

/* ============================================================
   BANNER "BAIXE O APP"
   ============================================================ */
.appbar {
    background: linear-gradient(120deg, var(--primaria), var(--primaria-2));
    color: #fff; border-radius: 16px; padding: 2rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1.2rem;
    min-height: 190px;
}
.appbar h3 { font-size: 1.6rem; font-weight: 800; line-height: 1.05; }
.appbar p { font-size: .9rem; opacity: .95; margin: .35rem 0 .15rem; max-width: 22rem; }
.appbar small { font-size: .78rem; opacity: .82; }
.store-badge { display: inline-flex; align-items: center; gap: .7rem; background: #161616; color: #fff; border-radius: 11px; padding: .7rem 1.2rem; transition: var(--transition); flex-shrink: 0; }
.store-badge i { font-size: 2rem; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.15; font-weight: 800; font-size: 1.05rem; }
.store-badge small { font-weight: 400; font-size: .66rem; opacity: .85; }
.store-badge:hover { background: #000; transform: translateY(-2px); }

/* ============================================================
   CARDS DE CATEGORIA (4 banners acima de "Navegue por Categorias")
   ============================================================ */
.catcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.catcard {
    position: relative; border-radius: 14px; overflow: hidden;
    background: var(--accent-soft); transition: var(--transition);
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 1.6rem 1.3rem 1.5rem; aspect-ratio: 33/38;
}
.catcard:hover { transform: translateY(-4px); box-shadow: var(--sombra-hover); }
.catcard h3 { color: var(--accent-txt); font-size: 1.3rem; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; }
.catcard p { font-size: .82rem; color: var(--texto-medio); margin: .4rem 0; line-height: 1.4; }
.catcard__art { font-size: 4.5rem; margin: auto 0; opacity: .85; }
.catcard .btn { margin-top: auto; }
.catcard--img { padding: 0; aspect-ratio: 33/38; }
.catcard--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 900px) { .catcards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .catcards { grid-template-columns: 1fr 1fr; gap: .7rem; } .catcard h3 { font-size: 1.05rem; } }

/* ============================================================
   FAIXA DE SELOS (frete, descontos, cartão, segurança)
   ============================================================ */
.trust { background: var(--branco); border-top: 1px solid var(--borda); border-bottom: 1px solid var(--borda); }
.trust .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1.3rem 18px; }
.trust-item { display: flex; align-items: center; gap: .9rem; }
.trust-item i { font-size: 2rem; color: var(--primaria); width: 38px; text-align: center; }
.trust-item b { display: block; color: var(--accent-txt); font-size: 1.05rem; font-weight: 800; line-height: 1.1; }
.trust-item span { font-size: .8rem; color: var(--texto-medio); }
@media (max-width: 720px) {
    .trust .container { grid-template-columns: 1fr 1fr; gap: 1rem .8rem; }
    .appbar { padding: 1.4rem; flex-direction: column; text-align: center; align-items: center; }
}

/* ============================================================
   SEÇÕES / TÍTULOS
   ============================================================ */
.section { padding: 2.4rem 0; }
.section--creme { background: var(--branco); }  /* vitrines em branco: o creme fica só nas barras e no rodapé */
.sec-head { margin-bottom: 1.6rem; }
.sec-head h2 { font-size: 1.6rem; font-weight: 800; display: inline-block; }
.sec-head h2 .hl { color: var(--accent); }
.sec-head .underline { height: 4px; width: 110px; background: var(--accent); border-radius: 3px; margin-top: .5rem; }
.sec-head--center { text-align: center; }
.sec-head--center .underline { margin: .6rem auto 0; }

/* ============================================================
   CARROSSEL DE CATEGORIAS (círculos)
   ============================================================ */
.cat-carousel { position: relative; }
.cat-track { display: flex; gap: 1.2rem; overflow-x: auto; scroll-behavior: smooth; padding: .5rem 0 1rem; scrollbar-width: none; }
.cat-track::-webkit-scrollbar { display: none; }
.cat-item { flex: 0 0 auto; width: 130px; text-align: center; }
.cat-circle {
    width: 118px; height: 118px; border-radius: 50%; margin: 0 auto .7rem;
    display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.cat-circle svg { width: 52px; height: 52px; }
.cat-item:hover .cat-circle { transform: translateY(-5px) scale(1.04); box-shadow: var(--sombra-hover); }
.cat-item span { font-size: .9rem; font-weight: 700; color: var(--texto); }
.carousel-arrow {
    position: absolute; top: 42%; transform: translateY(-50%); z-index: 4;
    width: 38px; height: 38px; border-radius: 50%; background: var(--primaria); color: #fff;
    display: flex; align-items: center; justify-content: center; box-shadow: var(--sombra); transition: var(--transition);
}
.carousel-arrow:hover { background: var(--accent); }
.carousel-arrow--prev { left: -10px; }
.carousel-arrow--next { right: -10px; }

/* ============================================================
   VITRINE / GRID DE PRODUTOS
   ============================================================ */
.products-row { position: relative; }
.products-track { display: flex; gap: 1.1rem; overflow-x: auto; scroll-behavior: smooth; padding: .4rem 0 1rem; scrollbar-width: none; }
.products-track::-webkit-scrollbar { display: none; }
.products-track > .card { flex: 0 0 260px; }

.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }

/* abas */
.tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.tab {
    padding: .55rem 1.1rem; border-radius: 30px; font-weight: 700; font-size: .88rem;
    color: var(--texto-medio); background: #fff; border: 1px solid var(--borda); transition: var(--transition);
}
.tab:hover { border-color: var(--accent-txt); color: var(--accent-txt); }
.tab.is-active { background: var(--primaria); color: #fff; border-color: var(--primaria); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadeIn .35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none; } }

/* ============================================================
   CARD DE PRODUTO
   ============================================================ */
.card {
    background: #fff; border: 1px solid var(--borda); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column; transition: var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sombra-hover); border-color: var(--accent); }
.card__media { position: relative; background: #fff; aspect-ratio: 1/1; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__badge {
    position: absolute; top: 10px; left: 10px; z-index: 2;
    background: var(--primaria); color: #fff; font-size: .7rem; font-weight: 700;
    padding: .3rem .55rem; border-radius: 6px; text-transform: uppercase;
}
.card__fav {
    position: absolute; top: 8px; right: 8px; z-index: 2; width: 36px; height: 36px;
    border-radius: 50%; background: rgba(255,255,255,.9); color: var(--texto-leve);
    display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: var(--transition);
}
.card__fav:hover { color: var(--vinho); transform: scale(1.1); }
.card__fav.is-active { color: var(--vinho); }
.card__body { padding: 1rem 1rem .4rem; flex: 1; display: flex; flex-direction: column; gap: .45rem; }
.card__title { font-size: .92rem; font-weight: 700; color: var(--texto); line-height: 1.3; min-height: 2.4em; }
.card__title:hover { color: var(--accent-txt); }
.card__ref { font-size: .78rem; color: var(--texto-leve); }
.card__ref strong { color: var(--texto-medio); }
.card__price { display: flex; align-items: baseline; gap: .5rem; margin-top: .2rem; }
.card__price-old { font-size: .82rem; color: var(--texto-leve); text-decoration: line-through; }
.card__price-now { font-size: 1.25rem; font-weight: 800; color: var(--primaria); }
.card__variations { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.card__foot { padding: .4rem 1rem 1rem; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb { display: flex; align-items: center; gap: .55rem; font-size: .85rem; color: var(--texto-leve); padding: 1.1rem 0; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--accent-txt); }
.breadcrumb i { font-size: .7rem; }

/* ============================================================
   PÁGINA DE PRODUTO (PDP)
   ============================================================ */
.pdp { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 1.6rem; padding-bottom: 2.5rem; }
.pdp__thumbs { display: flex; flex-direction: column; gap: .7rem; }
.pdp__thumb { border: 2px solid var(--borda); border-radius: 10px; overflow: hidden; cursor: pointer; transition: var(--transition); background:#fff; }
.pdp__thumb:hover { border-color: var(--accent); }
.pdp__thumb.is-active { border-color: var(--primaria); }
.pdp__stage { border: 1px solid var(--borda); border-radius: 16px; overflow: hidden; background: #fff; position: relative; cursor: zoom-in; }
.pdp__stage img { width: 100%; transition: transform .35s ease; }
.pdp__stage.zoom img { transform: scale(1.8); cursor: zoom-out; }
.pdp__zoom-hint { position: absolute; bottom: 10px; right: 12px; font-size: .72rem; color: var(--texto-leve); background: rgba(255,255,255,.85); padding: .25rem .55rem; border-radius: 6px; }

.pdp__info h1 { font-size: 1.55rem; font-weight: 800; line-height: 1.25; margin-bottom: .5rem; }
.pdp__ref { font-size: .85rem; color: var(--texto-leve); margin-bottom: 1rem; }
.pdp__price { display: flex; align-items: baseline; gap: .7rem; margin-bottom: 1.2rem; }
.pdp__price .old { font-size: 1rem; color: var(--texto-leve); text-decoration: line-through; }
.pdp__price .now { font-size: 2rem; font-weight: 800; color: var(--primaria); }
.pdp__price .save { background: var(--accent-soft); color: var(--accent-txt); font-weight: 700; font-size: .8rem; padding: .25rem .55rem; border-radius: 6px; }
.pdp__parcela { font-size: .85rem; color: var(--texto-medio); margin-top: -.7rem; margin-bottom: 1.2rem; }
.opt-group { margin-bottom: 1.2rem; }
.opt-group h4 { font-size: .85rem; font-weight: 700; margin-bottom: .5rem; }
.opt-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.opt-size, .opt-color { cursor: pointer; transition: var(--transition); }
.opt-size {
    min-width: 46px; height: 40px; padding: 0 12px; border: 1.5px solid var(--borda); border-radius: 9px;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; color: var(--texto-medio); background:#fff;
}
.opt-size.is-active { border-color: var(--primaria); background: var(--primaria); color: #fff; }
.opt-color { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--borda); position: relative; }
.opt-color.is-active { box-shadow: 0 0 0 2px var(--accent); }
.pdp__qty { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.3rem; }
.qty-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--borda); border-radius: 9px; overflow: hidden; }
.qty-stepper button { width: 40px; height: 44px; font-size: 1.1rem; color: var(--primaria); }
.qty-stepper button:hover { background: var(--creme); }
.qty-stepper input { width: 48px; height: 44px; text-align: center; border: none; border-left: 1px solid var(--borda); border-right: 1px solid var(--borda); font-weight: 700; }
.pdp__actions { display: flex; gap: .8rem; }
.pdp__actions .btn { flex: 1; }
.pdp__perks { margin-top: 1.6rem; border-top: 1px solid var(--borda); padding-top: 1.2rem; display: grid; gap: .8rem; }
.perk { display: flex; align-items: center; gap: .7rem; font-size: .85rem; color: var(--texto-medio); }
.perk i { color: var(--primaria); font-size: 1.1rem; width: 24px; text-align: center; }

.pdp-desc { padding: 2rem 0; border-top: 1px solid var(--borda); }
.pdp-desc h3 { font-size: 1.2rem; margin-bottom: .8rem; }
.pdp-desc p { color: var(--texto-medio); max-width: 70ch; }

/* ============================================================
   PÁGINA DE CATEGORIA / BUSCA
   ============================================================ */
.shop { display: grid; grid-template-columns: 260px 1fr; gap: 1.8rem; padding-bottom: 3rem; }
.filters { background: #fff; border: 1px solid var(--borda); border-radius: var(--radius); padding: 1.2rem; align-self: start; position: sticky; top: 150px; }
.filters h3 { font-size: 1rem; margin-bottom: 1rem; }
.filter-block { padding: 1rem 0; border-top: 1px solid var(--borda-2); }
.filter-block:first-of-type { border-top: none; padding-top: 0; }
.filter-block h4 { font-size: .85rem; font-weight: 700; margin-bottom: .7rem; }
.filter-block label { display: flex; align-items: center; gap: .55rem; font-size: .88rem; color: var(--texto-medio); padding: .25rem 0; cursor: pointer; }
.filter-block label:hover { color: var(--accent-txt); }
.price-inputs { display: flex; align-items: center; gap: .5rem; }
.price-inputs input { width: 100%; height: 38px; border: 1px solid var(--borda); border-radius: 7px; padding: 0 .6rem; font-size: .85rem; }

.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; flex-wrap: wrap; }
.shop-toolbar .count { font-size: .9rem; color: var(--texto-medio); }
.sortbox { display: flex; align-items: center; gap: .5rem; }
.sortbox select { height: 42px; border: 1px solid var(--borda); border-radius: 9px; padding: 0 2rem 0 .9rem; font-size: .88rem; background: #fff; font-weight: 600; cursor: pointer; }

.cat-hero { background: var(--creme); border-radius: 16px; padding: 2rem 2.2rem; margin-bottom: 1.6rem; }
.cat-hero h1 { font-size: 1.9rem; font-weight: 800; }
.cat-hero p { color: var(--texto-medio); margin-top: .3rem; }

.pagination { display: flex; justify-content: center; gap: .5rem; margin-top: 2rem; }
.pagination a, .pagination span {
    min-width: 42px; height: 42px; padding: 0 .7rem; border-radius: 9px; border: 1px solid var(--borda);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; background: #fff; color: var(--texto-medio);
}
.pagination a:hover { border-color: var(--accent-txt); color: var(--accent-txt); }
.pagination .is-active { background: var(--primaria); color: #fff; border-color: var(--primaria); }

.empty { text-align: center; padding: 4rem 1rem; color: var(--texto-leve); }
.empty i { font-size: 3rem; color: var(--borda); margin-bottom: 1rem; }

/* ============================================================
   MINI-CART (drawer lateral)
   ============================================================ */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 300; opacity: 0; visibility: hidden; transition: var(--transition); }
.overlay.is-open { opacity: 1; visibility: visible; }
.drawer {
    position: fixed; top: 0; right: 0; height: 100%; width: 410px; max-width: 92vw; background: #fff; z-index: 310;
    transform: translateX(100%); transition: transform .35s ease; display: flex; flex-direction: column;
}
.drawer.is-open { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--borda); }
.drawer__head h3 { font-size: 1.1rem; }
.drawer__close { font-size: 1.3rem; color: var(--texto-medio); }
.drawer__close:hover { color: var(--accent-txt); }
.drawer__body { flex: 1; overflow-y: auto; padding: 1rem 1.4rem; }
.drawer__foot { border-top: 1px solid var(--borda); padding: 1.2rem 1.4rem; }
.ship-progress { background: var(--creme); border-radius: 10px; padding: .8rem 1rem; font-size: .82rem; margin-bottom: 1rem; }
.ship-progress .bar { height: 7px; background: var(--borda); border-radius: 4px; margin-top: .5rem; overflow: hidden; }
.ship-progress .bar span { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .4s ease; }

.mini-item { display: flex; gap: .8rem; padding: .9rem 0; border-bottom: 1px solid var(--borda-2); }
.mini-item img { width: 64px; height: 64px; border-radius: 9px; border: 1px solid var(--borda); object-fit: cover; }
.mini-item__info { flex: 1; min-width: 0; }
.mini-item__info h4 { font-size: .85rem; font-weight: 700; line-height: 1.25; }
.mini-item__meta { font-size: .75rem; color: var(--texto-leve); }
.mini-item__bottom { display: flex; align-items: center; justify-content: space-between; margin-top: .4rem; }
.mini-item__price { font-weight: 800; color: var(--primaria); font-size: .9rem; }
.mini-remove { color: var(--texto-leve); font-size: .8rem; }
.mini-remove:hover { color: var(--vinho); }
.drawer__total { display: flex; justify-content: space-between; font-size: 1.05rem; font-weight: 800; margin-bottom: 1rem; }

/* ============================================================
   CARRINHO (página)
   ============================================================ */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 1.8rem; padding-bottom: 3rem; }
.cart-table { background: #fff; border: 1px solid var(--borda); border-radius: var(--radius); overflow: hidden; }
.cart-row { display: grid; grid-template-columns: 90px 1fr auto auto auto; gap: 1rem; align-items: center; padding: 1.1rem; border-bottom: 1px solid var(--borda-2); }
.cart-row:last-child { border-bottom: none; }
.cart-row img { width: 80px; height: 80px; border-radius: 9px; border: 1px solid var(--borda); object-fit: cover; }
.cart-row__name { font-weight: 700; font-size: .92rem; }
.cart-row__meta { font-size: .78rem; color: var(--texto-leve); margin-top: .2rem; }
.summary { background: #fff; border: 1px solid var(--borda); border-radius: var(--radius); padding: 1.4rem; align-self: start; position: sticky; top: 150px; }
.summary h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.summary__line { display: flex; justify-content: space-between; padding: .5rem 0; font-size: .92rem; color: var(--texto-medio); }
.summary__line--total { border-top: 1px solid var(--borda); margin-top: .5rem; padding-top: 1rem; font-size: 1.2rem; font-weight: 800; color: var(--texto); }
.coupon { display: flex; gap: .5rem; margin: 1rem 0; }
.coupon input { flex: 1; height: 44px; border: 1px solid var(--borda); border-radius: 9px; padding: 0 .9rem; }
.coupon-msg { font-size: .82rem; margin-top: -.5rem; margin-bottom: .8rem; }
.coupon-msg.ok { color: var(--primaria-2); }
.coupon-msg.err { color: var(--vinho); }

/* ============================================================
   CHECKOUT
   ============================================================ */
.checkout { display: grid; grid-template-columns: 1fr 380px; gap: 1.8rem; padding-bottom: 3rem; }
.co-step { background: #fff; border: 1px solid var(--borda); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.3rem; }
.co-step h3 { font-size: 1.1rem; margin-bottom: 1.1rem; display: flex; align-items: center; gap: .6rem; }
.co-step h3 .num { width: 28px; height: 28px; border-radius: 50%; background: var(--primaria); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .82rem; font-weight: 600; color: var(--texto-medio); }
.field input, .field select { height: 46px; border: 1px solid var(--borda); border-radius: 9px; padding: 0 .9rem; font-size: .92rem; }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(104,133,81,.3); }
.ship-option, .pay-option { display: flex; align-items: center; gap: .8rem; border: 1.5px solid var(--borda); border-radius: 10px; padding: .9rem 1rem; margin-bottom: .7rem; cursor: pointer; transition: var(--transition); }
.ship-option:hover, .pay-option:hover { border-color: var(--accent); }
.ship-option.is-active, .pay-option.is-active { border-color: var(--primaria); background: var(--creme); }
.ship-option__name { font-weight: 700; font-size: .9rem; }
.ship-option__prazo { font-size: .78rem; color: var(--texto-leve); }
.ship-option__price { margin-left: auto; font-weight: 800; color: var(--primaria); }
.pay-methods { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ============================================================
   ABOUT / NEWSLETTER / FOOTER
   ============================================================ */
.about { background: var(--branco); color: var(--texto); border-top: 1px solid var(--borda); }
.about .container { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; padding: 3rem 18px; }
.about h2 { font-size: 1.8rem; margin-bottom: 1rem; color: var(--accent); }
.about p { color: var(--texto-medio); margin-bottom: 1rem; max-width: 50ch; }
.about__art { font-size: 9rem; text-align: center; opacity: .9; color: var(--accent); }

.news { background: var(--primaria); color: #fff; padding: 2.5rem 0; }
.news .container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.news h3 { font-size: 1.5rem; }
.news p { opacity: .95; }
.news form { display: flex; gap: .6rem; flex: 1; min-width: 300px; max-width: 520px; }
.news input { flex: 1; height: 50px; border: none; border-radius: 9px; padding: 0 1rem; }
.news .btn { background: var(--accent); color: var(--primaria); }
.news .btn:hover { background: var(--accent-hover); }

.footer { background: var(--creme); color: var(--texto-medio); padding: 3rem 0 0; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer h4 { color: var(--primaria); font-size: 1rem; margin-bottom: 1.1rem; }
.footer a, .footer p { font-size: .88rem; color: var(--texto-medio); line-height: 2; }
.footer a:hover { color: var(--primaria); }
.footer__logo .logo__agro { color: var(--primaria); }
.footer__logo .logo__ilha { color: var(--accent); }
.footer__social { display: flex; gap: .7rem; margin-top: 1rem; }
.footer__social a { width: 40px; height: 40px; border-radius: 50%; background: var(--primaria); display: flex; align-items: center; justify-content: center; color: #fff; }
.footer__social a:hover { background: var(--primaria-2); transform: translateY(-2px); }
.footer__bottom { background: var(--primaria); padding: 1.3rem 0; text-align: center; font-size: .8rem; color: #fff; }
.payflags { display: flex; gap: .5rem; flex-wrap: wrap; }
.payflags span { background: var(--caramelo); color: var(--primaria-esc); font-size: 1.4rem; width: 46px; height: 32px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }

/* ============================================================
   WHATSAPP FLUTUANTE
   ============================================================ */
.wpp-float {
    position: fixed; right: 22px; bottom: 22px; z-index: 250;
    width: 60px; height: 60px; border-radius: 50%; background: #25D366; color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1.9rem;
    box-shadow: 0 6px 20px rgba(37,211,102,.5); transition: var(--transition); animation: wppPulse 2.4s infinite;
}
.wpp-float:hover { transform: scale(1.08); }
@keyframes wppPulse { 0%{ box-shadow: 0 0 0 0 rgba(37,211,102,.5);} 70%{ box-shadow: 0 0 0 16px rgba(37,211,102,0);} 100%{ box-shadow: 0 0 0 0 rgba(37,211,102,0);} }

/* ============================================================
   NEWSLETTER POP-UP
   ============================================================ */
.popup { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; }
.popup.is-open { display: flex; }
.popup__back { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.popup__box {
    position: relative; background: #fff; border-radius: 18px; max-width: 460px; width: 92%;
    padding: 2.4rem; text-align: center; animation: pop .35s ease;
}
@keyframes pop { from { transform: scale(.9); opacity: 0;} to { transform: scale(1); opacity: 1; } }
.popup__box .emoji { font-size: 3rem; }
.popup__box h3 { font-size: 1.5rem; margin: .5rem 0; color: var(--primaria); }
.popup__box p { color: var(--texto-medio); margin-bottom: 1.3rem; }
.popup__box form { display: flex; flex-direction: column; gap: .7rem; }
.popup__box input { height: 50px; border: 1px solid var(--borda); border-radius: 9px; padding: 0 1rem; }
.popup__close { position: absolute; top: 12px; right: 14px; font-size: 1.4rem; color: var(--texto-leve); }

/* ============================================================
   BUSCA EM MODAL
   ============================================================ */
.searchmodal { position: fixed; inset: 0; z-index: 350; display: none; }
.searchmodal.is-open { display: block; }
.searchmodal__back { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.searchmodal__box { position: relative; background: #fff; max-width: 760px; margin: 6vh auto 0; border-radius: 16px; padding: 1.5rem; }
.searchmodal__box form { display: flex; gap: .6rem; }
.searchmodal__box input { flex: 1; height: 54px; border: 2px solid var(--borda); border-radius: 10px; padding: 0 1rem; font-size: 1.05rem; }
.searchmodal__hints { margin-top: 1.1rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.searchmodal__hints a { background: var(--creme); padding: .4rem .9rem; border-radius: 30px; font-size: .82rem; font-weight: 600; }
.searchmodal__hints a:hover { background: var(--accent); color: #fff; }

/* ============================================================
   MENU MOBILE
   ============================================================ */
.mnav { position: fixed; top: 0; left: 0; height: 100%; width: 320px; max-width: 88vw; background: #fff; z-index: 320; transform: translateX(-100%); transition: transform .35s ease; display: flex; flex-direction: column; }
.mnav.is-open { transform: translateX(0); }
.mnav__head { background: var(--primaria); color: #fff; padding: 1.3rem 1.4rem; display: flex; align-items: center; justify-content: space-between; }
.mnav__head .logo__agro, .mnav__head .logo__ilha { color: #fff; }
.mnav__body { flex: 1; overflow-y: auto; padding: .5rem 0; }
.mnav__body a { display: flex; align-items: center; gap: .8rem; padding: .9rem 1.4rem; font-weight: 600; color: var(--texto); border-bottom: 1px solid var(--borda-2); }
.mnav__body a:hover { background: var(--creme); color: var(--accent-txt); }
.mnav__body a .dot { width: 12px; height: 12px; border-radius: 50%; }
.hamburger { display: none; font-size: 1.5rem; color: var(--primaria); }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 1080px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .megamenu__grid { grid-template-columns: repeat(3, 1fr); }
    .promo-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .deptbar__links > a { display: none; }
    .shop { grid-template-columns: 1fr; }
    .filters { position: static; display: none; }
    .filters.is-open { display: block; }
    .cart-layout, .checkout { grid-template-columns: 1fr; }
    .summary { position: static; }
    .pdp { grid-template-columns: 80px 1fr; }
    .pdp__info { grid-column: 1 / -1; }
    .about .container { grid-template-columns: 1fr; }
    .about__art { display: none; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    :root { --header-h: 68px; }
    .topbar__list { gap: 1rem; }
    .topbar .shipbar, .topbar__list .hide-sm { display: none; }
    .header__actions .haction__text { display: none; }
    .hamburger { display: block; }
    .dept-toggle span { display: none; }
    .header__main { gap: .8rem; }
    .logo__agro, .logo__ilha { font-size: 1.35rem; }
    .search input { height: 44px; }
    .slide { padding: 2rem 1.5rem; min-height: 280px; }
    /* Precisa vir depois de .slide: mesma especificidade, e o banner
       em imagem não pode herdar a altura mínima do slide de texto. */
    .slide--img { padding: 0; min-height: 0; }
    .slide__content { max-width: 100%; }
    .slide h2 { font-size: 1.7rem; }
    .slide p { font-size: .95rem; }
    .promo-grid--2 { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .products-track > .card { flex: 0 0 200px; }
    .cart-row { grid-template-columns: 70px 1fr; grid-template-areas: 'img name' 'img bottom'; row-gap: .5rem; }
    .footer__grid { grid-template-columns: 1fr; }
    .news .container { flex-direction: column; text-align: center; }
}

@media (max-width: 460px) {
    .products-grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
    .card__title { font-size: .82rem; }
    .card__price-now { font-size: 1.05rem; }
    .pdp { grid-template-columns: 1fr; }
    .pdp__thumbs { flex-direction: row; order: 2; }
    .section { padding: 1.6rem 0; }
}

/* ============================================================
   BLOCOS EM IMAGEM DA HOME
   Selo em arte, carrossel de destaques em foto, faixa larga e
   foto da seção "Conheça a loja". Todos aparecem só quando há
   arquivo enviado; sem imagem, a home usa a versão em HTML.
   ============================================================ */
.trust-item--img { display: block; }
.trust-item--img img { width: 100%; height: auto; display: block; border-radius: 8px; }

.dest-track { display: flex; gap: 1.2rem; overflow-x: auto; scroll-behavior: smooth; padding: .5rem 0 1rem; scrollbar-width: none; }
.dest-track::-webkit-scrollbar { display: none; }
.dest-card {
    position: relative; flex: 0 0 auto; width: 230px; aspect-ratio: 492/672;
    border-radius: 14px; overflow: hidden; box-shadow: var(--sombra); transition: var(--transition);
}
.dest-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: var(--transition); }
.dest-card:hover { transform: translateY(-4px); box-shadow: var(--sombra-hover); }
.dest-card:hover img { transform: scale(1.05); }

/* Duas camadas separadas em vez de um degradê preso ao rótulo: assim o nome
   pode subir para o centro sem carregar o fundo junto.
   ::before = degradê do rodapé (estado parado)
   ::after  = tinta escura sobre a foto (no hover) */
.dest-card::before, .dest-card::after {
    content: ''; position: absolute; z-index: 1; pointer-events: none;
    transition: opacity var(--transition);
}
.dest-card::before {
    left: 0; right: 0; bottom: 0; height: 55%;
    background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0));
}
.dest-card::after { inset: 0; background: rgba(0,0,0,.72); opacity: 0; }
.dest-card:hover::before { opacity: 0; }
.dest-card:hover::after  { opacity: 1; }

/* O rótulo tem largura do próprio texto (sem right:0), então dá para animar
   as duas coordenadas ao mesmo tempo: parte do canto inferior esquerdo e
   viaja na diagonal até o centro. Os dois estados escrevem o transform como
   translate(x,y) — se um fosse translateY() o navegador cairia em
   interpolação por matriz e o caminho poderia não ser reto. */
.dest-card__label {
    position: absolute; z-index: 2;
    left: .95rem; top: calc(100% - .9rem);
    transform: translate(0, -100%);
    max-width: calc(100% - 1.9rem);
    color: #fff; font-weight: 800; font-size: 1.05rem; line-height: 1.15;
    transition: left var(--transition), top var(--transition), transform var(--transition);
}
.dest-card:hover .dest-card__label {
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.faixa { display: block; border-radius: 14px; overflow: hidden; }
.faixa img { width: 100%; height: auto; display: block; }

.about__foto { border-radius: 16px; overflow: hidden; box-shadow: var(--sombra); }
.about__foto img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 577/313; }

@media (max-width: 720px) {
    .dest-card { width: 168px; }
    .dest-card__label { font-size: .92rem; left: .7rem; top: calc(100% - .7rem); max-width: calc(100% - 1.4rem); }
    .about .container { grid-template-columns: 1fr; }
}

/* Hero em telas menores: o vazamento lateral encolhe junto com a tela. */
@media (max-width: 900px) {
    .hero { --slide-w: calc(100vw - 4rem); --slide-gap: 20px; }
}
@media (max-width: 560px) {
    .hero { --slide-w: calc(100vw - 2.2rem); --slide-gap: 12px; }
    .slider__arrow--prev { left: 10px; }
    .slider__arrow--next { right: 10px; }
}
