/* ==========================================================================
   Frank & Caroline – Hochzeitsgalerie (Luxury Pic-Time Editorial Style)
   ========================================================================== */

:root {
  --bg-body: #faf9f6;
  --bg-card: #ffffff;
  --bg-subtle: #f4f2ee;
  --bg-hover: #ece9e3;
  --text-main: #181715;
  --text-muted: #73716c;
  --text-light: #999690;
  --accent: #181715;
  --accent-gold: #bfa172;
  --accent-gold-hover: #a88b5e;
  --heart-active: #e63946;
  --border-light: rgba(0, 0, 0, 0.06);
  --border-medium: rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================================================
   Sticky Header
   ========================================================================== */
.gallery-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  transition: var(--transition);
}

.brand-section {
  display: flex;
  align-items: center;
}

.brand-logo {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}

.brand-logo span {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-left: 1px solid var(--border-medium);
  padding-left: 10px;
  margin-left: 4px;
}

.header-center {
  display: flex;
  align-items: center;
}

.badge-info {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: 1px solid var(--border-medium);
  background: var(--bg-card);
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition);
  user-select: none;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  background: var(--bg-hover);
  border-color: rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: #333230;
  border-color: #333230;
  color: #ffffff;
}

.btn-fav-download {
  background: #fff0f1;
  color: var(--heart-active);
  border-color: #ffd6d9;
  display: none; /* activated when fav > 0 */
}

.btn-fav-download:hover {
  background: #ffe3e6;
  border-color: #ffb8be;
}

.btn-fav-download.active {
  display: inline-flex;
}

/* Download Dropdown */
.download-dropdown-wrap {
  position: relative;
}

.download-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  flex-direction: column;
  z-index: 200;
  animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.download-dropdown-menu.show {
  display: flex;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  padding: 6px 10px 4px;
}

.dropdown-item {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--bg-subtle);
}

.dropdown-item.highlight {
  background: #fbf7ee;
  border: 1px solid rgba(191, 161, 114, 0.3);
}

.dropdown-item.highlight:hover {
  background: #f5eedc;
}

.dropdown-item .dl-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
}

.dropdown-item .dl-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 6px 0;
}

/* ==========================================================================
   Editorial Hero Banner
   ========================================================================== */
.hero-banner {
  padding: 54px 24px 34px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 14px;
}

.hero-top-badge .heart-icon {
  font-size: 12px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5.5vw, 62px);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: var(--text-main);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.hero-subtitle {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(17px, 2.2vw, 22px);
  font-style: italic;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.hero-tagline {
  font-size: 13.5px;
  color: var(--text-light);
  max-width: 580px;
  margin: 0 auto 18px;
  line-height: 1.6;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   Filter & Layout Toolbar (Sticky)
   ========================================================================== */
.filter-bar {
  position: sticky;
  top: calc(64px + var(--sat));
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  background: rgba(250, 249, 246, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 12px;
}

.filter-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 30px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-medium);
  background: var(--bg-card);
  color: var(--text-main);
  transition: var(--transition);
  white-space: nowrap;
  user-select: none;
}

.pill:hover {
  background: var(--bg-hover);
  border-color: rgba(0, 0, 0, 0.2);
}

.pill.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.pill-count {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-muted);
  font-weight: 600;
}

.pill.active .pill-count {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.layout-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.layout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 30px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.layout-btn svg {
  width: 16px;
  height: 16px;
}

.layout-btn:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.layout-btn.active {
  background: var(--accent);
  color: #ffffff;
}

/* ==========================================================================
   Masonry Photo Grid
   ========================================================================== */
.gallery-container {
  max-width: 1720px;
  margin: 0 auto;
  padding: 24px 28px 80px;
}

.photo-grid {
  display: grid;
  gap: 16px;
  width: 100%;
}

.photo-grid.cols-1 {
  grid-template-columns: 1fr;
  max-width: 620px;
  margin: 0 auto;
}

.photo-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.photo-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.photo-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Column Wrapper for True Balanced Masonry */
.grid-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.photo-card {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-subtle);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  user-select: none;
}

.photo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.photo-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
  background-color: #edebe7;
}

.photo-card:hover img {
  transform: scale(1.02);
}

/* Video Badge & Play Button Overlay */
.video-overlay-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(18, 19, 22, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  transition: var(--transition);
}

.photo-card:hover .video-overlay-badge {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(191, 161, 114, 0.9);
}

.video-overlay-badge svg {
  width: 20px;
  height: 20px;
  margin-left: 2px;
}

.video-duration-pill {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(18, 19, 22, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Card Hover Actions (Heart & Download) */
.card-action-btn {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: var(--transition);
  opacity: 0;
  transform: scale(0.9);
}

.photo-card:hover .card-action-btn {
  opacity: 1;
  transform: scale(1);
}

.card-fav-btn {
  top: 10px;
  right: 10px;
}

.card-fav-btn:hover {
  background: #ffffff;
  color: var(--heart-active);
  transform: scale(1.08);
}

.card-fav-btn.is-fav {
  opacity: 1;
  transform: scale(1);
  color: var(--heart-active);
  background: #ffffff;
}

.card-fav-btn.is-fav svg {
  fill: var(--heart-active);
}

.card-dl-btn {
  top: 10px;
  left: 10px;
}

.card-dl-btn:hover {
  background: #ffffff;
  transform: scale(1.08);
}

.card-category-pill {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 12px;
  opacity: 0;
  transition: var(--transition);
}

.photo-card:hover .card-category-pill {
  opacity: 1;
}

/* ==========================================================================
   Lightbox Modal
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(14, 13, 12, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.25s ease;
  user-select: none;
}

.lightbox-modal.open {
  display: flex;
  opacity: 1;
}

.lightbox-top-bar {
  height: 60px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.lightbox-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #a3a19b;
}

.lightbox-category-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  padding: 3px 10px;
  border-radius: 20px;
}

.lightbox-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-lightbox {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: var(--transition);
}

.btn-lightbox svg {
  width: 15px;
  height: 15px;
}

.btn-lightbox:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-lightbox.is-fav {
  background: #ffffff;
  color: var(--heart-active);
  border-color: #ffffff;
}

.btn-lightbox.is-fav svg {
  fill: var(--heart-active);
}

.btn-lightbox.download-cta {
  background: #ffffff;
  color: #181715;
  border-color: #ffffff;
  font-weight: 600;
}

.btn-lightbox.download-cta:hover {
  background: #e5e3de;
}

/* Lightbox Stage */
.lightbox-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}

.zoom-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  transition: transform 0.1s ease-out;
}

.lightbox-img {
  max-width: 94%;
  max-height: 92%;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  pointer-events: auto;
}

.video-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-stage video {
  max-width: 90%;
  max-height: 85%;
  border-radius: 8px;
  outline: none;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
  background: #000000;
}

/* Nav Arrows */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}

.nav-arrow:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-50%) scale(1.08);
}

.nav-arrow svg {
  width: 24px;
  height: 24px;
}

.nav-prev { left: 24px; }
.nav-next { right: 24px; }

/* Lightbox Mobile Bottom Bar */
.lightbox-bottom-bar {
  min-height: 58px;
  height: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 10px calc(8px + var(--sab));
  background: rgba(14, 13, 12, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-shrink: 0;
  width: 100%;
}

.bottom-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 12px;
  text-decoration: none;
  min-width: 48px;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.bottom-btn svg {
  width: 18px;
  height: 18px;
}

.bottom-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.1);
}

.bottom-btn.active {
  color: var(--accent-gold);
}

.bottom-btn.active svg {
  stroke: var(--accent-gold);
  fill: var(--accent-gold);
}

.bottom-btn.highlight {
  background: #ffffff;
  color: #181715;
  font-weight: 600;
  border-radius: 18px;
  padding: 6px 14px;
}

.bottom-btn.highlight svg {
  stroke: #181715;
}

/* ==========================================================================
   Mobile Floating Quick Nav
   ========================================================================== */
.mobile-floating-nav {
  position: fixed;
  bottom: calc(18px + var(--sab));
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  background: rgba(24, 23, 21, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  padding: 5px 8px;
  display: none;
  align-items: center;
  gap: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.floating-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 20px;
  transition: var(--transition);
}

.floating-nav-btn.icon-only {
  padding: 7px;
}

.floating-nav-btn svg {
  width: 15px;
  height: 15px;
}

.floating-nav-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   Login Gate Modal
   ========================================================================== */
.login-gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(18, 17, 15, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-gate.hidden {
  display: none;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 42px 36px 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-gold);
  background: #fbf8f2;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.login-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-gold);
  border-radius: 50%;
}

.login-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 28px;
}

.form-group {
  text-align: left;
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--text-light);
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  font-family: var(--font-sans);
  font-size: 16px; /* Prevents iOS Safari auto-zoom */
  color: var(--text-main);
  background: var(--bg-body);
  transition: var(--transition);
  outline: none;
}

.input-wrapper input:focus {
  border-color: var(--text-main);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(24, 23, 21, 0.08);
}

.btn-toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-toggle-pw svg {
  width: 17px;
  height: 17px;
}

.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c92a2a;
  font-size: 12px;
  background: #fff5f5;
  border: 1px solid #ffc9c9;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  text-align: left;
}

.login-error svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.login-submit-btn {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.login-submit-btn:hover {
  background: #333230;
  transform: translateY(-1px);
}

.login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-light);
  margin-top: 24px;
}

.login-footer svg {
  width: 13px;
  height: 13px;
  color: var(--accent-gold);
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast-msg {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(24, 23, 21, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  opacity: 0;
  transition: var(--transition);
  z-index: 3000;
}

.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Favorites ZIP Progress Bar Overlay
   ========================================================================== */
.zip-progress-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 17, 15, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.zip-progress-card {
  width: 100%;
  max-width: 360px;
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 30px 24px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.zip-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-light);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.zip-progress-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
}

.zip-progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--bg-subtle);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.zip-progress-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--accent-gold);
  transition: width 0.15s ease;
}

.zip-progress-text {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
.desktop-only { display: inline-flex; }
.mobile-only { display: none; }

@media (max-width: 1024px) {
  .photo-grid.cols-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: flex !important; }

  .gallery-header {
    padding: var(--sat) 14px 0;
    height: calc(56px + var(--sat));
  }
  .brand-logo span {
    display: none;
  }
  .btn .btn-label {
    display: none;
  }
  .btn {
    padding: 8px 10px;
  }

  .hero-banner {
    padding: 30px 14px 18px;
  }
  .hero-title {
    font-size: 32px;
    letter-spacing: 2px;
  }
  .hero-subtitle {
    font-size: 16px;
    letter-spacing: 2px;
  }
  .hero-tagline {
    font-size: 13px;
    line-height: 1.5;
  }
  .hero-meta {
    font-size: 11px;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Horizontally scrollable single-row category pills on mobile */
  .filter-bar {
    top: calc(56px + var(--sat));
    padding: 8px 12px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filter-bar::-webkit-scrollbar {
    display: none;
  }

  .filter-left {
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .filter-left::-webkit-scrollbar {
    display: none;
  }

  .filter-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding-bottom: 2px;
  }
  .filter-pills::-webkit-scrollbar {
    display: none;
  }

  .pill {
    padding: 6px 12px;
    font-size: 11.5px;
    flex-shrink: 0;
  }

  #favDownloadFilterBtn {
    display: none; /* Hide on mobile pill row to keep it sleek */
  }

  .layout-toggle {
    display: none; /* Controlled by floating bottom bar */
  }

  .gallery-container {
    padding: 12px 10px 100px;
  }

  .photo-grid.cols-1 {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 12px;
  }

  .photo-grid.cols-2,
  .photo-grid.cols-3,
  .photo-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .nav-arrow {
    display: none; /* Mobile uses swipe gestures & bottom bar */
  }

  .mobile-floating-nav {
    display: flex;
    bottom: calc(16px + var(--sab));
  }

  /* Show action buttons on cards on mobile */
  .card-action-btn {
    opacity: 0.95;
    transform: scale(0.9);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 27px;
  }
  .hero-subtitle {
    font-size: 14.5px;
  }
  .hero-tagline {
    font-size: 12px;
  }
  .login-card {
    padding: 28px 18px 22px;
    border-radius: 16px;
  }
  .login-title {
    font-size: 26px;
  }
  .login-badge {
    font-size: 9.5px;
    padding: 4px 10px;
  }
}
