:root {
  --orange: #ff5a00;
  --orange2: #ff7a00;
  --bg: #f5f5f5;
  --text: #171717;
  --muted: #777;
  --card: #fff;
  --border: #e8e8e8;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { background: #f1f1f1; }

body.mdc-category-body {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 88px;
  overflow-x: hidden;
}

.catv2-top {
  color: #fff;
  padding: 12px 14px 14px;
  border-radius: 0 0 24px 24px;
  background:
    radial-gradient(circle at 86% 12%, rgba(255,255,255,.30), transparent 26%),
    linear-gradient(135deg, var(--orange), #ff2f00);
  box-shadow: 0 12px 32px rgba(255,90,0,.20);
}

.catv2-bar {
  min-height: 46px;
  display: grid;
  grid-template-columns: 44px 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
}

.catv2-icon-btn,
.catv2-menu-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.catv2-menu-btn { font-size: 27px; }

.catv2-title-mini { min-width: 0; }
.catv2-title-mini span,
.catv2-title-mini strong { display: block; }
.catv2-title-mini span { font-size: 11px; opacity: .86; font-weight: 800; }
.catv2-title-mini strong { font-size: 14px; font-weight: 950; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.catv2-hero {
  margin-top: 9px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.catv2-hero-icon {
  width: 54px;
  height: 54px;
  border-radius: 19px;
  background: #111;
  color: var(--orange2);
  display: grid;
  place-items: center;
  font-size: 27px;
  border: 2px solid rgba(255,255,255,.5);
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

.catv2-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(17,17,17,.22);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 950;
  margin-bottom: 5px;
}

.catv2-hero h1 {
  margin: 0;
  font-size: clamp(22px, 6vw, 25px);
  line-height: 1.03;
  font-weight: 950;
  letter-spacing: -.035em;
}

.catv2-hero p {
  margin: 5px 0 0;
  font-size: 12px;
  font-weight: 800;
  opacity: .92;
}

.catv2-search-row {
  margin-top: 13px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 9px;
}

.catv2-search {
  min-width: 0;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 999px;
  padding: 0 14px;
  color: #777;
  box-shadow: 0 8px 22px rgba(0,0,0,.16);
}

.catv2-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111;
  font-size: 15px;
  font-weight: 750;
}

.catv2-search button {
  border: 0;
  background: transparent;
  color: #999;
  font-size: 18px;
  display: none;
}

.catv2-search.has-value button { display: grid; }

.catv2-filter-toggle {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 8px 22px rgba(0,0,0,.16);
}

.catv2-main { padding: 13px 14px 14px; }
.catv2-section { margin-bottom: 12px; }

.catv2-section-title {
  margin: 4px 2px 9px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 950;
  color: #111;
}

.catv2-section-title span { display: inline-flex; align-items: center; gap: 7px; }
.catv2-section-title i { color: var(--orange); }
.catv2-section-title button {
  border: 0;
  background: transparent;
  color: var(--orange);
  font-weight: 900;
  font-size: 12px;
}
.catv2-section-title em {
  color: #777;
  font-style: normal;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.catv2-subchips,
.catv2-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1px 1px 5px;
  scrollbar-width: none;
}
.catv2-subchips::-webkit-scrollbar,
.catv2-filters::-webkit-scrollbar { display: none; }

.catv2-subchips a,
.catv2-filters button {
  flex: 0 0 auto;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: #222;
  text-decoration: none;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 3px 10px rgba(0,0,0,.04);
}
.catv2-subchips a { display: inline-flex; align-items: center; gap: 6px; }
.catv2-subchips i { color: var(--orange); font-size: 13px; }

.catv2-sticky-tools {
  position: sticky;
  top: 0;
  z-index: 25;
  margin: 0 -14px 12px;
  padding: 7px 14px 6px;
  background: rgba(245,245,245,.92);
  backdrop-filter: blur(10px);
}

.catv2-filters { margin: 0; }
.catv2-filters button { display: inline-flex; align-items: center; gap: 6px; }
.catv2-filters button.active {
  background: #111;
  border-color: #111;
  color: #fff;
}
.catv2-filters button.active i { color: var(--orange2); }

.catv2-ai-card {
  margin: 0 0 12px;
  border-radius: 20px;
  padding: 13px 14px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 12%, rgba(255,122,0,.42), transparent 28%),
    linear-gradient(135deg, #111, #2a2a2a);
  display: grid;
  grid-template-columns: 1fr 46px;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 22px rgba(0,0,0,.12);
}

.catv2-ai-card small,
.catv2-ai-card strong,
.catv2-ai-card span { display: block; }
.catv2-ai-card small { color: var(--orange2); font-size: 10px; font-weight: 950; }
.catv2-ai-card strong { margin-top: 2px; font-size: 16px; font-weight: 950; }
.catv2-ai-card span { margin-top: 2px; color: #ddd; font-size: 12px; font-weight: 700; line-height: 1.22; }
.catv2-ai-card i { width: 46px; height: 46px; border-radius: 17px; background: rgba(255,122,0,.16); color: var(--orange2); display: grid; place-items: center; font-size: 25px; }

.catv2-products-title { margin-top: 0; }

.catv2-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.catv2-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 17px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 3px 10px rgba(0,0,0,.045);
  display: none;
}

.catv2-card.is-visible { display: block; }
.catv2-card.is-hidden-filter { display: none !important; }

.catv2-discount {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  background: #ff321f;
  color: #fff;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 950;
}

.catv2-heart {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  border: 0;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: rgba(255,255,255,.90);
  color: #333;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.catv2-card img {
  width: 100%;
  height: 164px;
  object-fit: contain;
  background: #fff;
  padding: 10px;
}

.catv2-card-body { padding: 10px; }
.catv2-pill {
  display: inline-block;
  background: #111;
  color: #fff;
  border-radius: 7px;
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 950;
  margin-bottom: 7px;
}

.catv2-card h3 {
  margin: 0;
  height: 38px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
}

.catv2-price {
  color: var(--orange);
  font-size: 20px;
  font-weight: 950;
  margin-top: 7px;
  min-height: 24px;
}

.catv2-market {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  color: #777;
  font-size: 12px;
  font-weight: 700;
}

.catv2-wide { grid-column: 1 / -1; }

.catv2-ad {
  display: none;
  grid-column: 1 / -1;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  min-height: 118px;
  box-shadow: 0 3px 10px rgba(0,0,0,.04);
}
.catv2-ad.is-visible { display: block; }
.catv2-ad-label { display: block; color: #999; font-size: 11px; font-weight: 900; margin-bottom: 8px; text-transform: uppercase; }
.catv2-ad-box { min-height: 86px; border-radius: 14px; background: linear-gradient(135deg, #fff4ec, #fff); border: 1px dashed #ffd0b7; color: #9a4a1f; display: flex; align-items: center; justify-content: center; text-align: center; padding: 14px; font-size: 13px; font-weight: 850; }

.catv2-feed-ia {
  display: none;
  grid-column: 1 / -1;
  border-radius: 18px;
  padding: 18px;
  color: #fff;
  background: linear-gradient(135deg, #111, #2a2a2a 45%, #ff5a00);
  box-shadow: 0 8px 22px rgba(0,0,0,.12);
}
.catv2-feed-ia.is-visible { display: block; }
.catv2-feed-ia span { display: inline-flex; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 950; }
.catv2-feed-ia h3 { margin: 14px 0 6px; font-size: 22px; }
.catv2-feed-ia p { margin: 0 0 14px; color: rgba(255,255,255,.86); font-size: 14px; font-weight: 700; }
.catv2-feed-ia button { border: 0; border-radius: 999px; background: #fff; color: #111; padding: 11px 16px; font-weight: 950; }

.catv2-sentinel { min-height: 82px; display: flex; align-items: center; justify-content: center; }
.catv2-loader { display: none; align-items: center; justify-content: center; gap: 10px; padding: 22px 0; color: #777; font-size: 13px; font-weight: 700; }
.catv2-loader.show { display: flex; }
.catv2-spinner { width: 22px; height: 22px; border: 3px solid #eee; border-top-color: var(--orange); border-radius: 50%; animation: catv2Spin .8s linear infinite; }
@keyframes catv2Spin { to { transform: rotate(360deg); } }

.catv2-empty,
.catv2-seo-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 3px 12px rgba(0,0,0,.045);
}
.catv2-empty { text-align: center; color: #555; }
.catv2-empty i { color: var(--orange); font-size: 34px; }
.catv2-empty strong, .catv2-empty span { display: block; }
.catv2-empty strong { margin-top: 8px; color: #111; font-size: 17px; font-weight: 950; }
.catv2-empty span { margin-top: 4px; font-size: 13px; }
.catv2-empty a { display: inline-flex; margin-top: 13px; background: #111; color: #fff; text-decoration: none; border-radius: 999px; padding: 11px 14px; font-size: 12px; font-weight: 950; }

.catv2-seo-box { margin-top: 18px; }
.catv2-seo-box h2 { margin: 0 0 8px; font-size: 18px; font-weight: 950; }
.catv2-seo-box p { margin: 0; color: #666; line-height: 1.42; font-size: 13px; font-weight: 650; }

.external-modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); z-index: 99999; display: none; align-items: flex-end; justify-content: center; }
.external-modal.show { display: flex; }
.external-box { width: 100%; max-width: 430px; background: #fff; border-radius: 24px 24px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); text-align: center; animation: externalUp .22s ease; }
@keyframes externalUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.external-icon { width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 50%; background: linear-gradient(135deg, var(--orange), #ff2f00); color: #fff; display: grid; place-items: center; font-size: 26px; }
.external-box h3 { margin: 0 0 8px; font-size: 20px; font-weight: 950; }
.external-box p { margin: 0; color: #666; font-size: 14px; line-height: 1.35; }
.external-affiliate { margin-top: 10px !important; font-size: 12px !important; color: #777 !important; }
.external-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.external-actions button { height: 46px; border-radius: 999px; border: 0; font-weight: 900; }
#btnCancelarExterno { background: #eee; color: #222; }
#btnContinuarExterno { background: #111; color: #fff; }

@media (max-width: 360px) {
  .catv2-bar { grid-template-columns: 42px 42px minmax(0, 1fr) 42px; }
  .catv2-icon-btn, .catv2-menu-btn { width: 42px; height: 42px; }
  .catv2-hero h1 { font-size: 22px; }
  .catv2-card img { height: 145px; }
}
