/* ==========================================================================
   CLOSET MARY — layout moderno e elegante (paleta preto / branco / cinza)
   Testado para desktop, Android e iPhone (safe-area, dvh, inputs 16px)
   ========================================================================== */
:root {
    --bg-color: #fcfcfc;
    --surface: #ffffff;
    --soft: #f1eeea;
    --text-main: #111111;
    --text-muted: #666666;
    --border-color: #ebebeb;
    --primary-color: #000000;
    --hover-color: #333333;
    --accent-color: #9b9b9b;
    --success-color: #2b8a3e;
    --danger-color: #c92a2a;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    --blur: blur(18px);
    --gutter: 1.25rem;
    --safe-l: env(safe-area-inset-left, 0px);
    --safe-r: env(safe-area-inset-right, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (min-width: 768px) { :root { --gutter: 2rem; } }

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html.no-scroll, html.no-scroll body { overflow: hidden; }
body { font-family: var(--font-body); color: var(--text-main); background: var(--bg-color); line-height: 1.5; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; transition: var(--transition); touch-action: manipulation; }
input, select, textarea { font-family: inherit; color: inherit; }
img { max-width: 100%; display: block; height: auto; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 3px; }
::selection { background: #111; color: #fff; }

/* ---------- Loader / manutenção ---------- */
#loader { position: fixed; inset: 0; background: #fff; z-index: 9999; display: flex; justify-content: center; align-items: center; transition: opacity .6s var(--ease), visibility .6s; pointer-events: none; opacity: 0; visibility: hidden; }
#loader.active { opacity: 1; visibility: visible; pointer-events: all; }
.loader-content { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.loader-text { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 600; letter-spacing: -.5px; animation: premiumPulse 2s ease-in-out infinite; }
.loader-bar { width: 140px; height: 2px; background: var(--border-color); position: relative; overflow: hidden; border-radius: 2px; }
.loader-bar::after { content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 40%; background: var(--primary-color); animation: loaderBar 1.6s cubic-bezier(.65,0,.35,1) infinite; }
@keyframes premiumPulse { 0%,100% { opacity: .4; transform: scale(.98); } 50% { opacity: 1; transform: scale(1); } }
@keyframes loaderBar { 0% { left: -40%; } 100% { left: 100%; } }

#maintenance-screen { position: fixed; inset: 0; background: var(--bg-color); z-index: 10005; display: none; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 2rem; }
.maintenance-content { display: flex; flex-direction: column; align-items: center; max-width: 500px; }
.maintenance-content h1 { font-family: var(--font-heading); font-size: 2.5rem; margin-bottom: 1rem; }
.maintenance-content p { color: var(--text-muted); line-height: 1.7; margin-bottom: 2.5rem; }
.maintenance-note { font-size: .8rem; opacity: .5; }

/* ---------- Faixa de avisos ---------- */
.announce { background: var(--primary-color); color: #fff; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; text-align: center; padding: .55rem var(--gutter); display: flex; justify-content: center; align-items: center; gap: .9rem; }
.announce .dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.5); }
@media (max-width: 640px) { .announce .dot, .announce-2 { display: none; } .announce { font-size: .66rem; } }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--border-color); }
@media (min-width: 900px) { .header { background: rgba(255,255,255,.88); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); } }
.header-container { position: relative; z-index: 0; max-width: 1280px; margin: 0 auto; height: 64px; padding: 0 max(var(--gutter), var(--safe-r)) 0 max(var(--gutter), var(--safe-l)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
@media (min-width: 900px) { .header-container { height: 76px; } }
.header-left { display: flex; align-items: center; justify-self: start; margin-left: -10px; }
.header-actions { display: flex; align-items: center; justify-self: end; margin-right: -10px; }
.logo { font-family: var(--font-heading); font-size: 1.45rem; font-weight: 600; letter-spacing: -.5px; white-space: nowrap; }
@media (min-width: 900px) { .logo { font-size: 1.85rem; } }
.icon-btn { position: relative; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 1.4rem; color: var(--text-main); }
.icon-btn:hover { background: rgba(0,0,0,.05); }
.icon-btn:active { transform: scale(.92); background: rgba(0,0,0,.07); }
@media (max-width: 380px) { .hide-xs { display: none; } }
@media (min-width: 900px) { .menu-toggle { display: none; } }
.badge { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 4px; background: var(--primary-color); color: #fff; font-size: .64rem; font-weight: 600; border-radius: 99px; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; transition: transform .3s; }
.badge.bag-anim, .bag-anim { animation: bagBounce .45s cubic-bezier(.175,.885,.32,1.275); }
@keyframes bagBounce { 0%,100% { transform: scale(1); } 50% { transform: scale(1.3); } }
#user-name-display { display: none !important; }

/* Navegação: gaveta no celular, barra centralizada no desktop */
.nav { position: fixed; top: 0; bottom: 0; left: 0; z-index: 2; width: min(86vw, 340px); background: #fff; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); transform: translateX(-102%); visibility: hidden; transition: transform .45s var(--ease), visibility .45s; box-shadow: none; overflow-y: auto; overscroll-behavior: contain; }
.nav.active { transform: none; visibility: visible; box-shadow: 12px 0 50px rgba(0,0,0,.18); }
.nav-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--border-color); }
.nav-brand { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 600; }
.nav-links { display: flex; flex-direction: column; padding: .75rem 1.5rem; flex: 1; }
.nav-links a { font-family: var(--font-heading); font-size: 1.45rem; padding: .85rem 0; border-bottom: 1px solid var(--border-color); color: var(--text-main); }
.nav-links a.active { font-style: italic; }
.nav-foot { padding: 1rem 1.5rem calc(1.5rem + var(--safe-b)); display: flex; flex-direction: column; gap: .4rem; background: #fafafa; }
.nav-foot a { display: flex; align-items: center; gap: .6rem; padding: .7rem 0; font-size: .9rem; color: var(--text-muted); }
.nav-backdrop { position: fixed; inset: 0; z-index: 1; background: rgba(0,0,0,.4); opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s; }
.nav-backdrop.active { opacity: 1; visibility: visible; }
@media (min-width: 900px) {
    .nav { position: static; width: auto; transform: none; visibility: visible; background: transparent; padding: 0; flex-direction: row; justify-content: center; border-top: 1px solid var(--border-color); box-shadow: none; overflow: visible; }
    .nav.active { box-shadow: none; }
    .nav-drawer-head, .nav-foot, .nav-backdrop { display: none; }
    .nav-links { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0 2.4rem; padding: 0 var(--gutter); }
    .nav-links a { font-family: var(--font-body); font-size: .78rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; padding: 1rem 0; border: 0; position: relative; color: var(--text-muted); }
    .nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: .65rem; height: 1px; background: var(--primary-color); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
    .nav-links a:hover, .nav-links a.active { color: var(--primary-color); font-style: normal; }
    .nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
}

/* Busca */
.search-panel { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--border-color); box-shadow: 0 24px 40px rgba(0,0,0,.06); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: var(--transition); max-height: calc(100dvh - 120px); max-height: calc(100vh - 120px); overflow-y: auto; }
@supports (height: 100dvh) { .search-panel { max-height: calc(100dvh - 120px); } }
.search-panel.active { opacity: 1; visibility: visible; transform: none; }
.search-inner { max-width: 760px; margin: 0 auto; padding: .9rem var(--gutter); display: flex; align-items: center; gap: .8rem; }
.search-inner i { font-size: 1.3rem; color: var(--text-muted); }
.search-inner input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 16px; padding: .6rem 0; background: transparent; -webkit-appearance: none; appearance: none; }
.search-results { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter) 1rem; }
.search-result-item { display: flex; gap: 1rem; align-items: center; padding: .6rem .5rem; border-radius: 10px; cursor: pointer; }
.search-result-item:hover { background: #f6f6f6; }
.search-result-item img { width: 46px; height: 58px; object-fit: cover; border-radius: 6px; background: var(--soft); }
.search-result-item h4 { font-size: .9rem; font-weight: 400; }
.search-result-item span { font-size: .82rem; font-weight: 600; }
.search-empty { padding: 1.2rem; text-align: center; font-size: .88rem; color: var(--text-muted); }

/* ---------- Botões ---------- */
.btn-interactive { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: .7rem; transition: var(--transition); }
.btn-interactive:active { transform: scale(.97); }
.btn-primary { background: var(--primary-color); color: #fff; padding: 1.05rem 2rem; width: 100%; font-size: .82rem; font-weight: 500; text-transform: uppercase; letter-spacing: .14em; border-radius: 999px; border: 1px solid var(--primary-color); min-height: 52px; }
.btn-primary:hover { background: var(--hover-color); border-color: var(--hover-color); }
.btn-outline { border: 1px solid var(--text-main); color: var(--primary-color); padding: .95rem 1.5rem; width: 100%; font-size: .82rem; font-weight: 500; text-transform: uppercase; letter-spacing: .14em; margin-top: 1rem; border-radius: 999px; background: transparent; min-height: 52px; }
.btn-outline:hover { background: var(--primary-color); color: #fff; }
.btn-light { background: #fff; color: #111; padding: 1rem 2.2rem; font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .16em; border-radius: 999px; min-height: 52px; display: inline-flex; align-items: center; gap: .6rem; }
.btn-light:hover { background: #111; color: #fff; }
.btn-text { padding: .7rem; margin-top: .5rem; width: 100%; color: var(--text-muted); border-radius: 8px; font-size: .85rem; font-weight: 500; }
.btn-text:hover { color: var(--primary-color); }
.btn-detail-action { display: flex; justify-content: center; align-items: center; gap: .6rem; }
.btn-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3); border-radius: 50%; border-top-color: #fff; animation: spin .75s linear infinite; }
.btn-outline .btn-spinner { border-color: rgba(0,0,0,.15); border-top-color: #000; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Layout comum ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 2.5rem max(var(--gutter), var(--safe-r)) 1rem max(var(--gutter), var(--safe-l)); }
.eyebrow { display: block; font-size: .7rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--accent-color); margin-bottom: .6rem; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.section-title { font-family: var(--font-heading); font-size: clamp(1.7rem, 4.5vw, 2.5rem); font-weight: 400; letter-spacing: -.5px; line-height: 1.15; }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; padding-bottom: 2px; border-bottom: 1px solid var(--text-main); }
.link-arrow:hover { gap: .7rem; }
.view-transition-container > * { animation: viewIn .6s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(78vh, 720px); min-height: min(78svh, 720px); display: flex; align-items: flex-end; color: #fff; background: #1a1a1a; overflow: hidden; }
.hero-media { position: absolute; inset: 0; background: url('https://images.unsplash.com/photo-1490481651871-ab68de25d43d?q=80&w=2070') center 30%/cover; transform: scale(1.04); animation: heroZoom 14s ease-out forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.2) 45%, rgba(0,0,0,.68) 100%); }
.hero-content { position: relative; z-index: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 3rem max(var(--gutter), var(--safe-r)) 3.5rem max(var(--gutter), var(--safe-l)); }
.hero .eyebrow { color: rgba(255,255,255,.8); }
.hero h1 { font-family: var(--font-heading); font-weight: 400; font-size: clamp(2.6rem, 8.5vw, 5.4rem); line-height: 1.02; letter-spacing: -1.5px; margin-bottom: 1.1rem; max-width: 16ch; }
.hero h1 em { font-style: italic; }
.hero p { font-size: clamp(.95rem, 2vw, 1.1rem); font-weight: 300; max-width: 34rem; opacity: .9; margin-bottom: 2rem; }

/* ---------- Benefícios ---------- */
.benefits { max-width: 1280px; margin: 0 auto; padding: 0 max(var(--gutter), var(--safe-r)) 0 max(var(--gutter), var(--safe-l)); display: grid; grid-template-columns: 1fr; border-bottom: 1px solid var(--border-color); }
.benefit { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 0; border-top: 1px solid var(--border-color); }
.benefit:first-child { border-top: 0; }
.benefit i { font-size: 1.6rem; flex: none; }
.benefit strong { display: block; font-size: .9rem; font-weight: 600; }
.benefit span { font-size: .8rem; color: var(--text-muted); }
@media (min-width: 768px) { .benefits { grid-template-columns: repeat(3, 1fr); } .benefit { border-top: 0; padding: 1.7rem 1rem; justify-content: center; } .benefit + .benefit { border-left: 1px solid var(--border-color); } }

/* ---------- Categorias (tiles) ---------- */
.cat-tiles { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) .3rem; }
.cat-tiles::-webkit-scrollbar { display: none; }
.cat-tile { position: relative; flex: 0 0 62%; max-width: 300px; aspect-ratio: 4/5; border-radius: 4px; overflow: hidden; background: var(--soft); scroll-snap-align: start; color: #fff; display: flex; align-items: flex-end; }
@media (min-width: 640px) { .cat-tile { flex-basis: 30%; } }
@media (min-width: 992px) { .cat-tile { flex-basis: calc(25% - .75rem); max-width: none; } }
.cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.cat-tile:hover img { transform: scale(1.05); }
.cat-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.65)); }
.cat-tile span { position: relative; z-index: 1; padding: 1.1rem 1.2rem; font-family: var(--font-heading); font-size: 1.35rem; display: flex; justify-content: space-between; align-items: center; width: 100%; }

/* ---------- Faixa WhatsApp ---------- */
.cta-band { background: var(--primary-color); color: #fff; margin-top: 4rem; }
.cta-inner { max-width: 1280px; margin: 0 auto; padding: 3.5rem max(var(--gutter), var(--safe-r)) 3.5rem max(var(--gutter), var(--safe-l)); display: flex; flex-direction: column; gap: 1.6rem; align-items: flex-start; }
.cta-inner h2 { font-family: var(--font-heading); font-weight: 400; font-size: clamp(1.7rem, 4.5vw, 2.6rem); line-height: 1.15; max-width: 20ch; }
.cta-inner p { color: rgba(255,255,255,.7); font-weight: 300; margin-top: .6rem; }
@media (min-width: 768px) { .cta-inner { flex-direction: row; align-items: center; justify-content: space-between; } }

/* ---------- Grid e cards de produto ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem .9rem; }
@media (min-width: 640px) { .grid { gap: 2.2rem 1.4rem; } }
@media (min-width: 992px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.8rem 1.6rem; } }
.grid-empty { grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; color: var(--text-muted); font-weight: 300; }

.product-card { display: flex; flex-direction: column; gap: .9rem; position: relative; }
.pc-media { position: relative; display: block; aspect-ratio: 3/4; overflow: hidden; background: var(--soft); border-radius: 2px; cursor: pointer; }
.pc-media .product-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .7s ease, transform 1.2s var(--ease); }
.pc-img-alt { opacity: 0; }
@media (hover: hover) {
    .pc-media:hover .pc-img-alt { opacity: 1; }
    .product-card:hover .pc-media .product-img { transform: scale(1.03); }
    .pc-media:hover .pc-quick { transform: translateY(0); }
}
.pc-quick { position: absolute; left: 0; right: 0; bottom: 0; padding: .85rem 1rem; text-align: center; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; color: #111; background: rgba(255,255,255,.85); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transform: translateY(101%); transition: transform .45s var(--ease); }
@media (hover: none) { .pc-quick { display: none; } }
.pc-badge { position: absolute; top: 12px; left: 12px; z-index: 2; padding: .3rem .7rem; background: #fff; color: #111; font-family: var(--font-heading); font-style: italic; font-size: .78rem; line-height: 1.2; border-radius: 2px; }
.favorite-btn { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; color: #fff; z-index: 5; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
.favorite-btn:hover { transform: scale(1.12); }
.favorite-btn:active { transform: scale(.9); }
.pc-info { display: flex; flex-direction: column; gap: .25rem; padding: 0 .15rem; }
.pc-name { font-size: .88rem; font-weight: 400; line-height: 1.45; color: var(--text-main); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-price { font-family: var(--font-heading); font-size: 1.1rem; }

.products-skeleton-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.product-skeleton-card { display: flex; flex-direction: column; gap: .8rem; }
.skeleton-image { width: 100%; aspect-ratio: 3/4; border-radius: 2px; }
.skeleton-text { height: 13px; border-radius: 4px; }
.skeleton-text.title { width: 75%; } .skeleton-text.price { width: 40%; }
.animated-blur { animation: shimmer 1.5s infinite linear; background: linear-gradient(to right, #f2f2f2 4%, #e4e4e4 25%, #f2f2f2 36%); background-size: 1000px 100%; }
@keyframes shimmer { 0% { background-position: -1000px 0; } 100% { background-position: 1000px 0; } }

/* ---------- Loja: cabeçalho, chips, ordenação ---------- */
.page-head { margin-bottom: 1.6rem; }
.page-title { font-family: var(--font-heading); font-weight: 400; font-size: clamp(2rem, 6vw, 3.2rem); letter-spacing: -1px; line-height: 1.1; }
.page-sub { color: var(--text-muted); font-size: .88rem; margin-top: .5rem; }
.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--border-color); }
.chips { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-left: calc(-1 * var(--gutter)); padding-left: var(--gutter); flex: 1; min-width: 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: .55rem 1.05rem; border: 1px solid var(--border-color); border-radius: 999px; font-size: .8rem; font-weight: 500; background: #fff; color: var(--text-muted); white-space: nowrap; }
.chip:hover { border-color: var(--text-main); color: var(--text-main); }
.chip.active { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.sort-select { flex: none; padding: .55rem 2rem .55rem .9rem; border: 1px solid var(--border-color); border-radius: 999px; background: #fff; font-size: 16px; -webkit-appearance: none; appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23666' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; }
@media (min-width: 640px) { .sort-select { font-size: .82rem; } }
@media (max-width: 520px) { .shop-toolbar { flex-direction: column; align-items: stretch; } .sort-select { width: 100%; border-radius: 12px; } }

/* ---------- Detalhe do produto ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .78rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.crumbs a:hover { color: var(--text-main); }
.crumbs i { font-size: .7rem; }
.product-detail-container { display: grid; grid-template-columns: 1fr; gap: 2rem; padding-top: 1.5rem; }
@media (min-width: 900px) { .product-detail-container { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 4.5rem; } .product-info-detail { position: sticky; top: 130px; align-self: start; } }
.product-gallery { display: flex; flex-direction: column; gap: .8rem; min-width: 0; }
.main-img-zoom-container { position: relative; overflow: hidden; border-radius: 4px; background: var(--soft); aspect-ratio: 3/4; }
@media (hover: hover) and (pointer: fine) { .main-img-zoom-container { cursor: zoom-in; } }
.product-gallery-main { width: 100%; height: 100%; object-fit: cover; transition: transform .15s ease; }
.product-gallery-thumbs { display: flex; gap: .6rem; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; padding-bottom: 2px; }
.product-gallery-thumbs::-webkit-scrollbar { display: none; }
.product-gallery-thumbs img { width: 72px; height: 92px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 2px solid transparent; opacity: .6; scroll-snap-align: start; flex: none; background: var(--soft); }
.product-gallery-thumbs img.active, .product-gallery-thumbs img:hover { opacity: 1; border-color: var(--primary-color); }
.product-info-detail { display: flex; flex-direction: column; min-width: 0; }
.product-info-detail h1 { font-family: var(--font-heading); font-size: clamp(1.9rem, 5vw, 2.8rem); font-weight: 400; line-height: 1.12; letter-spacing: -.5px; margin-bottom: .8rem; }
.pd-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.stock-tag { flex: none; margin-top: .5rem; font-size: .66rem; color: var(--success-color); border: 1px solid currentColor; padding: .2rem .6rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .1em; font-weight: 500; white-space: nowrap; }
.stock-tag.stock-excl { color: var(--text-main); background: #fff; }
.product-info-detail .price { font-size: 1.5rem; font-weight: 500; margin-bottom: 1.5rem; }
.product-info-detail .description { color: var(--text-muted); line-height: 1.75; margin-bottom: 2rem; white-space: pre-line; font-size: .95rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border-color); }
.detail-label-title { display: block; margin-bottom: .7rem; font-weight: 500; color: var(--text-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; }
.detail-label-title b { color: var(--text-main); font-weight: 600; letter-spacing: .04em; }
.option-block { margin-bottom: 1.6rem; }
.size-pills, .color-swatches { display: flex; flex-wrap: wrap; gap: .6rem; }
.size-pill { min-width: 52px; height: 48px; padding: 0 1rem; border: 1px solid var(--border-color); border-radius: 999px; font-size: .88rem; font-weight: 500; background: #fff; }
.size-pill:hover { border-color: var(--text-main); }
.size-pill.active { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.color-swatch { width: 38px; height: 38px; border-radius: 50%; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--border-color); background-clip: content-box; padding: 3px; }
.color-swatch.active { border-color: var(--primary-color); }
.btn-medidas { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1rem; font-size: .8rem; color: var(--text-muted); border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.btn-medidas:hover { color: var(--text-main); }
.detail-action-container { display: flex; flex-direction: column; gap: .8rem; }
.detail-action-container .btn-outline { margin-top: 0; }
.perks { margin-top: 1.6rem; display: grid; gap: .6rem; font-size: .82rem; color: var(--text-muted); }
.perks div { display: flex; gap: .6rem; align-items: center; } .perks i { font-size: 1.15rem; color: var(--text-main); }
.share-container { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--border-color); display: flex; gap: .6rem; align-items: center; }
.share-container > span { font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: var(--text-muted); font-weight: 500; margin-right: .4rem; }
.share-container .icon-btn { border: 1px solid var(--border-color); width: 42px; height: 42px; font-size: 1.1rem; }
.related-section { padding-top: 3rem; }

/* ---------- Overlay / modais ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1002; opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility .45s; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.overlay.active { opacity: 1; visibility: visible; }
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -46%) scale(.96); width: 92%; max-width: 440px; max-height: 90vh; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain; background: #fff; z-index: 1005; opacity: 0; visibility: hidden; transition: transform .5s var(--ease), opacity .4s ease, visibility .4s; border-radius: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.18); }
.modal.active { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1.6rem 1.8rem .4rem; }
.modal-header h2 { font-size: 1.4rem; font-family: var(--font-heading); font-weight: 600; }
.close-btn { width: 40px; height: 40px; flex: none; border-radius: 50%; background: #f3f3f3; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--text-main); }
.close-btn:hover { background: var(--primary-color); color: #fff; }
@media (max-width: 600px) {
    .modal { top: auto; bottom: 0; left: 0; width: 100%; max-width: none; transform: translateY(100%); border-radius: 22px 22px 0 0; opacity: 1; }
    .modal.active { transform: translateY(0); }
    .modal::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 4px; background: #ddd; margin: .7rem auto 0; }
}
.auth-wrapper { padding: .5rem 1.8rem calc(1.8rem + var(--safe-b)); display: flex; flex-direction: column; align-items: center; }
.auth-subtitle { color: var(--text-muted); font-size: .86rem; margin-bottom: 1.4rem; text-align: center; width: 100%; }
.auth-form { width: 100%; display: flex; flex-direction: column; gap: 1.05rem; }
.auth-group { display: flex; flex-direction: column; gap: .4rem; }
.auth-group label { font-size: .78rem; font-weight: 500; color: var(--text-muted); }
.auth-form input, .checkout-inputs input { width: 100%; padding: .9rem 1.1rem; border: 1px solid var(--border-color); border-radius: 12px; font-size: 16px; background: #fafafa; transition: var(--transition); -webkit-appearance: none; appearance: none; }
.auth-form input:focus, .checkout-inputs input:focus { outline: none; border-color: var(--primary-color); background: #fff; box-shadow: 0 0 0 3px rgba(0,0,0,.05); }
.auth-form .btn-outline { margin-top: 0; }
#logged-in-view { padding: .5rem 0; text-align: center; width: 100%; }
#medidas-content { padding: 1rem 1.8rem calc(1.8rem + var(--safe-b)); font-size: .92rem; line-height: 1.8; white-space: pre-line; }

/* ---------- Carrinho / checkout ---------- */
#cart-sidebar { position: fixed; top: 0; bottom: 0; right: 0; width: 100%; max-width: 440px; height: 100vh; height: 100dvh; z-index: 1005; background: #fff; display: flex; flex-direction: column; transform: translateX(104%); visibility: hidden; transition: transform .5s var(--ease), visibility .5s; box-shadow: -10px 0 40px rgba(0,0,0,.08); }
#cart-sidebar.active { transform: none; visibility: visible; }
@media (min-width: 520px) { #cart-sidebar { border-radius: 24px 0 0 24px; } }
.checkout-header { display: flex; justify-content: space-between; align-items: center; padding: calc(1.4rem + env(safe-area-inset-top, 0px)) 1.5rem 1.2rem; border-bottom: 1px solid var(--border-color); }
.checkout-header h2 { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 400; line-height: 1.1; }
.checkout-mini { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted); font-weight: 500; }
.checkout-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 1.5rem; display: flex; flex-direction: column; gap: 1.8rem; }
.checkout-section { display: flex; flex-direction: column; gap: 1rem; }
.checkout-label { display: flex; align-items: center; gap: .6rem; font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; }
.shipping-methods { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.ship-opt { cursor: pointer; }
.ship-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ship-opt span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: .5rem; border: 1px solid var(--border-color); border-radius: 12px; font-size: .85rem; font-weight: 500; transition: var(--transition); }
.ship-opt input:checked + span { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.ship-opt input:focus-visible + span { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.checkout-inputs { display: flex; flex-direction: column; gap: .7rem; }
#address-fields { display: flex; flex-direction: column; gap: .7rem; width: 100%; }
.cep-wrap { position: relative; }
.checkout-input-grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; width: 100%; }
.input-readonly { background-color: #f5f5f5 !important; color: var(--text-muted); }
.cep-status-hint { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: .75rem; font-weight: 500; pointer-events: none; }
.cep-status-hint.loading { color: var(--accent-color); } .cep-status-hint.success { color: var(--success-color); } .cep-status-hint.error { color: var(--danger-color); }
.shipping-progress-wrapper { background: #fafafa; border: 1px solid var(--border-color); border-radius: 16px; padding: 1.1rem; display: flex; flex-direction: column; gap: .8rem; }
.shipping-progress-text { font-size: .85rem; text-align: center; }
.shipping-progress-bar { width: 100%; height: 6px; background: #e8e8e8; border-radius: 4px; overflow: hidden; }
.shipping-progress-fill { height: 100%; background: var(--primary-color); border-radius: 4px; transition: width .8s var(--ease); position: relative; }
.shipping-progress-fill.success { background: var(--success-color); }
.shipping-progress-fill.success::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent); animation: shimmer 2s infinite linear; }
.cart-items { display: flex; flex-direction: column; gap: .8rem; }
.cart-empty { text-align: center; color: var(--text-muted); padding: 2rem 0; font-weight: 300; }
.cart-item { display: flex; gap: 1rem; padding: .9rem; border: 1px solid var(--border-color); border-radius: 16px; background: #fff; }
.cart-item img { width: 72px; height: 96px; object-fit: cover; border-radius: 10px; flex: none; background: var(--soft); }
.cart-item-info { display: flex; flex-direction: column; justify-content: space-between; flex: 1; min-width: 0; }
.cart-item-info h4 { font-size: .9rem; font-weight: 500; line-height: 1.35; }
.cart-item-size { font-size: .78rem; color: var(--text-muted); margin: .15rem 0; }
.cart-item-price { font-weight: 600; font-size: .92rem; }
.qty-controls { display: flex; align-items: center; gap: .3rem; margin-top: .5rem; }
.qty-btn { width: 36px; height: 36px; border: 1px solid var(--border-color); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; }
.qty-btn:hover { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.qty-num { min-width: 28px; text-align: center; font-size: .92rem; font-weight: 600; }
.checkout-summary { background: #fafafa; border: 1px solid var(--border-color); border-radius: 18px; padding: 1.3rem; display: flex; flex-direction: column; gap: .9rem; }
.summary-line { display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: .9rem; }
.summary-line.total { border-top: 1px solid var(--border-color); padding-top: 1rem; color: var(--text-main); font-size: 1rem; font-weight: 500; }
.summary-line.total strong { font-size: 1.5rem; font-weight: 600; }
.checkout-footer { padding: 1.1rem 1.5rem calc(1.1rem + var(--safe-b)); border-top: 1px solid var(--border-color); background: #fff; }
#checkout-btn { width: 100%; min-height: 58px; border-radius: 999px; background: var(--primary-color); color: #fff; font-size: .82rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
#checkout-btn:hover:not(:disabled) { background: var(--hover-color); }
#checkout-btn:disabled { background: var(--border-color); color: var(--text-muted); cursor: not-allowed; box-shadow: none; }
#checkout-btn i { font-size: 1.25rem; }

/* ---------- Toasts / voltar ao topo ---------- */
#toast-container { position: fixed; bottom: calc(24px + var(--safe-b)); left: 50%; transform: translateX(-50%); z-index: 10000; display: flex; flex-direction: column; gap: 10px; width: 90%; max-width: 380px; pointer-events: none; }
.toast { background: rgba(17,17,17,.96); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: #fff; padding: 1rem 1.5rem; border-radius: 14px; animation: toastIn .5s var(--ease), fadeOut .4s ease 2.7s forwards; font-size: .88rem; box-shadow: 0 16px 32px rgba(0,0,0,.18); text-align: center; }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; visibility: hidden; } }
.back-to-top { position: fixed; right: max(1rem, var(--safe-r)); bottom: calc(1.2rem + var(--safe-b)); z-index: 900; width: 46px; height: 46px; border-radius: 50%; background: var(--primary-color); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; box-shadow: 0 8px 24px rgba(0,0,0,.2); opacity: 0; visibility: hidden; transform: translateY(10px); }
.back-to-top.visible { opacity: 1; visibility: visible; transform: none; }

/* ---------- Pedidos ---------- */
.orders-page { min-height: 55vh; padding-bottom: 3rem; }
.orders-loading, .orders-empty, .orders-error { max-width: 680px; margin: 1.5rem auto; padding: 1.5rem; text-align: center; color: var(--text-muted); border: 1px solid var(--border-color); border-radius: 16px; background: #fff; }
.orders-error { color: var(--danger-color); }
.customer-order-card { max-width: 760px; margin: 1rem auto; padding: 1.3rem; border: 1px solid var(--border-color); border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.03); }
.customer-order-head, .customer-order-total { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.customer-order-head span { padding: .3rem .75rem; border-radius: 999px; background: #f0f0f0; color: var(--text-main); font-size: .74rem; font-weight: 600; }
.customer-order-date { margin: .5rem 0 1rem; color: var(--text-muted); font-size: .82rem; }
.customer-order-card ul { padding-left: 1.1rem; color: var(--text-muted); font-size: .88rem; line-height: 1.8; }
.customer-order-total { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
.customer-order-total strong { font-size: 1.1rem; }

/* ---------- Footer ---------- */
.footer { background: #0b0b0b; color: #fff; margin-top: 0; padding: 4rem max(var(--gutter), var(--safe-r)) calc(1.5rem + var(--safe-b)) max(var(--gutter), var(--safe-l)); }
.view-transition-container > .container:last-child { padding-bottom: 4.5rem; }
.footer-content { display: grid; grid-template-columns: 1fr; gap: 2.2rem; max-width: 1280px; margin: 0 auto 3rem; }
@media (min-width: 768px) { .footer-content { grid-template-columns: 1.6fr 1fr 1fr; gap: 3rem; } }
.footer h3 { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 400; margin-bottom: .6rem; }
.footer-brand p { color: rgba(255,255,255,.55); font-weight: 300; max-width: 26rem; }
.footer h4 { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; color: rgba(255,255,255,.5); margin-bottom: 1rem; }
.footer-col { display: flex; flex-direction: column; gap: .7rem; font-size: .9rem; }
.footer-col a, .footer-col span { color: rgba(255,255,255,.75); display: inline-flex; align-items: center; gap: .5rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #222; padding-top: 1.6rem; text-align: center; font-size: .78rem; color: rgba(255,255,255,.4); max-width: 1280px; margin: 0 auto; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
