:root {
  --promo-orange: #ff6500;
  --promo-orange-dark: #df5100;
  --promo-green: #159447;
  --promo-text: #202020;
  --promo-muted: #6d6d6d;
  --promo-border: #e7e7e7;
  --promo-bg: #f6f6f7;
  --promo-white: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--promo-text); background: var(--promo-bg); }
.is-hidden { display: none !important; }
.public-container { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.public-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--promo-border); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.header-content { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.public-brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.public-brand > span:last-child { display: grid; gap: 2px; }
.public-brand small { color: var(--promo-muted); font-size: .72rem; }
.brand-symbol { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(135deg,#ff7b00,#ff4d00); font-weight: 900; font-size: 1.4rem; }
.back-link { color: var(--promo-orange-dark); font-weight: 800; text-decoration: none; }
.public-main { min-height: calc(100vh - 142px); padding: 34px 0 60px; }
.state-card { min-height: 390px; padding: 40px; display: grid; place-items: center; align-content: center; text-align: center; border: 1px solid var(--promo-border); border-radius: 22px; background: #fff; }
.state-card h1 { margin: 10px 0; }
.state-card p { max-width: 560px; color: var(--promo-muted); line-height: 1.6; }
.state-icon { font-size: 3rem; }
.public-spinner { width: 44px; height: 44px; border: 4px solid #eee; border-top-color: var(--promo-orange); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.primary-link { min-height: 46px; padding: 0 20px; display: inline-grid; place-items: center; border-radius: 12px; background: var(--promo-orange); color: #fff; text-decoration: none; font-weight: 900; }
.promotion-detail { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 22px; }
.promotion-media, .promotion-main-card, .company-card, .rules-card { border: 1px solid var(--promo-border); border-radius: 22px; background: #fff; box-shadow: 0 12px 34px rgba(30,30,30,.06); }
.promotion-media { position: relative; min-height: 460px; overflow: hidden; grid-column: 1; }
/* contain: na página de detalhe o cliente precisa ver o produto inteiro. */
.promotion-detail-image { width: 100%; height: 100%; min-height: 460px; display: block; object-fit: contain; background: #f6f6f7; }
.promotion-detail-placeholder { min-height: 460px; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--promo-muted); background: linear-gradient(135deg,#fff5ec,#f4f4f4); }
.promotion-detail-placeholder span { font-size: 4rem; }
.promotion-main-card { padding: 30px; grid-column: 1; }
.promotion-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.category-label { padding: 7px 11px; border-radius: 999px; background: #fff1e7; color: var(--promo-orange-dark); font-size: .78rem; font-weight: 900; }
.validity-label { color: var(--promo-muted); font-size: .84rem; font-weight: 800; }
.company-name { margin: 0 0 7px; color: var(--promo-orange-dark); font-weight: 900; }
.promotion-main-card h1 { margin: 0; font-size: clamp(2rem,4vw,3.35rem); line-height: 1.06; letter-spacing: -.035em; }
.promotion-description { margin: 18px 0 26px; color: var(--promo-muted); font-size: 1.04rem; line-height: 1.7; white-space: pre-line; }
.price-area { padding: 20px; margin-bottom: 18px; border-radius: 17px; background: #fff8f3; }
.original-price { display: block; margin-bottom: 4px; color: #888; text-decoration: line-through; }
.current-price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.promotional-price { color: var(--promo-orange-dark); font-size: clamp(2rem,5vw,3.1rem); }
.discount-detail-badge { padding: 7px 10px; border-radius: 9px; background: #e9f8ef; color: var(--promo-green); font-weight: 900; }
.whatsapp-detail-button, .secondary-whatsapp-button { min-height: 52px; display: grid; place-items: center; border-radius: 14px; text-decoration: none; font-weight: 900; }
.whatsapp-detail-button { background: var(--promo-green); color: #fff; font-size: 1.02rem; }
.secondary-whatsapp-button { border: 1px solid #bfe4cc; background: #effaf3; color: #147a3d; }
.company-card-actions { display: grid; gap: 10px; }
.company-profile-button { min-height: 48px; display: grid; place-items: center; padding: 0 14px; border: 1px solid #ffd1b3; border-radius: 14px; background: #fff7f1; color: var(--promo-orange-dark); text-align: center; text-decoration: none; font-weight: 900; }
.company-profile-button:hover { background: #ffefe3; }

.safe-note { margin: 11px 0 0; color: var(--promo-muted); font-size: .78rem; text-align: center; }
.company-card { grid-column: 2; grid-row: 1 / span 2; align-self: start; padding: 24px; position: sticky; top: 96px; }
.company-card-heading { display: flex; align-items: center; gap: 13px; padding-bottom: 20px; border-bottom: 1px solid var(--promo-border); }
.company-avatar { width: 52px; height: 52px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 16px; background: #fff0e5; color: var(--promo-orange-dark); font-weight: 900; font-size: 1.25rem; }
.company-card-heading small { color: var(--promo-muted); }
.company-card-heading h2 { margin: 4px 0 0; font-size: 1.2rem; }
.company-details { margin: 22px 0; display: grid; gap: 16px; }
.company-details div { display: grid; gap: 5px; }
.company-details dt { color: var(--promo-muted); font-size: .76rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.company-details dd { margin: 0; line-height: 1.5; }
.rules-card { grid-column: 1 / -1; padding: 26px 30px; }
.rules-card h2 { margin: 0 0 14px; }
.rules-card ul { margin: 0; padding-left: 20px; color: var(--promo-muted); line-height: 1.75; }
.public-footer { border-top: 1px solid var(--promo-border); background: #fff; }
.footer-content { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.footer-content a { color: var(--promo-orange-dark); font-weight: 800; text-decoration: none; }
@media (max-width: 820px) {
  .promotion-detail { grid-template-columns: 1fr; }
  .promotion-media, .promotion-main-card, .company-card, .rules-card { grid-column: 1; grid-row: auto; }
  .company-card { position: static; }
  .promotion-media, .promotion-detail-image, .promotion-detail-placeholder { min-height: 330px; }
}
@media (max-width: 560px) {
  .public-container { width: min(100% - 20px,1120px); }
  .header-content { min-height: 64px; }
  .public-brand small { display: none; }
  .back-link { font-size: .82rem; }
  .public-main { padding-top: 20px; }
  .promotion-main-card, .company-card, .rules-card { padding: 21px; border-radius: 17px; }
  .promotion-media { border-radius: 17px; min-height: 270px; }
  .promotion-detail-image, .promotion-detail-placeholder { min-height: 270px; }
  .promotion-topline { align-items: flex-start; flex-direction: column; }
  .footer-content { padding: 16px 0; flex-direction: column; justify-content: center; }
}

.promotion-social-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
.favorite-detail-button,.share-detail-button { border:1px solid #d1d5db; background:#fff; border-radius:12px; padding:12px; font-weight:800; cursor:pointer; color:#374151; }
.favorite-detail-button.is-favorite { background:#fff1f2; border-color:#fb7185; color:#be123c; }
@media (max-width:560px){.promotion-social-actions{grid-template-columns:1fr;}}
#review-promotion-button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}


.review-product-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  border: 2px solid #f59e0b;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.review-product-button:hover {
  transform: translateY(-1px);
  background: #ffedd5;
}

.review-product-button.is-disabled {
  opacity: .55;
  cursor: not-allowed;
}
