:root {
  --red: #e31c23;
  --red-dark: #c4161c;
  --green: #16a34a;
  --dark: #1a1a1a;
  --gray: #666;
  --light: #f5f5f5;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--dark);
  background: #fff;
  line-height: 1.5;
}
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; }

/* Topbar */
.topbar {
  background: #fff;
  border-bottom: 3px solid var(--red);
  position: sticky; top: 0; z-index: 100;
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}
.brand {
  font-weight: 800; font-size: 1.5rem;
  display: flex; align-items: center; gap: 10px;
}
.brand span { color: var(--red); }
.brand__ball {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(to bottom, var(--red) 50%, #fff 50%);
  border: 2px solid #111; position: relative;
}
.brand__ball::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 9px; height: 9px; background: #fff;
  border: 2px solid #111; border-radius: 50%;
}
.topbar__nav { display: flex; gap: 28px; }
.topbar__nav a { font-weight: 600; font-size: .95rem; }
.topbar__nav a:hover { color: var(--red); }

/* Promo */
.promo-bar {
  background: linear-gradient(90deg, var(--red), #ff6b00);
  color: #fff; text-align: center; padding: 10px;
  font-weight: 700; font-size: .9rem;
}

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; border: none; cursor: pointer;
  border-radius: 8px; transition: .2s; font-family: inherit;
}
.btn--primary {
  background: var(--red); color: #fff;
  box-shadow: 0 4px 14px rgba(227,28,35,.35);
}
.btn--primary:hover { background: var(--red-dark); transform: translateY(-2px); }
.btn--outline {
  background: #fff; color: var(--dark);
  border: 2px solid #ddd;
}
.btn--outline:hover { border-color: var(--red); color: var(--red); }
.btn--lg { padding: 16px 28px; font-size: 1.05rem; }
.btn--sm { padding: 10px 18px; font-size: .9rem; }
.btn--block { width: 100%; }

/* PDP */
.pdp {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 50px; padding: 50px 0;
}
.pdp__main-image {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid #eee; position: relative;
  aspect-ratio: 1; background: #fafafa;
}
.pdp__main-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity .2s;
}
.pdp__main-image img.fade { opacity: 0; }
.pdp__badge {
  position: absolute; top: 16px; left: 16px;
  background: var(--red); color: #fff;
  font-weight: 800; padding: 6px 14px;
  border-radius: 30px; font-size: .85rem;
}
.pdp__thumbs {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 10px; margin-top: 14px;
}
.pdp__thumb {
  border: 2px solid #e5e5e5; border-radius: 10px;
  overflow: hidden; cursor: pointer; padding: 0; background: none;
  aspect-ratio: 1;
}
.pdp__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp__thumb.is-active { border-color: var(--red); }

.pdp__tag {
  display: inline-block; background: #fff3cd;
  color: #856404; font-weight: 700; font-size: .8rem;
  padding: 5px 12px; border-radius: 20px; margin-bottom: 12px;
}
.pdp h1 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; }
.pdp__rating { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; color: #666; font-size: .9rem; }
.stars { color: #f5a623; letter-spacing: 1px; }
.pdp__desc { color: #555; margin-bottom: 20px; }

.pdp__price { margin-bottom: 24px; }
.pdp__price .old { text-decoration: line-through; color: #999; margin-right: 8px; }
.pdp__price .off {
  background: var(--red); color: #fff; font-size: .75rem;
  font-weight: 700; padding: 2px 8px; border-radius: 4px;
}
.pdp__price .now { font-size: 2.4rem; font-weight: 800; color: var(--red); }
.pdp__price .install { color: #666; font-size: .9rem; }

.field-block { margin-bottom: 22px; }
.label { display: block; font-weight: 700; margin-bottom: 8px; font-size: .9rem; }

.design-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 8px;
}
.design-card {
  border: 2px solid #e5e5e5; border-radius: 10px;
  padding: 12px 6px; text-align: center; cursor: pointer;
  background: #fff; transition: .2s;
}
.design-card .emoji { font-size: 1.4rem; display: block; }
.design-card .name { font-size: .7rem; font-weight: 600; color: #555; }
.design-card.is-active {
  border-color: var(--c, var(--red));
  background: color-mix(in srgb, var(--c, var(--red)) 12%, white);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c, var(--red)) 30%, transparent);
}
.selected-design { margin-top: 8px; font-weight: 600; color: var(--red); }

select, .qty input {
  width: 100%; padding: 12px 14px; border: 2px solid #ddd;
  border-radius: 8px; font-size: 1rem; font-family: inherit;
}
select:focus { outline: none; border-color: var(--red); }

.qty-row { display: flex; align-items: center; gap: 16px; }
.qty {
  display: flex; border: 2px solid #ddd; border-radius: 8px; overflow: hidden;
}
.qty button {
  width: 40px; height: 40px; border: none; background: #f5f5f5;
  font-size: 1.2rem; cursor: pointer; font-weight: 700;
}
.qty input {
  width: 50px; text-align: center; border: none; font-weight: 700;
}
.stock { color: var(--green); font-weight: 600; font-size: .9rem; }

.pdp__ctas { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }

/* Seções */
.section { padding: 70px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.eyebrow {
  display: block; color: var(--red); font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; font-size: .8rem;
  margin-bottom: 8px;
}
.section-head h2 { font-size: 2rem; font-weight: 800; }

.grid-4 {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 20px;
}
.card {
  background: #fff; border: 1px solid #eee; border-radius: var(--radius);
  padding: 28px 22px; text-align: center; transition: .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.card .icon { font-size: 2rem; margin-bottom: 12px; }
.card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.card p { color: #666; font-size: .9rem; }

/* Checkout */
.checkout-section { background: #f8f8f8; }
.checkout-grid {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px;
}

.form-card {
  background: #fff; border-radius: var(--radius);
  padding: 24px; margin-bottom: 16px;
  border: 1px solid #eee; box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.form-card h3 {
  font-size: 1rem; margin-bottom: 18px;
  padding-bottom: 10px; border-bottom: 2px solid #f0f0f0;
}

/* Floating labels */
.floating {
  position: relative; margin-bottom: 16px;
}
.floating input {
  width: 100%; padding: 16px 14px 8px;
  border: 2px solid #ddd; border-radius: 8px;
  font-size: 1rem; font-family: inherit;
  background: #fff; transition: .2s;
}
.floating label {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: #999; pointer-events: none;
  transition: .2s; font-size: .95rem;
}
.floating input:focus,
.floating input:not(:placeholder-shown) {
  border-color: var(--red);
  outline: none;
}
.floating input:focus + label,
.floating input:not(:placeholder-shown) + label {
  top: 10px; font-size: .7rem; color: var(--red);
  transform: none; font-weight: 600;
}

/* Validação */
.floating input.is-valid,
select.is-valid {
  border-color: var(--green) !important;
  box-shadow: 0 0 0 3px rgba(22,163,74,.12);
}
.floating input.is-invalid,
select.is-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,.12);
}

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: 1.2fr 1.5fr .7fr; gap: 12px; }
.grow { min-width: 0; }

/* Métodos de pagamento */
.pay-methods {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 10px;
  margin-bottom: 20px;
}
.pay-method { cursor: pointer; }
.pay-method input { display: none; }
.pay-method__box {
  border: 2px solid #ddd; border-radius: 10px;
  padding: 14px; text-align: center; transition: .2s;
}
.pay-method__box strong { display: block; font-size: .95rem; }
.pay-method__box span { font-size: .75rem; color: #666; }
.pay-method input:checked + .pay-method__box {
  border-color: var(--red);
  background: #fff5f5;
  box-shadow: 0 0 0 1px var(--red);
}

/* Painéis */
.pay-panel { margin-top: 10px; }
.pix-box {
  display: flex; gap: 24px; align-items: center;
  background: #f9f9f9; border-radius: 12px; padding: 20px;
}
.pix-qr img {
  width: 160px; height: 160px; border-radius: 8px;
  border: 1px solid #eee; background: #fff;
}
.pix-placeholder {
  width: 200px; height: 200px;
  border: 2px dashed #ddd; border-radius: 12px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; color: #666; font-size: .9rem;
  background: #fafafa; padding: 16px;
}
.pix-info p { margin-bottom: 10px; font-size: .9rem; }
.pix-copy {
  display: flex; gap: 8px; margin: 12px 0;
}
.pix-copy input {
  flex: 1; padding: 10px; border: 1px solid #ddd;
  border-radius: 6px; font-size: .8rem; background: #fff;
}
.pix-copy button {
  background: var(--red); color: #fff; border: none;
  padding: 0 16px; border-radius: 6px; font-weight: 700;
  cursor: pointer;
}
.card-fields { margin-top: 8px; }
.boleto-info {
  background: #f0f9ff; border: 1px solid #bae6fd;
  padding: 16px; border-radius: 8px; color: #0369a1;
  font-size: .9rem;
}

.legal { text-align: center; color: #999; font-size: .8rem; margin-top: 12px; }

/* Summary */
.summary {
  background: #fff; border-radius: var(--radius);
  padding: 24px; border: 1px solid #eee;
  position: sticky; top: 90px;
  box-shadow: var(--shadow);
}
.summary h3 { margin-bottom: 18px; font-size: 1.1rem; }
.summary__product {
  display: flex; gap: 14px; margin-bottom: 18px;
  padding-bottom: 16px; border-bottom: 1px solid #eee;
}
.summary__product img {
  width: 64px; height: 64px; border-radius: 8px; object-fit: cover;
}
.summary__product strong { display: block; font-size: .9rem; }
.summary__product span { display: block; font-size: .8rem; color: #666; }

.summary__qty {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #eee;
}
.summary__lines div {
  display: flex; justify-content: space-between;
  padding: 6px 0; font-size: .9rem;
}
.summary__lines .green { color: var(--green); }
.summary__total {
  display: flex; justify-content: space-between;
  margin-top: 12px; padding-top: 14px;
  border-top: 2px solid #eee; font-size: 1.2rem;
}
.summary__total strong { color: var(--red); font-size: 1.5rem; }

/* Footer */
.footer {
  background: var(--dark); color: #aaa; padding: 50px 0 20px;
}
.footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 40px; margin-bottom: 30px;
}
.footer .brand { color: #fff; font-size: 1.3rem; margin-bottom: 8px; }
.footer h4 { color: #fff; margin-bottom: 10px; }
.footer a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid #333; padding-top: 16px;
  text-align: center; font-size: .85rem;
}

/* Responsivo */
@media (max-width: 900px) {
  .pdp { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .summary { position: static; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .pay-methods { grid-template-columns: 1fr; }
  .pix-box { flex-direction: column; text-align: center; }
  .row, .row-3 { grid-template-columns: 1fr; }
  .topbar__nav { display: none; }
}