/* ============================================================
   Mikael's Gallery — sober, modern, minimalist
   v1 visual identity restored + v2 features (likes, filters, status)
   ============================================================ */

/* ---------- Reset & Tokens ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-start: #ffffff;
  --bg-end: #e6ecf3;
  --text: #161628;
  --text-soft: #565f74;
  --muted: #8a93a6;
  --border: rgba(22, 22, 40, 0.08);
  --border-strong: rgba(22, 22, 40, 0.16);
  --card-solid: #ffffff;
  --accent: #161628;
  --accent-hover: #2a2a40;
  --heart: #e63946;
  --heart-bg: rgba(230, 57, 70, 0.08);
  --available: #2d8a4e;
  --sold: #b5412a;

  --shadow-sm: 0 2px 8px rgba(20, 30, 60, 0.05);
  --shadow-md: 0 8px 24px rgba(20, 30, 60, 0.08);
  --shadow-lg: 0 20px 50px rgba(20, 30, 60, 0.12);
  --radius: 12px;
  --radius-lg: 18px;
  --transition: 280ms cubic-bezier(.2,.8,.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(160deg, var(--bg-start) 0%, var(--bg-end) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 0.95rem; color: var(--text); }

:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -100px; left: 1rem; z-index: 1001;
  background: var(--text); color: #fff; padding: 0.75rem 1.25rem;
  border-radius: 8px; font-weight: 500; font-size: 0.9rem;
  transition: top 200ms ease;
}
.skip-link:focus { top: 1rem; }

/* ---------- Layout ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }
@media (max-width: 600px) { .container { padding: 0 1.25rem; } }
main { padding-bottom: 5rem; }

/* ---------- Header (glassmorphism) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem; max-width: 1280px; margin: 0 auto;
}
@media (max-width: 600px) { .header-inner { padding: 0.9rem 1.25rem; } }

.brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em;
}

.nav { display: flex; gap: 2.2rem; align-items: center; }
.nav a { font-size: 0.92rem; font-weight: 500; color: var(--text-soft); transition: color var(--transition); }
.nav a:hover, .nav a.active { color: var(--text); }

.nav-icons { display: flex; gap: 0.3rem; align-items: center; margin-left: 0.5rem; }
.icon-link {
  position: relative; display: inline-flex; align-items: center;
  gap: 0.15rem; padding: 0.4rem 0.45rem;
  font-size: 0.8rem; font-weight: 500; color: var(--text-soft);
  transition: color var(--transition);
}
.icon-link:hover { color: var(--text); }
.icon-link svg { width: 20px; height: 20px; }
.icon-link .badge { font-size: 0.72rem; font-weight: 600; }
.icon-link .badge.hidden { display: none; }

/* Mobile nav */
.nav-toggle {
  display: none; width: 38px; height: 38px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text);
  border-radius: 2px; transition: transform 200ms ease, opacity 200ms ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    flex-direction: column; gap: 0; padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
  }
  .nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav a { padding: 0.9rem 1.5rem; width: 100%; border-bottom: 1px solid var(--border); }
  .nav a:last-child { border-bottom: none; }
  .nav-icons { padding: 0.75rem 1.5rem; width: 100%; margin-left: 0; gap: 1rem; }
}

/* ---------- Hero ---------- */
.hero { padding: 4.5rem 0 2rem; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); margin-bottom: 0.5rem; }
.hero .tagline { font-size: 1.15rem; color: var(--text-soft); max-width: 500px; }

/* ---------- Filter Bar (flat tabs + native selects) ---------- */
.filter-bar { margin-bottom: 2rem; border-bottom: 1px solid var(--border); padding-bottom: 0.75rem; }

.filter-row {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}

/* Category text tabs — no pill, underline active */
.cat-tabs { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.cat-btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem; font-weight: 500;
  color: var(--text-soft);
  background: none; border: none;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.cat-btn:hover { color: var(--text); }
.cat-btn.active { color: var(--text); border-bottom-color: var(--text); }

/* Native selects for prix / medium / sort */
.filter-selects {
  display: flex; gap: 0.5rem; align-items: center;
  margin-left: auto;
}
.filter-selects select {
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem; font-weight: 500;
  background: rgba(255,255,255,0.6);
  color: var(--text); cursor: pointer;
  transition: border-color var(--transition);
}
.filter-selects select:hover { border-color: var(--border-strong); }
.filter-selects select:focus { outline: none; border-color: var(--text); }

/* Active filter tags (flat rectangles, NOT pills) */
.active-filters {
  display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center;
  min-height: 0.5rem; margin-top: 0.6rem;
}
.active-filters:empty { display: none; margin-top: 0; }
.active-label { font-size: 0.8rem; color: var(--muted); }
.active-tag {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  background: rgba(22, 22, 40, 0.05); color: var(--text);
  border-radius: 4px; font-size: 0.78rem; font-weight: 500;
}
.active-tag button { font-size: 0.9rem; line-height: 1; opacity: 0.45; transition: opacity var(--transition); }
.active-tag button:hover { opacity: 1; }

@media (max-width: 720px) {
  .filter-row { gap: 0.5rem; }
  .filter-selects { margin-left: 0; width: 100%; }
  .filter-selects select { flex: 1; min-width: 0; }
}
@media (max-width: 420px) {
  .cat-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; gap: 0; -webkit-overflow-scrolling: touch; }
  .cat-tabs::-webkit-scrollbar { display: none; }
  .cat-btn { white-space: nowrap; flex-shrink: 0; padding: 0.4rem 0.6rem; font-size: 0.82rem; }
}

/* ---------- Gallery (masonry columns) ---------- */
.gallery {
  column-count: 4; column-gap: 1.25rem;
  transition: opacity 200ms ease;
}
.gallery.fading { opacity: 0; }
@media (max-width: 1100px) { .gallery { column-count: 3; } }
@media (max-width: 720px)  { .gallery { column-count: 2; column-gap: 0.75rem; } }
@media (max-width: 420px)  { .gallery { column-count: 1; } }

.gallery-empty {
  column-span: all; text-align: center; padding: 4rem 2rem; color: var(--muted);
}

/* ---------- Card ---------- */
.card {
  break-inside: avoid;
  position: relative;
  margin-bottom: 1.25rem;
  border-radius: var(--radius); overflow: hidden;
  background: var(--card-solid);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
  opacity: 0; animation: fadeUp 500ms ease forwards;
}
@media (max-width: 720px) { .card { margin-bottom: 0.75rem; } }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.card-image { display: block; position: relative; overflow: hidden; background: #f0f2f6; }
.card-image img {
  width: 100%; height: auto; display: block;
  transition: transform 600ms cubic-bezier(.2,.8,.2,1);
}
.card:hover .card-image img { transform: scale(1.03); }

/* Heart button overlay */
.heart-btn {
  position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%; transition: all var(--transition);
}
.heart-btn svg { width: 16px; height: 16px; stroke: var(--text); fill: none; stroke-width: 2; }
.heart-btn:hover { background: #fff; transform: scale(1.12); }
.heart-btn.liked svg { fill: var(--heart); stroke: var(--heart); }
.heart-btn.liked { background: var(--heart-bg); }

/* Status dot */
.status-dot {
  position: absolute; bottom: 0.5rem; left: 0.5rem;
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.status-dot::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--available); }
.status-dot.sold::before { background: var(--sold); }

.card-body {
  display: block; padding: 0.75rem 0.85rem 0.9rem;
}
.card-title {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem; font-weight: 600; font-style: italic;
  color: var(--text); margin-bottom: 0.1rem;
}
.card-dims { display: block; font-size: 0.75rem; color: var(--muted); }
.card-price { display: block; font-size: 0.88rem; font-weight: 600; color: var(--text); margin-top: 0.2rem; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Artwork Detail ---------- */
.artwork-page {
  padding-top: 2rem;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 3.5rem; align-items: start;
}
@media (max-width: 900px) { .artwork-page { grid-template-columns: 1fr; gap: 2rem; } }

.back-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  margin-bottom: 1rem; color: var(--text-soft); font-size: 0.85rem; font-weight: 500;
  transition: color var(--transition);
}
.back-link:hover { color: var(--text); }

.artwork-media .main-image {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); background: #fff;
}
.artwork-media .main-image img { width: 100%; height: auto; }

.artwork-tags { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; min-height: 1.5rem; }

.artwork-info h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 0.4rem; }
.artwork-info .meta {
  color: var(--muted); font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1.25rem;
}
.artwork-info .description { color: var(--text-soft); margin-bottom: 1.5rem; }
.artwork-info .specs {
  list-style: none; border-top: 1px solid var(--border);
  padding-top: 1rem; margin-bottom: 1.5rem;
}
.artwork-info .specs li {
  display: flex; justify-content: space-between;
  padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-size: 0.88rem;
}
.artwork-info .specs li span:first-child {
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.76rem;
}

.price-tag {
  font-family: 'Playfair Display', serif;
  font-size: 2rem; font-weight: 600; margin-bottom: 1.25rem;
}

.artwork-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.artwork-actions .heart-btn-lg {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 50%;
  transition: all var(--transition);
}
.artwork-actions .heart-btn-lg svg { width: 22px; height: 22px; stroke: var(--text); fill: none; stroke-width: 2; }
.artwork-actions .heart-btn-lg:hover { border-color: var(--heart); }
.artwork-actions .heart-btn-lg.liked { background: var(--heart-bg); border-color: var(--heart); }
.artwork-actions .heart-btn-lg.liked svg { fill: var(--heart); stroke: var(--heart); }

/* Inline 3D viewer (replaces in-situ) */
.viewer-inline {
  margin-top: 1rem; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4/3; background: #f0ebe3; box-shadow: var(--shadow-md);
}
.viewer-inline canvas { display: block; width: 100%; height: 100%; }
.viewer-loading {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: var(--muted); font-size: 0.88rem;
}
.viewer-hint-inline {
  font-size: 0.72rem; color: var(--muted); text-align: center;
  margin-top: 0.5rem; text-transform: uppercase; letter-spacing: 0.1em;
}

.similar { margin-top: 4rem; }
.similar h2 { font-size: 1.5rem; margin-bottom: 1.25rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.9rem 1.7rem; background: var(--accent); color: #fff;
  border-radius: 999px; font-weight: 500; font-size: 0.92rem;
  transition: transform var(--transition), background var(--transition);
}
.btn:hover { transform: translateY(-2px); background: var(--accent-hover); }
.btn-secondary { background: transparent; border: 1px solid var(--text); color: var(--text); }
.btn-secondary:hover { background: var(--text); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }

/* ---------- Cart ---------- */
.cart-page { padding-top: 3rem; max-width: 880px; margin: 0 auto; }
.cart-page h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 2rem; }

.cart-list { display: flex; flex-direction: column; gap: 1rem; }
.cart-item {
  display: grid; grid-template-columns: 100px 1fr auto auto;
  gap: 1.25rem; align-items: center;
  background: var(--card-solid); padding: 1rem;
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
@media (max-width: 600px) {
  .cart-item {
    grid-template-columns: 80px 1fr;
    grid-template-areas: "img info" "img price" "remove remove";
    gap: 0.5rem 1rem;
  }
  .cart-item > a:first-child { grid-area: img; }
  .cart-item > div:nth-child(2) { grid-area: info; }
  .cart-item .price { grid-area: price; justify-self: start; }
  .cart-item .remove-btn { grid-area: remove; justify-self: start; padding-left: 0; }
  .cart-item img { width: 80px; height: 80px; }
}
.cart-item img { width: 100px; height: 100px; object-fit: cover; border-radius: 8px; }
.cart-item h2 { font-family: 'Inter', sans-serif; font-size: 0.95rem; font-weight: 600; letter-spacing: 0; }
.cart-item h2 a:hover { text-decoration: underline; }
.cart-item .meta { color: var(--muted); font-size: 0.82rem; }
.cart-item .price { font-weight: 600; }
.remove-btn { color: var(--muted); font-size: 0.82rem; padding: 0.4rem 0.6rem; transition: color var(--transition); }
.remove-btn:hover { color: var(--sold); }

.cart-summary {
  margin-top: 2rem; padding: 1.5rem; background: var(--card-solid);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 0.6rem; color: var(--text-soft); }
.cart-summary .total {
  font-size: 1.3rem; font-weight: 600; color: var(--text);
  border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 0.75rem;
}
.cart-summary .btn { width: 100%; margin-top: 1.25rem; }
.cart-note { text-align: center; margin-top: 0.75rem; font-size: 0.75rem; color: var(--muted); }
.payment-methods {
  display: flex; gap: 0.6rem; justify-content: center; align-items: center;
  margin-top: 0.6rem; font-size: 0.78rem; color: var(--muted);
}
.payment-methods span { display: inline-flex; align-items: center; gap: 0.3rem; }

.empty-state { text-align: center; padding: 4rem 2rem; color: var(--muted); }
.empty-state h2 { font-size: 1.4rem; margin-bottom: 0.5rem; color: var(--text); }

/* ---------- Success ---------- */
.success-page { max-width: 560px; margin: 6rem auto; text-align: center; padding: 3rem 2rem; }
.success-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 84px; height: 84px; margin: 0 auto 2rem; border-radius: 50%;
  background: var(--text); color: #fff;
  animation: popIn 600ms cubic-bezier(.34,1.56,.64,1);
}
.success-icon svg { width: 42px; height: 42px; }
@keyframes popIn { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.success-page h1 { font-size: 2.2rem; margin-bottom: 1rem; }
.success-page p { color: var(--text-soft); margin-bottom: 2rem; }

/* ---------- About ---------- */
.about-page { padding-top: 4rem; max-width: 900px; margin: 0 auto; }
.about-page h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 2rem; }
.about-grid { display: grid; grid-template-columns: 280px 1fr; gap: 3rem; align-items: start; }
@media (max-width: 720px) { .about-grid { grid-template-columns: 1fr; } }
.about-photo {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #d8dde6, #b8c1d0);
  box-shadow: var(--shadow-md); overflow: hidden;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text p { color: var(--text-soft); margin-bottom: 1.25rem; }
.timeline { margin-top: 2rem; border-left: 2px solid var(--border); padding-left: 1.5rem; }
.timeline-heading { font-size: 1.4rem; margin: 2.5rem 0 1.5rem; }
.timeline-item { margin-bottom: 1.75rem; position: relative; }
.timeline-item::before {
  content: ''; position: absolute; left: -1.65rem; top: 0.4rem;
  width: 10px; height: 10px; background: var(--text); border-radius: 50%;
}
.timeline-item h3 { font-family: 'Inter', sans-serif; font-size: 0.95rem; font-weight: 600; letter-spacing: 0; }
.timeline-item .year { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.25rem; }
.timeline-item p { color: var(--text-soft); font-size: 0.88rem; }

/* ---------- Contact ---------- */
.contact-page { padding-top: 4rem; max-width: 900px; margin: 0 auto; }
.contact-page h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 1rem; }
.contact-page > p { color: var(--text-soft); margin-bottom: 2.5rem; }
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; }
@media (max-width: 720px) { .contact-grid { grid-template-columns: 1fr; } }
.form-row { margin-bottom: 1rem; }
.form-row label {
  display: block; font-size: 0.76rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin-bottom: 0.4rem;
}
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 0.8rem 0.9rem;
  background: rgba(255,255,255,0.7); border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: none; border-color: var(--text); background: #fff;
  box-shadow: 0 0 0 4px rgba(22, 22, 40, 0.04);
}
.form-row textarea { min-height: 120px; resize: vertical; }
.contact-info { background: var(--card-solid); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.contact-info h2 { font-family: 'Inter', sans-serif; font-size: 0.95rem; font-weight: 600; letter-spacing: 0; margin-bottom: 0.75rem; }
.contact-info h2 + h2 { margin-top: 1.5rem; }
.contact-info p { color: var(--text-soft); font-size: 0.88rem; margin-bottom: 0.5rem; }
.contact-info a { color: var(--text); }

/* ---------- Admin ---------- */
.admin-page { padding-top: 3rem; }
.admin-login {
  max-width: 400px; margin: 6rem auto; padding: 2.5rem;
  background: var(--card-solid); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); text-align: center;
}
.admin-login h1 { font-size: 1.6rem; margin-bottom: 1.5rem; }
.admin-login input {
  width: 100%; padding: 0.8rem 0.9rem;
  border: 1px solid var(--border); border-radius: 10px; margin-bottom: 1rem;
}
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.admin-header h1 { font-size: 2rem; }
.admin-header-actions { display: flex; gap: 0.5rem; }
.admin-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem; margin-bottom: 2rem;
}
.stat-card { background: var(--card-solid); padding: 1.25rem; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stat-card .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.stat-card .value { font-family: 'Playfair Display', serif; font-size: 1.8rem; margin-top: 0.3rem; }
/* Admin table — standard table on desktop, stacked cards on mobile */
.table-wrap { border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.admin-table {
  width: 100%;
  background: var(--card-solid);
  border-collapse: collapse;
}
.admin-table th, .admin-table td { padding: 0.9rem; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.admin-table th { background: #f6f8fb; font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.admin-actions { display: flex; gap: 0.4rem; }
.icon-btn { padding: 0.35rem 0.65rem; background: #f1f4f9; border-radius: 6px; font-size: 0.78rem; transition: background var(--transition); }
.icon-btn:hover { background: #e3e8f0; }
.icon-btn.danger { color: var(--sold); }

/* On mobile: each <tr> becomes a card with CSS grid layout */
@media (max-width: 720px) {
  .table-wrap { box-shadow: none; }
  .admin-table { display: block; background: transparent; }
  .admin-table thead { display: none; }
  .admin-table tbody { display: flex; flex-direction: column; gap: 0.6rem; }
  .admin-table tr {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 0.15rem 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-solid);
    box-shadow: var(--shadow-sm);
    align-items: center;
  }
  .admin-table td { padding: 0; border: none; font-size: 0.85rem; white-space: normal; }
  /* Row 1-2: image left, title + category right, price + status far right */
  .admin-table td:nth-child(1) { grid-column: 1; grid-row: 1 / 3; }
  .admin-table td:nth-child(2) { grid-column: 2; grid-row: 1; font-weight: 600; }
  .admin-table td:nth-child(3) { grid-column: 2; grid-row: 2; color: var(--muted); font-size: 0.78rem; }
  .admin-table td:nth-child(4) { grid-column: 3; grid-row: 1; font-weight: 600; text-align: right; font-size: 0.85rem; }
  .admin-table td:nth-child(5) { grid-column: 3; grid-row: 2; text-align: right; font-size: 0.78rem; }
  /* Sales: hide on mobile — not critical at a glance */
  .admin-table td:nth-child(6) { display: none; }
  /* Actions: full-width bottom row */
  .admin-table td:nth-child(7) {
    grid-column: 1 / -1;
    margin-top: 0.35rem; padding-top: 0.5rem;
    border-top: 1px solid var(--border);
  }
}

.admin-section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; flex-wrap: wrap; gap: 0.75rem; }
.admin-section-title h2 { font-size: 1.3rem; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(20,30,60,0.4); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 2rem; }
.modal-backdrop.hidden { display: none; }
.modal { background: #fff; border-radius: var(--radius-lg); padding: 2rem; max-width: 600px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: fadeUp 280ms ease; }
.modal h2 { font-size: 1.3rem; margin-bottom: 1.5rem; }
.modal .form-row { margin-bottom: 0.9rem; }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; }

@media (max-width: 600px) {
  .admin-header { flex-direction: column; align-items: flex-start; }
  .admin-header h1 { font-size: 1.5rem; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .stat-card .value { font-size: 1.4rem; }
  .modal-backdrop { padding: 0.5rem; align-items: flex-end; }
  .modal {
    padding: 1.25rem; border-radius: var(--radius) var(--radius) 0 0;
    max-height: 92vh;
  }
  .modal h2 { font-size: 1.1rem; margin-bottom: 1rem; }
  .modal .form-row input,
  .modal .form-row textarea,
  .modal .form-row select {
    font-size: 16px; /* prevents iOS zoom on focus */
  }
  .modal .form-row input[type="file"] { font-size: 0.82rem; }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn { width: 100%; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff;
  padding: 0.8rem 1.4rem; border-radius: 999px;
  font-size: 0.88rem; box-shadow: var(--shadow-lg);
  opacity: 0; transition: all 260ms ease; pointer-events: none; z-index: 2000;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 3rem 0 1.5rem; margin-top: 4rem; background: rgba(255,255,255,0.4); }
.footer-inner { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5rem; margin-bottom: 2.5rem; }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 480px) { .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; } }
.footer-col h4 { font-family: 'Inter', sans-serif; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.75rem; font-weight: 600; }
.footer-col a { display: block; color: var(--text-soft); font-size: 0.88rem; padding: 0.2rem 0; transition: color var(--transition); }
.footer-col a:hover { color: var(--text); }
.footer-brand { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 600; margin-bottom: 0.4rem; }
.footer-tag { color: var(--text-soft); font-size: 0.88rem; }
.footer-copy { border-top: 1px solid var(--border); padding-top: 1.25rem; text-align: center; color: var(--muted); font-size: 0.78rem; }
