/* Beadology store styles */
:root {
  --bg: #161616;
  --surface: #202020;
  --line: rgba(242, 239, 233, 0.16);
  --text: #f2efe9;
  --muted: #a8a49c;
  --gold: #c9a45c;
  --display: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1; margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--text); color: var(--bg); padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 0.5rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 4.75rem; padding: 0 1.25rem; background: rgba(22, 22, 22, 0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.logo { width: 3.25rem; height: 3.25rem; border-radius: 50%; object-fit: cover; }
.main-nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.main-nav a, .site-footer nav a { color: var(--muted); transition: color 0.2s; }
.main-nav a:hover, .site-footer nav a:hover { color: var(--text); }
.cart-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border: 1px solid var(--line); border-radius: 999px; transition: border-color 0.2s; }
.cart-btn:hover { border-color: var(--gold); }
.cart-count { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 0.3rem; border-radius: 999px; background: var(--gold); color: var(--bg); font-size: 0.8rem; font-weight: 500; }

/* Buttons */
.btn { display: inline-block; padding: 0.8rem 1.75rem; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 500; text-align: center; transition: background 0.2s; }
.btn:hover { background: var(--gold); }
.btn:disabled { opacity: 0.5; cursor: wait; }
.btn-full { width: 100%; }

.banner { padding: 1rem 1.25rem; background: var(--gold); color: var(--bg); text-align: center; font-weight: 500; }

/* Hero */
.hero { display: grid; gap: 2rem; align-items: center; max-width: 80rem; margin: 0 auto; padding: 2.5rem 1.25rem 1rem; }
.hero-text h1 { font-size: clamp(3.5rem, 12vw, 7.5rem); }
.hero-text p { margin: 1rem 0 2rem; font-size: 1.25rem; color: var(--muted); }
.hero-img { width: 100%; height: auto; border-radius: 4px; }

/* Sections */
.section { max-width: 80rem; margin: 0 auto; padding: 4.5rem 1.25rem; }
.section h2 { font-size: clamp(2.25rem, 6vw, 3.5rem); margin-bottom: 2rem; }

/* Filters */
.filters { display: grid; gap: 0.75rem; margin-bottom: 2.5rem; }
.filter-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { padding: 0.4rem 1rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 0.95rem; transition: all 0.2s; }
.chip:hover { color: var(--text); border-color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
.card { display: flex; flex-direction: column; }
.card-img { display: block; aspect-ratio: 4 / 5; background: var(--surface); overflow: hidden; border-radius: 4px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-top { display: flex; justify-content: space-between; gap: 0.75rem; margin-top: 0.9rem; }
.card h3 { margin: 0; font: 500 1rem/1.35 var(--sans); }
.card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.price { color: var(--gold); font-weight: 500; white-space: nowrap; }
.tags { margin: 0.15rem 0 0.9rem; font-size: 0.875rem; color: var(--muted); }
.card .btn { margin-top: auto; padding: 0.6rem 1rem; background: transparent; color: var(--text); border: 1px solid var(--line); font-size: 0.95rem; }
.card .btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.card .btn:disabled { opacity: 0.45; cursor: not-allowed; background: transparent; color: var(--muted); }
.empty { color: var(--muted); }

/* Product page */
.pv { max-width: 80rem; margin: 0 auto; padding: 1.5rem 1.25rem 4.5rem; }
.back { display: inline-block; margin-bottom: 1.25rem; color: var(--muted); transition: color 0.2s; }
.back:hover { color: var(--text); }
.pv-grid { display: grid; gap: 1.75rem; }
.pv-photo { position: relative; display: block; width: 100%; padding: 0; border-radius: 4px; overflow: hidden; background: var(--surface); cursor: zoom-in; }
.pv-photo img { width: 100%; height: auto; }
.pv-zoom { position: absolute; right: 0.75rem; bottom: 0.75rem; padding: 0.3rem 0.85rem; border-radius: 999px; background: rgba(22, 22, 22, 0.82); font-size: 0.85rem; }
.pv-info h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); }
.pv-price { margin: 0.75rem 0 1.25rem; font-size: 1.5rem; color: var(--gold); font-weight: 500; }
.pv-desc { max-width: 34rem; margin: 0 0 1.25rem; color: var(--muted); font-size: 1.05rem; }
.pv-details { max-width: 34rem; margin: 0 0 1.25rem; padding-left: 1.1rem; color: var(--muted); }
.pv-info .tags { margin: 0 0 1.5rem; }
.pv-info .tags a { text-decoration: underline; text-underline-offset: 3px; }
.pv-info .tags a:hover { color: var(--text); }
.pv-add { max-width: 22rem; }
.pv-info .note { margin: 0.6rem 0 0; }
.pv-more { font-size: clamp(1.75rem, 5vw, 2.5rem); margin: 4rem 0 1.5rem; }

/* Photo zoom */
.lightbox { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: rgba(0, 0, 0, 0.94); }
.lightbox[hidden] { display: none; }
.lb-close { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2; background: rgba(32, 32, 32, 0.9); }
.lb-scroll { flex: 1; min-height: 0; display: grid; place-items: center; overflow: auto; touch-action: pan-x pan-y pinch-zoom; }
.lb-scroll img { max-width: 100%; max-height: calc(100dvh - 3.5rem); object-fit: contain; cursor: zoom-in; }
.lb-scroll.zoomed { display: block; }
.lb-scroll.zoomed img { max-width: none; max-height: none; cursor: zoom-out; }
.lb-hint { margin: 0; padding: 0.75rem; text-align: center; font-size: 0.875rem; color: var(--muted); }

/* Policies */
.policies { border-top: 1px solid var(--line); }
.policies dl { display: grid; gap: 1.5rem; margin: 0; max-width: 60rem; }
.policies dt { font: 500 1.5rem/1.2 var(--display); margin-bottom: 0.25rem; }
.policies dd { margin: 0; color: var(--muted); }

/* Footer */
.site-footer { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; padding: 3rem 1.25rem; border-top: 1px solid var(--line); text-align: center; }
.site-footer p { margin: 0; font-size: 0.9rem; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; font-size: 0.95rem; }

/* Cart drawer */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.6); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; display: flex; flex-direction: column; width: min(26rem, 100%); background: var(--surface); border-left: 1px solid var(--line); transform: translateX(100%); transition: transform 0.3s ease; }
.drawer.open { transform: none; }
.drawer[hidden], .scrim[hidden] { display: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 2rem; margin: 0; }
.icon-btn { width: 2.5rem; height: 2.5rem; border-radius: 50%; font-size: 1.1rem; }
.icon-btn:hover { background: var(--line); }
.cart-list { flex: 1; margin: 0; padding: 0 1.25rem; list-style: none; overflow-y: auto; }
.cart-item { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0.9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 4.5rem; height: 5.6rem; object-fit: cover; border-radius: 3px; }
.cart-item h3 { margin: 0; font: 500 0.95rem/1.35 var(--sans); }
.cart-item .price { display: block; font-size: 0.95rem; }
.qty { display: inline-flex; align-items: center; margin-top: 0.5rem; border: 1px solid var(--line); border-radius: 999px; }
.qty button { width: 2rem; height: 2rem; border-radius: 50%; }
.qty button:hover { background: var(--line); }
.qty button:disabled { opacity: 0.35; cursor: not-allowed; background: none; }
.qty span { min-width: 1.5rem; text-align: center; }
.remove { margin-left: 0.75rem; font-size: 0.85rem; color: var(--muted); text-decoration: underline; }
.remove:hover { color: var(--text); }
#cartEmpty { padding: 1.25rem; margin: 0; }
.drawer-foot { padding: 1.25rem; border-top: 1px solid var(--line); }
.subtotal { display: flex; justify-content: space-between; font-size: 1.1rem; }
.note { margin: 0.25rem 0 1rem; font-size: 0.875rem; color: var(--muted); }
.error { margin: 0.75rem 0 0; color: #ff8f8f; font-size: 0.9rem; }

/* Larger screens */
@media (min-width: 720px) {
  .pv { padding: 2rem 2.5rem 6rem; }
  .pv-grid { grid-template-columns: 1.1fr 1fr; gap: 3.5rem; align-items: start; }
  .pv-photo { position: sticky; top: 6rem; }
  .site-header { padding: 0 2.5rem; }
  .hero { grid-template-columns: 1fr 1.3fr; gap: 3rem; padding: 4rem 2.5rem 2rem; }
  .section { padding: 6rem 2.5rem; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 3rem 1.5rem; }
  .filters { grid-template-columns: auto 1fr; gap: 0.75rem 2.5rem; }
  .policies dl { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .site-footer { flex-direction: row; justify-content: space-between; padding: 3rem 2.5rem; }
}
@media (max-width: 560px) { .main-nav a:nth-child(n+3) { display: none; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
