/* ================================================================
   Armorum Image Gallery — gallery.css
   ================================================================ */

/* ── Container ── */
.arm-gallery {
  position: relative;
}

.arm-gallery-inner {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: flex-start;
}

/* ── Thumbnails column (desktop left) ── */
.arm-thumbs-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  flex-shrink: 0;
  gap: 4px;
}

.arm-thumbs-nav {
  background: none;
  border: 1px solid white;
  border-radius: 4px;
  width: 80px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.arm-thumbs-nav.arm-thumbs-prev svg,
.arm-thumbs-nav.arm-thumbs-next svg{
    transform: rotate(90deg);
}

.arm-thumbs-nav svg{
    fill:none
}
.arm-thumbs-nav:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.arm-thumbs-nav:not(:disabled):hover {
    background: rgb(255, 255, 255, .9);
    box-shadow: 0 2px 10px -2px rgb(102, 102, 102, .15);
    border: 1px solid rgb(102, 102, 102, .1);
}

.arm-thumbs-viewport {
  overflow: hidden;
  width: 80px;
  /* 5 thumbs × 72px + 4 gaps × 6px = 384px */
  height: 384px;
  flex-shrink: 0;
}

.arm-thumbs-track {
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

.arm-thumb {
  width: 72px;
  height: 72px;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s;
  background: #f9f9f9;
  outline: none;
}
.arm-thumb:focus-visible {
  border-color: #213946;
  box-shadow: 0 0 0 2px rgba(33,57,70,0.3);
}
.arm-thumb:hover,
.arm-thumb.active {
  border-color: #213946;
}
.arm-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ── Main image ── */
.arm-main-col {
  flex: 1;
  min-width: 0;
}

.arm-main-wrap {
  position: relative;
  cursor: zoom-in;
  background: #fafafa;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid #f0f0f0;
  outline: none;
}
.arm-main-wrap:focus-visible {
  box-shadow: 0 0 0 2px rgba(33,57,70,0.3);
}

.arm-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.18s ease;
}

.arm-zoom-icon {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #213946;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.arm-zoom-icon svg{
    fill:none
}
/* ── Mobile dots ── */
.arm-dots {
  display: none;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.arm-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.arm-dot.active {
  background: #213946;
  transform: scale(1.25);
}

/* ── Responsive: mobile ── */
@media (max-width: 991px) {
  .arm-gallery-inner {
    flex-direction: column;
  }
  .arm-thumbs-col {
    display: none;
  }
  .arm-dots {
    display: flex;
  }
  .arm-main-col {
    width: 100%;
  }
  .arm-main-wrap {
    border-radius: 4px;
  }
}

/* ================================================================
   Lightbox
   ================================================================ */

/* Overlay */
.arm-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 10998;
}
.arm-lightbox-overlay[hidden] { display: none; }

/* Lightbox wrapper — centers the modal */
.arm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.arm-lightbox[hidden] { display: none; }

/* Modal box */
.arm-lb-modal {
  position: relative;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.3);
  width: 100%;
  max-width: 1060px;
  height: 85vh;
  max-height: 820px;
  overflow: hidden;
}

/* Close button */
.arm-lb-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(0,0,0,0.06);
  border: none;
  color: #333;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 20;
  padding: 4px 10px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}
.arm-lb-close:hover { background: rgba(0,0,0,0.14); }

/* Main wrapper — fills modal, leaves room for sidebar on left */
.arm-lb-main {
  position: absolute;
  inset: 0;
  left: 0; /* sidebar width */
  display: flex;
  flex-direction: column;
}

/* Sidebar — absolute left column on desktop */
.arm-lb-sidebar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 112px;
  background: #f7f7f7;
  border-right: 1px solid #e8e8e8;
  overflow-y: auto;
  padding: 10px 8px;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
  z-index: 1;
}
.arm-lb-sidebar::-webkit-scrollbar { width: 4px; }
.arm-lb-sidebar::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

.arm-lb-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.arm-lb-thumb {
  width: 92px;
  height: 92px;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s;
  background: #fff;
}
.arm-lb-thumb.active,
.arm-lb-thumb:hover { border-color: #213946; }
.arm-lb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Image row */
.arm-lb-body {
  flex: 1;
  position: relative;
  min-height: 0;
  background: #fff;
}

/* Arrows — positioned over the image */
.arm-lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 1px solid transparent;
  color: #444;
  width: 44px;
  height: 60px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  z-index: 5;
  
  transition: background 0.15s, border-color 0.15s;
}
.arm-lb-arrow:hover { 
    background: #fff; 
    border-color: #bbb; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.arm-lb-arrow svg{fill:none}
.arm-lb-prev { left: 120px; }
.arm-lb-next { right: 10px; }
.arm-lb-arrow:disabled { opacity: 0.2; cursor: default; pointer-events: none; }

/* Image wrap — zoom container */
.arm-lb-img-wrap {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: absolute;
  inset: 0;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
}
.arm-lb-img-wrap.is-zoomed { cursor: grab; }
.arm-lb-img-wrap.is-dragging { cursor: grabbing !important; }

.arm-lb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform-origin: 0 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
  will-change: transform;
  -webkit-user-drag: none;
}

/* Footer */
.arm-lb-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 16px;
  border-top: 1px solid #eee;
  background: #fff;
}

/* Add to cart */
.arm-lb-add-cart {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s;
    background: url(/img/hover_view.png) #FF9936;
    background-position-y: 50%;
    background-position-x: -340px;
    background-repeat: no-repeat;
    gap: 5px;
}
.arm-lb-add-cart:hover{
    background-position-x: 0;
}
/*.arm-lb-add-cart:hover { background: #2d4f5f; }*/
.arm-lb-add-cart svg{
    width: 26px;
    height: 26px;
}
/* ── Mobile lightbox ── */
@media (max-width: 767px) {
  .arm-lightbox { padding: 12px; }

  .arm-lb-modal {
    height: 88vh;
    max-height: 88vh;
    border-radius: 6px;
  }

  /* Main: no left offset (no sidebar column) */
  .arm-lb-main { left: 0; }
  .arm-lb-prev{left:10px;}
  /* Sidebar becomes a horizontal strip at the bottom */
  .arm-lb-sidebar {
    position: relative;
    left: auto; top: auto; bottom: auto;
    width: 100%;
    height: 82px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 8px 0;
    border-right: none;
    border-top: 1px solid #e8e8e8;
  }

  .arm-lb-thumbs {
    flex-direction: row;
    gap: 6px;
  }

  .arm-lb-thumb {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
  }

  .arm-lb-body { flex: 1; }

  .arm-lb-arrow {
    width: 36px;
    height: 46px;
  }

  .arm-lb-footer { padding: 8px 12px; }
  .arm-lb-add-cart svg {
        width: 20px;
        height: 20px;
    }
  .arm-lb-add-cart {
    font-size: 13px;
    padding: 5px 14px;
    width: 100%;
    justify-content: center;
    background: #FF9936;
  }
}
