/**
 * Arts Gallery - Frontend Styles
 * Version: 1.0.0
 */

/* Gallery Container */
.arts-gallery-container {
  width: 100%;
}

/* Responsive Grid with CSS Variables */
.arts-gallery-grid {
  display: grid;
  gap: var(--ag-gap, 15px);
  width: 100%;
  /* Default to desktop variable, fallback to 3 */
  grid-template-columns: repeat(var(--ag-col-desktop, 3), 1fr);
}

@media (max-width: 1024px) {
  .arts-gallery-grid {
    /* Tablet variable, fallback to 2 */
    grid-template-columns: repeat(var(--ag-col-tablet, 2), 1fr);
  }
}

@media (max-width: 767px) {
  .arts-gallery-grid {
    /* Mobile variable, fallback to 1 */
    grid-template-columns: repeat(var(--ag-col-mobile, 1), 1fr);
  }
}

/* Masonry Layout - JS Based */
.arts-gallery-masonry {
  width: 100%;
}

.arts-gallery-masonry-sizer,
.arts-gallery-masonry-item {
  width: calc(
    (100% - (var(--ag-col-desktop, 3) - 1) * var(--ag-gap, 15px)) /
      var(--ag-col-desktop, 3)
  );
}

.arts-gallery-masonry-item {
  margin-bottom: var(--ag-gap, 15px);
}

/* Gallery Item - FIXED FOR MASONRY */
.arts-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  width: 100%;
}

.arts-gallery-image-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  line-height: 0; /* Remove extra space */
}

.arts-gallery-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
  border-radius: 8px;
}

.arts-gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.arts-gallery-item:hover .arts-gallery-image {
  transform: scale(1.05);
}

/* Overlay - HIDDEN AS REQUESTED */
.arts-gallery-overlay {
  display: none !important;
}

.arts-gallery-item:hover .arts-gallery-overlay {
  opacity: 0;
}

.arts-gallery-title,
.arts-gallery-description,
.arts-gallery-view-button {
  display: none !important;
}

/* No Items Message */
.arts-gallery-no-items {
  text-align: center;
  padding: 60px 20px;
  background: #f8f9fa;
  border-radius: 8px;
  color: #6c757d;
}

.arts-gallery-no-items p {
  margin: 0;
  font-size: 1.1em;
}

/* Lightbox Styles - IMPROVED */
.arts-gallery-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
    Cantarell, "Helvetica Neue", sans-serif;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.arts-gallery-lightbox.is-active {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Lightbox Inner - Removed Card Style */
.agw-lightbox-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  max-width: none;
  min-height: 0;
  z-index: 10;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  gap: 20px;
}

/* Lightbox Title */
.agw-lightbox-title {
  flex-shrink: 0;
  margin: 0;
  padding: 10px 60px;
  text-align: center;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  z-index: 15;
}

.agw-lightbox-media {
  width: 100%;
  flex: 1; /* Take visible space but allow button below */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 11;
  min-height: 0; /* Important for flex child overflow */
}

.agw-lightbox-media .agw-lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 65vh; /* Reduced to make room for title and button */
  object-fit: contain;
  border-radius: 0;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

.agw-lightbox-media[hidden] {
  display: none;
}

/* Restore View Room Button */
.agw-view-room-btn {
  display: inline-block !important;
  border-radius: 999px;
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  background: linear-gradient(135deg, #f69045 0%, #f66b4e 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(246, 144, 69, 0.3);
  z-index: 100;
  position: relative;
  margin-top: 10px;
  text-transform: capitalize;
}

.agw-view-room-btn:hover {
  background: linear-gradient(135deg, #34bfc6 0%, #2fa6ae 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(52, 191, 198, 0.35);
}

.agw-view-room-btn[hidden] {
  display: none !important;
}

/* Lightbox Navigation Arrows */
.agw-lightbox-prev,
.agw-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.agw-lightbox-prev:hover,
.agw-lightbox-next:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}

.agw-lightbox-prev {
  left: 20px;
}

.agw-lightbox-next {
  right: 20px;
}

.agw-lightbox-prev::before,
.agw-lightbox-next::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
  transform: rotate(-135deg); /* Left Arrow */
}

.agw-lightbox-next::before {
  transform: rotate(45deg); /* Right Arrow */
}

.agw-lightbox-prev[hidden],
.agw-lightbox-next[hidden] {
  display: none !important;
}

.agw-view-room-btn[hidden] {
  display: none;
}

.agw-room-mode {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: none;
  border-radius: 0;
  background: transparent; /* Transparent background */
  padding: 0;
  box-shadow: none;
  display: none;
  flex-direction: column;
  gap: 0;
  z-index: 15;
  overflow: hidden;
}

.agw-room-mode:not([hidden]) {
  display: flex;
}

.agw-room-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0;
  background: transparent; /* Transparent stage */
  padding: 20px;
  padding-bottom: 70px; /* Reduced space for smaller controls */
}

.agw-room-mode .view-in-room-lightbox {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.agw-room-mode .room-background-lightbox {
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 80vh; /* Reduced slightly to ensure fit with controls */
  border-radius: 4px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  position: relative; /* Relative for absolute children */
  display: inline-block; /* Shrink fit to image */
  line-height: 0;
}

.room-background-image-element {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

/* Ensure artwork display is positioned relative to the ROOM BACKGROUND CONTAINER */
.artwork-display-lightbox {
  position: absolute;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  z-index: 10;
}

/* Room Controls Bar */
.agw-room-controls {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 20;
  padding: 10px;
}

.agw-room-back {
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  background: linear-gradient(135deg, #f69045 0%, #f66b4e 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(246, 144, 69, 0.3);
  text-transform: capitalize;
}

.agw-room-back:hover {
  background: linear-gradient(135deg, #34bfc6 0%, #2fa6ae 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(52, 191, 198, 0.35);
}

.agw-room-prev,
.agw-room-next {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.agw-room-prev:hover,
.agw-room-next:hover {
  background: rgba(255, 255, 255, 0.1); /* Keep transparent/subtle */
  transform: scale(1.1);
}

.agw-room-prev::before,
.agw-room-next::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(-135deg);
}

.agw-room-next::before {
  transform: rotate(45deg);
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
}

.lightbox-container {
  position: relative;
  width: 95%;
  height: 95%;
  max-width: 1400px;
  max-height: 90vh;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
}

.lightbox-content {
  display: flex;
  height: 100%;
  flex: 1;
  min-height: 0;
}

.lightbox-close,
.agw-lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 40px;
  height: 40px;
  background: transparent;
  color: #fff;
  border: none;
  border-radius: 0;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.3s ease,
    color 0.3s ease;
}

.lightbox-close:hover,
.agw-lightbox-close:hover {
  background: transparent;
  color: #ccc;
  transform: scale(1.1);
}

.lightbox-artwork-view {
  flex: 1;
  position: relative;
  background: #f8f9fa;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.lightbox-artwork-info {
  width: 420px;
  background: #fff;
  padding: 35px;
  overflow-y: auto;
  border-left: 1px solid #e9ecef;
  min-height: 0;
}

.artwork-title {
  font-size: 1.6em;
  font-weight: 700;
  margin: 0 0 20px 0;
  color: #1a1a1a;
  line-height: 1.3;
}

.artwork-description {
  line-height: 1.7;
  color: #495057;
  margin-bottom: 30px;
  font-size: 1.05em;
}

.artwork-description p {
  margin-bottom: 1.2em;
}

/* View in Room Lightbox - IMPROVED */

.view-in-room-lightbox {
  width: 100%;
  display: block;
  line-height: 0;
}

.room-background-lightbox {
  width: 100%;
  position: relative;
  display: block;
  background-color: #1a1a1a;
  overflow: visible;
  line-height: 0;
}

/* Room background image for single artwork page */
.room-background-image-single {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.room-background-lightbox__image {
  display: block;
  width: 100%;
  height: auto;
}

.artwork-display-lightbox {
  position: absolute;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  width: auto;
  height: auto;
  transition:
    width 0.25s ease,
    height 0.25s ease;
}

.artwork-image-wrapper-lightbox {
  display: inline-block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  border: none;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
}

.artwork-image-lightbox {
  display: block;
  max-width: 100%;
  max-height: 100%; /* Let aspect-ratio control the size */
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  transition:
    transform 0.18s ease-out,
    transform-origin 0.18s ease-out;
  will-change: transform;
}

.artwork-image-wrapper-lightbox.is-zoomed {
  cursor: zoom-out;
}

.artwork-no-image-lightbox {
  padding: 50px 30px;
  text-align: center;
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 12px;
  color: #6c757d;
  font-size: 1.1em;
}

/* Inquiry Form */
.lightbox-inquiry-form {
  background: #ffffff;
  border-radius: 18px;
  padding: 32px 36px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid #e9ecef;
}

.lightbox-inquiry-form h2,
.lightbox-inquiry-form h4 {
  margin: 0;
  font-size: 1.45em;
  font-weight: 600;
  color: #172b4d;
}

.lightbox-inquiry-form__subtitle {
  margin: 12px 0 28px;
  color: #64748b;
  font-size: 0.95em;
  line-height: 1.65;
}

.form-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.submit-btn {
  width: 100%;
  padding: 16px 20px;
  margin-top: 18px;
  background: #f69045;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.submit-btn:hover,
.submit-btn:focus {
  background: #34bfc6;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(52, 191, 198, 0.24);
}

.submit-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #94a3b8;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #34bfc6;
  box-shadow: 0 0 0 3px rgba(52, 191, 198, 0.18);
  background: #fff;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.lightbox-inquiry-form input[type="text"],
.lightbox-inquiry-form input[type="email"],
.lightbox-inquiry-form input[type="tel"],
.lightbox-inquiry-form input[type="url"],
.lightbox-inquiry-form input[type="number"],
.lightbox-inquiry-form input[type="search"],
.lightbox-inquiry-form textarea {
  border: 1px solid #dce4ee;
  border-radius: 10px;
  background: #f9fbfe;
  transition: all 0.25s ease;
  color: #1f2937;
}

.lightbox-inquiry-form input[type="text"]:focus,
.lightbox-inquiry-form input[type="email"]:focus,
.lightbox-inquiry-form input[type="tel"]:focus,
.lightbox-inquiry-form input[type="url"]:focus,
.lightbox-inquiry-form input[type="number"]:focus,
.lightbox-inquiry-form input[type="search"]:focus,
.lightbox-inquiry-form textarea:focus {
  outline: none;
  border-color: #34bfc6;
  box-shadow: 0 0 0 3px rgba(52, 191, 198, 0.18);
  background: #ffffff;
}

.submit-btn {
  width: 100%;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f69045 0%, #f66b4e 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 12px 24px rgba(246, 144, 69, 0.28);
}

.submit-btn:hover {
  background: linear-gradient(135deg, #34bfc6 0%, #2fa6ae 100%);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(52, 191, 198, 0.28);
}

.submit-btn:disabled {
  background: #9aa6b2;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-loading {
  display: none;
}

.form-message {
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  font-size: 14px;
}

.form-message.success {
  background: #d1edff;
  color: #004085;
  border: 1px solid #b3d7ff;
}

.form-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f1aeb5;
}

.lightbox-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 18px;
  color: #6c757d;
}

/* Body class when lightbox is open */
body.arts-gallery-lightbox-open {
  overflow: hidden;
}

body.single-gallery_item {
  overflow-x: hidden;
}

/* Lightbox states */
.arts-gallery-lightbox.is-loading {
  pointer-events: none;
}

.arts-gallery-lightbox.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s linear infinite;
  z-index: 20;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Hide lightbox media when in room mode */
.arts-gallery-lightbox.is-room-mode .agw-lightbox-media {
  display: none;
}

.arts-gallery-lightbox.is-room-mode .agw-view-room-btn {
  display: none;
}

/* Inline lightbox triggers behave like links */
.arts-gallery-item.agw-inline-trigger {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .agw-lightbox-inner {
    padding: 10px;
    gap: 15px;
  }

  .agw-lightbox-media .agw-lightbox-image {
    max-width: 95vw;
    max-height: 60vh; /* More space on mobile to avoid overflow */
    height: auto;
    object-fit: contain;
  }

  .agw-view-room-btn {
    padding: 5px 15px; /* Smaller on mobile */
    font-size: 0.85rem;
  }

  .agw-room-stage {
    padding: 0;
    padding-bottom: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .room-background-image-element {
    /* max-width: 100vw; */
    max-height: 60vh; /* Ensure room fits well on mobile */
    width: auto;
    height: auto;
    object-fit: contain;
  }

  .agw-room-controls {
    bottom: 15px;
    gap: 15px;
    padding: 5px;
    width: 100%;
    justify-content: center;
  }

  .agw-room-back {
    padding: 8px 16px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .agw-room-prev,
  .agw-room-next {
    width: 35px;
    height: 35px;
    flex-shrink: 0;
  }

  .agw-room-prev::before,
  .agw-room-next::before {
    width: 10px;
    height: 10px;
  }

  .agw-lightbox-prev,
  .agw-lightbox-next {
    width: 40px;
    height: 40px;
  }

  .agw-lightbox-prev::before,
  .agw-lightbox-next::before {
    width: 16px;
    height: 16px;
  }

  .agw-lightbox-prev {
    left: 5px;
  }
  .agw-lightbox-next {
    right: 5px;
  }

  .lightbox-close,
  .agw-lightbox-close {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    font-size: 24px;
    background: rgba(
      0,
      0,
      0,
      0.2
    ); /* Make close button visible on light images */
    border-radius: 50%;
  }
}

@media (max-width: 480px) {
  /* Grid columns controlled by Elementor/Widget settings */
}

.arts-gallery-item.agw-inline-trigger:focus-visible {
  outline: 2px solid #34bfc6;
  outline-offset: 3px;
}

/* Old Logic Removed */

/* Slider within single view */
.artwork-slider {
  position: relative;
  width: 100%;
  line-height: 0;
}

.slider-slides-container {
  position: relative;
  width: 100%;
}

.slider-slide {
  width: 100%;
  position: relative;
  display: none;
  line-height: 0;
}

.slider-slide.active {
  display: block;
}

.slider-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgb(0 0 0 / 34%);
  color: #fff;
  border: none;
  padding: 14px;
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.slider-control:hover {
  background: rgba(0, 0, 0, 0.7);
}

.slider-prev {
  left: 13px;
}

.slider-next {
  right: 13px;
}

.slider-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgb(0 0 0 / 34%);
  color: #fff;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.5px;
}

/* Single artwork page layout */
.arts-gallery-single {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0 40px;
}

.arts-gallery-single__header {
  text-align: center;
  margin-bottom: 30px;
  padding: 0 20px;
}

.arts-gallery-single__viewer {
  position: relative;
  margin: 0 calc(-50vw + 50%);
  width: 100vw;
  margin-bottom: 0;
  overflow: hidden;
}

.arts-gallery-single__actions {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 5;
}

.arts-gallery-single__back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 0.95em;
  font-weight: 600;
  background: #f69045;
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.arts-gallery-single__back-link:hover,
.arts-gallery-single__back-link:focus {
  background: #34bfc6;
  transform: translateY(-1px);
}

.arts-gallery-single__back-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.arts-gallery-single__details {
  max-width: 840px;
  margin: 35px auto 25px;
  padding: 0 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.arts-gallery-single__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: #6c757d;
  font-size: 0.95em;
}

.arts-gallery-single__meta .artwork-category {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 4px 12px;
  background: #f1f3f5;
  border-radius: 20px;
}

.arts-gallery-single__title {
  font-size: 1.85em;
  margin: 0;
  color: #111;
}

.arts-gallery-single__inquiry {
  margin: 45px auto 40px;
  max-width: 840px;
  padding: 0 20px;
}

.arts-gallery-single__content {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 20px;
  color: #495057;
  line-height: 1.8;
}

.arts-gallery-single__content .artwork-description p {
  margin-bottom: 1.4em;
}

/* Responsive Design - IMPROVED */
@media (max-width: 1200px) {
  .arts-gallery-col-6 {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 992px) {
  .arts-gallery-col-5,
  .arts-gallery-col-6 {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Masonry responsive - use tablet columns */
  .arts-gallery-masonry-sizer,
  .arts-gallery-masonry-item {
    width: calc(
      (100% - (var(--ag-col-tablet, 2) - 1) * var(--ag-gap, 15px)) /
        var(--ag-col-tablet, 2)
    );
  }

  .slider-control {
    padding: 12px;
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .agw-lightbox-inner {
    width: 98vw;
    padding: 28px 20px;
  }

  .agw-lightbox-media {
    max-height: 55vh;
  }

  .agw-room-mode {
    padding: 22px;
    border-radius: 20px;
  }
}

@media (max-width: 768px) {
  .arts-gallery-single {
    padding: 0 0 20px;
  }

  .arts-gallery-single__viewer {
    margin: 0;
    width: 100%;
    overflow: visible;
  }

  .view-in-room-lightbox {
    width: 100%;
    padding: 0;
  }

  .room-background-lightbox {
    margin: 0 auto;
  }

  .arts-gallery-single__details {
    margin: 18px auto 22px;
    padding: 0 18px;
  }
}

@media (max-width: 576px) {
  .arts-gallery-single__title {
    font-size: 1.2em;
    line-height: 1.3;
  }

  .arts-gallery-col-4,
  .arts-gallery-col-5,
  .arts-gallery-col-6 {
    grid-template-columns: repeat(3, 1fr);
  }

  .arts-gallery-col-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Masonry responsive - use mobile columns */
  .arts-gallery-masonry-sizer,
  .arts-gallery-masonry-item {
    width: calc(
      (100% - (var(--ag-col-mobile, 1) - 1) * var(--ag-gap, 15px)) /
        var(--ag-col-mobile, 1)
    );
  }

  .arts-gallery-single__viewer {
    margin: 0;
    width: 100%;
  }

  .slider-control {
    padding: 8px;
    width: 30px;
    height: 30px;
    font-size: 15px;
  }

  .arts-gallery-single__actions {
    top: 16px;
    right: 18px;
  }

  .lightbox-inquiry-form {
    padding: 28px 24px;
  }

  .agw-lightbox-inner {
    padding: 24px 16px;
    gap: 12px;
  }

  .agw-lightbox-title {
    font-size: 1rem;
    padding: 0 10px;
  }

  .agw-lightbox-media {
    max-height: 50vh;
  }

  .agw-lightbox-media .agw-lightbox-image {
    max-width: calc(100vw - 40px);
    max-height: calc(50vh - 20px);
  }

  .agw-view-room-btn {
    padding: 5px 15px;
    font-size: 0.95rem;
  }

  .agw-room-mode {
    padding: 18px;
    width: 96vw;
    height: 85vh;
  }

  .agw-room-toolbar {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .agw-room-nav {
    justify-content: center;
  }

  .agw-lightbox-close {
    width: 38px;
    height: 38px;
    font-size: 22px;
    top: 12px;
    right: 12px;
  }
}

@media (max-width: 576px) {
  .arts-gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .arts-gallery-single__details,
  .arts-gallery-single__content {
    padding: 0 16px;
  }

  .arts-gallery-single__inquiry {
    padding: 0 16px;
    margin: 0;
  }

  .lightbox-inquiry-form h2 {
    font-size: 16px;
  }

  .lightbox-inquiry-form__subtitle {
    font-size: 15px;
  }

  .slider-counter {
    bottom: 8px;
    padding: 6px 12px;
    font-size: 10px;
  }

  .arts-gallery-single__actions {
    top: 12px;
    right: 12px;
  }

  .arts-gallery-single__back-link {
    padding: 3px 10px;
    font-size: 0.7em;
  }

  .form-row {
    flex-direction: column;
    gap: 14px;
  }

  .lightbox-inquiry-form {
    padding: 24px 20px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .agw-lightbox-inner {
    width: 100vw;
    padding: 18px 14px;
  }

  .agw-lightbox-media {
    max-height: 48vh;
  }

  .agw-room-mode {
    padding: 16px;
  }

  .room-background-lightbox {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 400px) {
  .arts-gallery-grid {
    grid-template-columns: 1fr !important;
  }
  .arts-gallery-masonry {
    --ag-columns: 1 !important;
  }

  .arts-gallery-single__actions {
    top: 10px;
    right: 10px;
  }

  .lightbox-container {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .arts-gallery-lightbox {
    padding: 0;
  }
}

/* Print Styles */
@media print {
  .arts-gallery-overlay,
  .lightbox-inquiry-form {
    display: none !important;
  }

  .arts-gallery-item {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}
