/* M&S Variados — tema claro (Hostinger friendly) */
:root{
  /* Branco gelo (leve e clean, sem tom "pele") */
  --bg:#f8fafc;
  --surface:#ffffff;
  --surface2:#f1f5f9;
  --text:#111827;
  --muted:#6b7280;
  --primary:#0b3a7a; /* azul do footer */
  --border:rgba(15,23,42,.12);
  --shadow:0 10px 30px rgba(17,24,39,.08);
  --radius:14px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Arial;
  color:var(--text);
  background:var(--surface2);
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
a{color:inherit}
.container{padding:14px;max-width:980px;margin:0 auto; width:100%; flex:1}

/* Header */
.topbar{
  position:sticky;top:0;z-index:10;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:12px 14px;
  background:rgba(248, 250, 252, .92);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none}
.brand-logo{height:30px;max-width:190px;object-fit:contain;display:block}
.cart-link{text-decoration:none;display:flex;gap:6px;align-items:center}
.cart-badge{
  display:inline-grid;place-items:center;
  min-width:22px;height:22px;padding:0 6px;
  border-radius:999px;
  background:var(--primary);
  color:#fff;
  font-weight:800;font-size:12px
}


/* Search (botão + campo no header) */
.searchbar{
  flex:1;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  max-width:520px;
}
.search-toggle{
  width:42px;height:42px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface);
  display:grid;place-items:center;
  cursor:pointer;
  box-shadow:0 6px 16px rgba(17,24,39,.06);
}
.search-input{
  display:none;
  width:100%;
  max-width:420px;
  padding:11px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface);
}
body.search-open .search-input{display:block}
@media (min-width:720px){.search-input{display:block}}

/* Stories (filtros) */
.category-strip{margin-top:14px}
.stories{display:flex;gap:14px;overflow:auto;padding:8px 2px 14px}
.story{
  border:0;background:transparent;color:var(--text);
  padding:0;
  display:flex;flex-direction:column;align-items:center;gap:8px;
  cursor:pointer;
  min-width:78px;
}
.story:focus{outline:2px solid rgba(11,58,122,.25);outline-offset:6px;border-radius:14px}
.story-img{
  width:64px;height:64px;border-radius:50%;
  padding:3px;
  background:linear-gradient(45deg,#feda75,#d62976,#962fbf,#4f5bd5);
  box-shadow:0 6px 16px rgba(0,0,0,.08);
}
.story-img img{
  width:100%;height:100%;object-fit:cover;display:block;
  border-radius:50%;
  background:var(--surface);
}
.story-name{font-size:12px;font-weight:700;text-align:center;max-width:78px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.story.active .story-img{box-shadow:0 0 0 3px rgba(11,58,122,.18), 0 10px 20px rgba(0,0,0,.10)}

.subcats{margin:2px 0 0;display:flex;flex-wrap:wrap;gap:8px}
.subcats button{
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
  border-radius:999px;
  padding:8px 12px;
  cursor:pointer;
  box-shadow:0 6px 16px rgba(17,24,39,.05);
}
.subcats button.active{border-color:rgba(11,58,122,.45)}

/* Produtos */
.products{margin-top:10px}
.products-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}
@media (min-width:720px){.grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow)}
.card-link{text-decoration:none;display:block}
.card img{width:100%;height:160px;object-fit:cover;display:block;background:#f2f2f2}
.card h3{font-size:14px;margin:10px 10px 4px}
.price{margin:0 10px 12px;font-weight:900;color:var(--primary)}
.price.big{font-size:22px}

.product{display:grid;gap:14px}
@media (min-width:720px){.product{grid-template-columns:1fr 1fr}}
.product-img img{width:100%;border-radius:var(--radius);border:1px solid var(--border);background:#f2f2f2}
.desc{color:var(--muted);line-height:1.5;margin:10px 0 0}

/* Formulários / botões */
.addcart{margin-top:12px;display:grid;gap:10px;max-width:320px}
label{display:grid;gap:6px;color:var(--muted);font-size:13px}
input{padding:12px;border-radius:12px;border:1px solid var(--border);background:var(--surface);color:var(--text);outline:none}
.btn,.btn-secondary{display:inline-block;border-radius:12px;padding:12px 14px;text-decoration:none;text-align:center;font-weight:900;cursor:pointer;border:1px solid var(--border)}
.btn{background:var(--primary);color:#fff;border-color:transparent}
.btn-secondary{background:transparent;color:var(--text)}
.btn-secondary:hover{background:rgba(11,58,122,.06)}

.link-danger{color:#dc2626;text-decoration:none}

.cart-list{display:grid;gap:10px;margin-top:12px}
.cart-item{display:grid;grid-template-columns:74px 1fr;gap:10px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:10px;box-shadow:var(--shadow)}
.cart-item img{width:74px;height:74px;object-fit:contain;border-radius:12px;background:var(--surface);border:1px solid rgba(0,0,0,.06);padding:6px;box-sizing:border-box}
.cart-info{display:grid;gap:6px}
.cart-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:14px}
.actions{display:flex;gap:10px}

.checkout{display:grid;gap:18px}
@media (min-width:720px){.checkout{grid-template-columns:1fr 1fr}}
.checkout-items{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.checkout-items li{display:flex;justify-content:space-between;gap:10px;color:var(--muted)}

.alert{padding:12px;border-radius:12px;margin:10px 0}
.alert.error{border:1px solid rgba(220,38,38,.35);background:rgba(220,38,38,.06)}
.alert.success{border:1px solid rgba(11,58,122,.25);background:rgba(11,58,122,.06)}

.empty{padding:16px;border:1px dashed var(--border);border-radius:14px;color:var(--muted);text-align:center;background:#fff}

/* Footer */
.footer{
  padding:14px 14px;
  color:#e8eef9;
  text-align:center;
  background:var(--primary);
  margin-top:auto;
}
.footer p{margin:4px 0}
.footer .small{font-size:11.5px;opacity:.9}

/* WhatsApp */
.whatsapp-float{
  position:fixed;right:16px;bottom:16px;
  width:54px;height:54px;border-radius:50%;
  display:grid;place-items:center;
  background:#25D366;color:#fff;
  text-decoration:none;font-size:24px;
  border:1px solid rgba(0,0,0,.2);
  box-shadow:0 10px 30px rgba(0,0,0,.25)
}


.whatsapp-float svg{width:28px;height:28px;display:block}



/* Footer layout */
.footer-inner{
  max-width:980px;
  margin:0 auto;
  display:grid;
  gap:12px;
  text-align:center;
}
.footer-brand{font-weight:900;font-size:15px;margin-bottom:4px}
.footer-title{font-weight:900;margin:4px 0 6px}
.footer-link{display:block;margin:4px 0;text-decoration:none;opacity:.95}
.footer-link:hover{text-decoration:underline}
.footer-bottom{
  max-width:980px;
  margin:10px auto 0;
  padding-top:10px;
  border-top:1px solid rgba(232,238,249,.25);
  text-align:center;
}
@media (min-width: 760px){
  .footer-inner{grid-template-columns:1.3fr 1fr 1fr; text-align:left; align-items:start}
  }

/* Instagram button */
.btn-instagram{
  background:#E1306C;
  color:#fff;
  border-color:transparent;
}
.btn-instagram:hover{filter:brightness(1.05)}

/* Contact page */
.page{padding:14px 0}
.page h1{margin:0 0 10px;font-size:22px}
.muted{color:var(--muted)}
.cards{display:grid;gap:12px;margin:12px 0}
@media (min-width: 760px){.cards{grid-template-columns:1fr 1fr}}
.card-pad{padding:14px}
.card-pad h2{margin:0 0 8px;font-size:16px}
.owners{display:grid;gap:12px;margin-top:12px}
@media (min-width: 760px){.owners{grid-template-columns:1fr 1fr}}
.owner h3{margin:0 0 6px;font-size:15px}

/* Footer extras (pagamentos + instagram com ícone) */
.btn-instagram{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(232,238,249,.28);
  color:#fff;
  font-weight:900;
  text-decoration:none;
  width:100%;
  max-width:300px;
}
.btn-instagram:hover{background:rgba(255,255,255,.2)}
.btn-instagram img{width:18px;height:18px;display:block}

.pay-row{
  margin-top:6px;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.pay-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 9px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(232,238,249,.20);
  color:#fff;
  font-weight:800;
  font-size:12px;
}
.pay-pill img{width:16px;height:16px;display:block}



/* Fix: centralizar copyright */
.footer-bottom{ text-align:center !important; }


/* Patch v4 — footer ainda mais compacto (sem perder legibilidade) */
.footer{padding:8px 12px;}
.footer-inner{gap:8px;}
.footer p{margin:2px 0;}
.footer-brand{font-size:13px;margin-bottom:1px}
.footer-title{margin:1px 0 4px;font-size:13px}
.footer .small{font-size:10.5px;line-height:1.35}
.footer-bottom{margin:6px auto 0;padding-top:6px}

.pay-row{margin-top:3px;gap:4px}
.pay-pill{padding:4px 7px;font-size:11px}
.pay-pill img{width:14px;height:14px}

.btn-instagram{
  width:40px;
  height:40px;
  max-width:none;
  padding:0;
  border-radius:999px;
  gap:0;
}
.btn-instagram img{width:18px;height:18px}


/* Patch — footer accordion no mobile */
.footer-desktop{display:block;}
.footer-mobile{display:none;}

@media (max-width: 720px){
  .footer-desktop{display:none;}
  .footer-mobile{display:block;}
  /* safety */
  .footer-inner{display:none;}

  details.footer-acc{
    border-top:1px solid rgba(255,255,255,.14);
    padding-top:2px;
    margin-top:2px;
  }
  details.footer-acc:first-child{
    border-top:0;
    padding-top:0;
    margin-top:0;
  }

  details.footer-acc summary{
    display:flex;
    align-items:center;
    justify-content:space-between;
    cursor:pointer;
    padding:6px 0;
    font-weight:800;
    font-size:12px;
    letter-spacing:.2px;
    list-style:none;
  }
  details.footer-acc summary::-webkit-details-marker{display:none;}
  details.footer-acc summary::after{
    content:'+';
    font-weight:900;
    opacity:.85;
    margin-left:10px;
  }
  details.footer-acc[open] summary::after{content:'–';}

  .footer-mobile .acc-body{padding:0 0 8px;}
  .footer-mobile .footer-link{display:block; padding:6px 0;}
  .footer-mobile .pay-row{flex-wrap:wrap;}
  .footer-mobile .btn-instagram{width:36px;height:36px;}
  .footer-mobile .btn-instagram img{width:18px;height:18px;}
}


/* ===== Pagamento PIX (melhorias UI) ===== */
.payment-page{padding-top:8px}
.payment-head{max-width:980px;margin:0 auto}
.pix-card{padding:18px}
.pix-grid{display:grid;gap:16px;align-items:start}
@media (min-width: 860px){
  .pix-grid{grid-template-columns: 360px 1fr}
}
.pix-title{margin:0 0 10px 0}
.pix-qr-box{
  background:var(--surface2);
  border:1px dashed var(--border);
  border-radius:14px;
  padding:14px;
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:280px;
}
.pix-qr-img{
  width:240px;
  height:240px;
  max-width:70vw;
  object-fit:contain;
  background:var(--surface);
  border-radius:12px;
  padding:10px;
  border:1px solid var(--border);
}
#pixCode{
  width:100%;
  min-height:130px;
  resize:vertical;
  padding:12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--surface);
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  font-size:12px;
  line-height:1.35;
}
.pix-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}
.status-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px;align-items:center}
.status-pill{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface2);
  font-size:13px;
}
.approved-box .alert{margin:0}

/* Acessibilidade: texto apenas para leitores de tela */
.sr-only{
  position:absolute !important;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* Ajustes para footer responsivo */
@media (max-width: 767px) {
    .footer {
        padding: 10px 20px;  /* Ajuste o espaçamento do footer */
        font-size: 12px;  /* Ajuste de tamanho de fonte para mobile */
    }
    .footer-inner {
        grid-template-columns: 1fr;  /* Ajusta o layout para telas pequenas */
    }
    .footer img {
        max-width: 100%;  /* Garante que as imagens não saiam da área */
        height: auto;
    }
    body, html {
        overflow-x: hidden;  /* Impede o overflow horizontal no mobile */
    }
}

/* ===== Modern UI Updates ===== */
:root {
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-800: #1f2937;
}

.btn-primary { background: var(--primary); color: #fff; border: none; }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* Cart Modernization */
.cart-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.cart-item-modern {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-100);
  align-items: center;
}
.cart-item-modern:last-child { border-bottom: none; }

.cart-item-thumb{
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  padding: 8px;
  box-sizing: border-box;
}

.cart-item-details { flex: 1; }
.cart-item-title { font-weight: 800; font-size: 16px; margin-bottom: 4px; display: block; text-decoration: none; color: var(--text); }
.cart-item-price { color: var(--primary); font-weight: 900; font-size: 18px; }

/* Stepper Moderno */
.ms-qty-modern {
  display: flex;
  align-items: center;
  background: var(--gray-100);
  border-radius: 12px;
  width: fit-content;
  padding: 4px;
}
.ms-qty-modern button {
  width: 32px;
  height: 32px;
  border: none;
  background: #fff;
  border-radius: 10px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.ms-qty-modern button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* Botão visualmente "desabilitado" (mantém clique para exibir aviso) */
.ms-qty-modern button.is-disabled,
.ms-qty-modern button[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.ms-qty-modern input {
  width: 40px;
  text-align: center;
  background: transparent;
  border: none;
  font-weight: 800;
  padding: 0;
  outline: none;
  color: var(--text);
}

/* Remove os "botões" (spinner) do input number, já que usamos + e - */
.ms-qty-modern input[type=number]::-webkit-outer-spin-button,
.ms-qty-modern input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.ms-qty-modern input[type=number] {
  -moz-appearance: textfield;
}

.ms-qty-modern input:focus {
  outline: 2px solid rgba(59,130,246,.45);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Aviso de quantidade máxima (inline) */
.ms-qty-msg {
  display: none;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #b45309;
}
.ms-qty-msg.show {
  display: block;
}

/* Confirmação / Sucesso */
.success-card {
  text-align: center;
  padding: 40px 20px;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
  max-width: 500px;
  margin: 40px auto;
}
.success-icon {
  width: 80px;
  height: 80px;
  background: #d1fae5;
  color: #059669;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto 20px;
}

/* ===== Dark Mode & Hover Effects ===== */
html.dark-mode, html[data-theme="dark"], body.dark-mode {
  --bg: #0b1220;
  --surface: #152238;
  --surface2: #0b1220;
  --text: #f8fafc;
  --muted: #a8b4c7;
  --border: rgba(255,255,255,.08);
  --shadow: 0 18px 50px rgba(0,0,0,.45);

  /* Neutros usados em botões/cards antigos */
  --gray-50: rgba(255,255,255,.03);
  --gray-100: rgba(255,255,255,.06);
  --gray-200: rgba(255,255,255,.10);
  --gray-800: #f8fafc;
}

/* Fundo sólido no tema escuro (evita “duas cores” ao rolar) */
html.dark-mode, html[data-theme="dark"] { background: #0b1220; }
html.dark-mode body, html[data-theme="dark"] body, body.dark-mode { background: #0b1220; }

html.dark-mode .topbar, html[data-theme="dark"] .topbar, body.dark-mode .topbar { background: rgba(11, 18, 32, 0.72); border-bottom: 1px solid rgba(255,255,255,.06); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
html.dark-mode .card, html.dark-mode .cart-card, html[data-theme="dark"] .card, html[data-theme="dark"] .cart-card, body.dark-mode .card, body.dark-mode .cart-card { background: var(--surface); border-color: rgba(255,255,255,.08); }
html.dark-mode input, html.dark-mode textarea, html[data-theme="dark"] input, html[data-theme="dark"] textarea, body.dark-mode input, body.dark-mode textarea { background: #334155; color: #fff; border-color: #475569; }

/* Efeito Hover nos Produtos (Mobile Friendly) */
.card { transition: transform 0.3s ease, box-shadow 0.3s ease; }
@media (hover: hover) {
  .card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.15); }
  .card:hover img { transform: scale(1.05); }
}
.card img { transition: transform 0.5s ease; }

/* Botão Alternador de Tema */
.theme-toggle {
  background: var(--gray-100);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s;
}
html.dark-mode .theme-toggle, html[data-theme="dark"] .theme-toggle, body.dark-mode .theme-toggle { background: #334155; }

/* Selos de Confiança */
.trust-badges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 20px;
}
.badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-50);
  padding: 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}
html.dark-mode .badge-item, html[data-theme="dark"] .badge-item, body.dark-mode .badge-item { background: #334155; }

/* ===== Mobile: categorias (stories) paginadas 3 por vez + botão "›" ===== */
@media (max-width: 768px) {
  .stories-wrap{
    display:flex;
    align-items:center;
    gap:10px;
    width:100%;
  }

  /* mantemos a lista como flex para o JS poder esconder/mostrar itens */
  .stories{
    display:flex;
    flex:1;
    gap:14px;
    overflow:hidden;
    flex-wrap:nowrap;
  }

  /* Garante 3 cards por "página" (o JS alterna a visibilidade) */
  .stories > .story{
    flex:0 0 calc((100% - 28px)/3); /* 2 gaps de 14px = 28px */
    max-width:calc((100% - 28px)/3);
  }.stories-wrap{
  position:relative;
  width:100%;
}

/* deixa espaço para o botão "›" sem cobrir o 3º item */
.stories{
  padding-right:54px;
}

.stories-next{
  position:absolute;
  right:0;
  top:50%;
  transform:translateY(-50%);
  width:44px;
  height:44px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  background:var(--surface);
  font-size:30px;
  line-height:1;
  display:none; /* só aparece quando houver mais categorias */
  place-items:center;
  box-shadow:0 8px 20px rgba(0,0,0,.12);
}

.stories-wrap.has-more .stories-next{
  display:grid;
}

body.dark-mode .stories-next{
  background:#0f172a;
  border-color:rgba(255,255,255,.15);
  color:#fff;
}
}

/* ===== Dark Mode Fixes (Theme consistency) ===== */
html.dark-mode .btn-secondary,
html[data-theme="dark"] .btn-secondary,
body.dark-mode .btn-secondary{ color: var(--text); }

html.dark-mode .btn-secondary:hover,
html[data-theme="dark"] .btn-secondary:hover,
body.dark-mode .btn-secondary:hover{ background: rgba(255,255,255,.06); }

@media (hover:hover){
  .cart-item-modern:hover{ background: rgba(11,58,122,.04); }
}
html.dark-mode .cart-item-modern:hover,
html[data-theme="dark"] .cart-item-modern:hover,
body.dark-mode .cart-item-modern:hover{ background: rgba(255,255,255,.04); }

html.dark-mode .ms-qty-modern,
html[data-theme="dark"] .ms-qty-modern,
body.dark-mode .ms-qty-modern{ background: rgba(255,255,255,.06); }

html.dark-mode .ms-qty-modern button,
html[data-theme="dark"] .ms-qty-modern button,
body.dark-mode .ms-qty-modern button{
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

html.dark-mode .search-toggle,
html[data-theme="dark"] .search-toggle,
body.dark-mode .search-toggle{
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
}

html.dark-mode .subcats button,
html[data-theme="dark"] .subcats button,
body.dark-mode .subcats button{
  background: var(--surface);
  color: var(--text);
}

/* === MS HOTFIX: DARK HEADER CONTROLS START === */
/* Mantém os controles do topo legíveis no tema escuro (mobile-first)
   - lupa (botão) com fundo claro
   - campo de busca com fundo claro
   - evita "camuflagem" por causa do reset global de inputs no dark mode
*/
html.dark-mode .topbar .search-toggle,
html[data-theme="dark"] .topbar .search-toggle,
body.dark-mode .topbar .search-toggle{
  background: rgba(255,255,255,.96) !important;
  color: #111827 !important;
  border-color: rgba(17,24,39,.14) !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.28) !important;
}

html.dark-mode .topbar .search-input,
html[data-theme="dark"] .topbar .search-input,
body.dark-mode .topbar .search-input{
  background: rgba(255,255,255,.96) !important;
  color: #111827 !important;
  border-color: rgba(17,24,39,.14) !important;
}

html.dark-mode .topbar .search-input::placeholder,
html[data-theme="dark"] .topbar .search-input::placeholder,
body.dark-mode .topbar .search-input::placeholder{
  color: rgba(17,24,39,.55) !important;
}
/* === MS HOTFIX: DARK HEADER CONTROLS END === */
/* ===== Theme Polish v3 (mobile-first, foco no tema escuro) ===== */

/* Promo (linha no carrinho) */
.ms-cart-promo-label{
  margin-top:6px;
  font-size:13px;
  font-weight:900;
  color:#0b3a7a;
  display:flex;
  align-items:center;
  gap:6px;
}
html.dark-mode .ms-cart-promo-label,
html[data-theme="dark"] .ms-cart-promo-label,
body.dark-mode .ms-cart-promo-label{
  color:#34d399; /* verde suave (mais contraste no fundo escuro) */
}

/* Preço e botões outline no tema escuro (o azul do --primary é muito escuro para texto) */
html.dark-mode .price,
html[data-theme="dark"] .price,
body.dark-mode .price{
  color:#ffffff;
}

/* Valores monetários (Subtotal/Total) em branco no tema escuro */
.ms-money-label { color: var(--muted); }

html.dark-mode .ms-money,
html[data-theme="dark"] .ms-money,
body.dark-mode .ms-money { color: #ffffff; }

.ms-total { color: var(--primary); }
html.dark-mode .ms-total,
html[data-theme="dark"] .ms-total,
body.dark-mode .ms-total { color: #ffffff; }

html.dark-mode .ms-money-label,
html[data-theme="dark"] .ms-money-label,
body.dark-mode .ms-money-label { color: #ffffff; }

/* Preço do produto no carrinho */
html.dark-mode .cart-item-price,
html[data-theme="dark"] .cart-item-price,
body.dark-mode .cart-item-price { color: #ffffff; }


html.dark-mode .btn-outline,
html[data-theme="dark"] .btn-outline,
body.dark-mode .btn-outline{
  border-color:#93c5fd;
  color:#93c5fd;
}
html.dark-mode .btn-outline:hover,
html[data-theme="dark"] .btn-outline:hover,
body.dark-mode .btn-outline:hover{
  background:#93c5fd;
  color:#0b1220;
}

/* Estado vazio do carrinho (evita texto branco em card claro) */
html.dark-mode .success-card,
html[data-theme="dark"] .success-card,
body.dark-mode .success-card{
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 8px 22px rgba(0,0,0,.28);
}
html.dark-mode .success-card .muted,
html[data-theme="dark"] .success-card .muted,
body.dark-mode .success-card .muted{
  color: var(--muted);
}
.ms-success-icon-cart{
  background:#f3f4f6;
  color:#9ca3af;
}
html.dark-mode .ms-success-icon-cart,
html[data-theme="dark"] .ms-success-icon-cart,
body.dark-mode .ms-success-icon-cart{
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.75);
}

/* PIX: classes para deixar tudo consistente no tema escuro */
.ms-icon-bubble{
  background:#e1f5fe;
  color:#0288d1;
  width:60px;
  height:60px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto 15px;
  font-size:30px;
}
html.dark-mode .ms-icon-bubble,
html[data-theme="dark"] .ms-icon-bubble,
body.dark-mode .ms-icon-bubble{
  background: rgba(147,197,253,.14);
  color: #93c5fd;
  border: 1px solid rgba(147,197,253,.18);
}

.ms-qr-box{
  background:#f9fafb;
  border:2px dashed #e5e7eb;
  border-radius:24px;
  padding:25px;
  display:inline-block;
  margin-bottom:20px;
}
html.dark-mode .ms-qr-box,
html[data-theme="dark"] .ms-qr-box,
body.dark-mode .ms-qr-box{
  background: rgba(255,255,255,.03);
  border-color: rgba(255,255,255,.14);
}

/* status pills do PIX */
.status-pill.ms-status-wait{
  background: rgba(11,58,122,.06);
  border-color: rgba(11,58,122,.35);
  color:#0b3a7a;
  font-weight:800;
}
html.dark-mode .status-pill.ms-status-wait,
html[data-theme="dark"] .status-pill.ms-status-wait,
body.dark-mode .status-pill.ms-status-wait{
  background: rgba(147,197,253,.10);
  border-color: rgba(147,197,253,.22);
  color:#e0f2fe;
}

.status-pill.ms-status-exp{ font-weight:800; }

.ms-dot-pulse{
  display:inline-block;
  width:8px;
  height:8px;
  border-radius:999px;
  background: currentColor;
  animation: msPulse 1.5s infinite;
}
@keyframes msPulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

/* textarea + botão copiar (PIX) */
#pixCode.ms-pixcode{
  background:#f3f4f6;
  border:1px solid #e5e7eb;
  border-radius:16px;
  padding:15px;
  width:100%;
  height:100px;
  min-height:100px;
  font-size:12px;
  font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  resize:none;
  color:#111827;
}
html.dark-mode #pixCode.ms-pixcode,
html[data-theme="dark"] #pixCode.ms-pixcode,
body.dark-mode #pixCode.ms-pixcode{
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.14);
  color: var(--text);
}

.ms-btn-copy{
  position:absolute;
  right:10px;
  bottom:10px;
  background: var(--primary);
  color:#fff;
  border:none;
  padding:8px 15px;
  border-radius:10px;
  font-weight:800;
  font-size:12px;
  cursor:pointer;
}
.ms-btn-copy:hover{ filter: brightness(1.05); }
.ms-btn-copy:active{ transform: translateY(1px); }

/* caixinha de aviso (PIX) */
.ms-note{
  border-radius:16px;
  padding:15px;
  display:flex;
  gap:12px;
  align-items:center;
  margin-bottom:25px;
}
.ms-note-warn{
  background:#fffbeb;
  border:1px solid #fef3c7;
}
.ms-note-warn .ms-note-text{ color:#92400e; font-weight:600; }
html.dark-mode .ms-note-warn,
html[data-theme="dark"] .ms-note-warn,
body.dark-mode .ms-note-warn{
  background: rgba(245,158,11,.10);
  border-color: rgba(245,158,11,.22);
}
html.dark-mode .ms-note-warn .ms-note-text,
html[data-theme="dark"] .ms-note-warn .ms-note-text,
body.dark-mode .ms-note-warn .ms-note-text{
  color: #fcd34d;
}


/* Dark mode: hover com contraste melhor */
@media (hover:hover){
  html.dark-mode .card:hover, html[data-theme="dark"] .card:hover, body.dark-mode .card:hover{
    box-shadow: 0 22px 55px rgba(0,0,0,.55);
  }
}
