:root {
    --brand: #0a8f5b;
    --brand-dark: #077a4d;
    --brand-soft: #ecfdf5;
    --bg: #ffffff;
    --surface: #ffffff;
    --alt: #f7f9fa;
    --text: #1f2a37;
    --muted: #6b7280;
    --border: #e5e7eb;
    --danger: #b91c1c;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(16, 24, 40, .07), 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-lg: 0 10px 24px rgba(16, 24, 40, .1);
}

* { box-sizing: border-box; }

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

img { max-width: 100%; }
.muted { color: var(--muted); }
.empty { padding: 3rem 0; text-align: center; }

.shop-container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 2.5rem 1.25rem; }
.section-title { font-size: 1.35rem; margin: 0 0 1.25rem; }

.btn-primary {
    display: inline-block;
    padding: .75rem 1.5rem;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background .15s;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { background: #d1d5db; cursor: not-allowed; }

/* ---------- Header ---------- */
.shop-header { border-bottom: 1px solid var(--border); position: sticky; top: 0; background: #fff; z-index: 20; }
.shop-header-inner { display: flex; align-items: center; gap: 1.5rem; height: 72px; }
.shop-logo { font-weight: 700; font-size: 1.2rem; color: var(--brand); text-decoration: none; white-space: nowrap; }

.shop-search { flex: 1; display: flex; max-width: 620px; }
.shop-search input {
    flex: 1;
    padding: .65rem .9rem;
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 10px 0 0 10px;
    font-size: .95rem;
    font-family: inherit;
}
.shop-search input:focus { outline: none; border-color: var(--brand); }
.shop-search button {
    padding: .65rem 1.2rem;
    background: var(--brand);
    color: #fff;
    border: 1px solid var(--brand);
    border-radius: 0 10px 10px 0;
    font-weight: 600;
    cursor: pointer;
    font-size: .95rem;
}
.shop-search button:hover { background: var(--brand-dark); }

.shop-actions { margin-left: auto; }
.shop-action { color: var(--text); text-decoration: none; font-size: .9rem; }
.shop-action:hover { color: var(--brand); }

/* ---------- Category nav ---------- */
.shop-catnav { border-top: 1px solid var(--border); background: var(--alt); }
.shop-catnav-inner { display: flex; gap: .25rem; overflow-x: auto; }
.shop-catnav-item { position: relative; }
.shop-catnav-item > a {
    display: block;
    padding: .7rem .9rem;
    color: var(--text);
    text-decoration: none;
    font-size: .9rem;
    white-space: nowrap;
}
.shop-catnav-item > a:hover { color: var(--brand); }
.shop-catnav-drop {
    display: none;
    position: absolute;
    top: 100%; left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0 0 10px 10px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: .4rem;
    z-index: 30;
}
.shop-catnav-item:hover .shop-catnav-drop,
.shop-catnav-item:focus-within .shop-catnav-drop { display: block; }
.shop-catnav-drop a {
    display: block;
    padding: .5rem .7rem;
    color: var(--text);
    text-decoration: none;
    font-size: .88rem;
    border-radius: 6px;
}
.shop-catnav-drop a:hover { background: var(--brand-soft); color: var(--brand-dark); }

/* ---------- Barra de avisos ---------- */
.shop-topbar { background: var(--brand-dark); color: #fff; font-size: .82rem; }
.shop-topbar-inner {
    display: flex; align-items: center; justify-content: center;
    gap: .6rem; height: 34px; flex-wrap: wrap; text-align: center;
}
.topbar-sep { opacity: .5; }

/* ---------- Carrossel de banners ---------- */
.hero-carousel { position: relative; overflow: hidden; background: var(--alt); }
.hero-track { display: flex; transition: transform .5s ease; }
.hero-slide {
    position: relative; flex: 0 0 100%; min-height: 300px;
    display: flex; align-items: center;
    background: linear-gradient(135deg, #0a8f5b 0%, #065f46 100%);
    color: #fff; text-decoration: none; overflow: hidden;
}
.hero-img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; z-index: 0;
}
.hero-copy {
    position: relative; z-index: 1;
    max-width: 1180px; width: 100%; margin: 0 auto; padding: 2.5rem 1.25rem;
}
.hero-copy h2 { font-size: 2.1rem; margin: 0 0 .5rem; line-height: 1.2; max-width: 560px; }
.hero-copy p { font-size: 1.05rem; opacity: .93; margin: 0 0 1.25rem; max-width: 520px; }
.hero-cta {
    display: inline-block; background: #fff; color: var(--brand-dark);
    padding: .7rem 1.6rem; border-radius: 10px; font-weight: 700; font-size: .95rem;
}
.hero-slide:hover .hero-cta { background: #f0fdf4; }

.hero-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 42px; height: 42px; border-radius: 50%;
    background: rgba(255, 255, 255, .85); border: none; color: var(--text);
    font-size: 1.5rem; line-height: 1; cursor: pointer; z-index: 2;
    display: flex; align-items: center; justify-content: center;
}
.hero-nav:hover { background: #fff; }
.hero-prev { left: 1rem; }
.hero-next { right: 1rem; }

.hero-dots {
    position: absolute; bottom: 1rem; left: 0; right: 0; z-index: 2;
    display: flex; justify-content: center; gap: .45rem;
}
.hero-dot {
    width: 9px; height: 9px; border-radius: 50%; border: none;
    background: rgba(255, 255, 255, .5); cursor: pointer; padding: 0;
}
.hero-dot.is-active { background: #fff; width: 26px; border-radius: 999px; }

/* ---------- Faixas de conteúdo ---------- */
.section-tight { padding: 2rem 1.25rem; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.row-title { font-size: 1.3rem; margin: 0 0 1.1rem; font-weight: 700; }
.row-head .row-title { margin: 0; }
.row-controls { display: flex; align-items: center; gap: .5rem; }
.row-link { font-size: .85rem; color: var(--brand-dark); text-decoration: none; font-weight: 600; margin-right: .35rem; }
.row-link:hover { text-decoration: underline; }
.row-nav {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--border); background: #fff; color: var(--text);
    font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.row-nav:hover { border-color: var(--brand); color: var(--brand); }

/* Trilho horizontal de produtos */
.p-rail {
    display: flex; gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory;
    padding-bottom: .5rem; scrollbar-width: thin;
}
.p-rail::-webkit-scrollbar { height: 6px; }
.p-rail::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.p-rail-item { flex: 0 0 210px; scroll-snap-align: start; }

/* ---------- Departamentos ---------- */
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 1rem; }
.dept-tile {
    display: flex; flex-direction: column; align-items: center; gap: .65rem;
    padding: 1.35rem .75rem; background: #fff;
    border: 1px solid var(--border); border-radius: var(--radius);
    text-decoration: none; color: var(--text);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.dept-tile:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.dept-icon {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--brand-soft);
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.dept-name { font-size: .85rem; font-weight: 600; text-align: center; line-height: 1.3; }

/* ---------- Diferenciais ---------- */
.perks { background: var(--alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-top: 1.5rem; }
.perks-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem; padding: 2rem 1.25rem;
}
.perk { display: flex; align-items: flex-start; gap: .85rem; }
.perk-icon {
    width: 44px; height: 44px; border-radius: 12px; background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; flex-shrink: 0; border: 1px solid var(--border);
}
.perk strong { display: block; font-size: .92rem; margin-bottom: .15rem; }
.perk span { font-size: .82rem; color: var(--muted); line-height: 1.45; }

/* ---------- Category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.cat-tile {
    display: flex; flex-direction: column; align-items: center; gap: .6rem;
    padding: 1.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cat-tile:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-tile-mark {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-soft); color: var(--brand);
    border-radius: 12px; font-size: 1.3rem;
}
.cat-tile-name { font-weight: 600; font-size: .92rem; text-align: center; }

/* ---------- Product grid / card ---------- */
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.25rem; }

.p-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    transition: box-shadow .15s, transform .15s;
}
.p-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.p-card-link { text-decoration: none; color: inherit; display: block; height: 100%; }

.p-card-media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--alt);
    display: flex; align-items: center; justify-content: center;
}
.p-card-media img { width: 100%; height: 100%; object-fit: contain; padding: .75rem; }
.p-card-noimg { font-size: 2.5rem; color: #cbd5e1; }

.p-badge {
    position: absolute; top: .6rem; left: .6rem;
    padding: .2rem .5rem;
    border-radius: 999px;
    font-size: .72rem; font-weight: 700;
}
.p-badge-sale { background: var(--danger); color: #fff; }
.p-badge-generic { background: #eff6ff; color: #1d4ed8; top: auto; bottom: .6rem; }

.p-card-body { padding: .85rem; }
.p-card-name {
    font-size: .92rem; font-weight: 600; margin: 0 0 .3rem;
    line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.p-card-ai { font-size: .78rem; color: var(--muted); margin: 0 0 .5rem; }
.p-card-price { display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; }
.p-price-old { font-size: .8rem; color: var(--muted); text-decoration: line-through; }
.p-price-now { font-size: 1.15rem; font-weight: 700; color: var(--brand-dark); }

.p-card-tags { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .5rem; min-height: 1.2rem; }
.p-tag { font-size: .7rem; font-weight: 600; padding: .15rem .45rem; border-radius: 5px; }
.p-tag-rx { background: #fef2f2; color: var(--danger); }
.p-tag-out { background: #f3f4f6; color: var(--muted); }
.p-tag-generic { background: #eff6ff; color: #1d4ed8; }

/* ---------- Breadcrumb / listing ---------- */
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 1.25rem; display: flex; gap: .4rem; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }

.listing-head { margin-bottom: 1.5rem; }
.listing-head h1 { margin: 0 0 .35rem; font-size: 1.6rem; }
.listing-head p { margin: .25rem 0; }

.listing-filters {
    display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap;
    padding: 1rem; margin-bottom: 1.5rem;
    background: var(--alt); border-radius: var(--radius);
}
.listing-filters label { display: flex; flex-direction: column; gap: .3rem; }
.listing-filters span { font-size: .78rem; color: var(--muted); font-weight: 600; }
.listing-filters select {
    padding: .5rem .7rem; border: 1px solid var(--border);
    border-radius: 8px; background: #fff; font-size: .9rem; font-family: inherit;
}
.link-clear { font-size: .85rem; color: var(--brand); text-decoration: none; align-self: center; }

/* ---------- Pagination ---------- */
.pager { display: flex; gap: .35rem; justify-content: center; align-items: center; margin-top: 2.5rem; flex-wrap: wrap; }
.pager a, .pager span {
    padding: .5rem .85rem; border: 1px solid var(--border);
    border-radius: 8px; font-size: .88rem; text-decoration: none; color: var(--text);
}
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager .is-current { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
.pager .is-disabled { color: #cbd5e1; }
.pager .gap { border: none; padding: .5rem .25rem; color: var(--muted); }

/* ---------- Product detail ---------- */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.pdp-main {
    aspect-ratio: 1 / 1; background: var(--alt); border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pdp-main img { width: 100%; height: 100%; object-fit: contain; padding: 1.5rem; }
.pdp-noimg { font-size: 4rem; color: #cbd5e1; }
.pdp-thumbs { display: flex; gap: .6rem; margin-top: .75rem; flex-wrap: wrap; }
.pdp-thumb {
    width: 64px; height: 64px; padding: .25rem;
    border: 1px solid var(--border); border-radius: 8px;
    background: #fff; cursor: pointer;
}
.pdp-thumb.is-active { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(10, 143, 91, .18); }
.pdp-thumb img { width: 100%; height: 100%; object-fit: contain; }

.pdp-brand { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 .35rem; }
.pdp-name { font-size: 1.6rem; margin: 0 0 .6rem; line-height: 1.25; }
.pdp-meta { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.pdp-ai { font-size: .9rem; color: var(--muted); }

.pdp-price { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.pdp-price-old { font-size: 1rem; color: var(--muted); text-decoration: line-through; }
.pdp-price-now { font-size: 2rem; font-weight: 700; color: var(--brand-dark); }
.pdp-price .p-badge { position: static; }
.pdp-unit { font-size: .9rem; color: var(--muted); }

.pdp-rx {
    background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d;
    padding: .9rem 1rem; border-radius: 10px; margin-bottom: 1.25rem; font-size: .88rem;
}
.pdp-rx p { margin: .35rem 0 0; }

.pdp-stock { display: flex; align-items: center; gap: .5rem; font-size: .9rem; margin-bottom: 1.25rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-on { background: var(--brand); box-shadow: 0 0 0 3px rgba(10, 143, 91, .18); }
.dot-off { background: #9ca3af; }

.btn-buy { width: 100%; max-width: 320px; }
.pdp-soon { font-size: .78rem; color: var(--muted); margin: .5rem 0 1.25rem; }
.pdp-short { color: var(--muted); font-size: .95rem; }

.pdp-block { margin-top: 3rem; }
.pdp-block h2 { font-size: 1.2rem; margin: 0 0 1rem; }
.pdp-desc { color: #374151; font-size: .95rem; line-height: 1.7; }
.pdp-specs { width: 100%; border-collapse: collapse; font-size: .92rem; max-width: 640px; }
.pdp-specs th, .pdp-specs td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--border); }
.pdp-specs th { color: var(--muted); font-weight: 600; width: 40%; }

/* ---------- Footer ---------- */
.shop-footer { border-top: 1px solid var(--border); margin-top: 0; background: var(--alt); }

.footer-newsletter {
    display: flex; align-items: center; justify-content: space-between;
    gap: 2rem; flex-wrap: wrap;
    padding: 1.75rem 1.25rem; border-bottom: 1px solid var(--border);
}
.footer-newsletter strong { font-size: 1.02rem; }
.footer-newsletter p { color: var(--muted); font-size: .85rem; margin: .25rem 0 0; }

.footer-cols {
    display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 2rem; padding: 2.25rem 1.25rem;
}
.footer-col h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 .85rem; color: var(--text); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .5rem; font-size: .86rem; color: var(--muted); }
.footer-col a { color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--brand); }
.footer-brand strong { font-size: 1.05rem; color: var(--brand); }
.footer-brand p { color: var(--muted); font-size: .86rem; margin: .6rem 0 0; line-height: 1.6; max-width: 320px; }

.footer-legal { padding: 0 1.25rem 1.75rem; border-top: 1px solid var(--border); padding-top: 1.5rem; }
.footer-legal p { color: var(--muted); font-size: .8rem; margin: 0 0 .5rem; line-height: 1.6; }

.shop-copy { border-top: 1px solid var(--border); padding: 1.1rem 0; text-align: center; background: #fff; }
.shop-copy p { color: var(--muted); font-size: .8rem; margin: 0; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 5rem 1.25rem; }
.notfound h1 { font-size: 4.5rem; color: var(--brand); margin: 0; line-height: 1; }
.notfound p { margin: .75rem 0 1.75rem; }

/* ---------- Error pages (standalone) ---------- */
.error-body {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; text-align: center; padding: 1.5rem;
}
.error-card { max-width: 440px; }
.error-code { font-size: 5rem; font-weight: 800; color: var(--brand); line-height: 1; }
.error-card h1 { margin: .5rem 0; }
.error-card p { color: var(--muted); }

/* ---------- Área do cliente ---------- */
.shop-actions { display: flex; align-items: center; gap: .85rem; }
.shop-action-account { font-weight: 600; }
.shop-action-cta {
    padding: .45rem .9rem; background: var(--brand); color: #fff;
    border-radius: 8px; font-weight: 600;
}
.shop-action-cta:hover { background: var(--brand-dark); color: #fff; }
.shop-logout { margin: 0; }
.shop-action-btn {
    background: none; border: none; padding: 0; cursor: pointer;
    color: var(--muted); font-size: .88rem; font-family: inherit;
}
.shop-action-btn:hover { color: var(--brand); }

.btn-outline {
    display: inline-block; padding: .55rem 1.1rem;
    border: 1px solid var(--border); border-radius: 9px;
    background: #fff; color: var(--text); text-decoration: none;
    font-weight: 600; font-size: .9rem; cursor: pointer; font-family: inherit;
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-danger {
    display: inline-block; padding: .55rem 1.1rem;
    border: 1px solid #fecaca; border-radius: 9px;
    background: #fff; color: var(--danger); text-decoration: none;
    font-weight: 600; font-size: .9rem; cursor: pointer; font-family: inherit;
}
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: .38rem .75rem; font-size: .82rem; }
.btn-block { width: 100%; }

/* Alertas */
.alert { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1.25rem; font-size: .9rem; }
.alert-ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert-err { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert ul { margin: .35rem 0 0; padding-left: 1.1rem; }

/* Formulários */
.form .field { display: flex; flex-direction: column; margin-bottom: 1rem; flex: 1; }
.form .field-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form .field-row .field { min-width: 160px; }
.form .field-sm { max-width: 160px; flex: 0 0 auto; }
.form label { font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: .35rem; }
.form input[type=text], .form input[type=email], .form input[type=password],
.form input[type=date], .form input[type=search], .form select {
    padding: .65rem .8rem; border: 1px solid var(--border); border-radius: 9px;
    font-size: .95rem; font-family: inherit; background: #fff; width: 100%;
}
.form input:focus, .form select:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(10, 143, 91, .12);
}
.form input:disabled { background: var(--alt); color: var(--muted); }
.form .hint { font-size: .75rem; color: var(--muted); margin-top: .3rem; }
.form .check { display: flex; align-items: flex-start; gap: .55rem; margin-bottom: .85rem; }
.form .check input { width: 18px; height: 18px; accent-color: var(--brand); margin-top: .1rem; }
.form .check span { font-size: .88rem; color: var(--text); font-weight: 400; }
.form-actions { display: flex; gap: .75rem; margin-top: 1.25rem; align-items: center; }

/* Login / cadastro */
.auth-wrap { display: flex; justify-content: center; }
.auth-card {
    width: 100%; max-width: 420px; padding: 2rem;
    border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.auth-card-wide { max-width: 640px; }
.auth-card h1 { margin: 0 0 .35rem; font-size: 1.5rem; }
.auth-card > .muted { margin: 0 0 1.5rem; font-size: .92rem; }
.auth-alt { margin: 1.25rem 0 0; text-align: center; font-size: .9rem; color: var(--muted); }
.auth-alt a { color: var(--brand); font-weight: 600; }

/* Layout da conta */
.acc-title { font-size: 1.6rem; margin: 0 0 1.5rem; }
.acc-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: start; }
.acc-side { position: sticky; top: 90px; }
.acc-nav { display: flex; flex-direction: column; gap: .2rem; margin-bottom: 1rem; }
.acc-nav-item {
    padding: .6rem .85rem; border-radius: 8px; text-decoration: none;
    color: var(--text); font-size: .92rem;
}
.acc-nav-item:hover { background: var(--alt); }
.acc-nav-item.is-active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.acc-logout { margin: 0; }
.acc-logout .btn-outline { width: 100%; }

.acc-content { min-width: 0; }
.acc-panel {
    padding: 1.5rem; border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 1.25rem; background: #fff;
}
.acc-panel h2 { margin: 0 0 .5rem; font-size: 1.2rem; }
.acc-panel h3 { margin: 0 0 .75rem; font-size: 1rem; }
.acc-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.acc-panel-head h2 { margin: 0; }
.acc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.acc-cards .acc-panel { margin-bottom: 0; }
.acc-line { margin: .2rem 0; font-size: .92rem; }
.acc-panel .btn-outline { margin-top: 1rem; }

/* Endereços */
.addr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.addr-card { border: 1px solid var(--border); border-radius: 10px; padding: 1.1rem; }
.addr-card.is-default { border-color: var(--brand); background: #f6fefb; }
.addr-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.badge-default {
    background: var(--brand); color: #fff; font-size: .68rem;
    font-weight: 700; padding: .15rem .5rem; border-radius: 999px;
}
.addr-line { margin: .15rem 0; font-size: .88rem; }
.addr-actions { display: flex; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; align-items: center; }
.addr-actions form { margin: 0; }

/* ---------- Carrinho ---------- */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.shop-cart-link { position: relative; font-weight: 600; }
.cart-badge {
    display: inline-block; min-width: 20px; padding: .1rem .35rem;
    background: var(--brand); color: #fff; border-radius: 999px;
    font-size: .72rem; font-weight: 700; text-align: center;
}

.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
.cart-items { display: flex; flex-direction: column; gap: .85rem; }
.cart-item {
    display: grid; grid-template-columns: 88px 1fr auto auto; gap: 1rem;
    align-items: center; padding: 1rem;
    border: 1px solid var(--border); border-radius: var(--radius); background: #fff;
}
.cart-item.has-issue { border-color: #fcd34d; background: #fffbeb; }
.cart-item-img {
    width: 88px; height: 88px; display: flex; align-items: center; justify-content: center;
    background: var(--alt); border-radius: 8px; overflow: hidden; text-decoration: none;
    color: #cbd5e1; font-size: 1.75rem;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: contain; padding: .35rem; }
.cart-item-name { font-weight: 600; color: var(--text); text-decoration: none; font-size: .95rem; }
.cart-item-name:hover { color: var(--brand); }
.cart-item-unit { font-size: .82rem; margin: .25rem 0; }
.cart-item-alert { color: #b45309; font-size: .8rem; margin: .35rem 0 0; }
.cart-item-qty { display: flex; gap: .4rem; align-items: center; }
.cart-item-qty input {
    width: 68px; padding: .45rem .5rem; border: 1px solid var(--border);
    border-radius: 8px; font-size: .9rem; font-family: inherit;
}
.cart-item-total { text-align: right; min-width: 110px; }
.cart-item-total strong { display: block; font-size: 1.05rem; color: var(--brand-dark); }
.link-remove {
    background: none; border: none; padding: 0; margin-top: .4rem;
    color: var(--muted); font-size: .8rem; cursor: pointer;
    text-decoration: underline; font-family: inherit;
}
.link-remove:hover { color: var(--danger); }

.cart-summary {
    padding: 1.5rem; border: 1px solid var(--border);
    border-radius: var(--radius); background: #fff; position: sticky; top: 90px;
}
.cart-summary h2 { margin: 0 0 1rem; font-size: 1.15rem; }
.cart-row { display: flex; justify-content: space-between; gap: 1rem; margin: .5rem 0; font-size: .92rem; }
.cart-total { font-size: 1.1rem; padding-top: .75rem; border-top: 1px solid var(--border); margin-top: .75rem; }
.cart-total strong { color: var(--brand-dark); }
.cart-note { font-size: .8rem; margin: .5rem 0 1rem; }
.cart-continue { margin-top: .6rem; text-align: center; }
.cart-rx-note {
    background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d;
    padding: .75rem; border-radius: 8px; font-size: .82rem; margin-bottom: 1rem;
}

/* ---------- Checkout ---------- */
.checkout { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; align-items: start; }
.checkout-main { min-width: 0; }
.checkout-summary { position: sticky; top: 90px; }

.opt-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.opt {
    display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem;
    border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
    transition: border-color .15s, background .15s;
}
.opt:hover { border-color: var(--brand); }
.opt:has(input:checked), .opt.is-selected { border-color: var(--brand); background: var(--brand-soft); }
.opt input { width: 18px; height: 18px; accent-color: var(--brand); flex-shrink: 0; }
.opt-body { display: flex; flex-direction: column; gap: .2rem; flex: 1; min-width: 0; }
.opt-body strong { font-size: .92rem; }
.opt-body .muted { font-size: .82rem; }
.opt-price { font-weight: 700; color: var(--brand-dark); white-space: nowrap; }

.rx-warning {
    background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d;
    padding: 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: .88rem;
}
.rx-warning p { margin: .5rem 0 0; }
.rx-files { margin: .5rem 0 1rem; padding-left: 1.1rem; font-size: .88rem; }
.rx-files a { color: var(--brand-dark); }

.sum-line { display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; margin: .4rem 0; }
.sum-line span:first-child { color: var(--muted); }
.checkout-summary hr { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }

.pdp-buy { display: flex; gap: .6rem; align-items: center; max-width: 360px; }
.pdp-qty {
    width: 72px; padding: .7rem .6rem; border: 1px solid var(--border);
    border-radius: 9px; font-size: 1rem; font-family: inherit;
}

/* ---------- Pedidos ---------- */
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.order-head .acc-title { margin-bottom: .25rem; }
.order-grid { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; align-items: start; }

.order-status {
    display: inline-block; padding: .35rem .75rem; border-radius: 999px;
    font-size: .78rem; font-weight: 700; white-space: nowrap;
}
.status-aguardando_pagamento { background: #fffbeb; color: #b45309; }
.status-pago { background: #ecfdf5; color: #047857; }
.status-em_separacao { background: #eff6ff; color: #1d4ed8; }
.status-em_entrega { background: #eef2ff; color: #4338ca; }
.status-entregue { background: #ecfdf5; color: #065f46; }
.status-cancelado { background: #fef2f2; color: var(--danger); }

.order-list { display: flex; flex-direction: column; gap: .6rem; }
.order-row {
    display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center;
    padding: .9rem 1rem; border: 1px solid var(--border); border-radius: 10px;
    text-decoration: none; color: var(--text); transition: border-color .15s;
}
.order-row:hover { border-color: var(--brand); }
.order-row-num { display: flex; flex-direction: column; gap: .15rem; font-size: .9rem; }
.order-row-num .muted { font-size: .78rem; }
.order-row-total { font-weight: 700; color: var(--brand-dark); }

/* ---------- Cupom ---------- */
.coupon-form { display: flex; gap: .4rem; margin: .75rem 0; }
.coupon-form input {
    flex: 1; min-width: 0; padding: .55rem .7rem; border: 1px solid var(--border);
    border-radius: 8px; font-size: .9rem; font-family: inherit; text-transform: uppercase;
}
.coupon-applied { background: var(--brand-soft); padding: .6rem .75rem; border-radius: 8px; align-items: flex-start; }
.coupon-applied strong { color: var(--brand-dark); }

/* ---------- Newsletter ---------- */
.newsletter-form { margin-bottom: 1.25rem; }
.newsletter-form label { font-size: .9rem; display: block; margin-bottom: .5rem; }
.newsletter-row { display: flex; gap: .5rem; max-width: 420px; }
.newsletter-row input {
    flex: 1; min-width: 0; padding: .6rem .8rem; border: 1px solid var(--border);
    border-radius: 9px; font-size: .9rem; font-family: inherit;
}
.newsletter-row .btn-primary { padding: .6rem 1.1rem; font-size: .9rem; white-space: nowrap; }

/* ---------- Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.post-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; transition: box-shadow .15s, transform .15s; }
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.post-card a { text-decoration: none; color: inherit; display: block; }
.post-card-media {
    aspect-ratio: 16 / 9; background: var(--alt);
    display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #cbd5e1;
}
.post-card-media img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 1rem; }
.post-card-body h2 { font-size: 1.05rem; margin: 0 0 .5rem; line-height: 1.35; }
.post-card-body p {
    font-size: .87rem; margin: 0 0 .6rem; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-date { font-size: .78rem; color: var(--muted); }

.post { max-width: 760px; margin: 0 auto; }
.post-head h1 { font-size: 2rem; margin: 0 0 .5rem; line-height: 1.25; }
.post-meta { font-size: .88rem; margin: 0 0 1rem; }
.post-tags { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 1.5rem; }
.post-tag { background: var(--brand-soft); color: var(--brand-dark); font-size: .74rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; }
.post-cover { width: 100%; border-radius: var(--radius); margin-bottom: 1.5rem; }
.post-lead { font-size: 1.1rem; color: #374151; line-height: 1.7; margin-bottom: 1.5rem; font-weight: 500; }
.post-body { font-size: 1rem; line-height: 1.8; color: #374151; }
.post-disclaimer {
    max-width: 760px; margin: 2.5rem auto 0; padding: 1rem;
    background: var(--alt); border-left: 3px solid var(--brand);
    border-radius: 8px; font-size: .87rem; color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .pdp { grid-template-columns: 1fr; gap: 1.75rem; }
    .footer-cols { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
@media (max-width: 720px) {
    .shop-header-inner { height: auto; padding: .75rem 0; flex-wrap: wrap; gap: .75rem; }
    .shop-search { order: 3; flex-basis: 100%; max-width: none; }
    .shop-actions { margin-left: auto; }
    .hero-slide { min-height: 210px; }
    .hero-copy { padding: 1.75rem 1.25rem; }
    .hero-copy h2 { font-size: 1.4rem; }
    .hero-copy p { font-size: .92rem; margin-bottom: 1rem; }
    .hero-nav { display: none; }
    .shop-topbar-inner { height: auto; padding: .4rem 0; font-size: .75rem; }
    .topbar-sep { display: none; }
    .dept-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .7rem; }
    .dept-icon { width: 44px; height: 44px; font-size: 1.25rem; }
    .dept-name { font-size: .76rem; }
    .p-rail-item { flex: 0 0 156px; }
    .footer-cols { grid-template-columns: 1fr; }
    .footer-newsletter { flex-direction: column; align-items: stretch; }
    .p-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .85rem; }
    .pdp-name { font-size: 1.3rem; }
    .pdp-price-now { font-size: 1.6rem; }
    .acc-layout { grid-template-columns: 1fr; gap: 1.25rem; }
    .acc-side { position: static; }
    .acc-nav { flex-direction: row; overflow-x: auto; }
    .acc-nav-item { white-space: nowrap; }
    .form .field-row { flex-direction: column; gap: 0; }
    .form .field-sm { max-width: none; }

    .cart-layout, .checkout, .order-grid { grid-template-columns: 1fr; }
    .cart-summary, .checkout-summary { position: static; }
    .cart-item { grid-template-columns: 64px 1fr; row-gap: .75rem; }
    .cart-item-img { width: 64px; height: 64px; }
    .cart-item-qty, .cart-item-total { grid-column: 2; }
    .cart-item-total { text-align: left; }
    .order-row { grid-template-columns: 1fr auto; row-gap: .5rem; }
}
