:root {
  --iv-bg: #f7f4ee;
  --iv-card: #ffffff;
  --iv-text: #181818;
  --iv-muted: #6d6a64;
  --iv-line: rgba(24, 24, 24, .12);
  --iv-black: #111111;
  --iv-red: #b5121b;
  --iv-shadow: 0 18px 50px rgba(0,0,0,.12);
}

html[data-theme="dark"] {
  --iv-bg: #101010;
  --iv-card: #181818;
  --iv-text: #f5f1e8;
  --iv-muted: #bdb6aa;
  --iv-line: rgba(255,255,255,.12);
  --iv-black: #f5f1e8;
  --iv-shadow: 0 18px 50px rgba(0,0,0,.4);
}

body {
  background: var(--iv-bg);
  color: var(--iv-text);
}

.iv-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: color-mix(in srgb, var(--iv-bg) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--iv-line);
}

.iv-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.iv-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--iv-text);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .08em;
}

.iv-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.iv-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.iv-nav a,
.iv-account a,
.iv-icon-btn {
  color: var(--iv-text);
  text-decoration: none;
  border: 1px solid var(--iv-line);
  background: var(--iv-card);
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 800;
  cursor: pointer;
}

.iv-nav a:hover,
.iv-account a:hover,
.iv-icon-btn:hover {
  border-color: var(--iv-red);
}

.iv-icon-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 20px;
}

.iv-account {
  display: flex;
  align-items: center;
  gap: 10px;
}

.iv-hello {
  font-weight: 900;
  color: var(--iv-muted);
}

.iv-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
}

.iv-sidebar-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.iv-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(340px, 88vw);
  background: var(--iv-card);
  color: var(--iv-text);
  z-index: 100;
  transform: translateX(-105%);
  transition: .25s ease;
  box-shadow: var(--iv-shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.iv-sidebar.is-open {
  transform: translateX(0);
}

.iv-sidebar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.iv-sidebar__nav {
  display: grid;
  gap: 10px;
}

.iv-sidebar__nav a,
.iv-theme-toggle,
.iv-sidebar__account a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--iv-line);
  color: var(--iv-text);
  text-decoration: none;
  background: color-mix(in srgb, var(--iv-card) 92%, var(--iv-bg));
  font-weight: 800;
}

.iv-sidebar__account {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.iv-theme-toggle button {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--iv-black);
  color: var(--iv-bg);
  font-weight: 900;
  cursor: pointer;
}

.iv-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  max-width: 360px;
  background: var(--iv-card);
  color: var(--iv-text);
  border: 1px solid var(--iv-line);
  border-left: 5px solid var(--iv-red);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--iv-shadow);
  display: none;
}

.iv-toast.is-open {
  display: block;
}

.iv-toast a {
  color: var(--iv-red);
  font-weight: 900;
}

@media (max-width: 760px) {
  .iv-nav { display: none; }
  .iv-header__inner { padding: 12px; }
  .iv-hello { display: none; }
}
.coupons-grid {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.coupon-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--iv-line);
  border-radius: 18px;
  background: var(--iv-card);
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
}

.coupon-card h2 {
  margin: 8px 0 4px;
  color: var(--iv-red);
  font-size: clamp(24px, 4vw, 40px);
}

.coupon-card p {
  margin: 0 0 8px;
  color: var(--iv-text);
  font-weight: 700;
}

.coupon-card small {
  display: block;
  color: var(--iv-muted);
}

.coupon-card.is-disabled {
  opacity: .58;
}

.coupon-badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--iv-red) 14%, transparent);
  color: var(--iv-red);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
}

.coupon-code-box {
  min-width: 190px;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px dashed var(--iv-red);
  border-radius: 16px;
  text-align: center;
}

.coupon-code-box strong {
  letter-spacing: .08em;
  color: var(--iv-text);
}

.coupon-code-box button {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--iv-black);
  color: var(--iv-bg);
  font-weight: 900;
  cursor: pointer;
}

.coupon-code-box button:disabled {
  cursor: not-allowed;
  opacity: .6;
}

.coupon-error {
  color: var(--iv-red) !important;
  font-weight: 800;
}

.empty-coupons {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 220px;
  border: 1px dashed var(--iv-line);
  border-radius: 18px;
  text-align: center;
  color: var(--iv-muted);
}

.empty-coupons i {
  font-size: 52px;
  color: var(--iv-red);
}

@media (max-width: 720px) {
  .coupon-card {
    align-items: stretch;
    flex-direction: column;
  }

  .coupon-code-box {
    min-width: 0;
  }
}


/* Navegação lateral pública: busca e categorias no menu mobile. */
.iv-sidebar__section-label {
  margin: 2px 2px -4px;
  color: var(--iv-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.iv-sidebar__search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  border: 1px solid var(--iv-line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--iv-bg);
}

.iv-sidebar__search input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 13px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--iv-text);
  font-size: 16px;
}

.iv-sidebar__search button {
  width: 46px;
  height: 46px;
  border: 0;
  background: var(--iv-red);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.iv-sidebar__nav--shop a {
  min-height: 48px;
}

@media (max-width: 700px) {
  .iv-sidebar {
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
    overflow-y: auto;
  }
}
