/* Camada visual mobile-first da loja. Carregada só no storefront, depois de store.css. */
:root {
    --display: 'Poppins', system-ui, sans-serif;
    --body: 'Poppins', system-ui, sans-serif;
    --tint-warm: #fff1ec;
    --tint-cool: #f2f0ff;
    --radius: 24px;
    --soft-shadow: 0 1px 2px rgba(26, 26, 26, .04), 0 14px 34px -26px rgba(26, 26, 26, .3);
    --tabbar-h: 62px;
}

html { font-size: 93.75%; }
body { font-size: 1rem; line-height: 1.6; -webkit-tap-highlight-color: transparent; }
.shell { width: min(1120px, calc(100% - 48px)); }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

h1 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); font-weight: 800; line-height: 1.15; letter-spacing: -.03em; }
h2 { font-size: clamp(1.25rem, 2.2vw, 1.7rem); font-weight: 700; line-height: 1.25; letter-spacing: -.02em; }
h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.35; }
.support-copy h1, .donation-success-card h1, .legal-copy h1 { font-size: clamp(1.7rem, 4vw, 2.8rem); }
.support-copy > p, .donation-success-card > p { font-size: 1rem; }
.eyebrow { font-size: .72rem; letter-spacing: .1em; margin-bottom: 10px; }

/* Botões e campos */
.button { min-height: 48px; padding: 12px 24px; border-radius: 999px; font-weight: 600; }
.button.small { min-height: 40px; padding: 8px 16px; font-size: .82rem; }
.input, select, textarea { min-height: 48px; padding: 12px 16px; border-radius: 14px; }
.flash { border-radius: 16px; }
.panel { border-color: transparent; box-shadow: var(--soft-shadow); }

/* Cabeçalho */
.site-header { background: rgba(255, 255, 255, .92); border-bottom: 0; box-shadow: 0 1px 0 rgba(26, 26, 26, .06); }
.header-main { min-height: 76px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; }
.brand-mark { border-radius: 14px; }
.header-search { display: flex; align-items: center; justify-self: center; width: 100%; max-width: 520px; min-height: 50px; padding: 5px 5px 5px 20px; background: var(--sand); border-color: transparent; }
.header-search:focus-within { background: var(--surface); }
.header-search button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; background: var(--rust); border-radius: 50%; }
.header-search button .icon { width: 18px; height: 18px; }
.header-actions { gap: 10px; }
.header-actions a, .header-actions > a:first-child { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--sand); font-size: .875rem; transition: background .18s, color .18s; }
.header-actions a:hover { background: var(--tint-warm); color: var(--rust-dark); }
.main-nav { display: block; border-top: 0; }
.nav-row { display: flex; gap: 8px; min-height: 0; padding: 0 0 12px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.nav-row::-webkit-scrollbar { display: none; }
.nav-row a { flex: 0 0 auto; padding: 8px 16px; border-radius: 999px; background: var(--sand); color: var(--ink); font-size: .82rem; scroll-snap-align: start; transition: background .18s, color .18s; }
.nav-row a:hover, .nav-row a[aria-current] { background: var(--ink); color: #fff; }
.menu-toggle { display: none; }

/* Barra de navegação inferior (só telemóvel) */
.tabbar { display: none; }

/* Hero */
.hero { padding: 44px 0 48px; border-radius: 0 0 40px 40px; background: linear-gradient(180deg, #fff 0%, var(--tint-warm) 48%, var(--tint-cool) 100%); text-align: center; }
.hero:after { display: none; }
.hero-copy { min-width: 0; }
.hero-copy h1 { max-width: 820px; margin: 0 auto 14px; font-size: clamp(1.7rem, 4.4vw, 2.9rem); }
.hero-copy > p { margin: 0 auto; font-size: 1rem; }
.hero-search { display: flex; align-items: center; width: min(640px, 100%); min-height: 60px; margin: 28px auto 0; padding: 5px 5px 5px 24px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 8px rgba(255, 255, 255, .55); }
.hero-search input { flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; outline: 0; }
.hero-search .button { min-height: 50px; padding-inline: 28px; }
.hero-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.hero-chips a { padding: 9px 18px; border-radius: 999px; background: rgba(255, 255, 255, .75); text-decoration: none; font-size: .85rem; font-weight: 600; transition: background .18s, color .18s; }
.hero-chips a:hover { background: var(--ink); color: #fff; }

/* Faixa de confiança */
.trust-row { padding-top: 28px; background: transparent; color: var(--ink); }
.trust-grid { gap: 12px; background: transparent; }
.trust-item { padding: 18px 20px; border-radius: 20px; background: var(--surface); box-shadow: var(--soft-shadow); }
.trust-item span { color: var(--muted); }

/* Secções */
.section { padding: 56px 0; }
.section-tint { background: var(--surface); }
.section-heading { margin-bottom: 22px; }
.section-heading p { font-size: .95rem; }

.category-card { min-height: 150px; padding: 20px; border: 0; border-radius: 28px; background: var(--tint-warm); }
.category-card:nth-child(3n+2) { background: var(--tint-cool); }
.category-card:nth-child(3n+3) { background: var(--sand); }
.category-card:after { color: rgba(26, 26, 26, .05); }
.category-card h3 { margin: 22px 0 6px; font-size: 1.15rem; }
.category-card:after { font-size: 6.5rem; bottom: -28px; }

/* Cartão de produto */
.products-grid { gap: 28px 20px; }
.product-card { overflow: visible; border: 0; border-radius: 0; background: transparent; }
.product-card:hover { transform: none; box-shadow: none; }
.product-visual { aspect-ratio: 1.15; border-radius: 26px; }
.product-visual:has(img) { aspect-ratio: auto; }
.product-visual img { height: auto; object-fit: contain; transition: transform .35s; }
.product-card:hover .product-visual img { transform: scale(1.04); }
.product-badge { background: var(--surface); color: var(--ink); box-shadow: 0 4px 12px -6px rgba(26, 26, 26, .4); }
.product-badge.badge-dark { background: var(--ink); color: #fff; }
.product-card-body { padding: 12px 4px 0; }
.product-card h3 { margin: 6px 0 4px; font-size: 1rem; }
.product-card p { margin-bottom: 10px; font-size: .85rem; }
.product-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.product-price-row { flex-wrap: wrap; margin-top: 0; }
.product-price-row strong { font-size: 1.05rem; }
.icon-buy { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--rust); transition: background .18s; }
.icon-buy:hover { background: var(--rust-dark); }

/* Blocos da página inicial */
.goal-band { background: transparent; }
.goal-band:after { display: none; }
.goal-grid { padding: 44px; border-radius: 40px; background: var(--forest); }
.goal-item { border-color: transparent; border-radius: 18px; background: rgba(255, 255, 255, .1); }
.goal-item b { margin-left: auto; border-radius: 50%; font-weight: 400; }
.process-card { padding: 22px; border-top: 0; border-radius: 24px; box-shadow: var(--soft-shadow); }
.process-card b { color: var(--rust); font-size: 1.1rem; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--tint-warm); }
.process-card h3 { margin-top: 14px; }
.process-card p { font-size: .92rem; }
.faq-list details { margin-bottom: 10px; padding: 16px 20px; border: 0; border-radius: 18px; background: var(--surface); box-shadow: var(--soft-shadow); }
.faq-list summary { font-size: 1rem; }
.faq-list p { margin-bottom: 0; }

/* Catálogo */
.page-hero { padding: 32px 0 4px; border-bottom: 0; }
.page-hero h1 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); margin-bottom: 8px; }
.page-hero p { font-size: 1rem; }
.catalog-layout { padding-top: 28px; }
.filter-panel { border-color: transparent; box-shadow: var(--soft-shadow); top: 140px; }
.filter-panel summary { display: none; }
.catalog-toolbar { gap: 12px; }
.catalog-toolbar select { border-radius: 999px; }
.empty-state { border-radius: 28px; }
.pagination a { width: 42px; height: 42px; border-radius: 50%; }

/* Produto */
.product-detail { padding-top: 36px; }
.product-gallery-main { border-radius: 32px; }
.product-gallery-main:has(img) { aspect-ratio: auto; }
.product-gallery-main img { height: auto; max-height: 80vh; object-fit: contain; }
.detail-copy h1 { font-size: clamp(1.4rem, 2.8vw, 2rem); margin-bottom: 12px; }
.detail-lead { font-size: 1rem; }
.detail-price strong { font-size: 1.7rem; }
.product-gallery-main .product-monogram { font-size: 6rem; }
.rich-copy h2 { font-size: 1.3rem; }
.buy-box { border-color: transparent; box-shadow: var(--soft-shadow); }
.choice { border-radius: 14px; }
.rich-copy { border-color: transparent; box-shadow: var(--soft-shadow); }
.spec-card { border-radius: 24px; }

/* Carrinho, checkout e conta */
.cart-thumb { border-radius: 18px; }
.summary-card { top: 140px; }
.payment-option { border-radius: 16px; }
.reference-cell { border-radius: 16px; }
.auth-wrap .panel { padding: 36px 28px; border-radius: 28px; text-align: center; }
.auth-wrap h1 { font-size: 1.6rem; margin-bottom: 22px; }
.google-button:hover { background: var(--sand); }
.account-nav a { border-radius: 999px; padding-inline: 16px; }
.account-nav a.active { background: var(--ink); color: #fff; }
.account-layout { grid-template-columns: 250px minmax(0, 1fr); padding-top: 24px; }
.account-main { display: grid; gap: 18px; align-content: start; min-width: 0; }
.account-hero { display: flex; align-items: center; gap: 16px; }
.account-hero h1 { margin-bottom: 2px; }
.account-hero p { margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.account-avatar { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--rust); color: #fff; font: 700 1.4rem var(--display); }
.account-alert { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-radius: 20px; background: var(--tint-warm); }
.account-alert strong, .account-alert span { display: block; }
.account-alert span { color: var(--muted); font-size: .85rem; }
.account-main .section-heading { display: flex; align-items: center; margin-bottom: 14px; }
.account-main .section-heading h2 { font-size: 1.15rem; }
a.stat-card { display: block; text-decoration: none; transition: transform .18s; }
a.stat-card:hover { transform: translateY(-2px); }
a.stat-card span { color: var(--muted); font-size: .85rem; }
.library-item h3 { margin: 0 0 3px; font-size: .98rem; }
.library-item small, .order-row small { color: var(--muted); }
.cart-thumb { overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.order-row:first-child { padding-top: 0; }
.order-row:last-child { padding-bottom: 0; border-bottom: 0; }
.order-row strong, .order-row small { display: block; }
.status-awaiting_payment, .status-pending { background: var(--tint-warm); color: var(--rust-dark); }
.status-refunded { background: var(--tint-cool); color: var(--forest); }
.account-main .empty-state { padding: 28px 20px; }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.stat-card { border-color: transparent; border-radius: 20px; box-shadow: var(--soft-shadow); }
.library-item { border-radius: 20px; background: var(--surface); }

/* Modal de login */
.login-modal { width: min(420px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 28px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -30px rgba(26, 26, 26, .6); }
.login-modal::backdrop { background: rgba(26, 26, 26, .5); backdrop-filter: blur(3px); }
.login-modal-body { position: relative; padding: 36px 28px 28px; text-align: center; }
.login-modal-body h2 { margin: 0 0 22px; font-size: 1.3rem; }
.login-modal-close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--sand); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }

/* Newsletter e rodapé */
.newsletter-band { padding: 0 0 56px; background: transparent; }
.newsletter-grid { padding: 36px 40px; border-radius: 36px; background: var(--rust); }
.newsletter-form input { border-radius: 999px; padding: 14px 20px; }
.site-footer { border-radius: 36px 36px 0 0; }

@media (max-width: 980px) {
    .goal-grid { padding: 40px; }
}

@media (max-width: 760px) {
    body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
    html { font-size: 87.5%; }
    input, select, textarea { font-size: 16px; } /* evita o zoom automático do iOS */
    .shell { width: calc(100% - 32px); }

    .header-main { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 64px; gap: 10px; }
    .brand > span:last-child { display: none; }
    .header-search { max-width: none; min-height: 46px; padding-left: 16px; }
    .header-search button { width: 36px; height: 36px; }
    .header-actions { display: none; }

    /* Menu: a navegação principal abre por baixo do cabeçalho */
    .menu-toggle { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: var(--sand); color: var(--ink); cursor: pointer; }
    .menu-toggle[aria-expanded="true"] { background: var(--ink); color: #fff; }
    .main-nav { display: none; }
    .main-nav.is-open { position: absolute; top: 100%; left: 0; right: 0; display: block; max-height: calc(100dvh - 64px - var(--tabbar-h) - env(safe-area-inset-bottom)); overflow-y: auto; border-radius: 0 0 24px 24px; background: #fff; box-shadow: 0 24px 40px -24px rgba(26, 26, 26, .35); }
    .nav-row { display: grid; gap: 0; padding: 4px 0 12px; overflow: visible; }
    .nav-row a, .nav-row a:hover { padding: 15px 2px; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); font-size: 1rem; }
    .nav-row a:last-child { border-bottom: 0; }
    .nav-row a[aria-current] { background: transparent; color: var(--rust); }
    body.menu-open::before { content: ''; position: fixed; inset: 0; z-index: 25; background: rgba(26, 26, 26, .4); }

    .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: env(safe-area-inset-bottom); background: rgba(255, 255, 255, .96); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
    .tabbar a { position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; min-height: var(--tabbar-h); color: var(--muted); font-size: .68rem; font-weight: 600; text-decoration: none; }
    .tabbar a[aria-current] { color: var(--rust); }
    .tabbar .icon { width: 24px; height: 24px; }
    .tabbar-badge { position: absolute; top: 6px; left: calc(50% + 6px); display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--rust); color: #fff; font-size: .65rem; }
    .tabbar-badge[hidden] { display: none; }
    .toast-stack { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); }

    .hero { padding: 22px 0 28px; border-radius: 0 0 28px 28px; text-align: left; }
    .hero-copy h1 { margin-inline: 0; font-size: 1.85rem; }
    .hero-copy > p { margin-inline: 0; font-size: 1rem; }
    .hero-search { display: none; }
    .hero-chips { flex-wrap: nowrap; justify-content: flex-start; margin: 18px -16px 0; padding-inline: 16px; overflow-x: auto; scrollbar-width: none; }
    .hero-chips::-webkit-scrollbar { display: none; }
    .hero-chips a { flex: 0 0 auto; }

    .section { padding: 36px 0; }
    .section-heading { margin-bottom: 16px; }
    .section-heading p { margin-bottom: 0; }

    /* Carris horizontais com encaixe */
    .trust-grid, .category-grid, .process-grid { display: flex; gap: 12px; margin-inline: -16px; padding: 4px 16px 16px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; }
    .trust-grid::-webkit-scrollbar, .category-grid::-webkit-scrollbar, .process-grid::-webkit-scrollbar { display: none; }
    .trust-grid { width: 100%; margin-inline: 0; }
    .trust-item, .category-card, .process-card { scroll-snap-align: start; }
    .trust-item { flex: 0 0 200px; padding: 14px 16px; }
    .category-card { flex: 0 0 64%; min-height: 132px; }
    .process-card { flex: 0 0 62%; }
    .category-grid .empty-state { flex: 1; }

    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
    .product-visual { border-radius: 20px; }
    .product-monogram { font-size: 3.2rem; }
    .product-card-body { padding-inline: 2px; }
    .product-meta span:last-child, .product-card p { display: none; }
    .product-card h3 { font-size: .9rem; }
    .product-price-row strong { font-size: .95rem; }
    .icon-buy { width: 36px; height: 36px; }

    .goal-grid { gap: 28px; padding: 28px 22px; border-radius: 28px; }
    .newsletter-band { padding-bottom: 36px; }
    .newsletter-grid { gap: 22px; padding: 28px 22px; border-radius: 28px; }
    .newsletter-form { display: grid; }
    .site-footer { padding-top: 40px; border-radius: 28px 28px 0 0; }

    .page-hero { padding-top: 24px; }
    .catalog-layout { gap: 18px; padding: 18px 0 56px; }
    .filter-panel { padding: 0; }
    .filter-panel summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; font-weight: 600; cursor: pointer; list-style: none; }
    .filter-panel summary::-webkit-details-marker { display: none; }
    .filter-panel summary:after { content: '+'; font-size: 1.3rem; line-height: 1; color: var(--rust); }
    .filter-panel[open] summary:after { content: '−'; }
    .filter-panel form { padding: 4px 18px 18px; }
    .catalog-toolbar { align-items: center; font-size: .85rem; }

    .product-detail { padding-top: 16px; }
    .product-detail-grid { gap: 22px; }
    .product-gallery-main { border-radius: 24px; }
    .detail-copy h1 { font-size: 1.45rem; }
    .breadcrumb { margin-bottom: 12px; }
    .buy-box > .button { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); z-index: 5; box-shadow: 0 12px 26px -12px rgba(255, 87, 34, .7); }
    .product-tabs { gap: 18px; }

    .cart-layout, .checkout-layout, .account-layout { gap: 18px; padding: 20px 0 56px; }
    .panel { padding: 20px; }
    .auth-wrap { margin: 32px auto 56px; }
    .login-modal { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 28px 28px 0 0; }
    .login-modal-body { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
    .account-nav { display: flex; align-items: center; gap: 6px; padding: 8px; overflow-x: auto; scrollbar-width: none; }
    .account-nav::-webkit-scrollbar { display: none; }
    .account-nav > strong { display: none; }
    .account-nav a, .account-nav form { flex: 0 0 auto; white-space: nowrap; }
    .account-layout { grid-template-columns: minmax(0, 1fr); }
    .account-avatar { width: 46px; height: 46px; font-size: 1.15rem; }
    .account-alert { flex-direction: column; align-items: stretch; }
    .library-item { grid-template-columns: 54px minmax(0, 1fr) auto; }
    .library-item form { grid-column: auto; }
    .stat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .stat-card { padding: 14px 12px; }
    .stat-card span { font-size: .72rem; line-height: 1.3; display: block; }
    .stat-card strong { font-size: 1.4rem; }
}

@media (max-width: 520px) {
    /* Um produto por linha em ecrãs estreitos */
    .products-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .product-visual { border-radius: 24px; }
    .product-card-body { padding-top: 14px; }
    .product-meta span:last-child { display: inline; }
    .product-card p { display: block; }
    .product-card h3 { font-size: 1.1rem; }
    .product-price-row strong { font-size: 1.1rem; }
    .icon-buy { width: 44px; height: 44px; }
}
