/* ═══════════════════════════════════════════════════════════
   BestWallArt v4 — Pinterest-Clean White Gallery
   Mobile-first, responsive, elegant
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --white:       #FFFFFF;
  --bg:          #FAFAFA;
  --bg-2:        #F5F5F5;
  --surface:     #FFFFFF;
  --border:      #EBEBEB;
  --border-2:    #D6D6D6;
  --text:        #111111;
  --text-2:      #555555;
  --text-3:      #999999;
  --accent:      #E63946;
  --accent-2:    #C1121F;
  --accent-bg:   #FFF0F0;
  --gold:        #B5935A;
  --success:     #2A9D5C;
  --danger:      #E63946;
  --radius-sm:   6px;
  --radius:      12px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --shadow-xs:   0 1px 3px rgba(0,0,0,.06);
  --shadow-sm:   0 2px 8px rgba(0,0,0,.08);
  --shadow:      0 4px 20px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.14);
  --shadow-xl:   0 20px 60px rgba(0,0,0,.18);
  --font-display:'Playfair Display', Georgia, serif;
  --font-body:   'Inter', -apple-system, sans-serif;
  --ease:        cubic-bezier(.4, 0, .2, 1);
  --ease-out:    cubic-bezier(0, 0, .2, 1);
  --header-h:    60px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ── Typography ─────────────────────────────────────────────── */
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }

/* ── Layout ─────────────────────────────────────────────────── */
.container { max-width: 1440px; margin: 0 auto; padding: 0 20px; }
.main-content { min-height: calc(100vh - var(--header-h)); }

/* ══════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 200;
  height: var(--header-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner {
  height: 100%; max-width: 1440px; margin: 0 auto;
  padding: 0 20px;
  display: flex; align-items: center; gap: 8px;
}
.logo {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-size: 1.15rem;
  font-weight: 500; letter-spacing: -.01em; flex-shrink: 0;
  margin-right: 16px;
}
.logo-mark { color: var(--accent); font-size: .9rem; }
.main-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-link {
  padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500; color: var(--text-2);
  transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--text); background: var(--bg-2); }
.nav-link.active { color: var(--text); }
.nav-admin { color: var(--accent) !important; }
.nav-btn {
  margin-left: 8px; padding: 7px 18px;
  border-radius: 100px; font-size: .875rem; font-weight: 600;
  background: var(--text); color: var(--white);
  transition: opacity .2s, transform .15s;
}
.nav-btn:hover { opacity: .85; transform: translateY(-1px); }
.nav-btn--outline {
  background: transparent; color: var(--text-2);
  border: 1.5px solid var(--border-2);
}
.nav-btn--outline:hover { border-color: var(--text); color: var(--text); background: transparent; }
.nav-toggle {
  display: none; flex-direction: column; gap: 4.5px;
  background: none; border: none; padding: 6px; margin-left: auto;
}
.nav-toggle span {
  display: block; width: 20px; height: 1.5px;
  background: var(--text); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ══════════════════════════════════════════════
   HERO
══════════════════════════════════════════════ */
.hero {
  padding: clamp(48px, 8vw, 96px) 20px clamp(40px, 6vw, 72px);
  text-align: center; background: var(--white);
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(230,57,70,.04) 0%, transparent 60%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-block;
  font-size: .72rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 20px;
  padding: 5px 14px; border: 1px solid rgba(230,57,70,.25);
  border-radius: 100px; background: var(--accent-bg);
}
.hero h1 { color: var(--text); margin-bottom: 16px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p { font-size: 1.05rem; color: var(--text-2); max-width: 460px; margin: 0 auto 32px; font-weight: 300; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ══════════════════════════════════════════════
   FILTER BAR
══════════════════════════════════════════════ */
.filter-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: var(--header-h); z-index: 100;
}
.filter-bar-scroll {
  max-width: 1440px; margin: 0 auto; padding: 0 20px;
  height: 52px; display: flex; align-items: center;
  gap: 6px; overflow-x: auto; scrollbar-width: none;
}
.filter-bar-scroll::-webkit-scrollbar { display: none; }

.filter-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 100px; white-space: nowrap;
  font-size: .8rem; font-weight: 500; cursor: pointer;
  border: 1.5px solid var(--border-2); background: var(--white);
  color: var(--text-2); transition: all .2s var(--ease);
  flex-shrink: 0;
}
.filter-chip:hover { border-color: var(--text); color: var(--text); }
.filter-chip.active { background: var(--text); border-color: var(--text); color: var(--white); }
.filter-chip.active:hover { background: #333; }
.filter-chip .chip-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
}

.filter-divider { width: 1px; height: 20px; background: var(--border); flex-shrink: 0; margin: 0 4px; }

.filter-dropdown-wrap { position: relative; }
.filter-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  min-width: 220px; max-height: 320px; overflow-y: auto;
  z-index: 300; padding: 8px; display: none;
  animation: dropIn .15s var(--ease-out);
}
.filter-dropdown.open { display: block; }
.filter-option {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: .85rem; color: var(--text-2); cursor: pointer;
  transition: background .15s;
}
.filter-option:hover { background: var(--bg-2); color: var(--text); }
.filter-option input[type=radio] { accent-color: var(--accent); }
.filter-color-swatch {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,.1); flex-shrink: 0;
}

/* Search */
.filter-search-wrap {
  margin-left: auto; flex-shrink: 0;
  display: flex; align-items: center;
  background: var(--bg-2); border-radius: 100px;
  border: 1.5px solid transparent;
  transition: border-color .2s;
  padding: 0 14px; gap: 8px; height: 36px;
}
.filter-search-wrap:focus-within { border-color: var(--border-2); background: var(--white); }
.filter-search-wrap input {
  background: none; border: none; outline: none;
  font-size: .85rem; color: var(--text); font-family: inherit;
  width: 180px;
}
.filter-search-wrap svg { color: var(--text-3); flex-shrink: 0; }
.filter-clear-all {
  font-size: .78rem; color: var(--text-3); background: none; border: none;
  cursor: pointer; padding: 4px 8px; border-radius: 4px; flex-shrink: 0;
  transition: color .2s;
}
.filter-clear-all:hover { color: var(--danger); }

/* ══════════════════════════════════════════════
   GALLERY — MASONRY PINTEREST STYLE
══════════════════════════════════════════════ */
.gallery-section { padding: 0; }
.gallery-bar {
  max-width: 1440px; margin: 0 auto;
  padding: 14px 20px;
  display: flex; align-items: center; gap: 12px;
}
.gallery-bar .count { font-size: .82rem; color: var(--text-3); }

/* CSS Columns masonry - responsive */
.masonry {
  max-width: 1440px; margin: 0 auto;
  padding: 0 12px 40px;
  columns: 2;
  column-gap: 12px;
}
@media (min-width: 480px)  { .masonry { columns: 2; } }
@media (min-width: 640px)  { .masonry { columns: 3; } }
@media (min-width: 900px)  { .masonry { columns: 4; } }
@media (min-width: 1200px) { .masonry { columns: 5; } }
@media (min-width: 1500px) { .masonry { columns: 6; } }

.masonry-item {
  break-inside: avoid;
  margin-bottom: 12px;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-2);
  box-shadow: var(--shadow-xs);
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
  /* Fade in animation */
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp .4s var(--ease-out) forwards;
}
.masonry-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.masonry-item img {
  width: 100%; display: block;
  transition: transform .5s var(--ease);
}
.masonry-item:hover img { transform: scale(1.03); }

/* Title badge — always visible, centered at bottom */
.img-title-badge {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  max-width: calc(100% - 20px);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: .72rem; font-weight: 500;
  color: var(--text); letter-spacing: .01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
  pointer-events: none;
  transition: opacity .2s;
}

/* Plan badge */
.img-plan-badge {
  position: absolute; top: 8px; right: 8px;
  font-size: .65rem; font-weight: 600; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 100px; text-transform: uppercase;
  backdrop-filter: blur(4px);
}
.img-plan-badge.free    { background: rgba(42,157,92,.85); color: #fff; }
.img-plan-badge.basic   { background: rgba(52,130,246,.85); color: #fff; }
.img-plan-badge.premium { background: rgba(181,147,90,.9);  color: #fff; }
.img-plan-badge.vip     { background: rgba(140,60,180,.85); color: #fff; }

/* Staggered animation */
.masonry-item:nth-child(1)  { animation-delay: .03s; }
.masonry-item:nth-child(2)  { animation-delay: .06s; }
.masonry-item:nth-child(3)  { animation-delay: .09s; }
.masonry-item:nth-child(4)  { animation-delay: .12s; }
.masonry-item:nth-child(5)  { animation-delay: .15s; }
.masonry-item:nth-child(6)  { animation-delay: .18s; }
.masonry-item:nth-child(7)  { animation-delay: .21s; }
.masonry-item:nth-child(8)  { animation-delay: .24s; }
.masonry-item:nth-child(9)  { animation-delay: .27s; }
.masonry-item:nth-child(10) { animation-delay: .30s; }
.masonry-item:nth-child(n+11) { animation-delay: .33s; }

/* Empty state */
.gallery-empty {
  text-align: center; padding: 100px 24px; color: var(--text-3);
}
.gallery-empty h3 { font-size: 1.4rem; margin: 16px 0 8px; color: var(--text-2); }

/* ══════════════════════════════════════════════
   PAGINATION
══════════════════════════════════════════════ */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 4px; padding: 32px 20px 48px; flex-wrap: wrap;
}
.pagination a, .pagination span {
  min-width: 40px; height: 40px; display: flex;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm); font-size: .875rem; font-weight: 500;
  border: 1.5px solid var(--border); color: var(--text-2);
  transition: all .2s;
}
.pagination a:hover { border-color: var(--text); color: var(--text); }
.pagination .current { background: var(--text); border-color: var(--text); color: var(--white); }
.pagination .dots { border: none; color: var(--text-3); min-width: 24px; }

/* ══════════════════════════════════════════════
   IMAGE DETAIL PAGE
══════════════════════════════════════════════ */
.img-detail-page { background: var(--white); min-height: 100vh; }

.img-detail-wrap {
  max-width: 1300px; margin: 0 auto; padding: 32px 20px 80px;
}

.img-detail-breadcrumb {
  font-size: .8rem; color: var(--text-3); margin-bottom: 28px;
  display: flex; align-items: center; gap: 6px;
}
.img-detail-breadcrumb a { color: var(--text-3); transition: color .2s; }
.img-detail-breadcrumb a:hover { color: var(--text); }
.img-detail-breadcrumb span { color: var(--text-3); }

.img-detail-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 56px; align-items: start;
}

/* Left: image */
.img-detail-left { position: sticky; top: calc(var(--header-h) + 20px); }
.img-detail-visual {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-xl); position: relative;
}
.img-detail-visual img { width: 100%; display: block; }
.img-wm-note {
  margin-top: 10px; text-align: center;
  font-size: .75rem; color: var(--text-3); font-style: italic;
}

/* Color palette under image */
.img-palette {
  margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px;
}
.img-palette-swatch {
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; transition: transform .2s;
  box-shadow: var(--shadow-xs);
  border: 2px solid var(--white);
  position: relative;
}
.img-palette-swatch:hover { transform: scale(1.25); z-index: 1; }
.img-palette-swatch::after {
  content: attr(data-label);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: var(--text); color: var(--white);
  font-size: .68rem; padding: 3px 8px; border-radius: 4px;
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.img-palette-swatch:hover::after { opacity: 1; }

/* Right: meta */
.img-detail-right {}

.img-detail-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-family: var(--font-display);
  font-weight: 500; line-height: 1.2;
  margin-bottom: 8px; color: var(--text);
}
.img-detail-alt {
  font-size: .9rem; color: var(--text-3);
  font-style: italic; margin-bottom: 24px;
}

/* Specs grid */
.img-specs {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 24px;
}
.img-spec {
  background: var(--white); padding: 12px 16px;
}
.img-spec .spec-label {
  font-size: .7rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 3px;
}
.img-spec .spec-value { font-size: .9rem; font-weight: 500; color: var(--text); }

/* Description */
.img-description {
  font-size: .9rem; color: var(--text-2); line-height: 1.75;
  padding: 20px 0; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); margin-bottom: 24px;
}

/* Tag groups */
.tag-section { margin-bottom: 20px; }
.tag-section-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 8px;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 5px 13px; border-radius: 100px;
  border: 1.5px solid var(--border);
  font-size: .78rem; color: var(--text-2);
  background: var(--white); cursor: pointer;
  transition: all .2s; font-weight: 400;
}
.tag:hover {
  border-color: var(--text); color: var(--text);
  background: var(--bg-2);
}

/* Download box */
.download-box {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; margin-top: 8px;
}
.download-plan-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 600; padding: 4px 12px;
  border-radius: 100px; margin-bottom: 14px;
  background: #E8F8EF; color: var(--success);
  border: 1px solid rgba(42,157,92,.2);
}
.download-locked-msg { font-size: .875rem; color: var(--text-2); margin-bottom: 16px; line-height: 1.6; }
.plans-available { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.plans-available .tag-section-label { margin-bottom: 8px; }

/* ══════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 11px 24px; border-radius: 100px;
  font-size: .875rem; font-weight: 600; cursor: pointer;
  border: none; transition: all .2s var(--ease);
  font-family: inherit; line-height: 1;
}
.btn-primary { background: var(--text); color: var(--white); }
.btn-primary:hover { background: #333; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: var(--accent-2); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(230,57,70,.3); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--border-2);
}
.btn-outline:hover { border-color: var(--text); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-2); color: var(--text); }
.btn-sm { padding: 7px 16px; font-size: .8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ══════════════════════════════════════════════
   AUTH
══════════════════════════════════════════════ */
.auth-page {
  min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--white) 100%);
}
.auth-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 48px 40px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-xl); text-align: center;
  animation: fadeUp .4s var(--ease-out) forwards;
}
.auth-logo { justify-content: center; margin-bottom: 8px; font-size: 1.3rem; }
.auth-card h2 { margin-bottom: 8px; }
.auth-card .sub { color: var(--text-2); font-size: .9rem; margin-bottom: 32px; font-weight: 300; }

.btn-google {
  width: 100%; display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 13px 20px; border-radius: var(--radius);
  border: 1.5px solid var(--border-2); background: var(--white);
  font-size: .9rem; font-weight: 500; cursor: pointer; color: var(--text);
  transition: all .2s; font-family: inherit;
}
.btn-google:hover { border-color: var(--text-2); box-shadow: var(--shadow-sm); }
.btn-google svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ══════════════════════════════════════════════
   PRICING
══════════════════════════════════════════════ */
.pricing-page { padding: 60px 20px 80px; }
.pricing-page .page-header { text-align: center; margin-bottom: 48px; }
.pricing-page .page-header h2 { margin-bottom: 12px; }
.pricing-page .page-header p { color: var(--text-2); font-weight: 300; font-size: 1rem; }

.billing-toggle {
  display: inline-flex; background: var(--bg-2); border-radius: 100px;
  padding: 4px; border: 1px solid var(--border); margin: 0 auto 40px;
  display: flex; width: fit-content; margin: 0 auto 48px;
}
.billing-opt {
  padding: 7px 22px; border-radius: 100px;
  font-size: .85rem; font-weight: 500; cursor: pointer;
  transition: all .2s; color: var(--text-2);
}
.billing-opt.active { background: var(--white); color: var(--text); box-shadow: var(--shadow-xs); }
.billing-save { font-size: .7rem; color: var(--success); font-weight: 600; margin-left: 4px; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px; max-width: 1100px; margin: 0 auto;
}
.pricing-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 28px;
  transition: box-shadow .3s, transform .3s; position: relative;
}
.pricing-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.pricing-card.featured {
  border-color: var(--accent); border-width: 2px;
  box-shadow: 0 0 0 4px rgba(230,57,70,.06);
}
.pricing-card .popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--white);
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 4px 14px; border-radius: 100px;
  white-space: nowrap;
}
.plan-name { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 20px; }
.plan-price-wrap { margin-bottom: 6px; }
.plan-price { font-size: 2.4rem; font-weight: 700; line-height: 1; }
.plan-price sup { font-size: 1rem; vertical-align: super; font-weight: 600; }
.plan-period { font-size: .8rem; color: var(--text-3); margin-bottom: 24px; }
.plan-features { list-style: none; margin-bottom: 28px; }
.plan-features li {
  padding: 8px 0; font-size: .875rem; color: var(--text-2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.plan-features li:last-child { border-bottom: none; }
.plan-features li::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; font-size: .8rem; }

/* ══════════════════════════════════════════════
   PROFILE
══════════════════════════════════════════════ */
.profile-page { max-width: 900px; margin: 0 auto; padding: 48px 20px; }
.profile-hero {
  display: flex; gap: 20px; align-items: center;
  padding-bottom: 32px; margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--white);
  box-shadow: var(--shadow); flex-shrink: 0;
}
.profile-avatar-placeholder {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-bg), var(--bg-2));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.8rem; color: var(--accent);
  flex-shrink: 0;
}
.profile-name { font-family: var(--font-display); font-size: 1.8rem; }
.profile-email { font-size: .875rem; color: var(--text-3); margin-top: 2px; }

.info-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px;
}
.info-card .card-label {
  font-size: .7rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 12px;
}
.info-card .card-value {
  font-family: var(--font-display); font-size: 2rem;
}
.info-card .card-sub { font-size: .82rem; color: var(--text-3); margin-top: 4px; }

/* ══════════════════════════════════════════════
   CONTACT
══════════════════════════════════════════════ */
.contact-page { max-width: 680px; margin: 0 auto; padding: 60px 20px; }
.contact-page h1 { margin-bottom: 8px; }
.contact-page .sub { color: var(--text-2); margin-bottom: 40px; font-weight: 300; font-size: 1rem; }

/* ══════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════ */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-2); margin-bottom: 7px; letter-spacing: .02em; }
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--white); color: var(--text);
  font-size: .9rem; font-family: inherit; outline: none;
  transition: border-color .2s;
}
.form-control:focus { border-color: var(--text); }
textarea.form-control { resize: vertical; min-height: 130px; }
select.form-control { cursor: pointer; }

/* ══════════════════════════════════════════════
   ALERTS / BADGES
══════════════════════════════════════════════ */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: .875rem; margin-bottom: 16px; border-left: 3px solid;
}
.alert-success { background: #EAF7EE; border-color: var(--success); color: #1a5e36; }
.alert-error   { background: #FEF0F0; border-color: var(--danger);  color: #7a1c14; }
.alert-info    { background: #EEF3FE; border-color: #3464b4; color: #1d3f7a; }

.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 100px;
  font-size: .72rem; font-weight: 600; letter-spacing: .02em;
}
.badge-free    { background: #EAF7EE; color: var(--success); }
.badge-basic   { background: #EEF3FE; color: #3464b4; }
.badge-premium { background: #FEF6E8; color: var(--gold); }
.badge-vip     { background: #F6EEFF; color: #8c3cb4; }
.badge-admin   { background: var(--text); color: var(--white); }

/* ══════════════════════════════════════════════
   ADMIN
══════════════════════════════════════════════ */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-sidebar {
  background: #0A0A0A; color: rgba(255,255,255,.65);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.admin-sidebar .sidebar-logo {
  padding: 20px; border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-size: 1.1rem;
  color: var(--white); margin-bottom: 8px;
}
.admin-sidebar .sidebar-logo .logo-mark { color: var(--accent); }
.admin-nav { padding: 8px; flex: 1; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: .85rem; color: rgba(255,255,255,.55);
  transition: all .2s; margin-bottom: 2px;
}
.admin-nav a:hover, .admin-nav a.active {
  background: rgba(255,255,255,.08); color: var(--white);
}
.admin-nav .nav-ico { font-size: 1rem; width: 20px; text-align: center; }
.admin-main { background: var(--bg); padding: 32px; overflow: auto; }
.admin-page-title { font-size: 1.8rem; margin-bottom: 24px; }

.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin-bottom: 28px;
}
.stat-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.stat-icon { font-size: 1.2rem; margin-bottom: 8px; }
.stat-value { font-family: var(--font-display); font-size: 1.9rem; line-height: 1; }
.stat-label { font-size: .78rem; color: var(--text-3); margin-top: 4px; }

.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-xs); }
.data-table th {
  text-align: left; padding: 11px 16px;
  font-size: .72rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-3);
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.data-table td { padding: 12px 16px; font-size: .875rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg); }

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.site-footer {
  background: var(--text); color: rgba(255,255,255,.5);
  padding: 36px 20px;
}
.footer-inner {
  max-width: 1440px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center;
}
.footer-brand { display: flex; align-items: center; gap: 7px; }
.footer-brand .logo-text { color: var(--white); font-family: var(--font-display); }
.footer-brand .logo-mark { color: var(--accent); }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; margin-left: auto; }
.footer-nav a { font-size: .82rem; transition: color .2s; }
.footer-nav a:hover { color: var(--white); }
.footer-copy { width: 100%; font-size: .75rem; opacity: .35; border-top: 1px solid rgba(255,255,255,.08); padding-top: 16px; margin-top: 4px; }

/* ══════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 500;
  align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; animation: fadeIn .2s var(--ease); }
.modal {
  background: var(--white); border-radius: var(--radius-lg);
  max-width: 460px; width: 100%; padding: 32px;
  box-shadow: var(--shadow-xl); animation: fadeUp .25s var(--ease-out);
}
.modal h3 { margin-bottom: 8px; }
.modal .modal-sub { color: var(--text-2); font-size: .9rem; margin-bottom: 24px; }

/* ══════════════════════════════════════════════
   UTILITIES
══════════════════════════════════════════════ */
.text-center { text-align: center; }
.text-muted  { color: var(--text-3); }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex  { display: flex; }
.gap-8 { gap: 8px; }
.gap-12{ gap: 12px; }
.items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }

/* ══════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn .4s var(--ease-out) forwards; }

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .img-detail-grid { grid-template-columns: 1fr; }
  .img-detail-left { position: static; }
}
@media (max-width: 768px) {
  :root { --header-h: 56px; }
  .main-nav {
    display: none; flex-direction: column; position: fixed;
    inset: var(--header-h) 0 0; background: var(--white);
    padding: 24px 20px; z-index: 199; gap: 4px;
    border-top: 1px solid var(--border); overflow-y: auto;
  }
  .main-nav.open { display: flex; animation: fadeIn .2s var(--ease); }
  .nav-link { padding: 12px 16px; font-size: 1rem; }
  .nav-btn { margin-left: 0; margin-top: 8px; text-align: center; border-radius: var(--radius); }
  .nav-toggle { display: flex; }
  .masonry { padding: 0 8px 32px; column-gap: 8px; }
  .masonry-item { margin-bottom: 8px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; }
  .auth-card { padding: 32px 24px; }
  .profile-hero { flex-direction: column; text-align: center; }
  .img-detail-wrap { padding: 20px 16px 60px; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 380px; }
}
@media (max-width: 480px) {
  .masonry { columns: 2 !important; }
  .filter-bar-scroll { gap: 4px; }
  .img-specs { grid-template-columns: 1fr; }
  h1 { font-size: 1.9rem; }
}
