/**
 * Split from numart_main.css for maintainability.
 */

/* ===========================================
   PREMIUM PRODUCT IMAGE GALLERY
   Modern, elegant design with smooth animations
   =========================================== */

/* Gallery Container - Vertical layout (image on top, thumbnails below) */
.bootstrap-basic-image-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

/* Main Image Container - Full height with scaled image */
.bootstrap-basic-image-gallery .main-image {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  max-width: 100%;
  min-height: 400px;
  max-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.bootstrap-basic-image-gallery .main-image:hover {
  box-shadow: 
    0 8px 40px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.08);
}

.bootstrap-basic-image-gallery .main-image img {
  width: 100%;
  object-fit: contain;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bootstrap-basic-image-gallery .main-image:hover img {
  transform: scale(1.03);
}

/* Responsive main image height */
@media (max-width: 992px) {
  .bootstrap-basic-image-gallery .main-image {
    height: calc(100vh - 300px);
    min-height: 350px;
    max-height: 550px;
  }
}

@media (max-width: 768px) {
  .bootstrap-basic-image-gallery .main-image {
    height: calc(100vh - 320px);
    min-height: 280px;
    max-height: 450px;
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  .bootstrap-basic-image-gallery .main-image {
    height: calc(100vh - 350px);
    min-height: 220px;
    max-height: 350px;
    border-radius: 10px;
  }
}

/* Modern zoom icon with glassmorphism effect */
.bootstrap-basic-image-gallery .main-image::before {
  content: '';
  position: absolute;
  top: 16px;
  right: 16px;
  left: auto;
  width: 48px;
  height: 48px;
  background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/><path d="M11 8v6"/><path d="M8 11h6"/></svg>');
  background-size: 24px 24px;
  background-repeat: no-repeat;
  background-position: center;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  opacity: 0.9;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 10;
  animation: zoomFadeIn 0.5s ease-out 0.3s both;
}

[dir="rtl"] .bootstrap-basic-image-gallery .main-image::before,
html[lang="ar"] .bootstrap-basic-image-gallery .main-image::before {
  right: auto;
  left: 16px;
}

.bootstrap-basic-image-gallery .main-image:hover::before {
  opacity: 1;
  transform: scale(1.1);
  background-color: rgba(0, 0, 0, 0.75);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Subtle entrance animation */
@keyframes zoomFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 0.9;
    transform: scale(1);
  }
}

/* ===========================================
   THUMBNAILS STRIP - Horizontal Layout
   =========================================== */
.bootstrap-basic-image-gallery .thumbnails {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  padding: 12px 0 !important;
  margin-top: 16px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.bootstrap-basic-image-gallery .thumbnails::-webkit-scrollbar {
  display: none;
}

/* Override inline width styles on thumbnails */
.bootstrap-basic-image-gallery .thumbnails .thumb,
.bootstrap-basic-image-gallery .thumbnails .thumb.bscol-5,
.bootstrap-basic-image-gallery .thumbnails > div {
  flex: 0 0 auto !important;
  width: 60px !important;
  min-width: 60px !important;
  max-width: 60px !important;
  height: 60px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  cursor: pointer;
  position: relative;
  background: #f8f9fa;
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  float: none !important;
  display: block !important;
}

.bootstrap-basic-image-gallery .thumbnails .thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.bootstrap-basic-image-gallery .thumbnails .thumb:hover {
  transform: translateY(-3px) scale(1.08);
  border-color: var(--nm-primary-color, #667eea);
  box-shadow:
    0 6px 16px rgba(102, 126, 234, 0.25),
    0 3px 6px rgba(0, 0, 0, 0.1);
}

.bootstrap-basic-image-gallery .thumbnails .thumb:hover::before {
  opacity: 1;
}

/* Active/Selected thumbnail */
.bootstrap-basic-image-gallery .thumbnails .thumb.active,
.bootstrap-basic-image-gallery .thumbnails .thumb:focus {
  border-color: var(--nm-primary-color, #667eea);
  box-shadow: 
    0 0 0 2px rgba(102, 126, 234, 0.25),
    0 4px 12px rgba(102, 126, 234, 0.3);
  transform: scale(1.05);
}

.bootstrap-basic-image-gallery .thumbnails .thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.4s ease;
}

.bootstrap-basic-image-gallery .thumbnails .thumb:hover img {
  transform: scale(1.15);
}

/* ===========================================
   FULLSCREEN IMAGE MODAL
   Immersive viewing experience
   =========================================== */

/* Hide ALL modal-backdrop when image gallery modal is open */
body.image-gallery-modal-open .modal-backdrop,
.bootstrap-basic-image-gallery ~ .modal-backdrop,
.modal-backdrop.image-gallery-backdrop {
  display: none !important;
}

/* Modal overlay - elegant dark background */
#bootstrap-basic-image-gallery-modal.show,
.bootstrap-basic-image-gallery .modal.show {
  background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(15,15,15,0.98) 100%) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  cursor: pointer;
}

/* Modal dialog - centered content */
#bootstrap-basic-image-gallery-modal .modal-dialog,
.bootstrap-basic-image-gallery .modal .modal-dialog {
  position: relative;
  pointer-events: none;
  width: 100%;
  max-width: 100%;
  margin: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Modal content - transparent container */
#bootstrap-basic-image-gallery-modal .modal-content,
.bootstrap-basic-image-gallery .modal .modal-content {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  pointer-events: none;
  width: auto;
  max-width: 95vw;
}

#bootstrap-basic-image-gallery-modal .modal-body,
.bootstrap-basic-image-gallery .modal .modal-body {
  padding: 0;
  pointer-events: none;
}

#bootstrap-basic-image-gallery-modal .carousel,
#bootstrap-basic-image-gallery-modal .carousel-inner,
#bootstrap-basic-image-gallery-modal .carousel-item,
.bootstrap-basic-image-gallery .modal .carousel,
.bootstrap-basic-image-gallery .modal .carousel-inner,
.bootstrap-basic-image-gallery .modal .carousel-item {
  pointer-events: none;
}

/* Main gallery image in modal */
#bootstrap-basic-image-gallery-modal .carousel-item img,
.bootstrap-basic-image-gallery .modal .carousel-item img {
  max-height: 85vh;
  max-width: 90vw;
  width: auto !important;
  height: auto !important;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 12px;
  pointer-events: auto;
  cursor: default;
  box-shadow: 
    0 25px 80px rgba(0, 0, 0, 0.5),
    0 10px 30px rgba(0, 0, 0, 0.3);
  animation: modalImageFadeIn 0.4s ease-out;
}

@keyframes modalImageFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===========================================
   CAROUSEL CONTROLS - Modern Floating Style
   =========================================== */
#bootstrap-basic-image-gallery-modal .carousel-control-prev,
#bootstrap-basic-image-gallery-modal .carousel-control-next,
.bootstrap-basic-image-gallery .modal .carousel-control-prev,
.bootstrap-basic-image-gallery .modal .carousel-control-next {
  pointer-events: auto !important;
  cursor: pointer;
  z-index: 15;
  width: 60px;
  height: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0.8;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 20px;
}

#bootstrap-basic-image-gallery-modal .carousel-control-prev:hover,
#bootstrap-basic-image-gallery-modal .carousel-control-next:hover,
.bootstrap-basic-image-gallery .modal .carousel-control-prev:hover,
.bootstrap-basic-image-gallery .modal .carousel-control-next:hover {
    opacity: 1;
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#bootstrap-basic-image-gallery-modal .carousel-control-prev-icon,
#bootstrap-basic-image-gallery-modal .carousel-control-next-icon,
.bootstrap-basic-image-gallery .modal .carousel-control-prev-icon,
.bootstrap-basic-image-gallery .modal .carousel-control-next-icon {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Fix carousel control positions for RTL - prev on right, next on left */
[dir="rtl"] #bootstrap-basic-image-gallery-modal .carousel-control-prev,
[dir="rtl"] .bootstrap-basic-image-gallery .modal .carousel-control-prev,
html[lang="ar"] #bootstrap-basic-image-gallery-modal .carousel-control-prev,
html[lang="ar"] .bootstrap-basic-image-gallery .modal .carousel-control-prev {
  left: auto !important;
  right: 0 !important;
}

[dir="rtl"] #bootstrap-basic-image-gallery-modal .carousel-control-next,
[dir="rtl"] .bootstrap-basic-image-gallery .modal .carousel-control-next,
html[lang="ar"] #bootstrap-basic-image-gallery-modal .carousel-control-next,
html[lang="ar"] .bootstrap-basic-image-gallery .modal .carousel-control-next {
  right: auto !important;
  left: 0 !important;
}

/* Flip the arrow icons for RTL */
[dir="rtl"] #bootstrap-basic-image-gallery-modal .carousel-control-prev-icon,
[dir="rtl"] #bootstrap-basic-image-gallery-modal .carousel-control-next-icon,
[dir="rtl"] .bootstrap-basic-image-gallery .modal .carousel-control-prev-icon,
[dir="rtl"] .bootstrap-basic-image-gallery .modal .carousel-control-next-icon,
html[lang="ar"] #bootstrap-basic-image-gallery-modal .carousel-control-prev-icon,
html[lang="ar"] #bootstrap-basic-image-gallery-modal .carousel-control-next-icon,
html[lang="ar"] .bootstrap-basic-image-gallery .modal .carousel-control-prev-icon,
html[lang="ar"] .bootstrap-basic-image-gallery .modal .carousel-control-next-icon {
  transform: scaleX(-1);
}

/* ===========================================
   CAROUSEL INDICATORS - Elegant Dots
   =========================================== */
#bootstrap-basic-image-gallery-modal .carousel-indicators,
.bootstrap-basic-image-gallery .modal .carousel-indicators {
  bottom: 30px;
  margin: 0;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 30px;
  gap: 10px;
  display: flex;
  justify-content: center;
  width: auto;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: auto;
}

#bootstrap-basic-image-gallery-modal .carousel-indicators li,
#bootstrap-basic-image-gallery-modal .carousel-indicators button,
.bootstrap-basic-image-gallery .modal .carousel-indicators li,
.bootstrap-basic-image-gallery .modal .carousel-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  margin: 0;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: auto;
  }

#bootstrap-basic-image-gallery-modal .carousel-indicators li:hover,
#bootstrap-basic-image-gallery-modal .carousel-indicators button:hover,
.bootstrap-basic-image-gallery .modal .carousel-indicators li:hover,
.bootstrap-basic-image-gallery .modal .carousel-indicators button:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: scale(1.2);
}

#bootstrap-basic-image-gallery-modal .carousel-indicators li.active,
#bootstrap-basic-image-gallery-modal .carousel-indicators button.active,
.bootstrap-basic-image-gallery .modal .carousel-indicators li.active,
.bootstrap-basic-image-gallery .modal .carousel-indicators button.active {
  background: #fff;
  width: 24px;
  border-radius: 5px;
}

/* Close button for modal */
#bootstrap-basic-image-gallery-modal .close-modal-btn,
.bootstrap-basic-image-gallery .modal .close-modal-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 20;
  pointer-events: auto;
}

#bootstrap-basic-image-gallery-modal .close-modal-btn:hover,
.bootstrap-basic-image-gallery .modal .close-modal-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1) rotate(90deg);
}

/* Thumbnails in modal must be clickable */
#bootstrap-basic-image-gallery-modal .thumbnails,
#bootstrap-basic-image-gallery-modal .thumbnails img,
.bootstrap-basic-image-gallery .thumbnails,
.bootstrap-basic-image-gallery .thumbnails img {
  pointer-events: auto !important;
  cursor: pointer;
}

