/* Loja Ranger 3D - folha de estilos principal */
:root {
    --color-accent: #EF4537;
    --color-accent-dark: #d13a2e;
    --color-text: #1c1e21;
    --color-text-secondary: #5f6368;
    --color-bg: #ffffff;
    --color-bg-alt: #f6f7f9;
    --color-border: #e4e6ea;
    --radius: 14px;
    --shadow: 0 2px 12px rgba(28, 30, 33, .07);
    --shadow-hover: 0 8px 28px rgba(28, 30, 33, .13);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.55;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-accent { color: var(--color-accent); }
img { max-width: 100%; height: auto; }
a { color: var(--color-accent); }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--color-text); }
.site-logo__mark {
    background: var(--color-accent); color: #fff; font-weight: 800;
    padding: 4px 8px; border-radius: 8px; font-size: .9rem; letter-spacing: .5px;
}
.site-logo__text { font-size: 1.05rem; }
.site-nav { display: flex; gap: 22px; }
.site-nav a { color: var(--color-text); text-decoration: none; font-weight: 500; font-size: .95rem; }
.site-nav a:hover { color: var(--color-accent); }

/* Hero */
.hero { padding: 72px 0 40px; text-align: center; background: linear-gradient(180deg, #fff 0%, var(--color-bg-alt) 100%); }
.hero h1 { font-size: 2.6rem; margin: 0 0 14px; font-weight: 800; }
.hero__subtitle { max-width: 640px; margin: 0 auto; color: var(--color-text-secondary); font-size: 1.1rem; }
.hero__notice {
    display: inline-block; margin-top: 20px; padding: 8px 16px; border-radius: 999px;
    background: rgba(239, 69, 55, .08); color: var(--color-accent-dark); font-size: .9rem; font-weight: 600;
}

/* Sections */
.section { padding: 56px 0; }
.section--alt { background: var(--color-bg-alt); }
.section__title { font-size: 1.9rem; font-weight: 800; margin: 0 0 6px; text-align: center; }
.section__subtitle { text-align: center; color: var(--color-text-secondary); margin: 0 0 36px; }
.empty { text-align: center; color: var(--color-text-secondary); }
.alert {
    max-width: 560px; margin: 0 auto; padding: 14px 18px; border-radius: var(--radius);
    background: #fff4f2; border: 1px solid #f5c6c0; color: var(--color-accent-dark); text-align: center;
}

/* Category cards */
.section--categories { padding-top: 48px; }
.category-grid {
    display: grid; gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.category-card {
    display: flex; flex-direction: column; align-items: flex-start;
    background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
    padding: 28px 24px; text-decoration: none; color: var(--color-text);
    box-shadow: var(--shadow); transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.category-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); border-color: var(--color-accent); }
.category-card__icon {
    display: flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; border-radius: 16px; margin-bottom: 16px;
    color: var(--color-accent); background: rgba(239, 69, 55, .08);
}
.category-card__title { margin: 0 0 8px; font-size: 1.2rem; }
.category-card__desc { margin: 0 0 16px; color: var(--color-text-secondary); font-size: .94rem; flex: 1; }
.category-card__link { color: var(--color-accent); font-weight: 600; font-size: .92rem; }
.category-card--soon { cursor: default; }
.category-card--soon:hover { border-color: var(--color-border); }
.category-card__soon {
    font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    color: var(--color-text-secondary); border: 1px solid var(--color-border);
    padding: 4px 12px; border-radius: 999px;
}

/* Product grid */
.product-grid {
    display: grid; gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.product-card {
    background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column;
    box-shadow: var(--shadow); transition: box-shadow .2s ease, transform .2s ease;
}
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.product-card__image { position: relative; aspect-ratio: 1 / 1; background: var(--color-bg-alt); }
.product-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card__noimage {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    color: var(--color-accent); font-weight: 800; font-size: 1.4rem; opacity: .35;
}
.product-card__badge {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    color: #fff; font-size: .72rem; font-weight: 700; text-transform: uppercase;
    padding: 4px 10px; border-radius: 999px; letter-spacing: .4px;
}
.product-card__body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.product-card__title { margin: 0 0 6px; font-size: 1.1rem; }
.product-card__tag {
    align-self: flex-start; font-size: .72rem; font-weight: 700; text-transform: uppercase;
    color: var(--color-text-secondary); border: 1px solid var(--color-border);
    padding: 2px 8px; border-radius: 999px; margin-bottom: 8px;
}
.product-card__desc { color: var(--color-text-secondary); font-size: .92rem; margin: 0 0 12px; }
.product-card__features { list-style: none; margin: 0 0 14px; padding: 0; font-size: .88rem; }
.product-card__features li { padding-left: 20px; position: relative; margin-bottom: 4px; }
.product-card__features li::before {
    content: ""; position: absolute; left: 2px; top: 7px;
    width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent);
}
.product-card__price { margin-top: auto; display: flex; align-items: baseline; gap: 10px; }
.product-card__price strong { font-size: 1.25rem; }
.product-card__price s { color: var(--color-text-secondary); font-size: .9rem; }
.product-card__consult { color: var(--color-text-secondary); font-weight: 600; }
.product-card__actions { display: flex; gap: 10px; margin-top: 14px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 18px; border-radius: 10px; line-height: 1.2;
    font-weight: 600; font-size: .92rem; text-decoration: none; text-align: center;
    cursor: pointer; border: 1px solid transparent; transition: background .15s ease, color .15s ease;
}
.btn--primary { background: var(--color-accent); color: #fff; flex: 1; }
.btn--primary:hover { background: var(--color-accent-dark); }
.btn--outline { border-color: var(--color-border); color: var(--color-text); flex: 1; }
.btn--outline:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn--disabled { opacity: .55; cursor: not-allowed; }
.btn--disabled:hover { background: var(--color-accent); }

/* Footer */
.site-footer { background: #17181a; color: #c9ccd1; margin-top: 40px; }
.site-footer__inner {
    display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap;
    padding-top: 40px; padding-bottom: 24px;
}
.site-footer p { margin: 8px 0 0; max-width: 420px; font-size: .9rem; }
.site-footer__links { display: flex; flex-direction: column; gap: 8px; }
.site-footer__links a { color: #c9ccd1; text-decoration: none; font-size: .92rem; }
.site-footer__links a:hover { color: #fff; }
.site-footer__copy { padding: 18px 20px 26px; font-size: .82rem; color: #8a8f98; border-top: 1px solid #26282b; }

/* Auth & account */
.auth-section { padding-top: 48px; }
.auth-card {
    max-width: 420px; margin: 0 auto; background: #fff;
    border: 1px solid var(--color-border); border-radius: var(--radius);
    padding: 32px 28px; box-shadow: var(--shadow);
}
.auth-card__title { margin: 0 0 6px; font-size: 1.5rem; }
.auth-card__subtitle { margin: 0 0 20px; color: var(--color-text-secondary); font-size: .94rem; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form__field { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 600; }
.auth-form__field small { font-weight: 400; color: var(--color-text-secondary); }
.auth-form__field input {
    padding: 11px 14px; border: 1px solid var(--color-border); border-radius: 10px;
    font-size: .95rem; font-family: inherit; width: 100%;
}
.auth-form__field input:focus { outline: 2px solid rgba(239, 69, 55, .35); border-color: var(--color-accent); }
.btn--block { width: 100%; }
.auth-card__links { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: .9rem; }
.auth-card__links a { text-decoration: none; }
.auth-card__links a:hover { text-decoration: underline; }

.flash {
    margin: 16px auto 0; max-width: 720px; padding: 12px 16px;
    border-radius: 10px; font-size: .92rem;
}
.flash--ok { background: #ecf9f0; border: 1px solid #b9e6c8; color: #1c7a3d; }
.flash--err { background: #fff4f2; border: 1px solid #f5c6c0; color: var(--color-accent-dark); }

.account-head {
    display: flex; justify-content: space-between; align-items: center;
    gap: 16px; flex-wrap: wrap; margin-bottom: 28px;
}
.account-grid {
    display: grid; gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.account-card {
    background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
    padding: 24px; box-shadow: var(--shadow);
}
.account-card h2 { margin: 0 0 12px; font-size: 1.1rem; }
.account-card__muted { color: var(--color-text-secondary); font-size: .92rem; }
.account-card .btn { margin-top: 10px; }
.account-stat { font-size: 2.2rem; font-weight: 800; margin: 0; color: var(--color-accent); }
.account-data { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: .92rem; }
.account-data dt { color: var(--color-text-secondary); }
.account-data dd { margin: 0; font-weight: 600; word-break: break-all; }
.account-card code {
    background: var(--color-bg-alt); padding: 3px 8px; border-radius: 6px;
    font-size: .85rem; word-break: break-all;
}
.site-nav__account { font-weight: 700 !important; color: var(--color-accent) !important; }

/* Perfil */
.auth-card--wide { max-width: 760px; }
.profile-section {
    margin: 10px 0 0; font-size: .82rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .6px; color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border); padding-bottom: 6px;
}
.profile-grid {
    display: grid; gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.profile-grid__wide { grid-column: 1 / -1; }

/* Toggle switch */
.toggle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: .95rem; font-weight: 600; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle__slider {
    position: relative; flex: 0 0 auto; width: 48px; height: 26px;
    background: #c9ccd1; border-radius: 999px; transition: background .2s ease;
}
.toggle__slider::after {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 20px; height: 20px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s ease;
}
.toggle input:checked + .toggle__slider { background: var(--color-accent); }
.toggle input:checked + .toggle__slider::after { transform: translateX(22px); }
.toggle input:focus-visible + .toggle__slider { outline: 2px solid rgba(239, 69, 55, .5); outline-offset: 2px; }

/* Admin catalogo */
.color-input {
    padding: 4px !important; width: 64px; height: 42px; cursor: pointer;
}
.color-swatch {
    display: inline-block; width: 22px; height: 22px; border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, .12); vertical-align: middle;
}
.auth-form__field textarea {
    padding: 11px 14px; border: 1px solid var(--color-border); border-radius: 10px;
    font-size: .92rem; font-family: inherit; width: 100%; resize: vertical;
}
.auth-form__field textarea:focus { outline: 2px solid rgba(239, 69, 55, .35); border-color: var(--color-accent); }
.auth-form__field select {
    padding: 11px 14px; border: 1px solid var(--color-border); border-radius: 10px;
    font-size: .95rem; font-family: inherit; width: 100%; background: #fff;
}

/* Upload de imagem (admin catalogo) */
.image-upload { display: flex; flex-direction: column; gap: 8px; }
.image-upload__preview {
    position: relative; width: 140px; height: 140px;
    border: 1px solid var(--color-border); border-radius: 10px; overflow: hidden;
}
.image-upload__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-upload__remove {
    position: absolute; top: 6px; right: 6px; width: 26px; height: 26px;
    border: none; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff;
    font-size: 16px; line-height: 1; cursor: pointer;
}
.image-upload__remove:hover { background: var(--color-accent); }
.image-upload__input { font-size: .88rem; }
.image-upload__hint { color: var(--color-text-secondary); font-weight: 400; }
.image-upload__status { font-size: .85rem; min-height: 1.2em; }
.image-upload__status--ok { color: #1c7a3d; }
.image-upload__status--err { color: var(--color-accent-dark); }
.admin-table .table-thumb {
    width: 44px; height: 44px; object-fit: cover;
    border-radius: 8px; border: 1px solid var(--color-border); vertical-align: middle;
}
.table-photos { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.table-photos .table-thumb { width: 40px; height: 40px; }
.table-thumb--main { box-shadow: 0 0 0 2px #f5c518; }
.table-photos__more {
    font-size: .78rem; font-weight: 700; color: var(--color-text-secondary);
    border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 6px;
}

/* Filtros e edicao inline na lista de produtos */
.filter-bar {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    margin-bottom: 18px;
}
.filter-bar select {
    padding: 9px 12px; border: 1px solid var(--color-border); border-radius: 9px;
    font-size: .9rem; font-family: inherit; background: #fff; min-width: 200px;
}
.table-input {
    width: 100%; padding: 7px 10px; border: 1px solid var(--color-border);
    border-radius: 8px; font-size: .88rem; font-family: inherit; text-align: right;
}
.table-input:focus { outline: 2px solid rgba(239, 69, 55, .35); border-color: var(--color-accent); }

/* Icones de acao monocromaticos (editar/excluir) */
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; padding: 0;
    border: 1px solid var(--color-border); border-radius: 9px;
    background: #fff; color: var(--color-text-secondary);
    cursor: pointer; text-decoration: none; vertical-align: middle;
    transition: color .12s, border-color .12s, background .12s;
}
.icon-btn:hover { color: var(--color-text); border-color: #b9bcc2; background: var(--color-bg-alt); }
.icon-btn--delete:hover { color: var(--color-accent); border-color: var(--color-accent); }
.icon-btn--locked { cursor: not-allowed; opacity: .45; }
.icon-btn--locked:hover { color: var(--color-text-secondary); border-color: var(--color-border); background: #fff; }

/* Arvore unificada do catalogo */
.tree-category {
    background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
    box-shadow: var(--shadow); margin-bottom: 22px;
    /* sem overflow:hidden — o zoom da foto do produto aparece acima do card */
}
.tree-category__head {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 14px 18px; background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    border-radius: var(--radius) var(--radius) 0 0;
}
.tree-category__title { margin: 0; font-size: 1.15rem; }
.tree-actions { margin-left: auto; display: inline-flex; gap: 6px; }
.tree-group { padding: 12px 18px 4px; }
.tree-group + .tree-group { border-top: 1px dashed var(--color-border); }
.tree-group__head {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 0 8px;
}
.tree-group__title { margin: 0; font-size: 1rem; }
.tree-products { list-style: none; margin: 0 0 10px; padding: 0; }
.tree-group__footer { padding: 0 0 12px 4px; }
.tree-product {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 4px; border-top: 1px solid var(--color-border);
}
.tree-product__name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tree-product__price { font-weight: 700; white-space: nowrap; }
.icon-btn svg { display: block; }

/* Coluna de imagem na lista de produtos (zoom no hover) */
.cell-thumb { position: relative; width: 84px; height: 84px; }
.cell-thumb__img {
    width: 84px; height: 84px; object-fit: cover;
    border-radius: 10px; border: 1px solid var(--color-border); display: block;
}
.cell-thumb--empty {
    display: flex; align-items: center; justify-content: center;
    border: 1px dashed var(--color-border); border-radius: 10px;
    color: var(--color-text-secondary);
}
.cell-thumb__zoom {
    display: none; position: absolute; left: 94px; top: 0; z-index: 90;
    background: #fff; border: 1px solid var(--color-border); border-radius: 12px;
    box-shadow: var(--shadow-hover); padding: 8px;
}
.cell-thumb__zoom img {
    width: 320px; height: 320px; object-fit: contain;
    border-radius: 8px; display: block;
}
.cell-thumb:hover .cell-thumb__zoom { display: block; }
.cell-cat { color: var(--color-text-secondary); }
.cell-link {
    font-size: .82rem; text-decoration: none; word-break: break-all;
}
.cell-link:hover { text-decoration: underline; }

/* Codigo unico do produto */
.product-code {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: .78rem; font-weight: 700; letter-spacing: .5px;
    background: var(--color-bg-alt); border: 1px solid var(--color-border);
    padding: 2px 8px; border-radius: 6px; color: var(--color-text-secondary);
    text-transform: uppercase; width: fit-content;
    cursor: copy; user-select: none; transition: background .15s, color .15s, border-color .15s;
}
.product-code:hover { border-color: var(--color-accent); color: var(--color-accent); }
.product-code--copied {
    background: #ecf9f0 !important; border-color: #1c7a3d !important; color: #1c7a3d !important;
}
.input-readonly, .input-readonly:disabled {
    background: var(--color-bg-alt) !important; color: var(--color-text-secondary);
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    letter-spacing: .5px; text-transform: uppercase; cursor: not-allowed;
}

/* Pagina publica do produto */
.product-page {
    display: grid; grid-template-columns: minmax(280px, 480px) 1fr; gap: 36px; align-items: start;
}
.product-page__main {
    background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
    overflow: hidden; aspect-ratio: 1 / 1;
}
.product-page__main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.product-page__thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.product-page__thumbs img {
    width: 72px; height: 72px; object-fit: cover;
    border: 1px solid var(--color-border); border-radius: 8px;
}
@media (max-width: 820px) {
    .product-page { grid-template-columns: 1fr; }
}

/* Pictogramas GHS */
.ghs-grid {
    display: grid; gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.ghs-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border: 1px solid var(--color-border); border-radius: 9px;
    cursor: pointer; font-size: .82rem; line-height: 1.2;
}
.ghs-item--static { cursor: default; }
.ghs-item span { font-weight: 600; }

/* Toggle de status na lista de produtos */
.status-toggle {
    position: relative; width: 44px; height: 24px; padding: 0;
    border: none; border-radius: 999px; background: #c9ccd1;
    cursor: pointer; transition: background .2s ease; vertical-align: middle;
}
.status-toggle__knob {
    position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    transition: transform .2s ease;
}
.status-toggle--on { background: #1c7a3d; }
.status-toggle--on .status-toggle__knob { transform: translateX(20px); }
.status-toggle:focus-visible { outline: 2px solid rgba(239, 69, 55, .5); outline-offset: 2px; }

/* Linha de produto inativo: texto cinza */
.row--inactive td { color: #9aa0a6; }
.row--inactive strong, .row--inactive small { color: #9aa0a6; }
.row--inactive .table-thumb { opacity: .45; filter: grayscale(60%); }
.row--inactive .table-input { color: #9aa0a6; background: var(--color-bg-alt); }
.tree-product.row--inactive .tree-product__name,
.tree-product.row--inactive .tree-product__price,
.tree-product.row--inactive .cell-link { color: #9aa0a6; }
.tree-product.row--inactive .cell-thumb__img { opacity: .45; filter: grayscale(60%); }
.tree-product.row--inactive .table-input { color: #9aa0a6; background: var(--color-bg-alt); }
.tree-product.row--inactive .product-code { opacity: .55; }

/* Galeria de fotos do produto (admin) */
.gallery-dropzone {
    border: 2px dashed var(--color-border); border-radius: 12px;
    padding: 28px; text-align: center; cursor: pointer;
    color: var(--color-text-secondary); transition: border-color .15s, background .15s;
}
.gallery-dropzone:hover, .gallery-dropzone--over {
    border-color: var(--color-accent); background: rgba(239, 69, 55, .04);
    color: var(--color-accent);
}
.gallery-grid {
    display: grid; gap: 14px; margin-top: 14px;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.gallery-card {
    border: 1px solid var(--color-border); border-radius: 10px; overflow: hidden;
    background: #fff; cursor: grab; transition: box-shadow .15s;
}
.gallery-card--dragging { opacity: .5; }
.gallery-card--over { box-shadow: 0 0 0 2px var(--color-accent); }
.gallery-card__imgwrap { position: relative; aspect-ratio: 1 / 1; background: var(--color-bg-alt); }
.gallery-card__imgwrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-card__crown {
    position: absolute; top: 6px; left: 6px; width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: #f5c518; color: #6b5200; border-radius: 50%; font-size: 15px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.gallery-card__delete {
    position: absolute; top: 6px; right: 6px; width: 26px; height: 26px;
    border: none; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff;
    font-size: 16px; line-height: 1; cursor: pointer;
}
.gallery-card__delete:hover { background: var(--color-accent); }
.gallery-card__caption {
    width: 100%; border: none; border-top: 1px solid var(--color-border);
    padding: 8px 10px; font-size: .82rem; font-family: inherit;
}
.gallery-card__caption:focus { outline: 2px solid rgba(239, 69, 55, .35); }

/* Editor visual (Quill) */
.wysiwyg-editor {
    background: #fff; border-radius: 0 0 10px 10px; min-height: 160px;
    font-size: .95rem;
}
.ql-toolbar.ql-snow {
    border: 1px solid var(--color-border) !important;
    border-radius: 10px 10px 0 0; background: var(--color-bg-alt);
}
.ql-container.ql-snow { border: 1px solid var(--color-border) !important; border-top: none !important; border-radius: 0 0 10px 10px; }
.ql-editor {
    min-height: 160px; font-family: inherit;
    resize: vertical; overflow-y: auto; max-height: 70vh;
}
.ql-editor.ql-blank::before { color: var(--color-text-secondary); font-style: normal; }

/* Conteudo do editor identico a tipografia do site */
.ql-editor, .product-description {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: .95rem; line-height: 1.55; color: var(--color-text);
}
.ql-editor p, .product-description p { margin: 0 0 .9em; }
.ql-editor h2, .product-description h2 {
    font-size: 1.4rem; font-weight: 800; color: var(--color-text);
    margin: 1.1em 0 .5em;
}
.ql-editor h3, .product-description h3 {
    font-size: 1.15rem; font-weight: 700; color: var(--color-text);
    margin: 1em 0 .45em;
}
.ql-editor a, .product-description a { color: var(--color-accent); text-decoration: none; }
.ql-editor a:hover, .product-description a:hover { text-decoration: underline; }
.ql-editor ul, .ql-editor ol, .product-description ul, .product-description ol { margin: 0 0 .9em; padding-left: 1.4em; }
.ql-editor li, .product-description li { margin-bottom: .25em; }
.ql-editor li::marker, .product-description li::marker { color: var(--color-accent); }
.ql-editor strong, .product-description strong { font-weight: 700; }
.ql-editor blockquote, .product-description blockquote {
    margin: 0 0 .9em; padding: 10px 16px;
    border-left: 3px solid var(--color-accent);
    background: var(--color-bg-alt); border-radius: 0 8px 8px 0;
    color: var(--color-text-secondary);
}
.ql-editor img, .product-description img { max-width: 100%; border-radius: 10px; }

/* Admin layout: menu lateral + conteudo */
.admin-layout {
    display: grid; grid-template-columns: 230px 1fr; gap: 28px; align-items: start;
}
.admin-sidebar {
    position: sticky; top: 84px;
    background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 14px 10px;
}
.admin-menu { display: flex; flex-direction: column; gap: 2px; }
.admin-menu__caption {
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
    color: var(--color-text-secondary); padding: 12px 12px 6px;
}
.admin-menu__item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 9px;
    color: var(--color-text); text-decoration: none; font-size: .92rem; font-weight: 500;
    transition: background .12s, color .12s;
}
.admin-menu__item:hover { background: var(--color-bg-alt); color: var(--color-accent); }
.admin-menu__item--active {
    background: rgba(239, 69, 55, .09); color: var(--color-accent); font-weight: 700;
}
.admin-content { min-width: 0; }

@media (max-width: 900px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; }
    .admin-menu { flex-direction: row; flex-wrap: wrap; }
    .admin-menu__caption { width: 100%; padding-bottom: 2px; }
    .admin-menu__item { padding: 7px 10px; font-size: .86rem; }
}

/* Admin - tabelas e badges */
.admin-table-wrap {
    background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow-x: auto;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th, .admin-table td { padding: 12px 16px; text-align: left; vertical-align: middle; }
.admin-table thead th {
    font-size: .78rem; text-transform: uppercase; letter-spacing: .5px;
    color: var(--color-text-secondary); border-bottom: 1px solid var(--color-border);
}
.admin-table tbody tr + tr { border-top: 1px solid var(--color-border); }
.admin-table small { color: var(--color-text-secondary); }
.inline-form { display: inline; }
.inline-form select {
    padding: 7px 10px; border: 1px solid var(--color-border); border-radius: 8px;
    font-size: .88rem; font-family: inherit; background: #fff;
}
.btn--sm { padding: 7px 14px; font-size: .85rem; }
.badge-role, .badge-status {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: .78rem; font-weight: 700;
}
.badge-role--superadmin { background: #fde8e6; color: var(--color-accent-dark); }
.badge-role--admin { background: #fff3d6; color: #8a6100; }
.badge-role--manager { background: #e3efff; color: #1d4ed8; }
.badge-role--customer { background: var(--color-bg-alt); color: var(--color-text-secondary); }
.badge-status--active { background: #ecf9f0; color: #1c7a3d; }
.badge-status--pending { background: #fff3d6; color: #8a6100; }
.badge-status--blocked { background: #fde8e6; color: var(--color-accent-dark); }

@media (max-width: 640px) {
    .hero h1 { font-size: 1.9rem; }
    .site-nav { gap: 14px; }
    .site-nav a { font-size: .85rem; }
}

/* ================================================================
   Pagina de produto publica — identica ao site principal
   (portado de ranger3d.com.br/css/styles.css + product-styles.php)
   ================================================================ */
.container--wide { max-width: 1280px; }
.btn--lg { padding: 14px 22px; font-size: 1rem; }

.breadcrumb-bar { padding-top: 5rem; padding-bottom: 0.5rem; }
.breadcrumb-nav { font-size: 0.8125rem; color: var(--color-text-secondary); }
.breadcrumb-nav a { color: var(--color-text-secondary); text-decoration: none; transition: color 0.2s; }
.breadcrumb-nav a:hover { color: var(--color-accent); }
.breadcrumb-nav .sep { margin: 0 0.25rem; color: var(--color-text-secondary); opacity: 0.4; }

.product-detail-page { padding: 2rem 0 4rem; }
.product-detail__grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: start; }
@media (min-width: 1024px) {
    .product-detail__grid { grid-template-columns: 1.1fr 1fr; gap: 4rem; }
}
.product-detail__media {
    position: relative; background: var(--color-bg-alt); border-radius: 16px;
    padding: 2rem; display: flex; align-items: center; justify-content: center;
    min-height: 360px; border: 1px solid var(--color-border); flex-wrap: wrap;
}
@media (min-width: 640px) {
    .product-detail__media { padding: 3rem; min-height: 420px; }
}
.product-detail__media img {
    position: relative; z-index: 1; max-width: 100%; max-height: 340px;
    object-fit: contain; filter: drop-shadow(0 16px 32px rgba(0,0,0,0.08));
}
.product-detail__badge {
    position: absolute; top: 1.25rem; left: 1.25rem; z-index: 2;
    background: var(--color-accent); color: white; padding: 0.375rem 1rem;
    border-radius: 9999px; font-size: 0.6875rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.product-detail__type {
    display: inline-flex; width: fit-content; font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-accent);
    background: rgba(239, 69, 55, 0.08); padding: 0.375rem 0.875rem;
    border-radius: 9999px; margin-bottom: 0.875rem;
}
.product-detail__title {
    font-size: 2rem; font-weight: 800; margin-bottom: 0.875rem;
    color: var(--color-text); line-height: 1.15; letter-spacing: -0.02em;
}
@media (min-width: 640px) {
    .product-detail__title { font-size: 2.5rem; }
}
.product-detail__desc {
    color: var(--color-text-secondary); font-size: 1.0625rem;
    line-height: 1.7; margin-bottom: 1.5rem;
}
.product-detail__price-box { margin-bottom: 1.25rem; display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.product-detail__price { font-size: 2rem; font-weight: 700; color: var(--color-accent); }
.product-detail__compare-price { text-decoration: line-through; color: var(--color-text-secondary); font-size: 1.125rem; }
.product-detail__sku { font-size: 0.8125rem; color: var(--color-text-secondary); margin-top: 0.25rem; width: 100%; }
.product-detail__stock {
    display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.875rem;
    color: var(--color-text-secondary); margin-bottom: 1.5rem; padding: 0.5rem 0.875rem;
    background: white; border: 1px solid var(--color-border); border-radius: 8px;
}
.product-detail__stock-dot { width: 8px; height: 8px; border-radius: 50%; }
.product-detail__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.product-detail__actions .btn { flex: 1; min-width: 160px; }
.product-detail__trust {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
    padding-top: 1.5rem; border-top: 1px solid var(--color-border);
}
.product-detail__trust-item { text-align: center; }
.product-detail__trust-item svg { margin: 0 auto 0.375rem; stroke: var(--color-text-secondary); }
.product-detail__trust-item p {
    font-size: 0.6875rem; font-weight: 500; color: var(--color-text-secondary);
    margin: 0; text-transform: uppercase; letter-spacing: 0.03em;
}

.product-info-section { background: var(--color-bg-alt); padding: 3rem 0 4rem; }
.product-info-section__grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 1024px) {
    .product-info-section__grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
}
.product-info-section h2 {
    font-size: 1.125rem; font-weight: 700; margin-bottom: 1rem;
    color: var(--color-text); letter-spacing: -0.01em;
}
.product-info-card { background: white; border-radius: 12px; padding: 1.5rem; border: 1px solid var(--color-border); }
.product-info-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.875rem; }
.product-info-list li { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.9375rem; color: var(--color-text); line-height: 1.5; }
.product-info-list__icon {
    width: 1.5rem; height: 1.5rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 0.0625rem;
}
.product-info-list__icon--green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.product-info-list__icon--red { background: rgba(239, 69, 55, 0.1); color: var(--color-accent); }
.product-info-list__icon--blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.product-content { color: var(--color-text-secondary); line-height: 1.8; font-size: 0.9375rem; }

/* Lightbox + galeria + safety (product-styles.php do site principal) */
.product-lightbox-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.97); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    cursor: zoom-out; opacity: 0; transition: opacity 0.3s ease; padding: 2rem;
}
.product-lightbox-overlay.active { opacity: 1; }
.product-lightbox-overlay img {
    max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    transform: scale(0.95); transition: transform 0.3s ease;
}
.product-lightbox-overlay.active img { transform: scale(1); }
.product-detail__media #product-main-image { cursor: zoom-in; transition: transform 0.2s ease; }
.product-detail__media #product-main-image:hover { transform: scale(1.02); }
.product-main-view { width: 100%; }
#product-main-video { width: 100%; border-radius: 8px; background: #000; }
.product-main-caption {
    margin-top: 0.5rem; font-size: 0.85rem; color: var(--color-text-secondary);
    text-align: center; min-height: 1.1em; width: 100%;
}
.product-gallery-thumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; justify-content: center; width: 100%; }
.product-gallery-thumb {
    position: relative; width: 64px; height: 64px; padding: 0;
    border: 2px solid transparent; border-radius: 8px; overflow: hidden;
    cursor: pointer; background: #f3f4f6; flex-shrink: 0;
}
.product-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-gallery-thumb:hover, .product-gallery-thumb.active { border-color: var(--color-accent); }
.product-gallery-thumb__play {
    position: absolute; inset: 0; display: flex; align-items: center;
    justify-content: center; color: #fff; background: rgba(0,0,0,0.35);
}
.safety-icon { position: relative; display: inline-flex; cursor: help; }
.safety-icon .safety-tooltip {
    visibility: hidden; opacity: 0; transition: opacity 0.15s ease;
    position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
    background: #1f2937; color: #fff; font-size: 0.78rem; line-height: 1.4;
    padding: 0.55rem 0.75rem; border-radius: 6px; width: 230px; z-index: 100;
    pointer-events: none; text-align: left; box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.safety-icon .safety-tooltip::after {
    content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    border: 6px solid transparent; border-top-color: #1f2937;
}
.safety-icon:hover .safety-tooltip { visibility: visible; opacity: 1; }
.safety-accordion__toggle {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; width: 100%;
    background: none; border: none; padding: 0; font: inherit; color: inherit;
    text-align: left; cursor: pointer;
}
.safety-accordion__title { font-size: 1.15rem; font-weight: 700; color: var(--color-text); }
.safety-accordion__icons { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; }
.safety-accordion__chevron { margin-left: auto; flex-shrink: 0; color: var(--color-text-secondary); transition: transform 0.2s ease; }
.safety-accordion.open .safety-accordion__chevron { transform: rotate(180deg); }
.safety-accordion__content { display: none; margin-top: 1rem; }
.safety-accordion.open .safety-accordion__content { display: block; }
.safety-fds-link {
    display: flex; align-items: center; gap: 0.75rem; margin-top: 1rem;
    padding-top: 1rem; border-top: 1px solid var(--color-border);
    text-decoration: none; color: inherit;
}
.safety-fds-link svg { flex-shrink: 0; }
.safety-fds-link strong { font-size: 0.9rem; color: var(--color-text); }
.safety-fds-link__action { font-size: 0.8rem; color: var(--color-text-secondary); }
.safety-accordion__toggle + .safety-fds-link { border-top: none; padding-top: 0; }
