/* ==========================================================================
   ATELIER BACKGROUND ART GALLERY MODAL (HIGH-CAPACITY)
   ========================================================================== */
.art-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 42, 58, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.art-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.art-modal-dialog {
  background: #FFFFFF;
  border: 1px solid #E6E0D7;
  border-radius: 14px;
  box-shadow: 0 28px 75px -15px rgba(30, 42, 58, 0.35);
  width: 100%;
  max-width: 860px;
  height: 85vh;
  max-height: 820px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.art-modal-overlay.open .art-modal-dialog {
  transform: translateY(0) scale(1);
}

/* Header */
.art-modal-header {
  padding: 1.35rem 1.75rem 1.15rem 1.75rem;
  border-bottom: 1px solid #F0ECE4;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: #FAF8F5;
}
.modal-kicker {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #c59c68;
  font-weight: 700;
  display: block;
  margin-bottom: 0.3rem;
}
.art-modal-title {
  font-family: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: #2b3b51;
  line-height: 1.15;
  margin: 0 0 0.25rem 0;
}
.art-modal-subtitle {
  font-size: 0.76rem;
  color: #5e6b7d;
  font-family: 'Montserrat', sans-serif;
  margin: 0;
}
.art-modal-close {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: #8e98a5;
  cursor: pointer;
  padding: 0 0.25rem;
  transition: color 0.15s ease;
}
.art-modal-close:hover { color: #2b3b51; }

/* Filter & Search Toolbar */
.modal-toolbar {
  padding: 0.85rem 1.75rem;
  background: #FFFFFF;
  border-bottom: 1px solid #F0ECE4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.modal-category-tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.modal-category-tabs::-webkit-scrollbar { display: none; }

.cat-pill-btn {
  background: #F3EFEA;
  border: 1px solid #E6E0D7;
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  color: #5e6b7d;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.cat-pill-btn:hover {
  background: #FFFFFF;
  color: #2b3b51;
  border-color: #c59c68;
}
.cat-pill-btn.active {
  background: #2b3b51;
  color: #FFFFFF;
  border-color: #2b3b51;
}

.modal-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 210px;
}
.modal-search-wrap svg {
  position: absolute;
  left: 0.75rem;
  color: #8e98a5;
  pointer-events: none;
}
.modal-search-input {
  width: 100%;
  padding: 0.4rem 0.75rem 0.4rem 2rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.74rem;
  border: 1px solid #CDC4B7;
  border-radius: 20px;
  background: #FAF8F5;
  color: #2b3b51;
  outline: none;
  transition: all 0.2s ease;
}
.modal-search-input:focus {
  background: #FFFFFF;
  border-color: #c59c68;
  box-shadow: 0 0 0 2px rgba(197, 156, 104, 0.18);
}

/* Grid & Items */
.art-modal-body {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  flex: 1;
  background: #FAF8F5;
}
.modal-presets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}
@media (max-width: 768px) {
  .modal-presets-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 520px) {
  .modal-presets-grid { grid-template-columns: repeat(2, 1fr); }
}

.preset-choice-card {
  background: #FFFFFF;
  border: 2px solid #E6E0D7;
  border-radius: 10px;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
  transition: all 0.18s ease;
  position: relative;
}
.preset-choice-card:hover {
  border-color: #CDC4B7;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(43, 59, 81, 0.08);
}
.preset-choice-card.active {
  border-color: #c59c68;
  background: rgba(197, 156, 104, 0.08);
  box-shadow: 0 6px 20px rgba(197, 156, 104, 0.22);
}
.preset-choice-card.active::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  background: #c59c68;
  color: #FFFFFF;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.preset-card-thumb {
  width: 100%;
  height: 96px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background-color: #F3EFEA;
}
.preset-card-thumb.blank-thumb {
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #CDC4B7;
}
.blank-icon {
  font-size: 1.4rem;
  opacity: 0.35;
}

.preset-card-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: #2b3b51;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 1.9em;
}

.catalog-empty-notice {
  text-align: center;
  padding: 3rem 1rem;
  color: #8e98a5;
  font-size: 0.85rem;
  font-family: 'Montserrat', sans-serif;
}

/* Upload Strip */
.modal-upload-bar {
  padding: 0.85rem 1.75rem;
  background: #FFFFFF;
  border-top: 1px solid #F0ECE4;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.btn-custom-upload {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1rem;
  background: #FAF8F5;
  border: 1px solid #CDC4B7;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  color: #2b3b51;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-custom-upload:hover {
  background: #FFFFFF;
  border-color: #c59c68;
  color: #c59c68;
}
.upload-hint {
  font-size: 0.7rem;
  color: #8e98a5;
  font-family: 'Montserrat', sans-serif;
}

/* Modal Footer */
.art-modal-footer {
  padding: 1rem 1.75rem;
  border-top: 1px solid #E6E0D7;
  background: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.modal-selected-status {
  font-size: 0.76rem;
  font-family: 'Montserrat', sans-serif;
  color: #5e6b7d;
}
.modal-selected-status strong {
  color: #2b3b51;
  font-weight: 700;
  margin-left: 0.35rem;
}

.modal-footer-actions {
  display: flex;
  gap: 0.6rem;
}
.btn-modal-cancel {
  padding: 0.6rem 1rem;
  background: transparent;
  border: 1px solid #CDC4B7;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #5e6b7d;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-modal-cancel:hover {
  background: #FAF8F5;
  color: #2b3b51;
}
.btn-modal-apply {
  padding: 0.6rem 1.25rem;
  background: #2b3b51;
  border: 1px solid rgba(197, 156, 104, 0.4);
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-modal-apply:hover {
  background: #1e2a3a;
  border-color: #c59c68;
  box-shadow: 0 4px 12px rgba(43, 59, 81, 0.2);
}