* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #ff4111;
  --primary-dark: #d9340d;
  --secondary: #172535;
  --secondary-soft: #22364b;
  --accent: #2d73bd;
  --text: #182333;
  --muted: #6b7685;
  --surface: #ffffff;
  --background: #f5f7fa;
  --border: #e6eaf0;
  --success: #159455;
  --danger: #d94141;
  --shadow: 0 18px 45px rgba(23, 37, 53, .10);
}
html { scroll-behavior: smooth; }
body { font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif; color: var(--text); background: var(--background); line-height: 1.5; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { border: 0; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.no-scroll { overflow: hidden; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(230,234,240,.8); }
.header-inner { width: min(1240px, calc(100% - 40px)); margin: auto; min-height: 78px; display: grid; grid-template-columns: auto minmax(250px, 560px) auto; align-items: center; gap: 32px; }
.logo { display: flex; align-items: center; gap: 10px; min-width: max-content; }
.logo-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(145deg, var(--primary), #ff704e); box-shadow: 0 8px 20px rgba(255,65,17,.24); }
.logo > span:last-child { display: flex; align-items: baseline; gap: 4px; font-size: 20px; }
.logo strong { color: var(--secondary); }
.logo small { color: var(--primary); font-size: 20px; font-weight: 800; }
.search-container { position: relative; height: 46px; border-radius: 14px; background: #f2f4f7; display: flex; align-items: center; padding: 0 15px; border: 1px solid transparent; transition: .2s ease; }
.search-container:focus-within { background: #fff; border-color: rgba(45,115,189,.35); box-shadow: 0 0 0 4px rgba(45,115,189,.08); }
.search-container > i { color: var(--muted); }
.search-input { width: 100%; border: 0; outline: 0; background: transparent; padding: 0 12px; color: var(--text); }
.clear-search { display: none; width: 30px; height: 30px; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.clear-search.visible { display: grid; place-items: center; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 12px; color: var(--secondary); background: transparent; border-radius: 12px; cursor: pointer; font-weight: 700; transition: .2s ease; }
.icon-button:hover { background: #f1f4f7; }
.cart-count { display: none; position: absolute; top: -4px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--primary); color: white; font-size: 11px; place-items: center; }
.cart-count.visible { display: grid; }

.categories-container { background: var(--secondary); overflow: hidden; }
.categories-bar { width: min(1240px, 100%); margin: auto; padding: 10px 20px; display: flex; justify-content: center; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.categories-bar::-webkit-scrollbar { display: none; }
.category-btn { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; border-radius: 999px; padding: 10px 16px; background: transparent; color: #dbe5ef; cursor: pointer; font-weight: 650; transition: .2s ease; }
.category-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.category-btn.active { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(255,65,17,.25); }

.hero-section { position: relative; overflow: hidden; min-height: 470px; padding: 80px max(20px, calc((100vw - 1200px)/2)); display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; color: #fff; background: radial-gradient(circle at 75% 28%, rgba(45,115,189,.95), transparent 33%), linear-gradient(135deg, #172535 10%, #203c58 56%, #ff4111 150%); }
.hero-section::after { content: ''; position: absolute; inset: auto -8% -45% auto; width: 520px; aspect-ratio: 1; border-radius: 50%; background: rgba(255,65,17,.12); filter: blur(5px); }
.hero-content { position: relative; z-index: 2; max-width: 700px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #e7eef5; font-size: 13px; font-weight: 750; letter-spacing: .02em; }
.hero-section h1 { max-width: 680px; font-size: clamp(44px, 6vw, 76px); line-height: .98; letter-spacing: -.05em; margin-bottom: 22px; }
.hero-section h1 span { color: #ff6b47; }
.hero-section p { max-width: 620px; color: #d6e0ea; font-size: clamp(16px, 2vw, 19px); }
.hero-button { width: max-content; margin-top: 30px; display: inline-flex; align-items: center; gap: 10px; border-radius: 14px; padding: 14px 18px; background: #fff; color: var(--secondary); font-weight: 800; box-shadow: 0 12px 28px rgba(0,0,0,.16); }
.hero-card { position: relative; z-index: 2; width: min(360px, 80vw); aspect-ratio: 1; justify-self: end; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); background: radial-gradient(circle, rgba(255,255,255,.18), rgba(255,255,255,.03) 60%, transparent 61%); }
.hero-card > i { font-size: clamp(80px, 10vw, 140px); color: rgba(255,255,255,.92); text-shadow: 0 15px 45px rgba(0,0,0,.25); }
.hero-orbit { position: absolute; border: 1px solid rgba(255,255,255,.20); border-radius: 50%; }
.orbit-one { inset: 12%; }
.orbit-two { inset: -8%; }

.benefits { width: min(1120px, calc(100% - 40px)); margin: -34px auto 0; position: relative; z-index: 5; display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; overflow: hidden; border-radius: 18px; background: var(--border); box-shadow: var(--shadow); }
.benefits article { background: var(--surface); padding: 24px; display: flex; align-items: center; gap: 15px; }
.benefits i { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: var(--primary); background: #fff2ee; }
.benefits strong, .benefits span { display: block; }
.benefits span { margin-top: 2px; color: var(--muted); font-size: 13px; }

.products { width: min(1240px, calc(100% - 40px)); margin: auto; padding: 82px 0 90px; }
.section-heading { margin-bottom: 28px; display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.section-kicker { color: var(--primary); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.section-heading h2 { margin-top: 5px; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.04em; }
.results-count { color: var(--muted); }
.products-container { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.product-card { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; box-shadow: 0 8px 28px rgba(23,37,53,.06); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(23,37,53,.12); border-color: #d9e0e8; }
.product-media { position: relative; aspect-ratio: 1.15; overflow: hidden; background: #edf0f4; }
.product-img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover .product-img { transform: scale(1.035); }
.low-stock-badge { position: absolute; z-index: 2; top: 12px; right: 12px; border-radius: 999px; padding: 6px 9px; color: #9a5b00; background: #fff3d4; font-size: 11px; font-weight: 850; }
.product-info { padding: 20px; }
.product-category { color: var(--accent); font-size: 11px; text-transform: uppercase; font-weight: 850; letter-spacing: .08em; }
.product-name { margin-top: 6px; font-size: 19px; line-height: 1.25; }
.product-description { margin: 8px 0 16px; min-height: 42px; color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price-row { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.price-row small { display: block; color: #98a1ad; text-decoration: line-through; font-size: 11px; }
.product-price { color: var(--secondary); font-size: 21px; font-weight: 900; letter-spacing: -.02em; }
.stock-dot { display: flex; align-items: center; gap: 5px; color: var(--success); font-size: 11px; white-space: nowrap; }
.stock-dot i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.product-button { width: 100%; margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: var(--secondary); color: #fff; cursor: pointer; font-weight: 800; transition: .2s ease; }
.product-button:hover { background: var(--primary); }
.empty-state { padding: 80px 20px; text-align: center; border: 1px dashed #ccd3dc; border-radius: 20px; background: #fff; }
.empty-state i { font-size: 42px; color: #aeb7c2; }
.empty-state h3 { margin-top: 14px; }
.empty-state p { color: var(--muted); }

footer { background: var(--secondary); color: #d9e3ed; }
.footer-inner { width: min(1240px, calc(100% - 40px)); margin: auto; padding: 42px 0; display: flex; justify-content: space-between; align-items: center; gap: 30px; }
.footer-brand { display: grid; grid-template-columns: auto auto; align-items: center; gap: 0 8px; }
.footer-brand i { color: var(--primary); grid-row: span 2; font-size: 24px; }
.footer-brand span { color: #98a9b9; font-size: 13px; }
.footer-links { display: flex; gap: 22px; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.copyright { padding: 16px 20px; text-align: center; color: #8193a5; border-top: 1px solid rgba(255,255,255,.07); font-size: 12px; }

.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(9,17,26,.52); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: .25s ease; }
.overlay.show { opacity: 1; visibility: visible; }
.cart-drawer { position: fixed; top: 0; right: 0; z-index: 100; width: min(460px, 100%); height: 100dvh; display: flex; flex-direction: column; background: #fff; transform: translateX(105%); transition: transform .32s ease; box-shadow: -20px 0 60px rgba(0,0,0,.18); }
.cart-drawer.open { transform: translateX(0); }
.drawer-header { padding: 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.drawer-header span { color: var(--primary); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.drawer-header h2 { margin-top: 2px; font-size: 26px; }
.close-cart, .close-checkout { width: 40px; height: 40px; border-radius: 50%; background: #f2f4f7; color: var(--secondary); cursor: pointer; }
.cart-items { padding: 10px 22px; flex: 1; overflow: auto; }
.cart-item { padding: 14px 0; display: grid; grid-template-columns: 82px 1fr; gap: 14px; border-bottom: 1px solid var(--border); }
.cart-item img { width: 82px; height: 82px; object-fit: cover; border-radius: 13px; background: #eee; }
.cart-item-top { display: flex; justify-content: space-between; gap: 12px; }
.cart-item-top h3 { font-size: 14px; line-height: 1.25; }
.cart-item-top button { background: transparent; color: #a0a8b2; cursor: pointer; }
.cart-item-info > strong { display: block; margin-top: 5px; color: var(--primary); font-size: 14px; }
.qty-control { width: max-content; margin-top: 9px; display: flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.qty-control button { width: 32px; height: 30px; background: #f7f8fa; cursor: pointer; }
.qty-control span { width: 32px; text-align: center; font-size: 13px; font-weight: 800; }
.cart-empty { flex: 1; display: grid; place-items: center; align-content: center; text-align: center; padding: 30px; }
.cart-empty i { width: 70px; height: 70px; margin-bottom: 16px; display: grid; place-items: center; border-radius: 50%; background: #fff2ee; color: var(--primary); font-size: 28px; }
.cart-empty p { color: var(--muted); font-size: 13px; }
.cart-footer { padding: 22px 24px 24px; border-top: 1px solid var(--border); background: #fff; }
.cart-summary-row { display: flex; justify-content: space-between; align-items: center; font-size: 17px; }
.cart-summary-row strong { font-size: 22px; }
.cart-footer small { display: block; margin: 4px 0 16px; color: var(--muted); }
.checkout-button, .place-order-button, .success-close { width: 100%; min-height: 50px; border-radius: 13px; color: #fff; background: var(--primary); cursor: pointer; font-weight: 850; }
.checkout-button { display: flex; align-items: center; justify-content: center; gap: 10px; }
.continue-button { width: 100%; margin-top: 8px; min-height: 42px; background: transparent; color: var(--muted); cursor: pointer; }

.checkout-modal, .success-modal { position: fixed; inset: 0; z-index: 120; padding: 24px; display: grid; place-items: center; background: rgba(9,17,26,.72); backdrop-filter: blur(8px); opacity: 0; visibility: hidden; transition: .25s ease; }
.checkout-modal.open, .success-modal.open { opacity: 1; visibility: visible; }
.checkout-shell { position: relative; width: min(1120px, 100%); max-height: calc(100dvh - 48px); overflow: auto; display: grid; grid-template-columns: 1.2fr .8fr; border-radius: 24px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.3); }
.checkout-shell > .close-checkout { position: absolute; top: 18px; right: 18px; z-index: 5; }
.checkout-form-column { padding: 44px; }
.checkout-kicker, .checkout-summary-column > span, .success-card > span { color: var(--primary); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.checkout-form-column > h2 { margin-top: 3px; font-size: 34px; letter-spacing: -.04em; }
.checkout-intro { margin: 3px 0 28px; color: var(--muted); }
fieldset { margin-top: 24px; border: 0; }
legend { margin-bottom: 14px; display: flex; align-items: center; gap: 9px; font-weight: 850; }
legend span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--secondary); font-size: 12px; }
.form-grid { display: grid; gap: 12px; }
.two-cols { grid-template-columns: repeat(2, minmax(0,1fr)); }
.address-grid { grid-template-columns: .7fr 1.4fr .6fr; }
.address-grid .wide { grid-column: span 2; }
.form-grid label { color: #4a5664; font-size: 12px; font-weight: 750; }
.form-grid input { width: 100%; height: 44px; margin-top: 5px; padding: 0 12px; border: 1px solid #dfe4ea; border-radius: 10px; outline: 0; background: #fff; }
.form-grid input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(45,115,189,.08); }
.payment-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.payment-card { position: relative; min-height: 80px; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 13px; cursor: pointer; }
.payment-card:has(input:checked) { border-color: var(--accent); background: #f3f8fd; box-shadow: 0 0 0 2px rgba(45,115,189,.06); }
.payment-card input { position: absolute; opacity: 0; }
.payment-card > i { width: 34px; color: var(--accent); font-size: 21px; text-align: center; }
.payment-card strong, .payment-card small { display: block; }
.payment-card small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.payment-note { margin-top: 10px; color: var(--muted); font-size: 11px; }
.place-order-button { margin-top: 26px; display: flex; align-items: center; justify-content: center; gap: 9px; }
.checkout-summary-column { padding: 44px 32px; background: #f4f6f8; border-left: 1px solid var(--border); }
.checkout-summary-column h3 { margin: 3px 0 22px; font-size: 25px; }
.checkout-items { display: grid; gap: 13px; }
.checkout-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 11px; align-items: center; }
.checkout-image { position: relative; }
.checkout-image img { width: 56px; height: 56px; object-fit: cover; border-radius: 11px; }
.checkout-image span { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--secondary); font-size: 10px; font-weight: 800; }
.checkout-item > div:nth-child(2) strong { display: block; font-size: 12px; }
.checkout-item small { color: var(--muted); font-size: 10px; }
.checkout-item > b { font-size: 12px; }
.checkout-totals { margin-top: 24px; padding-top: 18px; border-top: 1px solid #dfe4ea; }
.checkout-totals > div { padding: 5px 0; display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.checkout-totals strong { color: var(--text); }
.checkout-totals .checkout-total { margin-top: 9px; padding-top: 14px; border-top: 1px solid #dfe4ea; color: var(--text); font-size: 18px; font-weight: 800; }
.checkout-total strong { font-size: 24px; }

.success-card { width: min(440px, 100%); padding: 42px; text-align: center; border-radius: 24px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.3); }
.success-icon { width: 72px; height: 72px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--success); font-size: 28px; box-shadow: 0 12px 30px rgba(21,148,85,.25); }
.success-card h2 { margin: 5px 0 8px; font-size: 28px; }
.success-card p { color: var(--muted); }
.success-close { margin-top: 24px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 200; max-width: min(420px, calc(100% - 32px)); padding: 12px 17px; border-radius: 12px; color: #fff; background: var(--secondary); box-shadow: 0 12px 30px rgba(0,0,0,.2); opacity: 0; transform: translate(-50%, 20px); pointer-events: none; transition: .25s ease; font-size: 13px; font-weight: 700; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

@media (max-width: 1050px) {
  .header-inner { grid-template-columns: auto 1fr auto; gap: 16px; }
  .icon-button span { display: none; }
  .products-container { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .hero-section { grid-template-columns: 1fr .55fr; }
  .checkout-shell { grid-template-columns: 1fr .68fr; }
  .payment-options { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .header-inner { width: min(100% - 28px, 1240px); min-height: auto; padding: 12px 0; grid-template-columns: 1fr auto; }
  .search-container { grid-column: 1 / -1; grid-row: 2; height: 44px; }
  .admin-link { display: none; }
  .logo > span:last-child { font-size: 18px; }
  .logo small { font-size: 18px; }
  .categories-bar { justify-content: flex-start; padding-inline: 14px; }
  .hero-section { min-height: auto; padding: 62px 24px 95px; grid-template-columns: 1fr; }
  .hero-content { max-width: 620px; }
  .hero-card { display: none; }
  .benefits { grid-template-columns: 1fr; margin-top: -45px; }
  .benefits article { padding: 18px 20px; }
  .products { width: min(100% - 28px, 1240px); padding-top: 62px; }
  .products-container { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
  .checkout-modal { padding: 0; align-items: stretch; }
  .checkout-shell { width: 100%; max-height: 100dvh; min-height: 100dvh; border-radius: 0; grid-template-columns: 1fr; }
  .checkout-form-column { padding: 34px 20px; order: 2; }
  .checkout-summary-column { padding: 30px 20px; order: 1; border-left: 0; border-bottom: 1px solid var(--border); }
  .two-cols { grid-template-columns: 1fr; }
  .address-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .address-grid .wide { grid-column: 1 / -1; }
  .checkout-shell > .close-checkout { position: fixed; top: 12px; right: 12px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 540px) {
  .header-actions { gap: 0; }
  .icon-button { width: 42px; padding: 0; }
  .hero-section h1 { font-size: 46px; }
  .hero-section p { font-size: 15px; }
  .category-btn { padding: 9px 13px; font-size: 13px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .products-container { grid-template-columns: 1fr; }
  .product-media { aspect-ratio: 1.4; }
  .product-description { min-height: auto; }
  .cart-drawer { width: 100%; }
  .address-grid { grid-template-columns: 1fr; }
  .address-grid .wide { grid-column: auto; }
  .checkout-item { grid-template-columns: 50px 1fr auto; }
  .checkout-image img { width: 50px; height: 50px; }
  .success-card { padding: 34px 24px; }
}

/* Firebase / categorias dinâmicas / Pix */
.dynamic-categories { display: contents; }
.store-loading { min-height: 240px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); font-weight: 700; }
.store-loading i { color: var(--primary); font-size: 26px; }
.payment-disabled { opacity: .55; cursor: not-allowed; background: #f6f7f9; }
.place-order-button:disabled { opacity: .65; cursor: wait; }
.pix-success-card { width: min(520px, 100%); text-align: left; max-height: calc(100dvh - 48px); overflow: auto; }
.pix-success-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pix-success-heading .success-icon { flex: 0 0 58px; width: 58px; height: 58px; margin: 0; background: #32bcad; }
.pix-success-heading span { color: #32a99c; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.pix-success-heading h2 { margin: 2px 0 0; }
.pix-total-value { display: block; margin: 16px 0; color: var(--secondary); font-size: 30px; text-align: center; }
.pix-qrcode { width: 244px; min-height: 244px; margin: 0 auto 18px; padding: 12px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
.pix-qrcode img, .pix-qrcode canvas { max-width: 220px; width: 100% !important; height: auto !important; }
.pix-copy-group label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 800; }
.pix-copy-group > div { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.pix-copy-payload { width: 100%; min-height: 72px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; resize: none; font-size: 10px; line-height: 1.35; word-break: break-all; }
.copy-pix-payload { padding: 0 14px; border-radius: 10px; background: var(--secondary); color: #fff; cursor: pointer; font-weight: 800; }
.pix-key-line { margin-top: 12px; padding: 11px 13px; display: flex; justify-content: space-between; gap: 15px; border-radius: 10px; background: #f5f7f9; font-size: 12px; }
.pix-warning { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #eef8f6; color: #37615d !important; font-size: 11px; }
@media (max-width: 540px) {
  .pix-success-card { max-height: 100dvh; border-radius: 0; padding: 28px 20px; }
  .pix-copy-group > div { grid-template-columns: 1fr; }
  .copy-pix-payload { min-height: 42px; }
}

/* Detalhes do produto */
.product-actions { margin-top: 18px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.product-actions .product-button { width: auto; min-width: 50px; margin-top: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.product-details-button { min-height: 46px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #dce2e9; border-radius: 12px; background: #fff; color: var(--secondary); cursor: pointer; font-weight: 800; transition: .2s ease; }
.product-details-button:hover { border-color: var(--secondary); background: #f5f7f9; }
.product-details-modal { position: fixed; inset: 0; z-index: 130; padding: 24px; display: grid; place-items: center; background: rgba(9,17,26,.76); backdrop-filter: blur(8px); opacity: 0; visibility: hidden; transition: .25s ease; }
.product-details-modal.open { opacity: 1; visibility: visible; }
.product-details-card { position: relative; width: min(960px, 100%); max-height: calc(100dvh - 48px); overflow: auto; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr); border-radius: 26px; background: #fff; box-shadow: 0 32px 100px rgba(0,0,0,.35); }
.close-product-details { position: absolute; top: 16px; right: 16px; z-index: 4; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.94); color: var(--secondary); cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.product-details-media { position: relative; min-height: 520px; background: #edf0f4; overflow: hidden; }
.product-details-image { width: 100%; height: 100%; min-height: 520px; object-fit: cover; }
.product-details-content { padding: 54px 44px 42px; display: flex; flex-direction: column; align-items: stretch; }
.product-details-category { color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.product-details-name { margin-top: 7px; font-size: clamp(30px, 4vw, 44px); line-height: 1.04; letter-spacing: -.045em; }
.product-details-description { margin-top: 18px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.product-details-price-wrap { margin-top: 26px; }
.product-details-original { display: block; color: #9aa3ae; font-size: 13px; text-decoration: line-through; }
.product-details-price { display: block; color: var(--secondary); font-size: 32px; letter-spacing: -.035em; }
.product-details-stock { margin-top: 12px; display: flex; align-items: center; gap: 8px; color: var(--success); font-size: 12px; font-weight: 750; }
.product-details-stock i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.product-details-features { margin-top: 26px; display: grid; gap: 9px; }
.product-details-features > div { padding: 12px 13px; display: flex; align-items: center; gap: 11px; border-radius: 12px; background: #f5f7f9; }
.product-details-features > div > i { width: 34px; color: var(--primary); text-align: center; }
.product-details-features strong, .product-details-features small { display: block; }
.product-details-features strong { font-size: 12px; }
.product-details-features small { color: var(--muted); font-size: 10px; }
.product-details-add { margin-top: 26px; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 9px; border-radius: 13px; color: #fff; background: var(--primary); cursor: pointer; font-weight: 850; }
.product-details-add:hover { background: var(--primary-dark); }

@media (max-width: 760px) {
  .product-details-modal { padding: 0; align-items: stretch; }
  .product-details-card { width: 100%; max-height: 100dvh; border-radius: 0; grid-template-columns: 1fr; }
  .product-details-media { min-height: 44vh; max-height: 50vh; }
  .product-details-image { min-height: 44vh; }
  .product-details-content { padding: 30px 22px 32px; }
  .product-details-name { font-size: 31px; }
}

@media (max-width: 540px) {
  .products { width: calc(100% - 20px); }
  .products-container { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-card { border-radius: 14px; }
  .product-media { aspect-ratio: 1.22; }
  .low-stock-badge { top: 7px; right: 7px; padding: 4px 6px; font-size: 8px; }
  .low-stock-badge { right: 7px; max-width: 72px; text-align: center; }
  .product-info { padding: 11px; }
  .product-category { font-size: 8px; letter-spacing: .05em; }
  .product-name { margin-top: 4px; min-height: 34px; font-size: 14px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .product-description, .stock-dot { display: none; }
  .price-row { margin-top: 9px; }
  .price-row small { font-size: 9px; }
  .product-price { font-size: 16px; }
  .product-actions { margin-top: 11px; grid-template-columns: 1fr 40px; gap: 6px; }
  .product-details-button { min-height: 40px; padding: 0 7px; gap: 5px; font-size: 10px; }
  .product-details-button i { font-size: 11px; }
  .product-actions .product-button { min-width: 40px; min-height: 40px; padding: 0; border-radius: 10px; }
  .product-actions .product-button span { display: none; }
  .product-details-media { min-height: 40vh; max-height: 46vh; }
  .product-details-image { min-height: 40vh; }
  .product-details-content { padding: 26px 18px 28px; }
  .product-details-description { margin-top: 12px; font-size: 13px; }
  .product-details-price-wrap { margin-top: 18px; }
  .product-details-price { font-size: 27px; }
  .product-details-features { margin-top: 18px; }
  .product-details-add { margin-top: 20px; }
}


/* Refinamento visual — categorias, ações de produto e detalhes */
.categories-container {
  overflow: visible;
  background: linear-gradient(180deg, #172535 0%, #1b2d40 100%);
  border-top: 1px solid rgba(255,255,255,.04);
}
.categories-bar {
  width: min(1240px, 100%);
  margin: auto;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  overflow: visible;
}
.category-btn {
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.035);
  color: #dce6ef;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
.category-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.2);
  background: rgba(255,255,255,.10);
}
.category-btn.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), #ff6a43);
  box-shadow: 0 7px 18px rgba(255,65,17,.27);
}

.product-actions {
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.product-details-button,
.product-actions .product-button {
  position: relative;
  min-width: 0;
  min-height: 45px;
  border-radius: 13px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: -.01em;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.product-details-button {
  border: 1px solid #d8e0e8;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  color: var(--secondary);
  box-shadow: 0 4px 12px rgba(23,37,53,.04);
}
.product-details-button i {
  color: var(--accent);
}
.product-details-button:hover {
  transform: translateY(-2px);
  border-color: #b8c8d8;
  background: #fff;
  box-shadow: 0 9px 20px rgba(23,37,53,.10);
}
.product-actions .product-button {
  margin-top: 0;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--primary) 0%, #ff6a43 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(255,65,17,.20);
}
.product-actions .product-button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 15%, rgba(255,255,255,.18) 48%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .45s ease;
}
.product-actions .product-button:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #e63a10 0%, #ff5b31 100%);
  box-shadow: 0 11px 24px rgba(255,65,17,.28);
}
.product-actions .product-button:hover::after { transform: translateX(120%); }
.product-actions button:active { transform: translateY(0) scale(.98); }

.product-details-modal {
  background: rgba(8,17,27,.78);
  backdrop-filter: blur(13px);
}
.product-details-card {
  width: min(1010px, 100%);
  grid-template-columns: minmax(0, 1.08fr) minmax(350px, .92fr);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 35px 110px rgba(0,0,0,.40);
}
.close-product-details {
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(23,37,53,.08);
  background: rgba(255,255,255,.95);
  box-shadow: 0 8px 24px rgba(23,37,53,.14);
  transition: transform .18s ease, background .18s ease;
}
.close-product-details:hover { transform: rotate(6deg) scale(1.04); background: #fff; }
.product-details-media {
  min-height: 560px;
  display: grid;
  place-items: center;
  padding: 34px;
  background:
    radial-gradient(circle at 20% 18%, rgba(45,115,189,.13), transparent 35%),
    radial-gradient(circle at 85% 86%, rgba(255,65,17,.12), transparent 34%),
    linear-gradient(145deg, #edf2f7 0%, #f8fafc 100%);
}
.product-details-media::after {
  content: '';
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(23,37,53,.06);
  border-radius: 24px;
  pointer-events: none;
}
.product-details-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 492px;
  object-fit: contain;
  border-radius: 20px;
  filter: drop-shadow(0 18px 30px rgba(23,37,53,.13));
}
.product-details-content {
  position: relative;
  padding: 58px 46px 44px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
}
.product-details-category {
  width: max-content;
  padding: 6px 9px;
  border-radius: 999px;
  background: #edf5ff;
  color: var(--accent);
  letter-spacing: .08em;
}
.product-details-name { margin-top: 12px; }
.product-details-description { color: #677383; }
.product-details-price-wrap {
  margin-top: 24px;
  padding: 17px 18px;
  border: 1px solid #e9edf2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(23,37,53,.045);
}
.product-details-original { margin-bottom: 1px; }
.product-details-price { color: var(--primary); font-size: 34px; }
.product-details-stock {
  width: max-content;
  margin-top: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eaf8f0;
}
.product-details-features {
  margin-top: 22px;
  grid-template-columns: 1fr;
  gap: 10px;
}
.product-details-features > div {
  padding: 13px 14px;
  border: 1px solid #e9edf2;
  background: #fff;
  box-shadow: 0 5px 14px rgba(23,37,53,.035);
}
.details-feature-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #fff1ed;
  color: var(--primary);
}
.product-details-features > div:nth-child(2) .details-feature-icon {
  background: #edf5ff;
  color: var(--accent);
}
.product-details-features > div > i { width: auto; }
.product-details-features small { margin-top: 2px; line-height: 1.35; }
.product-details-add {
  min-height: 56px;
  margin-top: 22px;
  padding: 0 18px;
  justify-content: space-between;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--primary) 0%, #ff6a43 100%);
  box-shadow: 0 12px 26px rgba(255,65,17,.25);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.product-details-add > span { display: inline-flex; align-items: center; gap: 9px; }
.product-details-add:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #e63a10 0%, #ff5b31 100%);
  box-shadow: 0 16px 31px rgba(255,65,17,.31);
}
.product-details-add:active { transform: translateY(0) scale(.99); }

@media (max-width: 760px) {
  .categories-bar { justify-content: center; padding: 10px 10px 12px; gap: 6px; }
  .category-btn { min-height: 34px; padding: 7px 10px; font-size: 11px; }
  .category-btn i { font-size: 11px; }
  .product-details-card { border-radius: 0; grid-template-columns: 1fr; }
  .product-details-media { min-height: 40vh; max-height: 44vh; padding: 24px; }
  .product-details-media::after { inset: 16px; border-radius: 18px; }
  .product-details-image { min-height: 34vh; max-height: 38vh; }
  .product-details-content { padding: 30px 22px 32px; }
}

@media (max-width: 540px) {
  .product-actions { grid-template-columns: 1fr 1fr; gap: 6px; }
  .product-details-button,
  .product-actions .product-button {
    min-height: 39px;
    padding: 0 7px;
    border-radius: 10px;
    font-size: 9.5px;
    gap: 5px;
  }
  .product-actions .product-button span { display: inline; }
  .product-actions .product-button i,
  .product-details-button i { font-size: 10px; }
  .product-details-content { padding: 25px 18px 26px; }
  .product-details-name { font-size: 29px; }
  .product-details-price-wrap { padding: 14px; }
  .product-details-price { font-size: 28px; }
  .product-details-add { min-height: 52px; }
}


/* Alinhamento uniforme dos cards */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.product-media {
  flex: 0 0 auto;
}
.product-info {
  display: flex;
  flex: 1;
  flex-direction: column;
}
.product-actions {
  margin-top: auto;
  padding-top: 18px;
}
@media (max-width: 540px) {
  .product-actions {
    padding-top: 12px;
  }
}

/* Confirmação do pedido pelo WhatsApp */
.whatsapp-order-button {
  width: 100%;
  min-height: 52px;
  margin-top: 14px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 13px;
  background: #25d366;
  color: #fff;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(37, 211, 102, .22);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.whatsapp-order-button i { font-size: 21px; }
.whatsapp-order-button:hover {
  background: #1fbd5a;
  transform: translateY(-1px);
  box-shadow: 0 13px 28px rgba(37, 211, 102, .28);
}
.whatsapp-order-button:active { transform: translateY(0); }

/* MERCADO PAGO CHECKOUT */
.payment-card { transition: .2s ease; }
.payment-card:hover { border-color: #c7d7e8; transform: translateY(-1px); }
.payment-card:has(input:checked) { border-color: #2d73bd; background: linear-gradient(180deg,#f6faff,#eef5fc); box-shadow: 0 0 0 2px rgba(45,115,189,.08); }
.payment-card:has(input:checked) > i { color: var(--primary); }
.card-payment-panel { margin-top: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: 0 12px 28px rgba(30,55,82,.06); }
.payment-provider-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; background: #f6f9fc; color: var(--secondary); }
.payment-provider-title > i { color: var(--success); font-size: 18px; }
.payment-provider-title strong, .payment-provider-title small { display: block; }
.payment-provider-title small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.card-brick-loading { padding: 18px 10px; text-align: center; color: var(--muted); font-size: 12px; }
#cardPaymentBrick_container { min-height: 40px; }

.payment-result-card { width: min(540px,100%); max-height: calc(100dvh - 40px); overflow: auto; padding: 34px; text-align: left; }
.payment-result-heading { display: flex; align-items: center; gap: 14px; }
.payment-result-heading .success-icon { flex: 0 0 58px; width: 58px; height: 58px; margin: 0; }
.payment-result-heading h2 { margin: 2px 0 0; }
.payment-result-kicker { color: var(--primary); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.payment-result-icon.pix-icon { background: #32bcad; }
.payment-result-icon.boleto-icon { background: #31445a; }
.payment-result-icon.card-icon { background: #2d73bd; }
.payment-status-box { margin: 18px 0 10px; padding: 13px 14px; display: flex; align-items: center; gap: 11px; border-radius: 13px; }
.payment-status-box i { font-size: 19px; }
.payment-status-box small, .payment-status-box strong { display: block; }
.payment-status-box small { margin-bottom: 1px; font-size: 10px; opacity: .72; }
.payment-status-box.awaiting { background: #fff7e6; color: #8c5e00; }
.payment-status-box.paid { background: #eaf8f0; color: #147044; }
.payment-status-box.failed { background: #fff0f0; color: #a12b2b; }
.payment-total-value { display: block; margin: 12px 0 18px; text-align: center; color: var(--secondary); font-size: 31px; }
.result-method { padding-top: 4px; }
.result-instruction { margin-bottom: 12px; text-align: center; font-size: 12px; }
.mp-pix-image { display: block; width: 100%; max-width: 220px; height: auto; }
.boleto-copy-group label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 800; }
.boleto-copy-group > div { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.boleto-digitable-line { width: 100%; min-height: 58px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; resize: none; font-size: 11px; line-height: 1.4; }
.copy-boleto-line { padding: 0 14px; border: 0; border-radius: 10px; background: var(--secondary); color: #fff; cursor: pointer; font-weight: 800; }
.open-boleto-button { width: 100%; min-height: 48px; margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; background: #2d73bd; color: #fff; font-weight: 850; }
.open-boleto-button.disabled { opacity: .45; pointer-events: none; }
.card-result-message { padding: 16px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 14px; background: #f7f9fb; }
.card-result-message > i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #e9f2fb; color: #2d73bd; }
.card-result-message strong, .card-result-message small { display: block; }
.card-result-message small { margin-top: 3px; color: var(--muted); }
.payment-live-note { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: #f5f7f9; color: #556270 !important; font-size: 11px; }
.payment-live-note i { margin-right: 5px; }

@media (max-width: 640px) {
  .payment-result-card { max-height: 100dvh; padding: 26px 18px; border-radius: 0; }
  .payment-result-heading .success-icon { flex-basis: 50px; width: 50px; height: 50px; }
  .payment-result-card h2 { font-size: 24px; }
  .payment-total-value { font-size: 27px; }
  .boleto-copy-group > div { grid-template-columns: 1fr; }
  .copy-boleto-line { min-height: 42px; }
  .card-payment-panel { padding: 8px; }
}

/* 3D Secure / autenticação bancária */
.card-challenge-wrap {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--light-gray);
}

.card-challenge-wrap p {
  margin: 0 0 10px;
  font-weight: 700;
}

.card-challenge-frame {
  width: 100%;
  min-height: 440px;
  border: 0;
  border-radius: 12px;
  background: #fff;
}

@media (max-width: 640px) {
  .card-challenge-frame {
    min-height: 500px;
  }
}


/* Galeria de produto: até 5 imagens + 1 vídeo */
.product-details-media {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 14px;
}
.product-details-viewer {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 430px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 20px;
}
.product-details-viewer .product-details-image,
.product-details-viewer .product-details-video,
.product-details-viewer .product-details-video-frame {
  width: 100%;
  height: 430px;
  min-height: 0;
  border: 0;
  border-radius: 20px;
}
.product-details-viewer .product-details-image { object-fit: contain; }
.product-details-viewer .product-details-video { object-fit: contain; background: #0d1117; }
.product-details-viewer .product-details-video-frame { background: #0d1117; }
.product-details-thumbnails {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 2px 2px 5px;
  scrollbar-width: thin;
}
.product-media-thumb {
  flex: 0 0 70px;
  width: 70px;
  height: 70px;
  padding: 4px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 2px solid transparent;
  border-radius: 13px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 5px 16px rgba(23,37,53,.08);
  cursor: pointer;
  transition: .18s ease;
}
.product-media-thumb:hover { transform: translateY(-2px); }
.product-media-thumb.active {
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(255,65,17,.16);
}
.product-media-thumb img { width: 100%; height: 100%; border-radius: 8px; object-fit: cover; }
.product-media-video-thumb {
  gap: 3px;
  align-content: center;
  color: var(--primary);
  font-size: 10px;
  font-weight: 850;
}
.product-media-video-thumb i { font-size: 18px; }

@media (max-width: 760px) {
  .product-details-viewer { min-height: 30vh; }
  .product-details-viewer .product-details-image,
  .product-details-viewer .product-details-video,
  .product-details-viewer .product-details-video-frame { height: 32vh; min-height: 230px; }
  .product-media-thumb { flex-basis: 60px; width: 60px; height: 60px; }
}


/* Correção mobile/iOS — detalhes do produto */
@media (max-width: 760px) {
  .product-details-modal {
    height: 100dvh;
    min-height: 100dvh;
    padding: 0;
    overflow: hidden;
    align-items: stretch;
  }

  .product-details-card {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    grid-template-columns: 1fr;
    border-radius: 0;
  }

  .close-product-details {
    position: fixed;
    top: max(14px, env(safe-area-inset-top));
    right: 14px;
    z-index: 20;
  }

  .product-details-media {
    min-height: 0;
    max-height: none;
    padding: 16px 16px 12px;
    gap: 10px;
  }

  .product-details-media::after {
    inset: 10px;
    border-radius: 18px;
  }

  .product-details-viewer {
    width: 100%;
    height: clamp(260px, 38dvh, 390px);
    min-height: 0;
    border-radius: 18px;
  }

  .product-details-viewer .product-details-image,
  .product-details-viewer .product-details-video,
  .product-details-viewer .product-details-video-frame {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    border-radius: 18px;
  }

  .product-details-thumbnails {
    gap: 7px;
    padding: 1px 1px 4px;
  }

  .product-media-thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 11px;
  }

  .product-details-content {
    padding: 22px 18px calc(28px + env(safe-area-inset-bottom));
  }

  .product-details-category {
    padding: 5px 8px;
    font-size: 10px;
  }

  .product-details-name {
    margin-top: 10px;
    font-size: clamp(24px, 7vw, 29px);
    line-height: 1.07;
  }

  .product-details-description {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.5;
  }

  .product-details-price-wrap {
    margin-top: 16px;
    padding: 14px 15px;
  }

  .product-details-price {
    font-size: 28px;
  }

  .product-details-stock {
    margin-top: 10px;
  }

  .product-details-add {
    width: 100%;
    min-height: 54px;
    margin-top: 16px;
  }

  .product-details-features {
    margin-top: 14px;
    gap: 8px;
  }

  .product-details-features > div {
    padding: 11px 12px;
  }
}

@media (max-width: 390px) {
  .product-details-viewer {
    height: clamp(235px, 34dvh, 320px);
  }

  .product-media-thumb {
    flex-basis: 52px;
    width: 52px;
    height: 52px;
  }

  .product-details-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .product-details-name {
    font-size: 24px;
  }
}


/* Detalhes do produto — imagem equilibrada + descrição com rolagem */
@media (min-width: 761px) {
  .product-details-card {
    width: min(1080px, 100%);
    height: min(720px, calc(100dvh - 48px));
    max-height: calc(100dvh - 48px);
    grid-template-columns: minmax(0, 1.12fr) minmax(390px, .88fr);
    overflow: hidden;
  }

  .product-details-media {
    height: 100%;
    min-height: 0;
    max-height: none;
    padding: 28px 28px 22px;
    justify-content: flex-start;
  }

  .product-details-viewer {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .product-details-viewer .product-details-image,
  .product-details-viewer .product-details-video,
  .product-details-viewer .product-details-video-frame {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
  }

  .product-details-thumbnails {
    flex: 0 0 auto;
  }

  .product-details-content {
    height: 100%;
    min-height: 0;
    padding: 40px 38px 34px;
    overflow: hidden;
  }
}

.product-details-description {
  max-height: 190px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 10px 2px 0;
  white-space: pre-line;
  scrollbar-width: thin;
  scrollbar-color: #c7d0da transparent;
}

.product-details-description::-webkit-scrollbar {
  width: 7px;
}

.product-details-description::-webkit-scrollbar-track {
  background: transparent;
}

.product-details-description::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c7d0da;
}

.product-details-description::-webkit-scrollbar-thumb:hover {
  background: #aeb9c5;
}

@media (max-width: 760px) {
  .product-details-viewer {
    height: clamp(250px, 34dvh, 340px);
  }

  .product-details-description {
    max-height: 150px;
    padding-right: 8px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 390px) {
  .product-details-viewer {
    height: clamp(225px, 31dvh, 300px);
  }

  .product-details-description {
    max-height: 135px;
  }
}


/* Botão de atendimento pelo WhatsApp nos detalhes do produto */
.product-details-features > .product-details-whatsapp {
  position: relative;
  padding: 13px 46px 13px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid #dfe8e2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(23,37,53,.035);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.product-details-whatsapp .details-feature-icon {
  background: #eafaf0 !important;
  color: #1fa855 !important;
}

.product-details-whatsapp-arrow {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #1fa855;
  font-size: 12px;
  opacity: .78;
}

.product-details-features > .product-details-whatsapp:hover {
  transform: translateY(-1px);
  border-color: #a9dfbb;
  background: #f5fff8;
  box-shadow: 0 8px 20px rgba(31,168,85,.10);
}

.product-details-features > .product-details-whatsapp:focus-visible {
  outline: 3px solid rgba(37,211,102,.22);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .product-details-features > .product-details-whatsapp {
    padding: 11px 42px 11px 12px;
  }
}




/* Compartilhamento de produto — dois botões */
.product-details-share {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.product-details-share button {
  min-height: 43px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #dde4eb;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.product-details-share button:hover {
  transform: translateY(-1px);
  border-color: #bfcbd7;
  background: #f8fafc;
  box-shadow: 0 6px 16px rgba(23,37,53,.07);
}

.product-details-share button:active {
  transform: scale(.99);
}

.product-details-share button i {
  color: var(--primary);
}

@media (max-width: 390px) {
  .product-details-share {
    grid-template-columns: 1fr;
  }
}




/* Correção definitiva de visualização das fotos no celular / iPhone */
@media (max-width: 760px) {
  .product-details-card {
    display: block;
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: auto;
  }

  .product-details-media {
    display: flex;
    flex: none;
    min-height: 0 !important;
    max-height: none !important;
    padding: 10px 10px 8px !important;
    gap: 8px;
  }

  .product-details-media::after {
    inset: 5px !important;
    border-radius: 16px !important;
  }

  .product-details-viewer {
    flex: none;
    width: 100%;
    height: clamp(360px, 48dvh, 470px) !important;
    min-height: 360px !important;
    max-height: none !important;
    border-radius: 16px;
    background: #f4f6f8;
    overflow: hidden;
  }

  .product-details-viewer .product-details-image,
  .product-details-viewer .product-details-video,
  .product-details-viewer .product-details-video-frame {
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    border-radius: 16px;
  }

  .product-details-viewer .product-details-image {
    object-fit: contain !important;
    transform: none !important;
    cursor: zoom-in;
  }

  .product-details-thumbnails {
    flex: none;
    padding: 2px 2px 4px;
  }

  .product-details-content {
    padding-top: 20px;
  }
}

@media (max-width: 430px) {
  .product-details-viewer {
    height: clamp(340px, 46dvh, 430px) !important;
    min-height: 340px !important;
  }
}

@media (max-height: 700px) and (max-width: 760px) {
  .product-details-viewer {
    height: 320px !important;
    min-height: 320px !important;
  }
}

/* Visualização da imagem em tela cheia */
.product-image-zoom {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding:
    calc(18px + env(safe-area-inset-top))
    14px
    calc(18px + env(safe-area-inset-bottom));
  background: rgba(5, 10, 16, .96);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}

.product-image-zoom.open {
  opacity: 1;
  visibility: visible;
}

.product-image-zoom img {
  width: 100%;
  height: 100%;
  max-width: 1200px;
  max-height: 92dvh;
  object-fit: contain;
  border-radius: 14px;
}

.product-image-zoom-close {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  z-index: 2;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.96);
  color: #172535;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
}


/* Correção: descrição dos produtos visível no computador */
@media (min-width: 761px) {
  .product-details-content {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c7d0da transparent;
  }

  .product-details-description {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 0 0 auto !important;
    min-height: 72px;
    max-height: 190px;
    overflow-y: auto;
    white-space: pre-line;
  }

  .product-details-content::-webkit-scrollbar {
    width: 7px;
  }

  .product-details-content::-webkit-scrollbar-track {
    background: transparent;
  }

  .product-details-content::-webkit-scrollbar-thumb {
    background: #c7d0da;
    border-radius: 999px;
  }
}


/* WhatsApp flutuante da página inicial */
.floating-whatsapp {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 80;
  min-height: 58px;
  padding: 8px 16px 8px 8px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(27, 181, 92, .22);
  border-radius: 999px;
  background: #ffffff;
  color: #172535;
  text-decoration: none;
  box-shadow: 0 14px 36px rgba(20, 35, 50, .18);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease, visibility .2s ease;
}

.floating-whatsapp:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(20, 35, 50, .22);
}

.floating-whatsapp-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25D366;
  color: #ffffff;
  font-size: 23px;
  box-shadow: 0 7px 18px rgba(37, 211, 102, .28);
}

.floating-whatsapp-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.floating-whatsapp-text strong {
  color: #172535;
  font-size: 13px;
  font-weight: 850;
}

.floating-whatsapp-text small {
  margin-top: 3px;
  color: #718096;
  font-size: 10px;
  font-weight: 650;
}

/* Quando carrinho, checkout ou detalhes estão abertos, o botão sai da frente */
body.no-scroll .floating-whatsapp {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
}

@media (max-width: 760px) {
  .floating-whatsapp {
    right: 15px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: 56px;
    height: 56px;
    min-height: 56px;
    padding: 0;
    justify-content: center;
    border: 0;
    background: #25D366;
    box-shadow: 0 12px 28px rgba(37, 211, 102, .34);
  }

  .floating-whatsapp-icon {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    background: transparent;
    box-shadow: none;
    font-size: 29px;
  }

  .floating-whatsapp-text {
    display: none;
  }
}
