/* ══════════════════════════════════════════
   Agnieszka Elliott Fine Art — Shared Styles
   ══════════════════════════════════════════ */

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

/* ── IMAGE PROTECTION ── */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ── SAVED THEME: Dark Gallery (original) ──────────
   --bg:        #0c0b09;
   --bg2:       #131210;
   --bg3:       #1a1815;
   --border:    rgba(255,255,255,0.08);
   --gold:      #c9a96e;
   --gold-dim:  #8a6f42;
   --cream:     #f0e8d8;
   --text:      #d4cfc5;
   --text-dim:  #7a7570;
   ────────────────────────────────────────────── */

:root {
  --bg:        #0c0b09;
  --bg2:       #131210;
  --bg3:       #1a1815;
  --border:    rgba(255,255,255,0.08);
  --gold:      #c9a96e;
  --gold-dim:  #8a6f42;
  --cream:     #f0e8d8;
  --text:      #d4cfc5;
  --text-dim:  #7a7570;
  --nav-h:     240px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: rgba(12,11,9,0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-logo img {
  height: 230px;
  padding-top: 16px;
  width: auto;
  opacity: 0.9;
  transition: opacity 0.2s;
}
.nav-logo:hover img { opacity: 1; }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active { color: var(--gold); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 4px;
}

/* ── PAGE HEADER ── */
.page-header {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 60px;
  padding-left: 80px;
  padding-right: 80px;
  background: var(--bg);
}

.page-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 16px;
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.12;
}

.page-title em { font-style: italic; color: var(--gold); }

.page-divider {
  width: 48px;
  height: 1px;
  background: var(--gold-dim);
  margin-top: 24px;
}

/* ── SECTION ── */
section, .section {
  padding: 80px;
}

.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 14px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 2.5vw, 40px);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.15;
  margin-bottom: 20px;
}

.section-divider {
  width: 40px;
  height: 1px;
  background: var(--gold-dim);
  margin-bottom: 48px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 32px;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}

.btn-outline {
  color: var(--cream);
  border: 1px solid var(--gold-dim);
  background: transparent;
}
.btn-outline:hover { background: var(--gold); border-color: var(--gold); color: var(--bg); }

.btn-filled {
  background: var(--gold);
  color: var(--bg);
  border: 1px solid var(--gold);
}
.btn-filled:hover { background: var(--cream); border-color: var(--cream); }

.btn-ghost {
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ── ARTWORK GRID ── */
.artwork-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2px;
}

.artwork-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  background: var(--bg3);
}

.artwork-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.8);
  transition: filter 0.4s, transform 0.5s;
}

.artwork-card:hover img {
  filter: brightness(0.4);
  transform: scale(1.04);
}

.artwork-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.4s;
  text-align: center;
}

.artwork-card:hover .artwork-card-overlay { opacity: 1; }

.artwork-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 8px;
  line-height: 1.3;
}

.artwork-card-meta {
  font-family: Georgia, serif;
  font-size: 13px;
  font-style: italic;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.artwork-card-price {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 12px;
}

.artwork-card-status {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid;
}
.status-available { border-color: var(--gold-dim); color: var(--gold); }
.status-sold { border-color: var(--text-dim); color: var(--text-dim); }

.artwork-card:has(.status-sold)::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  width: 10px;
  height: 10px;
  background: #c0392b;
  border-radius: 50%;
  z-index: 10;
}
.status-hold { border-color: #8a7542; color: #c9a96e; opacity: 0.7; }

.artwork-card-name-tag {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  font-style: italic;
  color: rgba(240,232,216,0.65);
  transition: opacity 0.3s;
}
.artwork-card:hover .artwork-card-name-tag { opacity: 0; }

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8,7,6,0.96);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox-inner {
  display: flex;
  gap: 40px;
  max-width: 1100px;
  width: 100%;
  align-items: flex-start;
}
.lightbox-img-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}
.lightbox-info {
  width: 260px;
  flex-shrink: 0;
  padding-top: 8px;
}
.lightbox-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 400;
  color: var(--cream);
  line-height: 1.2;
  margin-bottom: 16px;
}
.lightbox-meta {
  font-family: Georgia, serif;
  font-size: 15px;
  font-style: italic;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.lightbox-price {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 300;
  color: var(--gold);
  letter-spacing: 0.05em;
  margin: 16px 0;
}
.lightbox-desc {
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-dim);
  margin-top: 16px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.lightbox-desc::-webkit-scrollbar { width: 3px; }
.lightbox-desc::-webkit-scrollbar-track { background: transparent; }
.lightbox-desc::-webkit-scrollbar-thumb { background: var(--gold-dim); }
.lightbox-close {
  position: fixed;
  top: 24px; right: 32px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  cursor: pointer;
  background: none;
  border: none;
  text-transform: uppercase;
  transition: color 0.2s;
}
.lightbox-close:hover { color: var(--cream); }

/* ── FOOTER ── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 40px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  height: 220px;
  width: auto;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.footer-logo:hover { opacity: 1; }

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold); }

.footer-copy {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 300;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ── FADE ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible { opacity: 1; transform: none; }

/* ── CART TOGGLE (in nav) ── */
#cart-toggle {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 6px 4px;
  transition: color 0.2s;
  position: relative;
  margin-left: 20px;
  flex-shrink: 0;
}
#cart-toggle:hover { color: var(--gold); }
#cart-toggle svg { display: block; }

.cart-count {
  position: absolute;
  top: -2px;
  right: -9px;
  background: var(--gold);
  color: var(--bg);
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 400;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

/* ── CART DRAWER ── */
#cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
}
#cart-drawer.open { display: block; }

#cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8,7,6,0.72);
  backdrop-filter: blur(4px);
}

.cart-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 380px;
  max-width: 100vw;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(.4,0,.2,1);
}
#cart-drawer.open .cart-panel { transform: none; }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cart-heading {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.06em;
}
.cart-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  padding: 4px 6px;
  letter-spacing: 0.1em;
  transition: color 0.2s;
}
.cart-close:hover { color: var(--cream); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
}
.cart-items::-webkit-scrollbar { width: 3px; }
.cart-items::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 2px; }

.cart-empty {
  font-family: Georgia, serif;
  font-style: italic;
  color: var(--text-dim);
  font-size: 16px;
  text-align: center;
  margin-top: 48px;
}

.cart-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:first-child { padding-top: 0; }
.cart-item:last-child { border-bottom: none; }

.cart-item-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg3);
}
.cart-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cart-item-title {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  color: var(--cream);
  line-height: 1.3;
}
.cart-item-meta {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: var(--text-dim);
}
.cart-item-price {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: var(--gold);
  letter-spacing: 0.05em;
  margin-top: 5px;
}
.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 11px;
  padding: 4px 2px;
  flex-shrink: 0;
  transition: color 0.2s;
}
.cart-item-remove:hover { color: var(--cream); }

.cart-footer {
  padding: 20px 28px 32px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.cart-total span {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.cart-total strong {
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 300;
  color: var(--cream);
  letter-spacing: 0.05em;
}
.cart-note {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 12px;
  line-height: 1.6;
}

body.cart-open { overflow: hidden; }

/* ── MOBILE ── */
@media (max-width: 900px) {
  :root { --nav-h: 72px; }
  nav { padding: 0 20px; }
  .nav-logo img { height: 44px; padding-top: 0; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(12,11,9,0.98);
    border-bottom: 1px solid var(--border);
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  nav.nav-open .nav-links { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    width: 100%;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
  }
  .page-header, section, .section { padding: 60px 24px; }
  .page-header { padding-top: calc(var(--nav-h) + 48px); }
  footer { padding: 32px 24px; }
  .lightbox { align-items: flex-start; overflow-y: auto; padding: 24px 16px 40px; }
  .lightbox-inner { flex-direction: column; }
  .lightbox-info { width: 100%; }
  .lightbox-img-wrap img { max-height: 60vh; }
  .artwork-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
