/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 251, 253, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  padding: 8px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-text b {
  font-size: 14px;
}
.brand-text span {
  font-size: 12px;
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ghost-pill,
.cart-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 30px rgba(11, 18, 32, 0.05);
}
.cart-pill {
  border-color: rgba(34, 197, 94, 0.25);
}
.cart-badge {
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  padding: 0 6px;
}
.cart-ico {
  font-size: 16px;
}

/* Hero */
.hero {
  position: relative;
  padding: 56px 0 10px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 34px;
  align-items: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.22);
  color: rgba(11, 18, 32, 0.85);
  font-weight: 600;
  font-size: 12px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}
.btn-primary,
.btn-secondary,
.btn-ghost {
  border: 0;
  cursor: pointer;
  border-radius: 16px;
  padding: 12px 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}
.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 18px 40px rgba(34, 197, 94, 0.18);
}
.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px dashed rgba(11, 18, 32, 0.22);
}
.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-1px);
}

.hero-stats {
  display: flex;
  gap: 14px;
  margin-top: 18px;
}
.stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  font-weight: 600;
}
.stat b {
  font-size: 18px;
}

.hero-media .media-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateZ(0);
}
.media-card img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}
.media-shadow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      60% 60% at 30% 20%,
      rgba(255, 122, 24, 0.22),
      transparent 60%
    ),
    radial-gradient(60% 60% at 70% 80%, rgba(34, 197, 94, 0.2), transparent 60%);
  pointer-events: none;
}
.media-glow {
  position: absolute;
  inset: -20%;
  filter: blur(30px);
  background: radial-gradient(circle, rgba(34, 197, 94, 0.18), transparent 55%);
  pointer-events: none;
}
.media-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  font-weight: 700;
}

.hero-wave {
  height: 36px;
  margin-top: 42px;
  background: radial-gradient(
    120% 200% at 50% 0%,
    rgba(34, 197, 94, 0.12),
    transparent 60%
  );
}

/* Section head */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 10px;
  box-shadow: var(--shadow-soft);
}
.search-wrap input {
  border: 0;
  outline: none;
  width: min(340px, 52vw);
  font-size: 14px;
  background: transparent;
}
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(11, 18, 32, 0.03);
  cursor: pointer;
}

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}
.chip {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.chip:hover {
  transform: translateY(-1px);
}
.chip.active {
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: 0 18px 40px rgba(34, 197, 94, 0.1);
}

/* Product grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 60px rgba(11, 18, 32, 0.12);
}
.card-media {
  position: relative;
  height: 220px;
  overflow: hidden;
}
.card-media img,
.card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-body {
  padding: 14px 14px 16px;
}
.card-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.card-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 12px;
  min-height: 38px;
}
.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.price {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.price b {
  font-size: 16px;
}
.price s {
  font-size: 12px;
  color: rgba(11, 18, 32, 0.4);
}
.add-btn {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.1);
  font-weight: 800;
  cursor: pointer;
}
.video-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 12px;
}

/* Cart page */
.cart-page {
  padding: 28px 0 70px;
}
.cart-head {
  margin-bottom: 16px;
}
.empty-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 22px;
}
.cart-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
  align-items: start;
}
.cart-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cart-item {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 12px;
}
.cart-thumb {
  width: 74px;
  height: 74px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-name b {
  display: block;
}
.cart-name .muted {
  font-size: 12px;
}
.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty button {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(11, 18, 32, 0.03);
  cursor: pointer;
  font-weight: 900;
}
.qty span {
  width: 24px;
  text-align: center;
  font-weight: 900;
}

.summary-card {
  position: sticky;
  top: 86px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}
.summary-row.total {
  font-size: 18px;
  letter-spacing: -0.02em;
}
.coupon-wrap,
.delivery-wrap {
  margin-top: 10px;
}
.mini-label {
  font-size: 12px;
  font-weight: 800;
  display: block;
  margin: 8px 0 6px;
}
.input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  outline: none;
  background: rgba(11, 18, 32, 0.02);
}
.coupon-row {
  display: flex;
  gap: 10px;
}
.coupon-row input {
  flex: 1;
}
.summary-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 32, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 80;
  overflow: auto; /* permite rolagem se o conteúdo passar */
  -webkit-overflow-scrolling: touch;
}

/* FIX: hidden precisa ganhar do display:flex do backdrop */
.modal-backdrop[hidden] {
  display: none !important;
}

.modal {
  width: min(760px, 100%);
  max-height: calc(
    100vh - 36px
  ); /* 18px padding top + 18px bottom do backdrop */
  overflow: auto; /* rola dentro do modal quando necessário */

  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 40px 110px rgba(11, 18, 32, 0.22);
  padding: 18px;
  position: relative;
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(11, 18, 32, 0.03);
  cursor: pointer;
  font-size: 22px;
}
.modal-title {
  margin: 0 0 6px;
}
.modal-text {
  margin: 0 0 14px;
  color: var(--muted);
}
.modal-label {
  display: block;
  font-weight: 800;
  font-size: 12px;
  margin: 10px 0 6px;
}
.modal-input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  outline: none;
  background: rgba(11, 18, 32, 0.02);
  font-family: inherit;
}
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.modal-grid .full {
  grid-column: 1 / -1;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

/* About/CTA */
.split {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
  align-items: start;
}
.about-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}
.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.feature {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  font-weight: 700;
}
.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(
      120% 160% at 10% 10%,
      rgba(34, 197, 94, 0.12),
      transparent 60%
    ),
    radial-gradient(
      120% 160% at 90% 90%,
      rgba(255, 122, 24, 0.12),
      transparent 60%
    ),
    #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.cta-actions {
  display: flex;
  gap: 10px;
}
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 12px;
}

/* Product modal */
.pm-media{
  margin: 10px 0 12px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.pm-media img, .pm-media video{
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}
.pm-desc p{ margin: 0 0 10px; }
.pm-list{
  margin: 10px 0 0;
  padding-left: 18px;
  color: rgba(11,18,32,.85);
}
.pm-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.pm-price{ display:flex; flex-direction:column; line-height: 1.1; }
.details-btn{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}
.card-actions{
  display:flex;
  gap: 10px;
  align-items:center;
  justify-content:flex-end;
}
