/* ============================================
   PRODUCT PAGE SPECIFIC STYLES
   ============================================ */

.product-page {
  padding: 20px 0 30px;
  background: var(--bs-light-bg-subtle);
  color: var(--bs-body-color);
}

.product-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: start;
  animation: fadeIn 0.4s ease;
}

.product-gallery {
  background: var(--bs-bg-card);
  padding: 20px;
  border-radius: var(--bs-border-radius);
  box-shadow: var(--bs-box-shadow);
  max-width: 570px;
  justify-self: center;
  min-width: 455px;
}

.main-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--bs-border-radius);
  overflow: hidden;
  background: var(--bs-bg-soft);
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnails {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  padding-top: 6px;
}

.thumbnails img {
  width: 80px;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: var(--bs-border-radius-sm);
  object-fit: cover;
  border: solid;
  border-width: thin;
  border-color: var(--bs-primary);
  cursor: pointer;
}

.thumbnails img:hover {
  opacity: 0.9;
}

.thumbnails img.active {
  opacity: 1;
  border-color: var(--bs-primary);
}

.product-info {
  background: var(--bs-bg-card);
  padding: 24px;
  border-radius: var(--bs-border-radius);
  box-shadow: var(--bs-box-shadow);
  max-width: 570px;
  justify-self: center;
  min-width: 455px;
}

.product-info h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.product-category {
  font-size: 0.9rem;
  color: var(--bs-text-muted);
  margin-bottom: 6px;
}

.product-price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--bs-primary);
  margin-bottom: 12px;
}

.product-description {
  margin: 14px 0 20px;
  color: var(--bs-text-muted);
  line-height: 1.6;
}

.btn-wishlist {
  background: var(--bs-border-color-translucent);
  color: var(--bs-primary-bg-subtle);
  border: 1px solid var(--bs-primary-bg-subtle);
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s ease;
  padding: 5px 12px;
}

.btn-wishlist:hover {
  background: rgba(148, 163, 184, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 14px 23px rgba(var(--bs-primary-rgb), 0.45);
}

.btn-wishlist.active {
  background: var(--bs-secondary-bg-subtle);
  border: 1px solid var(--bs-danger);
}

.add-btn {
  background: var(--bs-primary);
  color: var(--bs-secondary);
  border: 1px solid var(--bs-primary);
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s ease;
  padding: 5px 12px;
  height: 42px;
}

.add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 23px rgba(var(--bs-primary-rgb), 0.45);
}

.add-btn.active {
  background: var(--bs-danger);
  color: var(--bs-light);
}

/* Image Modal */

.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.image-modal .close-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: var(--bs-primary);
  cursor: pointer;
  z-index: 10000;
}

.modal-content-wrapper {
  width: 105%;
  max-width: 900px;
}

.modal-swiper-container {
  border-radius: 15px;
  width: 100%;
}

.modal-swiper-container img {
  width: 100%;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
  border-radius: 15px;
}

@media (max-width: 1000px) {
  .product-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1000px) {
  .product-gallery, .product-info {
    min-width: auto;
    width: 100%;
  }
}

@media (max-width: 576px) {
  .product-price {
    font-size: 1.25rem;
  }
}

@media (max-width: 576px) {
  .thumbnails {
    flex-wrap: wrap;
    overflow-x: visible;
    justify-content: left;
  }
}

@media (max-width: 576px) {
  .thumbnails img {
    width: 70px;
    height: 70px;
  }
}

.shipping-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  border-radius: 10px;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.shipping-badge-free {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #166534;
}

.shipping-badge-paid {
  background: var(--bs-secondary-bg, #f9f9f9);
  border: 1.5px solid var(--bs-border-color, #e5e7eb);
  color: var(--bs-body-color, #333);
}

[data-bs-theme="dark"] .shipping-badge-free {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

[data-bs-theme="dark"] .shipping-badge-paid {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}

.shipping-badge-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.shipping-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.shipping-badge-text strong {
  font-weight: 700;
  font-size: 0.9rem;
}

.shipping-badge-text small {
  font-size: 0.78rem;
  opacity: 0.8;
  margin-top: 1px;
}

/* ============================================
   MODAL SWIPER — ONE IMAGE AT A TIME
   ============================================ */

/* Swiper CSS may not be loaded; these rules guarantee correct layout */

.modal-swiper-container {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.modal-swiper-container .swiper-wrapper {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: 100%;
  align-items: center;
}

.modal-swiper-container .swiper-slide {
  flex-shrink: 0;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.modal-swiper-container .swiper-zoom-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

.modal-swiper-container .swiper-zoom-container img {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  user-select: none;
  -webkit-user-drag: none;
}

/* Pagination dots */

.modal-swiper-container .swiper-pagination {
  position: absolute;
  bottom: -28px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 10;
}

.modal-swiper-container .swiper-pagination-bullet {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  margin: 0 4px;
  cursor: pointer;
}

.modal-swiper-container .swiper-pagination-bullet-active {
  background: #fff;
}

