@font-face { 
  font-family: "IM Fell English";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/IMFellEnglish.woff2") format("woff2");
}

:root {
  --bg: #1a120c;
  --panel: #23170f;
  --panel-hover: #2d1f14;
  --text: #f4ecd8;
  --muted: #c9ba9a;
  --accent: #d4af37;
  --accent-dark: #b79226;
  --border: #4c3723;
  /* Home fixed header: hero only; tagline bar lives in main and scrolls with content */
  --home-hero-min-h: clamp(320px, 55vh, 520px);
  --home-below-bar-gap: 2rem;
}

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

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(180deg, #1a120c 0%, #120c08 100%);
  color: var(--text);
  line-height: 1.5;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header {
  padding: 1rem 0 2rem;
}

.site-header--home {
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 0;
  width: 100%;
}

.hero-banner {
  position: relative;
  min-height: var(--home-hero-min-h);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  background-color: #120c08;
}

.site-header--home .hero-banner {
  border-top: none;
  border-radius: 0;
}

.hero-banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  position: absolute;
  inset: 0;
}

.top-bar {
  background: #3d3225;
  padding: 0.85rem 0;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0;
}

/* Tagline bar in main: full width, sits under fixed hero, scrolls with page */
.main-scrolls-over-header > .top-bar--in-main {
  margin-bottom: var(--home-below-bar-gap);
}

.top-bar-text {
  margin: 0;
  color: #e8e0d0;
  text-align: center;
  font-family: "IM Fell English", Georgia, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.intro-slideshow-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.25rem;
  margin: 2rem 0 2rem;
}

.intro-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.intro-box p {
  margin: 0 0 1rem 0;
  color: var(--muted);
  line-height: 1.6;
}

.intro-box p:last-child {
  margin-bottom: 0;
}

.slideshow-box {
  min-width: 0;
}

.slideshow {
  position: relative;
  background: #120c08;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.slideshow-track {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  /* Let taps reach .slideshow-edge siblings; slides were winning hit-testing in some browsers */
  pointer-events: none;
}

.slideshow .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.slideshow .slide.active {
  opacity: 1;
  z-index: 1;
}

.slideshow .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
}

.slideshow-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(2.25rem, 20%, 5rem);
  z-index: 5;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease;
}

.slideshow-edge--prev {
  left: 0;
  border-radius: 12px 0 0 12px;
}

.slideshow-edge--next {
  right: 0;
  border-radius: 0 12px 12px 0;
}

.slideshow-edge:hover,
.slideshow-edge:focus-visible {
  background: rgba(0, 0, 0, 0.22);
}

.slideshow-edge:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.slideshow-dots {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 6;
  pointer-events: auto;
}

.slideshow-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.2s ease;
}

.slideshow-dots button:hover,
.slideshow-dots button:focus-visible {
  background: rgba(255, 255, 255, 0.7);
}

.slideshow-dots button.active {
  background: var(--accent);
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

h1,
h2,
h3 {
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.75rem;
}

.intro {
  color: var(--muted);
  max-width: 62ch;
  margin: 0 auto;
}

.section-title {
  margin: 2rem 0 1rem;
}

.catalog-section > .section-title {
  margin-top: 0;
}

.catalog-section > .line-filters {
  margin-bottom: 1.25rem;
}

/* Home: full-width scroll layer so background covers the full-bleed banner (not just .container width) */
main.main-scrolls-over-header {
  position: relative;
  z-index: 1;
  display: flow-root;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  margin-top: var(--home-hero-min-h);
  padding-top: 0;
  background-color: #1a120c;
  background-image: linear-gradient(180deg, #1a120c 0%, #120c08 100%);
  isolation: isolate;
}

main.main-scrolls-over-header ~ .site-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  background-color: #1a120c;
  background-image: linear-gradient(180deg, #1a120c 0%, #120c08 100%);
  isolation: isolate;
}

/* Keep intro row’s side margins; only zero the top margin (padding-top on main restores bar gap) */
main.main-scrolls-over-header > .container > .intro-slideshow-row:first-child {
  margin-top: 0;
}

.section-title p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.section-title .line-intro {
  max-width: 70ch;
  line-height: 1.55;
}

.line-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.line-filter {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: 0.2s ease;
}

.line-filter:hover,
.line-filter:focus-visible {
  border-color: var(--accent);
}

.line-filter.active {
  background: var(--accent);
  color: #1c130c;
  border-color: var(--accent);
  font-weight: 600;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.product-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.product-card-line-banner {
  flex-shrink: 0;
  padding: 0.35rem 0.85rem;
  background: #2a2218;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.product-card-line-banner .product-line {
  margin: 0;
  color: #c9a84a;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  line-height: 1.3;
}

.product-card-inner {
  padding: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex-grow: 1;
}

.product-card-inner .product-title,
.product-card-inner .product-desc,
.product-card-inner .card-actions {
  padding-left: 1rem;
  padding-right: 1rem;
}

.product-card-inner .product-title {
  line-height: 1.25;
}

.product-card-thumb-link {
  display: block;
  width: 100%;
  line-height: 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.product-card-thumb-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.product-card-thumb-link:hover .product-card-thumb {
  opacity: 0.94;
}

.product-card-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.2s ease;
}

.product-card:hover {
  background: var(--panel-hover);
  transform: translateY(-2px);
}

.product-card:hover .product-card-line-banner {
  background: #332a1f;
}

.product-line {
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.product-title {
  font-size: 1.1rem;
  margin: 0;
}

.product-desc {
  color: var(--muted);
  margin: 0;
  flex-grow: 1;
  font-size: 0.9rem;
  line-height: 1.45;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.price {
  font-weight: 700;
}

.buy-link {
  display: inline-block;
  background: var(--accent);
  color: #1c130c;
  text-decoration: none;
  font-weight: 700;
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
}

.buy-link:hover,
.buy-link:focus-visible {
  background: var(--accent-dark);
}

.details-link {
  display: inline-block;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
}

.details-link:hover,
.details-link:focus-visible {
  border-color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
}

.footer-inner a {
  color: var(--accent);
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 1rem;
  color: var(--muted);
}

.back-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.product-page {
  margin-bottom: 3rem;
}

.product-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.25rem;
}

.product-gallery-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gallery-main-view {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #120c08;
}

.gallery-main-view.is-zoomable {
  cursor: zoom-in;
}

.gallery-main-view img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

.gallery-lightbox[hidden] {
  display: none !important;
}

.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 5, 3, 0.92);
  cursor: pointer;
}

.gallery-lightbox-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  max-height: 100%;
  pointer-events: none;
}

.gallery-lightbox-inner > * {
  pointer-events: auto;
}

.gallery-lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-close:focus-visible {
  background: var(--panel-hover);
  border-color: var(--accent);
}

.gallery-lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(96vw, 96vh);
  height: min(96vw, 96vh);
  max-width: 96vw;
  max-height: 96vh;
}

.gallery-lightbox-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.75rem;
  height: min(4rem, 18vh);
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(35, 23, 15, 0.85);
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.gallery-lightbox-nav:hover,
.gallery-lightbox-nav:focus-visible {
  background: var(--panel-hover);
  border-color: var(--accent);
}

/* JS toggles this class when the mouse is near the image edges. */
.gallery-lightbox-nav.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Keep them usable via keyboard focus even if there's no hover. */
.gallery-lightbox-nav:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.gallery-lightbox-prev {
  left: 0.25rem;
}

.gallery-lightbox-next {
  right: 0.25rem;
}

.gallery-lightbox-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.gallery-lightbox-counter {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.gallery-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gallery-thumb {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #120c08;
  transition: border-color 0.2s ease;
}

.gallery-thumb:hover,
.gallery-thumb:focus-visible {
  border-color: var(--muted);
}

.gallery-thumb.active {
  border-color: var(--accent);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.product-detail-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.product-long-description {
  color: var(--muted);
  margin: 1rem 0 1.5rem;
  white-space: pre-line;
  line-height: 1.65;
}

.product-actions {
  display: flex;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .site-header:not(.site-header--home) {
    padding-top: 0.75rem;
  }

  .site-header:not(.site-header--home) .hero-banner {
    border-radius: 12px 12px 0 0;
  }

  .eyebrow {
    margin-bottom: 0.4rem;
  }
}

@media (max-width: 900px) {
  .product-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .intro-slideshow-row {
    grid-template-columns: 1fr;
  }
}
