/* Tupi.com.py Product Detail Page CSS Recreation */
/* Base settings */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  color: #222;
  margin: 0;
  padding: 0;
  font-size: 16px;
      background: aliceblue;
}

.navegacion a {
  text-decoration: none;
  line-height: 35px;
  color: black;
  background-color: #8888;
  padding: 10px;
  text-transform: capitalize;
}

/* Container */
.product-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

/* Product Image Section */
.product-image-wrapper {
  flex: 1 1 450px;
  min-width: 320px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #ddd;
  padding: 10px;
  background-color: #fafafa;
  border-radius: 6px;
  box-shadow: 0 0 10px rgb(0 0 0 / 0.05);
}

.product-image-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  object-fit: contain;
}

/* Product Details Section */
.product-details {
  flex: 1 1 400px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Product title */
.product-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.1;
  margin: 0 0 10px 0;
}

/* Price */
.product-price {
  font-size: 2rem;
  font-weight: 700;
  color: #e63946; /* Vibrant red style price */
  margin-bottom: 15px;
}

.product-price-container {
  justify-content: space-around;
  border: 1px solid #ccc;
  border-radius: 16px;
  padding: 20px;
}

.contenedor-contado {
  border: 10px 10px 10px 0;
  box-shadow: #838383 4px 7px 11px;
  border-radius: 10px 10px 10px 0;
  background-color: white;
}

.contenedor-cuota {
  border: 10px 10px 10px 0;
  box-shadow: #838383 4px 7px 11px;
  border-radius: 10px 10px 10px 0;
  background-color: white;
}

.product-price small {
  font-size: 1rem;
  color: #666;
  font-weight: 400;
  margin-left: 8px;
}

/* Product description */
.product-description {
  font-size: 1rem;
  color: #444;
  max-height: 140px;
  overflow-y: auto;
  padding-right: 6px;
  border-right: 3px solid #e63946;
  line-height: 1.5;
}

/* Stock / availability */
.product-stock {
  font-size: 1rem;
  font-weight: 600;
  color: #2a9d8f;
}

/* Buttons & Actions */
.product-actions {
  margin-top: 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-contactar {
  background-color: #e63946;
  color: white;
  font-weight: 700;
  border: none;
  padding: 14px 30px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.125rem;
  transition: background-color 0.3s ease;
  box-shadow: 0 4px 10px rgb(230 57 70 / 0.4);
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-contactar:hover,
.btn-contactar:focus {
  background-color: #d62828;
  outline: none;
  box-shadow: 0 6px 14px rgb(214 40 40 / 0.6);
}

/* Secondary button */
.btn-secondary {
  background-color: transparent;
  color: #333;
  border: 2px solid #333;
  padding: 12px 28px;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #333;
  color: white;
  outline: none;
}

/* Additional product info links, e.g. warranty */
.product-extra-link {
  color: #555;
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
  margin-top: 10px;
  display: inline-block;
}

/* Ratings & Reviews preview */
.product-ratings {
  display: flex;
  align-items: center;
  font-size: 1rem;
  color: #f4a261; /* a warm orange for stars */
  gap: 6px;
}

.product-ratings .star {
  font-size: 1.25rem;
  line-height: 1;
}

.navegacion {
  padding: 20px;
}

/* Responsive */
@media (max-width: 900px) {
  .product-container {
    flex-direction: column;
    margin: 20px auto;
  }
  .product-image-wrapper,
  .product-details {
    flex: 1 1 100%;
    min-width: 100%;
  }
  .product-description {
    max-height: none;
    border-right: none;
    padding-right: 0;
  }
  .product-actions {
    justify-content: center;
  }
}

.product-image-viewer {
  position: relative;
  overflow: hidden;
}

.product-image-open {
  display: flex;
  width: 100%;
  min-height: inherit;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.product-image-open:focus-visible {
  outline: 3px solid #2458d3;
  outline-offset: -4px;
}

.product-image-viewer img,
.product-image-open img {
  display: block;
  max-width: 100%;
  height: 100%;
}

.magnifier-glass {
  position: absolute;
  border: 3px solid #000;
  border-radius: 50%;
  cursor: none;
  width: 120px;
  height: 120px;
  opacity: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: 200% 200%;
  z-index: 10;
  transition: opacity 0.2s ease-in-out;
}

/* Contenedor de imagen con efecto zoom */
.img-hover-zoom {
  overflow: hidden;
  border-radius: 0.75rem;
  background-color: #f8f9fa;
}
.img-hover-zoom img {
  transition: transform 0.3s ease;
  object-fit: contain;
}
.img-hover-zoom:hover img {
  transform: scale(1.08);
}

/* Tarjeta de producto */
.card.product-item {
  background-color: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease;
}
.card.product-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

/* Imagen */
.card-img-top {
  border-radius: 0.5rem;
}

/* Título truncado y estilizado */
.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #212529;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Botón de compra */
.btn-outline-success {
  border-radius: 0.5rem;
  font-weight: 600;
  background-color: #e9f7ef;
  border-color: #198754;
  color: #198754;
}
.btn-outline-success:hover {
  background-color: #198754;
  color: #fff;
}

.btn-tiembla:hover {
  color: white;
}

.product-image-modal .modal-content {
  height: min(90vh, 900px);
  border: 0;
  border-radius: 14px;
  overflow: hidden;
}

.product-image-modal {
  z-index: 12000 !important;
}

body:has(.product-image-modal.show) .modal-backdrop {
  z-index: 11990 !important;
}

.product-image-modal .modal-dialog {
  max-width: min(1200px, calc(100vw - 32px));
  margin: 16px auto;
}

.product-image-modal .modal-header {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  background: #fff;
}

.product-image-modal .btn-close {
  width: 1.15rem;
  height: 1.15rem;
  padding: 12px;
}

.product-image-modal .modal-body {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  min-height: 0;
  align-items: center;
  gap: 16px;
  padding: 16px;
  overflow: hidden;
  background: #f8f8fa;
}

.product-modal-preview {
  display: flex;
  min-width: 0;
  height: 100%;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-modal-preview > img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-modal-thumbnails {
  display: flex;
  max-height: 100%;
  flex-direction: column;
  gap: 10px;
  align-self: stretch;
  padding: 3px;
  overflow-x: hidden;
  overflow-y: auto;
}

.product-modal-thumb {
  display: flex;
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border: 2px solid #dedbe5;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.product-modal-thumb:hover,
.product-modal-thumb.is-active {
  border-color: #2458d3;
  box-shadow: 0 0 0 2px rgba(36, 88, 211, 0.15);
}

.product-modal-thumb:focus-visible {
  outline: 3px solid rgba(36, 88, 211, 0.35);
  outline-offset: 2px;
}

.product-modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 767.98px) {
  .product-image-modal .modal-content {
    height: calc(100vh - 16px);
  }

  .product-image-modal .modal-dialog {
    max-width: calc(100vw - 16px);
    margin: 8px auto;
  }

  .product-image-modal .modal-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 78px;
    gap: 10px;
    padding: 10px;
  }

  .product-modal-preview {
    grid-row: 1;
  }

  .product-modal-thumbnails {
    grid-row: 2;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .product-modal-thumb {
    width: 68px;
    height: 68px;
    flex-basis: 68px;
  }
}

.mc-detail-whatsapp-cta {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  margin: 16px 0 0;
  padding: 14px 20px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #25d366 0%, #128c4a 100%);
  color: #ffffff !important;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 18px 34px rgba(18, 140, 74, 0.28);
  overflow: hidden;
  transform: translateZ(0);
  animation: detailWhatsappPulse 2.4s ease-in-out infinite;
}

.mc-detail-whatsapp-cta::before {
  content: "";
  position: absolute;
  inset: -8px;
  z-index: -1;
  border-radius: 18px;
  background: rgba(37, 211, 102, 0.2);
  opacity: 0;
  transform: scale(0.96);
  animation: detailWhatsappHalo 2.4s ease-in-out infinite;
}

.mc-detail-whatsapp-cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.mc-detail-whatsapp-cta__icon i {
  font-size: 1.45rem;
}

.mc-detail-whatsapp-cta__text {
  position: relative;
  z-index: 1;
}

.mc-detail-whatsapp-cta__shine {
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: -35%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transform: skewX(-18deg);
  animation: detailWhatsappShine 3.2s ease-in-out infinite;
}

.mc-detail-whatsapp-cta:hover,
.mc-detail-whatsapp-cta:focus-visible {
  color: #ffffff !important;
  animation: none;
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(18, 140, 74, 0.36);
}

.mc-detail-whatsapp-cta:focus-visible {
  outline: 3px solid rgba(37, 211, 102, 0.34);
  outline-offset: 4px;
}

@keyframes detailWhatsappPulse {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.015);
  }
}

@keyframes detailWhatsappHalo {
  0%, 100% {
    opacity: 0;
    transform: scale(0.96);
  }
  45% {
    opacity: 1;
    transform: scale(1.03);
  }
}

@keyframes detailWhatsappShine {
  0%, 42% {
    left: -40%;
  }
  62%, 100% {
    left: 120%;
  }
}

/* Select cuotas */
.form-select-sm {
  font-size: 0.85rem;
  border-radius: 0.5rem;
}

/* Badges */
.badge {
  font-size: 0.75rem;
  padding: 0.4em 0.6em;
  border-radius: 0.4rem;
}

/* Código de producto */
small.text-muted {
  font-size: 0.75rem;
}

@media (max-width: 576px) {
  .mc-detail-whatsapp-cta {
    min-height: 54px;
    padding: 13px 16px;
    font-size: 0.98rem;
  }

  .mc-detail-whatsapp-cta__icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .mc-detail-whatsapp-cta__icon i {
    font-size: 1.3rem;
  }

  .card-title {
    font-size: 0.85rem;
  }
  .btn-sm {
    font-size: 0.75rem;
  }
  .badge {
    font-size: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mc-detail-whatsapp-cta,
  .mc-detail-whatsapp-cta::before,
  .mc-detail-whatsapp-cta__shine {
    animation: none;
  }
}
.form-select-sm {
  border-radius: 0.5rem;
  border: 1px solid #ced4da;
  padding: 0.35rem 0.75rem;
  background-color: #f8f9fa;
  font-size: 0.85rem;
  color: #495057;
  transition: all 0.2s ease-in-out;
}
.form-select-sm:focus {
  border-color: #198754;
  box-shadow: 0 0 0 0.15rem rgba(25, 135, 84, 0.25);
  outline: none;
}
.btn-success.btn-sm.d-flex.align-items-center {
  border-radius: 0.5rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  background-color: #198754;
  border-color: #198754;
  transition: background-color 0.2s;
}
.btn-success.btn-sm.d-flex.align-items-center:hover {
  background-color: #146c43;
  border-color: #146c43;
}
