/* ==========================================
   PRODUCT MODAL - MODERN DESIGN
   Estilo BigTech (Stripe/Shopify) - Industrial/Engenharia
   ========================================== */

/* Overlay */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-modal-overlay.active {
  opacity: 1;
}

/* Container Principal */
.product-modal-container {
  position: relative;
  width: min(1200px, 100%);
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-modal-overlay.active .product-modal-container {
  transform: scale(1) translateY(0);
}

/* Garantir que o scrollbar fique dentro do border-radius */
.product-modal-container > * {
  border-radius: 0;
}

.product-modal-header {
  border-radius: 24px 24px 0 0;
}

/* Header */
.product-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 32px 40px 24px;
  background: linear-gradient(to bottom, #fafafa, #ffffff);
  border-bottom: 1px solid #e5e7eb;
}

.product-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #374151;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.product-modal-title {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.02em;
}

.product-modal-subtitle {
  margin-top: 8px;
  font-size: 16px;
  color: #6b7280;
  line-height: 1.5;
  max-width: 600px;
}

.product-modal-close {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #6b7280;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.product-modal-close:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #111827;
}

/* Body */
.product-modal-body {
  padding: 32px 40px 40px;
  padding-right: 52px;
  display: grid;
  gap: 40px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(95vh - 120px);
  scrollbar-gutter: stable;
  border-radius: 0 0 24px 24px;
}

@media (min-width: 1024px) {
  .product-modal-body {
    grid-template-columns: 1.4fr 1fr;
  }
}

/* Info Section */
.product-modal-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Highlight Card */
.product-modal-highlight {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 24px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.product-modal-highlight-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

.product-modal-highlight-value {
  display: block;
  font-size: 36px;
  font-weight: 700;
  color: #111827;
  line-height: 1;
  letter-spacing: -0.02em;
}

.product-modal-highlight-meta {
  text-align: right;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
}

.product-modal-highlight-caption {
  display: block;
  margin-top: 4px;
}

/* Features Section */
.product-modal-features h4,
.product-modal-extras h4 {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.product-modal-features ul {
  display: grid;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-modal-features li {
  position: relative;
  padding-left: 28px;
  color: #374151;
  font-size: 15px;
  line-height: 1.6;
}

.product-modal-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: #10b981;
  font-weight: 700;
  font-size: 16px;
}

/* Extras Section */
.product-modal-extras-header {
  margin-bottom: 20px;
}

.product-modal-extras-header p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin-top: 8px;
}

.product-modal-extras-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 13px;
  font-weight: 500;
}

.product-modal-extras-list {
  display: grid;
  gap: 12px;
}

.product-modal-empty {
  padding: 32px 24px;
  border-radius: 12px;
  border: 2px dashed #d1d5db;
  color: #6b7280;
  text-align: center;
  background: #f9fafb;
  font-size: 14px;
}

/* Extra Cards */
.home-extra-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: 12px;
  padding: 20px;
  border: 2px solid #e5e7eb;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.home-extra-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.home-extra-card.active {
  border-color: #10b981;
  background: #f0fdf4;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.home-extra-card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.home-extra-name {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.home-extra-description {
  margin-top: 6px;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

.home-extra-price {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.home-extra-price span {
  color: #111827;
  font-weight: 700;
  font-size: 18px;
}

.home-extra-price small {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.home-extra-note {
  font-size: 13px;
  color: #6b7280;
  font-style: italic;
}

/* Summary Sidebar */
.product-modal-summary {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px;
  border-radius: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  position: sticky;
  top: 20px;
  max-height: calc(95vh - 40px);
  overflow-y: auto;
}

.product-modal-summary-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.product-modal-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.product-modal-summary-line strong {
  font-size: 16px;
  color: #111827;
  font-weight: 700;
}

.product-modal-extras-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  border-radius: 12px;
  background: #10b981;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
}

.product-modal-selected-extras {
  margin-top: 8px;
}

.product-modal-selected-extras ul {
  display: grid;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-modal-selected-extras li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #374151;
  padding: 8px 0;
}

.product-modal-extras-empty {
  font-size: 13px;
  color: #9ca3af;
  padding: 12px;
  text-align: center;
  font-style: italic;
}

/* Total */
.product-modal-total {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 20px;
  border-top: 2px solid #e5e7eb;
}

.product-modal-total span {
  font-size: 14px;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-modal-total strong {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  line-height: 1;
  letter-spacing: -0.02em;
}

.product-modal-total small {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  margin-top: 4px;
}

/* CTA Button - Verde com efeito de feixe de luz */
.product-modal-cta {
  margin-top: 8px;
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background: #10b981;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.product-modal-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: lightBeam 2.5s infinite;
}

@keyframes lightBeam {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.product-modal-cta:hover {
  background: #059669;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.product-modal-cta:active {
  transform: translateY(0);
}

.product-modal-cta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.product-modal-cta span {
  position: relative;
  z-index: 1;
}

/* Responsive */
@media (max-width: 1023px) {
  .product-modal-body {
    grid-template-columns: 1fr;
  }

  .product-modal-info {
    order: 2;
  }

  .product-modal-summary {
    order: 1;
    position: static;
    max-height: none;
  }

  .product-modal-header {
    padding: 24px 24px 20px;
  }

  .product-modal-body {
    padding: 24px;
  }

  .product-modal-title {
    font-size: 28px;
  }
}

@media (max-width: 640px) {
  .product-modal-container {
    border-radius: 16px;
    max-height: 98vh;
  }

  .product-modal-header {
    padding: 20px 20px 16px;
  }

  .product-modal-body {
    padding: 20px;
    gap: 24px;
  }

  .product-modal-title {
    font-size: 24px;
  }

  .product-modal-highlight {
    flex-direction: column;
    gap: 16px;
  }

  .product-modal-highlight-meta {
    text-align: left;
  }
}

/* Scrollbar Azul - Fundo Cinza e Barra Azul - Dentro do contorno */
.product-modal-body::-webkit-scrollbar {
  width: 10px;
}

.product-modal-body::-webkit-scrollbar-track {
  background: #e5e7eb;
  border-radius: 0 0 20px 0;
  margin: 0;
}

.product-modal-body::-webkit-scrollbar-thumb {
  background: #006E7F;
  border-radius: 0 0 20px 0;
  border: none;
  min-height: 40px;
}

.product-modal-body::-webkit-scrollbar-thumb:hover {
  background: #005a68;
}

/* Scrollbar para Firefox */
.product-modal-body {
  scrollbar-width: thin;
  scrollbar-color: #006E7F #e5e7eb;
}

.product-modal-summary::-webkit-scrollbar {
  width: 8px;
}

.product-modal-summary::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 4px;
}

.product-modal-summary::-webkit-scrollbar-thumb {
  background: #006E7F;
  border-radius: 4px;
  border: 1px solid #f3f4f6;
}

.product-modal-summary::-webkit-scrollbar-thumb:hover {
  background: #005a68;
}

/* Scrollbar para Firefox - Summary */
.product-modal-summary {
  scrollbar-width: thin;
  scrollbar-color: #006E7F #f3f4f6;
}

/* Override dos estilos antigos */
.product-modal-overlay {
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(12px) !important;
}

.product-modal-container {
  background: #ffffff !important;
  border: none !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
}

.product-modal-cta {
  background: #10b981 !important;
  background-image: none !important;
}

.product-modal-cta:hover {
  background: #059669 !important;
  background-image: none !important;
}

