/* ====================================
   MODAL UNIFIED - CSS EXCLUSIVO
   Sistema completo do modal de produtos
   ==================================== */

/* ====================================
   MODAL - ESTRUTURA PRINCIPAL
   ==================================== */

/* Quick View Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 70;
  padding: 20px;
}

.modal.open {
  display: flex;
}

.modal-card {
  width: min(920px, 96vw);
  background: var(--branco);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
}

.modal-media {
  background: #f4f7fb;
  aspect-ratio: 4/3;
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-content {
  padding: 20px;
}

.modal-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 900;
}

.modal-sub {
  margin: 0 0 12px;
  color: var(--muted);
}

.modal-desc {
  color: #475569;
  margin: 10px 0 16px;
  font-size: 14px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.close-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--branco);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-weight: 900;
  z-index: 10;
  color: #666;
  font-size: 18px;
  transition: all 0.2s ease;
}

.close-x:hover {
  background: #f8f9fa;
  color: #333;
}

/* ====================================
   BOTÕES DO MODAL
   ==================================== */

/* Botões gerais */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-weight: 700;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  flex: 1;
}

/* Botão primário */
.btn.primary {
  background: linear-gradient(135deg, var(--brand, #27c3d8), #4e8fff);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 26px rgba(47, 134, 246, 0.28);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(47, 134, 246, 0.35);
}

.btn.primary:active {
  transform: translateY(0);
}

/* Botão secundário */
.btn:not(.primary) {
  background: var(--branco, #fff);
  color: var(--azul-escuro, #333);
  border: 2px solid var(--border, #e5e7eb);
}

.btn:not(.primary):hover {
  border-color: #cdd5e1;
  background: #f8f9fa;
}

.btn:not(.primary):active {
  transform: scale(0.98);
}

/* ====================================
   RATING STARS
   ==================================== */

.rating {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 8px 0;
  font-size: 14px;
}

.rating span {
  color: var(--muted, #6b7280);
}

/* ====================================
   PREÇOS
   ==================================== */

.price {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

.price .current {
  font-size: 20px;
  font-weight: 900;
  color: var(--brand, #27c3d8);
}

.price .old {
  font-size: 16px;
  color: var(--muted, #6b7280);
  text-decoration: line-through;
}

.price .promo {
  background: var(--success, #10b981);
  color: white;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

/* ====================================
   RESPONSIVIDADE
   ==================================== */

/* Mobile - Layout em coluna única */
@media (max-width: 820px) {
  .modal-card {
    grid-template-columns: 1fr;
  }

  .modal-media {
    aspect-ratio: 16/10;
  }

  .modal-content {
    padding: 16px;
  }

  .modal-title {
    font-size: 20px;
  }
}

/* Mobile pequeno */
@media (max-width: 480px) {
  .modal {
    padding: 15px;
  }

  .modal-card {
    border-radius: 16px;
  }

  .modal-content {
    padding: 14px;
  }

  .modal-title {
    font-size: 18px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 0.85rem;
  }

  .close-x {
    width: 32px;
    height: 32px;
    top: 12px;
    right: 12px;
    font-size: 16px;
  }
}