.modern-product-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: end center;
  overflow: hidden;
  background: rgba(19, 12, 10, 0.55);
  padding: 0;
  touch-action: none;
  animation: modern-modal-fade 0.18s ease;
}
.modern-product-modal {
  display: flex;
  flex-direction: column;
  width: min(100%, 680px);
  max-height: 88dvh;
  background: var(--surface, #fff);
  color: var(--ink, #231815);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.24);
  outline: none;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: auto;
}
.modern-product-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  min-height: 62px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line, #e9ddda);
}
.modern-product-modal-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}
.modern-product-modal-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2, #f6eeeb);
  color: var(--ink, #231815);
  cursor: pointer;
}
.modern-product-modal-close svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.modern-product-modal-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}
.modern-product-modal-body {
  min-height: 0;
  overflow-y: auto;
  flex: 1 1 auto;
  padding: 18px 20px 8px;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.modern-product-modal-hero {
  display: grid;
  place-items: center;
  width: min(100%, 420px);
  aspect-ratio: 1/1;
  height: auto;
  margin: 0 auto;
  padding: 10px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface-2, #f6eeeb);
}
.modern-product-modal-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
}
.modern-product-modal-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted, var(--ink-soft, #746763));
}
.modern-product-modal-placeholder svg {
  width: 64px;
  height: 64px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.modern-product-modal-copy {
  padding: 16px 0 10px;
}
.modern-product-modal-copy h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
}
.modern-product-modal-copy p {
  margin: 7px 0 0;
  color: var(--ink-soft, #746763);
  line-height: 1.5;
}
.modern-product-modal-price {
  display: flex;
  gap: 9px;
  align-items: baseline;
  margin-top: 10px;
}
.modern-product-modal-price span {
  text-decoration: line-through;
  color: var(--ink-soft, #746763);
  font-size: 0.9rem;
}
.modern-product-modal-price strong {
  font-size: 1.25rem;
  color: var(--primary, var(--accent, #c9482f));
  font-weight: 800;
}
.modern-product-extra-group {
  border: 0;
  border-top: 1px solid var(--line, #e9ddda);
  margin: 0;
  padding: 16px 0 8px;
}
.modern-product-extra-group legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 800;
}
.modern-product-extra-group legend small {
  max-width: 50%;
  color: var(--ink-soft, #746763);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: right;
}
.modern-product-extra-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}
.modern-product-extra-search svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--muted, var(--ink-soft, #746763));
  stroke-width: 1.8;
}
.modern-product-extra-search input {
  min-width: 0;
  width: 100%;
  height: 40px;
  border: 1px solid var(--line, #e9ddda);
  border-radius: 10px;
  padding: 0 10px;
  background: var(--surface-2, #f6eeeb);
  color: inherit;
  font: inherit;
}
.modern-product-extra-search button {
  border: 0;
  background: transparent;
  color: var(--ink-soft, #746763);
  font-size: 1.3rem;
  cursor: pointer;
}
.modern-product-extra-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  margin: 8px 0;
  padding: 11px 13px;
  border: 1px solid var(--line, #e9ddda);
  border-radius: 14px;
  background: var(--surface-2, #f6eeeb);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}
.modern-product-extra-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin: 0;
  border: 1.5px solid var(--line, #e9ddda);
  border-radius: 7px;
  background: var(--surface, #fff);
  cursor: pointer;
  opacity: 1;
  pointer-events: auto;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.modern-product-extra-option input[type="checkbox"]:checked {
  background: var(--primary, var(--accent, #c9482f));
  border-color: var(--primary, var(--accent, #c9482f));
}
.modern-product-extra-option input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.modern-product-extra-option > span {
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modern-product-extra-option > strong {
  color: var(--ink, #231815);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}
.modern-product-extra-option.is-selected {
  border-color: var(--primary, var(--accent, #c9482f));
  background: var(--accent-soft-bg, #fff1ed);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.05);
}
.modern-product-extra-option[hidden] {
  display: none;
}
.modern-product-extra-option.is-disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
}
.modern-product-extra-option.is-disabled:hover {
  border-color: var(--line, #e9ddda);
  box-shadow: none;
  transform: none;
}
.modern-product-extra-option input[type="checkbox"]:disabled {
  cursor: not-allowed;
}
.modern-product-observation {
  display: grid;
  gap: 6px;
  padding: 16px 0;
  font-weight: 800;
}
.modern-product-observation small {
  color: var(--ink-soft, #746763);
  font-weight: 500;
}
.modern-product-observation textarea {
  min-height: 74px;
  resize: vertical;
  border: 1px solid var(--line, #e9ddda);
  border-radius: 12px;
  padding: 11px;
  background: var(--surface-2, #f6eeeb);
  color: inherit;
  font: inherit;
}
.modern-product-modal-error {
  min-height: 1.25rem;
  color: #bd2f24;
  font-size: 0.9rem;
  margin-top: 4px;
}
.modern-product-modal-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: var(--surface, #fff);
  border-top: 1px solid var(--line, #e9ddda);
}
.modern-product-quantity {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid var(--line, #e9ddda);
  border-radius: 12px;
}
.modern-product-quantity button {
  border: 0;
  background: transparent;
  width: 36px;
  height: 46px;
  font-size: 1.3rem;
  color: inherit;
  cursor: pointer;
}
.modern-product-quantity input {
  width: 28px;
  border: 0;
  background: transparent;
  text-align: center;
  color: inherit;
  font: inherit;
}
.modern-product-add-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  flex: 1;
  border: 0;
  border-radius: 12px;
  background: var(--primary, var(--accent, #c9482f));
  color: #fff;
  font-weight: 800;
  padding: 0 15px;
  cursor: pointer;
}
.modern-product-add-button strong {
  font-size: 0.92rem;
}
.modern-product-add-button:disabled {
  opacity: 0.65;
  cursor: wait;
}
@media (hover: hover) {
  .modern-product-extra-option:hover {
    border-color: var(--primary, var(--accent, #c9482f));
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  }
}
html.modern-product-modal-open,
html.modern-product-modal-open body {
  overflow: hidden;
  overscroll-behavior: none;
}
@keyframes modern-modal-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (max-width: 767.98px) {
  .modern-product-modal {
    width: 100%;
    max-height: 90dvh;
  }
  .modern-product-modal-body {
    padding: 16px 20px 8px;
  }
  .modern-product-modal-hero {
    width: 100%;
    max-width: none;
    aspect-ratio: 1/1;
  }
}
@media (min-width: 768px) {
  .modern-product-modal-backdrop {
    place-items: center;
    padding: 24px;
  }
  .modern-product-modal {
    width: min(92vw, 620px);
    max-height: 88dvh;
    border-radius: 24px;
  }
  .modern-product-modal-body {
    padding-left: 24px;
    padding-right: 24px;
  }
  .modern-product-modal-footer {
    padding-left: 24px;
    padding-right: 24px;
  }
  .modern-product-modal-hero {
    width: min(100%, 380px);
    aspect-ratio: 1/1;
  }
}

.modern-product-size-section {
  margin: 4px 0 8px;
  padding: 16px;
  border: 1px solid var(--line, #e9ddda);
  border-radius: 18px;
  background: var(--surface-2, #f6eeeb);
}
.modern-product-size-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.modern-product-size-heading > span:last-child {
  display: grid;
  gap: 3px;
}
.modern-product-size-heading strong {
  font-size: 0.95rem;
}
.modern-product-size-heading small {
  color: var(--ink-soft, #746763);
  font-size: 0.76rem;
}
.modern-product-size-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--accent-soft-bg, #fff1ed);
  color: var(--primary, var(--accent, #c9482f));
}
.modern-product-size-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.modern-product-size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.modern-product-size-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line, #e9ddda);
  border-radius: 12px;
  background: var(--surface, #fff);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}
.modern-product-size-option strong {
  font-size: 0.8rem;
  color: var(--ink-soft, #746763);
  white-space: nowrap;
}
.modern-product-size-option.is-selected {
  border-color: var(--primary, var(--accent, #c9482f));
  background: var(--accent-soft-bg, #fff1ed);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.modern-product-size-option.is-selected strong {
  color: var(--primary, var(--accent, #c9482f));
}
@media (max-width: 767.98px) {
  .modern-product-size-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }
  .modern-product-size-option {
    width: 100%;
  }
}

.modern-product-extra-accordion {
  overflow: hidden;
  margin: 0 0 10px;
  border: 1px solid var(--line, #e9ddda);
  border-radius: 15px;
  background: var(--surface, #fff);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}
.modern-product-extra-accordion.is-invalid {
  border-color: var(--primary, var(--accent, #c9482f));
  box-shadow: 0 0 0 2px
    color-mix(in srgb, var(--primary, var(--accent, #c9482f)) 12%, transparent);
}
.modern-product-extra-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.modern-product-extra-accordion-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.modern-product-extra-accordion-copy strong {
  font-size: 0.94rem;
  font-weight: 800;
}
.modern-product-extra-accordion-copy small {
  color: var(--ink-soft, #746763);
  font-size: 0.74rem;
  line-height: 1.3;
}
.modern-product-extra-accordion-check {
  display: none;
  color: var(--primary, var(--accent, #c9482f));
  font-weight: 900;
}
.modern-product-extra-accordion.is-complete
  .modern-product-extra-accordion-check {
  display: inline;
}
.modern-product-extra-accordion-chevron {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2, #f6eeeb);
}
.modern-product-extra-accordion-chevron svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s ease;
}
.modern-product-extra-accordion.is-open
  .modern-product-extra-accordion-chevron
  svg {
  transform: rotate(180deg);
}
.modern-product-extra-accordion-content {
  display: none;
  padding: 14px;
  border-top: 1px solid var(--line, #e9ddda);
}
.modern-product-extra-accordion.is-open
  .modern-product-extra-accordion-content {
  display: block;
}
.modern-product-extra-accordion .modern-product-extra-group {
  border: 0;
  padding: 0;
}
.modern-product-extra-accordion .modern-product-observation {
  padding: 0;
}
.modern-product-extra-accordion .modern-product-extra-search {
  margin: 0 0 12px;
}
@media (max-width: 767.98px) {
  .modern-product-extra-accordion-header {
    padding: 11px 12px;
  }
  .modern-product-extra-accordion-content {
    padding: 12px;
  }
}

.modern-product-next-action {
  flex: 0 0 auto;
  padding: 0 20px 10px;
  background: var(--surface, #fff);
}
.modern-product-next-action[hidden] {
  display: none;
}
.modern-product-next-action-button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 8px 12px;
  border: 1px solid var(--primary, var(--accent, #c9482f));
  border-radius: 14px;
  background: var(--accent-soft-bg, #fff1ed);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.modern-product-next-action-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--primary, var(--accent, #c9482f));
  color: #fff;
}
.modern-product-next-action-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.modern-product-next-action-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.modern-product-next-action-copy strong {
  font-size: 0.88rem;
  font-weight: 800;
}
.modern-product-next-action-copy small {
  color: var(--ink-soft, #746763);
  font-size: 0.74rem;
  line-height: 1.3;
}
.modern-product-next-action-arrow {
  color: var(--primary, var(--accent, #c9482f));
  font-size: 1.15rem;
  font-weight: 800;
}
@media (max-width: 767.98px) {
  .modern-product-next-action {
    padding-left: 20px;
    padding-right: 20px;
  }
}

.modern-product-add-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
  filter: saturate(0.65);
}
[data-modern-simple-configurator] {
  display: contents;
}

/* CTA alinhado ao .modern-combo-primary, preservando o footer próprio do produto. */
.modern-product-modal-footer {
  gap: 14px;
  padding: 18px 22px;
}
.modern-product-add-button {
  flex: 0 1 auto;
  min-width: 205px;
  min-height: 46px;
  padding: 11px 16px;
  border-radius: 13px;
  gap: 15px;
  background: var(--primary, var(--accent, #c9482f));
  color: #fff;
  font: inherit;
  font-weight: 850;
}
.modern-product-add-button,
.modern-product-add-button strong {
  color: #fff;
}
.modern-product-add-button strong {
  font-size: 0.9rem;
}
.modern-product-add-button:hover:not(:disabled) {
  filter: brightness(0.96);
}
.modern-product-add-button:active:not(:disabled) {
  transform: scale(0.99);
}
.modern-product-add-button:focus-visible {
  outline: 3px solid
    color-mix(in srgb, var(--primary, var(--accent, #c9482f)) 35%, #fff);
  outline-offset: 3px;
}
.modern-product-add-button:disabled {
  opacity: 0.42;
  filter: saturate(0.45);
  cursor: not-allowed;
}
@media (max-width: 767.98px) {
  .modern-product-modal-footer {
    padding: 14px 15px calc(14px + env(safe-area-inset-bottom));
  }
  .modern-product-add-button {
    min-width: 0;
    flex: 1;
    padding: 11px 13px;
  }
  .modern-product-add-button strong {
    font-size: 0.8rem;
  }
}
