@charset "UTF-8";

/* ==========================================================================
   BAGJAA - GALLERY CUSTOM EDITORIAL STYLES
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. PAGE CONTAINER & BASE
   -------------------------------------------------------------------------- */
.gallery-page-container {
  width: 100%;
  background-color: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   2. HERO SECTION
   -------------------------------------------------------------------------- */
.gallery-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-color: var(--ink);
  color: var(--paper);
  overflow: hidden;
}

.gallery-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  z-index: 1;
  transform: scale(1.02);
  transition: transform 1.2s var(--ease);
}

.gallery-hero:hover .gallery-hero-bg {
  transform: scale(1.05);
}

.gallery-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(11, 11, 12, 0.45) 0%,
    rgba(11, 11, 12, 0.75) 55%,
    rgba(11, 11, 12, 0.95) 100%
  );
  z-index: 2;
}

.gallery-hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--section-gap) * 0.8) var(--container-pad) clamp(40px, 5vw, 64px);
}

.gallery-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
}

.gallery-hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: var(--orange);
}

.gallery-hero-title {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #FFFFFF;
  margin: 0 0 20px 0;
  max-width: 900px;
}

.gallery-hero-sub {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 400;
  line-height: 1.55;
  color: rgba(246, 244, 240, 0.92);
  max-width: 54ch;
  margin-bottom: 36px;
}

.gallery-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.btn-gallery-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  background-color: var(--orange);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--orange);
  transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease), transform var(--duration) var(--ease);
  cursor: pointer;
}

.btn-gallery-primary:hover {
  background-color: #E05315;
  color: #FFFFFF;
  border-color: #E05315;
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-gallery-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  background-color: transparent;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.5);
  transition: border-color var(--duration) var(--ease), background-color var(--duration) var(--ease), color var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.btn-gallery-ghost:hover {
  border-color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  transform: translateY(-2px);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   3. STICKY FILTER BAR
   -------------------------------------------------------------------------- */
.gallery-toolbar-sticky {
  position: sticky;
  top: 72px; /* height of navbar */
  z-index: 90;
  background-color: var(--paper);
  border-bottom: 2px solid var(--ink);
  box-shadow: 0 4px 16px rgba(11, 11, 12, 0.04);
  transition: top var(--duration) var(--ease);
}

.gallery-toolbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.gallery-toolbar-inner::-webkit-scrollbar {
  display: none;
}

.gallery-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.gallery-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 18px;
  background-color: transparent;
  color: var(--ink-70);
  border: 1.5px solid var(--ink-20);
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration) var(--ease);
}

.gallery-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
  background-color: var(--ink-10);
  text-decoration: none;
}

.gallery-chip.is-active,
.gallery-chip[aria-pressed="true"] {
  background-color: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.gallery-chip-count {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.75;
}

.gallery-toolbar-meta {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-60);
}

.gallery-toolbar-meta strong {
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   4. EDITORIAL GALLERY GRID (BENTO / MASONRY)
   -------------------------------------------------------------------------- */
.gallery-section {
  padding: clamp(32px, 4vw, 56px) 0 clamp(64px, 8vw, 96px);
}

.gallery-grid-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: dense;
  gap: 12px;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  background-color: var(--ink-10);
  border: 1px solid var(--ink-10);
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-card--featured {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-card__media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #E2DFD8;
}

.gallery-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease);
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.gallery-card:hover .gallery-card__img {
  transform: scale(1.08);
}

/* Skeleton Loading Shimmer */
.gallery-card__skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #E2DFD8 0%, #EFECE6 50%, #E2DFD8 100%);
  background-size: 200% 100%;
  animation: galleryShimmer 1.8s infinite;
  z-index: 1;
  transition: opacity 0.4s var(--ease);
}

.gallery-card__skeleton.is-loaded {
  opacity: 0;
  pointer-events: none;
}

@keyframes galleryShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Watermark Overlay */
.mk-watermark-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='150' viewBox='0 0 300 150'%3E%3Ctext x='75' y='45' fill='rgba(148, 163, 184, 0.20)' font-size='11' font-family='sans-serif' font-weight='800' text-anchor='middle'%3E%3Ctspan x='75' dy='0'%3EProperty Of%3C/tspan%3E%3Ctspan x='75' dy='15'%3EBagjaa%3C/tspan%3E%3C/text%3E%3Ctext x='225' y='120' fill='rgba(148, 163, 184, 0.20)' font-size='11' font-family='sans-serif' font-weight='800' text-anchor='middle'%3E%3Ctspan x='225' dy='0'%3EProperty Of%3C/tspan%3E%3Ctspan x='225' dy='15'%3EBagjaa%3C/tspan%3E%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
  opacity: 0.9;
}

/* Card Hover Overlay */
.gallery-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: linear-gradient(180deg, rgba(11, 11, 12, 0.1) 0%, rgba(11, 11, 12, 0.88) 100%);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.gallery-card:hover .gallery-card__overlay,
.gallery-card:focus-within .gallery-card__overlay {
  opacity: 1;
  transform: translateY(0);
}

.gallery-card__badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 6px;
}

.gallery-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #FFFFFF;
  margin: 0 0 14px 0;
  line-height: 1.2;
}

.gallery-card--featured .gallery-card__title {
  font-size: 1.5rem;
}

.gallery-card__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-gallery-zoom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  background-color: #FFFFFF;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease);
}

.btn-gallery-zoom:hover {
  background-color: var(--orange);
  color: var(--ink);
}

.btn-gallery-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: all var(--duration) var(--ease);
}

.btn-gallery-link:hover {
  background-color: #FFFFFF;
  color: var(--ink);
  text-decoration: none;
}

/* Image Error Fallback Box */
.gallery-fallback-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  background-color: #E2DFD8;
  color: var(--ink-70);
}

.gallery-fallback-box i {
  font-size: 2rem;
  color: var(--ink-40);
  margin-bottom: 10px;
}

.gallery-fallback-box strong {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--ink);
  text-transform: uppercase;
}

/* Empty State */
.gallery-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  background-color: var(--ink-10);
  border: 2px dashed var(--ink-20);
}

.gallery-empty-icon {
  font-size: 3.5rem;
  color: var(--ink-40);
  margin-bottom: 20px;
}

.gallery-empty-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 10px 0;
}

.gallery-empty-sub {
  font-size: 1rem;
  color: var(--ink-70);
  max-width: 480px;
  margin: 0 auto 24px;
}

.btn-gallery-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  border: none;
  cursor: pointer;
  transition: background-color var(--duration) var(--ease);
}

.btn-gallery-reset:hover {
  background-color: var(--orange);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   5. LOAD MORE BUTTON & PAGINATION
   -------------------------------------------------------------------------- */
.gallery-pagination {
  margin-top: 48px;
  text-align: center;
}

.btn-gallery-loadmore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  min-width: 260px;
  padding: 0 36px;
  background-color: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.btn-gallery-loadmore:hover:not(:disabled) {
  background-color: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

.btn-gallery-loadmore:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-gallery-loadmore .spinner {
  display: none;
  animation: gallerySpin 1s linear infinite;
}

.btn-gallery-loadmore.is-loading .spinner {
  display: inline-block;
}

.btn-gallery-loadmore.is-loading .btn-text {
  display: none;
}

@keyframes gallerySpin {
  100% { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   6. NATIVE ACCESSIBLE LIGHTBOX
   -------------------------------------------------------------------------- */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgba(11, 11, 12, 0.94);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}

.gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.gallery-lightbox__dialog {
  position: relative;
  width: 92vw;
  max-width: 1100px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.gallery-lightbox__stage {
  position: relative;
  max-width: 100%;
  max-height: calc(90vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.gallery-lightbox__img {
  max-width: 100%;
  max-height: calc(90vh - 120px);
  object-fit: contain;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.gallery-lightbox__watermark {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='150' viewBox='0 0 300 150'%3E%3Ctext x='75' y='45' fill='rgba(148, 163, 184, 0.22)' font-size='11' font-family='sans-serif' font-weight='800' text-anchor='middle'%3E%3Ctspan x='75' dy='0'%3EProperty Of%3C/tspan%3E%3Ctspan x='75' dy='15'%3EBagjaa%3C/tspan%3E%3C/text%3E%3Ctext x='225' y='120' fill='rgba(148, 163, 184, 0.22)' font-size='11' font-family='sans-serif' font-weight='800' text-anchor='middle'%3E%3Ctspan x='225' dy='0'%3EProperty Of%3C/tspan%3E%3Ctspan x='225' dy='15'%3EBagjaa%3C/tspan%3E%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
}

.gallery-lightbox__caption {
  margin-top: 18px;
  text-align: center;
  color: #FFFFFF;
  width: 100%;
  max-width: 600px;
}

.gallery-lightbox__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 6px 0;
  letter-spacing: -0.01em;
}

.gallery-lightbox__counter {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-40);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-lightbox__product-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: underline;
}

.gallery-lightbox__product-link:hover {
  color: #FFFFFF;
}

/* Lightbox Controls */
.gallery-lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration) var(--ease);
  z-index: 100;
}

.gallery-lightbox__close:hover {
  background-color: var(--orange);
  color: var(--ink);
  border-color: var(--orange);
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration) var(--ease);
  z-index: 90;
}

.gallery-lightbox__nav:hover {
  background-color: var(--orange);
  color: var(--ink);
  border-color: var(--orange);
}

.gallery-lightbox__nav--prev {
  left: 20px;
}

.gallery-lightbox__nav--next {
  right: 20px;
}

/* --------------------------------------------------------------------------
   7. CTA STRIP CLOSING
   -------------------------------------------------------------------------- */
.gallery-cta-strip {
  background-color: var(--orange);
  color: var(--ink);
  padding: clamp(48px, 6vw, 80px) 0;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}

.gallery-cta-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.gallery-cta-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 10px 0;
  line-height: 1.05;
}

.gallery-cta-sub {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
  opacity: 0.9;
  max-width: 520px;
}

.gallery-cta-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-cta-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 32px;
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--ink);
  transition: all var(--duration) var(--ease);
}

.btn-cta-dark:hover {
  background-color: #000000;
  color: #FFFFFF;
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-cta-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 32px;
  background-color: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--ink);
  transition: all var(--duration) var(--ease);
}

.btn-cta-ghost:hover {
  background-color: rgba(11, 11, 12, 0.1);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   8. RESPONSIVENESS & ACCESSIBILITY
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .gallery-toolbar-sticky {
    top: 60px;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .gallery-card--featured {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 16 / 10;
  }

  .gallery-lightbox__nav {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  .gallery-lightbox__nav--prev {
    left: 8px;
  }

  .gallery-lightbox__nav--next {
    right: 8px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .gallery-card__title {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }

  .btn-gallery-zoom,
  .btn-gallery-link {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.68rem;
  }

  .gallery-cta-actions {
    width: 100%;
  }

  .btn-cta-dark,
  .btn-cta-ghost {
    width: 100%;
  }
}

/* Focus Visible */
:focus-visible {
  outline: 2px solid var(--orange) !important;
  outline-offset: 3px !important;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
