:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --accent: #2563eb;
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(to bottom, #ffffff 0%, var(--bg) 60%, #ffffff 100%);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  object-fit: contain;
  padding: 2px;
  border: 1px solid rgba(15,23,42,0.10);
  background: #ffffff;
}

.header-links {
  display: flex;
  gap: 18px;
  align-items: center;
  position: relative;
}

.abbie-nav {
  position: static;
}

.abbie-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(15,23,42,0.12);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.abbie-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.96);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  z-index: 120;
}

.abbie-nav.open .abbie-menu {
  display: flex;
}

.abbie-nav:focus-within .abbie-menu {
  display: flex;
}

.abbie-menu a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.12);
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.abbie-menu a:hover,
.abbie-menu a:focus-visible {
  border-color: rgba(15,23,42,0.18);
  background: rgba(15,23,42,0.04);
}

.abbie-menu a[aria-current="page"] {
  border-color: rgba(37,99,235,0.35);
  background: rgba(37,99,235,0.10);
  color: var(--accent);
  font-weight: 600;
}

.kv-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.12);
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.btn {
  border: none;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 11px 18px;
  min-height: 44px;
  cursor: pointer;
}

.btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.hero {
  padding: 34px 0 14px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.05;
}

.hero p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
}

.hero-secondary-btn {
  display: inline-flex;
  margin-top: 14px;
}

.art-hero {
  padding: 22px 0 32px;
}

.art-hero p {
  max-width: 760px;
  line-height: 1.5;
}

.art-hero .section-kicker {
  font-size: 10px;
  margin-bottom: 2px;
  margin-left: 6px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.hero-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-actions .btn.hero-primary-soft {
  background: rgba(37,99,235,0.14);
  color: var(--accent);
  border: 1px solid rgba(37,99,235,0.22);
}

.hero-sub-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

.art-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  justify-items: stretch;
  gap: 16px;
  margin: 16px 0 84px;
}

.art-tile {
  margin: 0;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,0.06);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.art-tile img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
}

.art-tile figcaption {
  padding: 10px 12px 12px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

@media (min-width: 1025px) {
  .art-showcase > .art-tile:nth-child(5):last-child {
    grid-column: 2;
  }
}

.legacy-gallery {
  margin: -28px 0 38px;
}

.legacy-gallery h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.02em;
}

.legacy-pricing {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.legacy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.legacy-card {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,0.07);
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.legacy-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15,23,42,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox img {
  max-width: min(100vw, 1400px);
  max-height: 100vh;
  width: auto;
  height: auto;
  border-radius: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.legacy-card figcaption {
  padding: 10px 12px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 72px;
}

.entry-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.1);
  color: var(--text);
  background: #ffffff;
  font-size: 14px;
  font-weight: 500;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  margin: 26px 0 80px;
}

.shop-card,
.cart-card,
.panel {
  background: var(--card);
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.shop-card { padding: 20px; }
.cart-card { padding: 18px; position: sticky; top: 94px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.commission-inline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 18px;
}

.shop-card > .section-kicker,
.cart-card > .section-kicker {
  margin-bottom: 12px;
}

.cart-card .cart-title {
  margin-bottom: 18px;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid rgba(15,23,42,0.12);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
}

.toolbar select { width: auto; min-width: 160px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.product {
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.product-image {
  aspect-ratio: 4/3;
  background: #e2e8f0;
  display: block;
  width: 100%;
  object-fit: cover;
}

.product-body { padding: 12px; }
.product-title { margin: 0 0 4px; font-size: 16px; }
.product-meta { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.product-meta.has-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
  text-decoration: underline dotted rgba(71,85,105,0.55);
  text-underline-offset: 2px;
}

.product-meta.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  max-width: 260px;
  width: max-content;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.10);
  background: #ffffff;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.10);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 20;
}

.product-meta.has-tooltip:hover::after,
.product-meta.has-tooltip:focus-visible::after,
.product-meta.has-tooltip.show-tooltip::after {
  opacity: 1;
  transform: translateY(0);
}

.product-price { margin: 0 0 10px; font-weight: 700; }

.row { display: flex; gap: 8px; }
.row > * { flex: 1; }

.cart-title {
  margin: 0 0 14px;
  font-size: 18px;
}

.cart-items {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.cart-item {
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 12px;
  padding: 10px;
}

.cart-item-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.cart-item input[type="number"] {
  margin-top: 10px;
}

.cart-item-top .btn.ghost {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 12px;
  min-width: 108px;
}

.muted { color: var(--muted); font-size: 13px; }

.cart-totals {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 12px;
  display: grid;
  gap: 6px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.total-row.strong {
  font-size: 17px;
  font-weight: 700;
}

.section {
  margin: 26px 0 70px;
}

.section h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.section p {
  margin: 0 0 18px;
  color: var(--muted);
}

.section-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 600;
}

.about-panel {
  padding: 24px;
  margin: 18px 0 42px;
}

.featured-clip-panel {
  padding: 22px;
  margin: 8px 0 24px;
}

.featured-clip-panel h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.featured-clip-embed {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
}

.featured-clip-caption {
  margin: 10px 2px 0;
  font-size: 14px;
  color: var(--muted);
}

.about-panel h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.about-legacy-image {
  width: 100%;
  max-width: 520px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,0.08);
  margin: 10px 0 16px;
  display: block;
}

.about-panel p:last-child {
  margin-bottom: 0;
}

.clips-section {
  margin-top: 0;
  margin-bottom: 90px;
}

.clips-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.clip-card {
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 18px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.clip-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  background: #e2e8f0;
}

.clip-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.clip-static {
  display: grid;
  grid-template-rows: 1fr auto;
  height: 100%;
}

.clip-static img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clip-static img.clip-image-lower-crop {
  object-position: center 72%;
}

.clip-static-note {
  margin: 0;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid rgba(15,23,42,0.06);
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}

.form-grid .full { grid-column: 1 / -1; }

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 42px;
  color: var(--muted);
}

.note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.cart-card #checkout-btn {
  margin-top: 14px;
  margin-bottom: 16px;
}

.cart-card .note {
  margin-top: 16px;
}

.cart-card label.muted {
  display: block;
  margin-bottom: 8px;
}

@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
  .cart-card { position: static; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .header-inner {
    height: auto;
    padding: 10px 0;
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .logo {
    font-size: 16px;
    width: 100%;
  }

  .logo-mark {
    width: 30px;
    height: 30px;
  }

  .header-links {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 0 8px;
    position: relative;
  }

  .header-links .kv-home-link {
    flex: 1;
    justify-content: flex-start;
  }

  .abbie-menu {
    left: 0;
    right: 0;
    min-width: 0;
  }

  .abbie-menu a {
    font-size: 15px;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .art-showcase {
    grid-template-columns: 1fr;
  }

  .legacy-grid {
    grid-template-columns: 1fr;
  }

  .entry-links {
    margin-top: 2px;
    margin-bottom: 58px;
  }

  .entry-link {
    width: 100%;
  }

  .grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .clips-grid { grid-template-columns: 1fr; }

  .featured-clip-panel {
    padding: 16px;
  }
}

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

.header .abbie-menu-toggle {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-size: 14px;
  font-weight: 600;
  padding: 0 12px;
  width: auto;
  min-width: 58px;
}
