
:root {
    --amarelo: #FCDC4C;
    --azul-psi: #0A5AF4;
    --rosa: #F54291;
    --vermelho: #E62645;
    --verde: #00a650;
    --fundo: #f3f4f6;
    --texto: #111827;
    --muted: #6b7280;
    --borda: #e5e7eb;
    --card: #ffffff;
    --sombra: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(15,23,42,.06);
    --font-corpo: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-corpo); background: var(--fundo); color: var(--texto); min-width: 320px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

.market-top-line { height: 5px; background: linear-gradient(90deg, var(--amarelo), var(--azul-psi), var(--rosa)); }
.market-header { background: #fff; border-bottom: 1px solid var(--borda); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 12px rgba(0,0,0,.04); }
.market-header-main { max-width: 1240px; margin: 0 auto; padding: 14px 20px; display: grid; grid-template-columns: 190px 1fr auto; gap: 18px; align-items: center; }
.market-logo { display: flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: -.02em; }
.market-logo img { height: 52px; width: auto; object-fit: contain; }
.market-logo span { display: none; }
.market-search { display: flex; width: 100%; height: 46px; border: 2px solid var(--azul-psi); border-radius: 10px; overflow: hidden; background: #fff; }
.market-search input { flex: 1; border: 0; padding: 0 14px; outline: none; font-size: .98rem; min-width: 0; }
.market-search button { width: 56px; border: 0; background: var(--azul-psi); color: #fff; cursor: pointer; font-size: 1rem; }
.market-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.market-action { border: 1px solid var(--borda); background: #fff; padding: 10px 12px; border-radius: 10px; font-weight: 700; color: var(--texto); display: inline-flex; align-items: center; gap: 8px; transition: .18s ease; }
.market-action:hover { border-color: var(--azul-psi); color: var(--azul-psi); }
.cart-count { background: var(--vermelho); color: #fff; min-width: 20px; height: 20px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; padding: 0 6px; }
.market-nav { border-top: 1px solid #f1f3f5; background: #fff; }
.market-nav-inner { max-width: 1240px; margin: 0 auto; padding: 9px 20px; display: flex; gap: 18px; overflow-x: auto; align-items: center; }
.market-nav-inner a { color: #374151; font-size: .92rem; font-weight: 600; white-space: nowrap; }
.market-nav-inner a:hover { color: var(--azul-psi); }

.container, .section-products, .market-section { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.market-hero { max-width: 1240px; margin: 24px auto 0; padding: 0 20px; }
.hero-slider-wrap { display: block; }
.hero-slider { min-height: 430px; border-radius: 20px; overflow: hidden; position: relative; background: #111827; box-shadow: var(--sombra); color: #fff; }
.hero-slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; background-position: center; background-size: cover; background-repeat: no-repeat; display: flex; align-items: center; padding: 54px 72px; transition: opacity .55s ease; }
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.78), rgba(0,0,0,.38) 48%, rgba(0,0,0,.12)); }
.hero-content { position: relative; z-index: 2; max-width: 620px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); color: #fff; border-radius: 999px; padding: 8px 13px; font-weight: 900; font-size: .9rem; margin-bottom: 14px; backdrop-filter: blur(8px); }
.hero-content h1 { font-size: clamp(2.35rem, 5vw, 5rem); line-height: .92; text-shadow: 3px 3px 0 var(--vermelho); margin-bottom: 12px; letter-spacing: -.04em; }
.hero-content p { font-size: clamp(1rem, 1.5vw, 1.18rem); color: rgba(255,255,255,.92); margin-bottom: 24px; max-width: 560px; line-height: 1.55; }
.hero-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--amarelo); color: #111827; border-radius: 999px; padding: 14px 22px; font-weight: 900; box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.hero-slider-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.92); color: #111827; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 8px 20px rgba(0,0,0,.2); transition: .18s ease; }
.hero-slider-btn:hover { background: #fff; transform: translateY(-50%) scale(1.04); }
.hero-slider-btn.prev { left: 20px; }
.hero-slider-btn.next { right: 20px; }
.hero-slider-dots { position: absolute; z-index: 4; left: 0; right: 0; bottom: 18px; display: flex; align-items: center; justify-content: center; gap: 9px; }
.hero-slider-dots button { width: 10px; height: 10px; border-radius: 999px; border: 0; background: rgba(255,255,255,.48); cursor: pointer; transition: .18s ease; }
.hero-slider-dots button.active { width: 28px; background: var(--amarelo); }

.benefits { max-width: 1240px; margin: 18px auto 0; padding: 0 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.benefit-card { background: #fff; border: 1px solid var(--borda); border-radius: 14px; padding: 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.benefit-card i { width: 38px; height: 38px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: #eef4ff; color: var(--azul-psi); }
.benefit-card strong { display: block; font-size: .95rem; }
.benefit-card span { display: block; font-size: .82rem; color: var(--muted); margin-top: 2px; }

.market-section, .section-products { margin-top: 28px; }
.section-card { background: transparent; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-title { font-size: clamp(1.25rem, 2vw, 1.8rem); line-height: 1.1; border-left: 6px solid var(--azul-psi); padding-left: 12px; font-weight: 900; color: var(--texto); }
.section-subtitle { color: var(--muted); margin-top: 4px; font-size: .95rem; }
.section-link { color: var(--azul-psi); font-weight: 800; font-size: .95rem; }
.category-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.category-tile { background: #fff; border: 1px solid var(--borda); border-radius: 14px; padding: 18px; min-height: 96px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: .18s ease; }
.category-tile:hover { transform: translateY(-3px); box-shadow: var(--sombra); border-color: #cbd5e1; }
.category-tile i { color: var(--azul-psi); font-size: 1.3rem; }
.category-tile strong { margin-top: 10px; }

.market-toolbar { background: #fff; border: 1px solid var(--borda); border-radius: 14px; padding: 14px; margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.market-toolbar form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.market-toolbar input, .market-toolbar select { height: 40px; border: 1px solid var(--borda); border-radius: 9px; padding: 0 10px; background: #fff; color: var(--texto); }
.market-toolbar button, .small-btn { height: 40px; border: 0; border-radius: 9px; padding: 0 14px; background: var(--azul-psi); color: #fff; font-weight: 800; cursor: pointer; }
.result-count { color: var(--muted); font-weight: 600; font-size: .92rem; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; align-items: stretch; }
.product-card-rect, .product-card { background: #fff; border: 1px solid var(--borda); border-radius: 12px; overflow: hidden; min-height: 412px; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; position: relative; }
.product-card-rect:hover, .product-card:hover { transform: translateY(-3px); border-color: #cbd5e1; box-shadow: var(--sombra); }
.product-badge { position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--vermelho); color: #fff; font-size: .72rem; font-weight: 900; border-radius: 999px; padding: 5px 9px; letter-spacing: .02em; }
.product-img-rect, .product-img { width: 100%; height: 240px; background: #fff; border-bottom: 1px solid #f1f3f5; display: flex; align-items: center; justify-content: center; padding: 14px; overflow: hidden; }
.product-img-rect img, .product-img img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.product-info-rect, .product-info { padding: 14px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.product-name { font-size: .96rem; line-height: 1.28; color: var(--texto); font-weight: 600; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { font-size: 1.42rem; line-height: 1.1; font-weight: 800; color: var(--texto); }
.product-installments { color: var(--muted); font-size: .86rem; }
.product-shipping { color: var(--verde); font-size: .86rem; font-weight: 800; }
.product-category-link { color: var(--azul-psi); font-size: .82rem; font-weight: 700; }
.add-cart-btn { margin-top: auto; width: 100%; border: 0; border-radius: 9px; padding: 11px 12px; background: var(--azul-psi); color: #fff; font-weight: 900; cursor: pointer; transition: .18s ease; }
.add-cart-btn:hover { background: #0847c2; }
.empty-state { grid-column: 1 / -1; background: #fff; border: 1px solid var(--borda); border-radius: 14px; padding: 38px; text-align: center; color: var(--muted); }

.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .92rem; margin: 20px 0; flex-wrap: wrap; }
.breadcrumb a { color: var(--azul-psi); font-weight: 700; }
.breadcrumb .current { color: var(--texto); font-weight: 700; }

.product-page-card { background: #fff; border: 1px solid var(--borda); border-radius: 18px; padding: 26px; box-shadow: var(--sombra); display: grid; grid-template-columns: minmax(280px, 1fr) minmax(280px, .95fr); gap: 32px; align-items: start; }
.product-gallery-main { width: 100%; aspect-ratio: 1 / 1; background: #fff; border: 1px solid var(--borda); border-radius: 16px; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.product-gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 18px; display: none; }
.product-gallery-main img.active { display: block; }
.slider-arrow-product { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--borda); background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.slider-arrow-product.prev { left: 12px; }
.slider-arrow-product.next { right: 12px; }
.product-thumbs { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.product-thumbs img { width: 66px; height: 66px; object-fit: contain; background: #fff; border: 2px solid var(--borda); border-radius: 10px; padding: 4px; cursor: pointer; opacity: .74; }
.product-thumbs img.active { border-color: var(--azul-psi); opacity: 1; }
.product-buy-box h1 { font-size: clamp(1.45rem, 2.5vw, 2.25rem); line-height: 1.12; margin-bottom: 10px; }
.tag { display: inline-flex; align-items: center; gap: 6px; background: #eef4ff; color: var(--azul-psi); border-radius: 999px; padding: 6px 10px; font-weight: 800; font-size: .83rem; }
.price-main { margin-top: 18px; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 900; letter-spacing: -.04em; }
.price-installments { color: var(--muted); margin-top: 6px; }
.badge-free-shipping { color: var(--verde); background: #e9f8f1; font-weight: 900; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; margin-top: 10px; }
.stock-line { margin-top: 18px; font-weight: 800; }
.in-stock { color: var(--verde); }
.out-of-stock { color: var(--vermelho); }
.product-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 22px; }
.btn-primary, .btn-secondary { border: 0; border-radius: 10px; padding: 14px 18px; font-weight: 900; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary { background: var(--azul-psi); color: #fff; }
.btn-primary:hover { background: #0847c2; }
.btn-secondary { background: #e9f8f1; color: #047844; }
.product-description-panel { margin-top: 18px; border-top: 1px solid var(--borda); padding-top: 18px; color: #374151; line-height: 1.65; }
.out-of-stock-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg); background: rgba(230,38,69,.94); color: #fff; padding: 12px 36px; font-size: 1.3rem; font-weight: 900; letter-spacing: .08em; border: 3px solid #fff; border-radius: 6px; z-index: 5; }

.cart-page { padding-top: 28px; }
.cart-page h1 { margin-bottom: 18px; }
.cart-grid { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: start; }
.cart-items, .cart-summary, .cart-empty { background: #fff; border: 1px solid var(--borda); border-radius: 16px; box-shadow: var(--sombra); }
.cart-empty { padding: 38px; text-align: center; }
.cart-item { display: grid; grid-template-columns: 76px 1fr auto auto; gap: 14px; align-items: center; padding: 16px; border-bottom: 1px solid #f1f3f5; }
.cart-item:last-child { border-bottom: 0; }
.cart-item-img { width: 76px; height: 76px; border: 1px solid var(--borda); border-radius: 10px; padding: 6px; object-fit: contain; background: #fff; }
.cart-item-info h4 { font-size: .98rem; margin-bottom: 5px; }
.cart-item-price { color: var(--muted); font-size: .9rem; }
.qty-form { display: flex; align-items: center; gap: 6px; }
.qty-form input { width: 58px; height: 36px; border: 1px solid var(--borda); border-radius: 8px; text-align: center; }
.qty-form button { height: 36px; border: 0; background: #eef4ff; color: var(--azul-psi); border-radius: 8px; padding: 0 10px; font-weight: 900; cursor: pointer; }
.cart-item-subtotal { font-weight: 900; }
.cart-item-remove { color: var(--vermelho); padding: 8px; }
.cart-summary { padding: 18px; position: sticky; top: 122px; }
.cart-summary h3 { margin-bottom: 14px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid #f1f3f5; color: #374151; }
.summary-row.total { border-bottom: 0; font-weight: 900; font-size: 1.2rem; color: var(--texto); }
.btn-checkout { width: 100%; margin-top: 12px; }

.institutional-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.info-card { background: #fff; border: 1px solid var(--borda); border-radius: 14px; padding: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.info-card h3 { margin-bottom: 8px; }
.info-card p { color: var(--muted); line-height: 1.55; font-size: .95rem; }
.footer-eyes { margin-top: 40px; background: #111827; color: #fff; padding: 34px 20px; }
.footer-inner { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 20px; }
.footer-eyes h3 { margin-bottom: 10px; }
.footer-eyes p, .footer-eyes a { color: #d1d5db; font-size: .92rem; line-height: 1.7; display: block; }
.footer-bottom { max-width: 1240px; margin: 24px auto 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); color: #9ca3af; font-size: .88rem; }

/* Compatibilidade com páginas antigas/admin */
.header { background: #fff; border-bottom: 1px solid var(--borda); }
.top-line { height: 5px; background: linear-gradient(90deg, var(--amarelo), var(--azul-psi), var(--rosa)); }
.header-content { max-width: 1240px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo-img { height: 52px; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nav-links a { color: #374151; font-weight: 700; }
.hero { background: #111827 url('header.jpeg') center/cover no-repeat; min-height: 280px; position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; color: #fff; text-align: center; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2rem, 4vw, 3.5rem); text-shadow: 3px 3px 0 var(--vermelho); }
.hero .sub-text { background: rgba(0,0,0,.55); padding: 8px 18px; border-radius: 999px; margin-top: 10px; }
.hero-eye-float { font-size: 4rem; }

@media (max-width: 980px) {
    .market-header-main { grid-template-columns: 150px 1fr; }
    .market-actions { grid-column: 1 / -1; justify-content: flex-end; }
    .benefits { grid-template-columns: repeat(2, 1fr); }
    .product-page-card, .cart-grid { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
    .institutional-grid, .footer-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .market-header-main { grid-template-columns: 1fr; gap: 10px; padding: 10px 14px; }
    .market-logo { justify-content: center; }
    .market-logo img { height: 46px; }
    .market-actions { justify-content: center; flex-wrap: wrap; }
    .market-action { padding: 9px 10px; font-size: .88rem; }
    .market-nav-inner { padding: 8px 14px; gap: 14px; }
    .market-hero, .benefits, .market-section, .section-products, .container { padding-left: 12px; padding-right: 12px; }
    .hero-slider { min-height: 330px; border-radius: 16px; }
    .hero-slide { padding: 34px 48px; }
    .benefits { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .product-card-rect, .product-card { min-height: 350px; border-radius: 10px; }
    .product-img-rect, .product-img { height: 170px; padding: 9px; }
    .product-info-rect, .product-info { padding: 10px; gap: 6px; }
    .product-name { font-size: .86rem; }
    .product-price { font-size: 1.08rem; }
    .product-installments, .product-shipping, .product-category-link { font-size: .76rem; }
    .add-cart-btn { padding: 10px 8px; font-size: .82rem; }
    .section-head { align-items: start; flex-direction: column; }
    .market-toolbar { align-items: stretch; }
    .market-toolbar form, .market-toolbar input, .market-toolbar select, .market-toolbar button { width: 100%; }
    .product-page-card { padding: 14px; gap: 18px; }
    .product-thumbs img { width: 54px; height: 54px; }
    .cart-item { grid-template-columns: 58px 1fr; }
    .cart-item-img { width: 58px; height: 58px; }
    .qty-form, .cart-item-subtotal, .cart-item-remove { grid-column: 2; justify-self: start; }
    .institutional-grid, .footer-inner { grid-template-columns: 1fr; }
}


@media (max-width: 640px) {
    .hero-slider { min-height: 360px; border-radius: 14px; }
    .hero-slide { padding: 32px 22px 54px; align-items: flex-end; }
    .hero-slide::before { background: linear-gradient(0deg, rgba(0,0,0,.82), rgba(0,0,0,.35)); }
    .hero-slider-btn { width: 36px; height: 36px; top: auto; bottom: 14px; transform: none; }
    .hero-slider-btn:hover { transform: none; }
    .hero-slider-btn.prev { left: 14px; }
    .hero-slider-btn.next { right: 14px; }
    .hero-slider-dots { bottom: 25px; }
    .hero-content h1 { font-size: clamp(2.1rem, 12vw, 3.2rem); }
    .hero-content p { font-size: .95rem; }
}
