/* ============================================
   HOME PAGE LAYOUT
   Sidebar navigation + full-height hero image
   Inspired by editorial photography portfolio layouts
   ============================================ */

/* Lock home page to viewport — no scroll on desktop */
.page-home {
  overflow: hidden;
  height: 100vh;
}

/* Two-column flex layout — sidebar left, image right */
.home-layout {
  display: flex;
  height: 100vh;
}

/* ---- LEFT SIDEBAR ---- */
.sidebar {
  width: 290px;
  flex-shrink: 0;           /* never squish the sidebar */
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 2.75rem;
  background: var(--color-bg);
  position: relative;
  z-index: 10;
}

/* --- Logo --- */
.sidebar__logo {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text);
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Logo mark next to the text */
.sidebar__logo-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

/* --- Nav — grows to fill middle space, links vertically centered --- */
.sidebar__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.125rem;
}

.sidebar__link {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--color-text-muted);
  padding: 0.35rem 0;
  display: block;
  transition: color var(--transition);
}

.sidebar__link:hover,
.sidebar__link--active {
  color: var(--color-text);
}

/* --- Social icon row --- */
.sidebar__social {
  margin-top: 1.25rem;
  display: flex;
  gap: 1rem;
}

.sidebar__social-link {
  color: var(--color-text-muted);
  transition: color var(--transition);
  line-height: 0;   /* removes gap below inline SVG */
}

.sidebar__social-link:hover {
  color: var(--color-navy);
}

/* --- Shop group: wraps the Shop link + sub-links so hover covers both --- */
.sidebar__shop-group {
  display: flex;
  flex-direction: column;
}

/* Sub-links hidden by default, expand on hover of the whole group */
.sidebar__sub {
  display: flex;
  flex-direction: column;
  padding-left: 0.75rem;
  border-left: 1px solid var(--color-border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.sidebar__shop-group:hover .sidebar__sub {
  max-height: 80px;   /* enough to reveal both links */
}

.sidebar__sub-link {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0.2rem 0;
  display: block;
  transition: color var(--transition);
}

.sidebar__sub-link:hover {
  color: var(--color-navy);
}

/* --- Bottom controls (PREV / NEXT, SHOW THUMBNAILS) --- */
.sidebar__bottom {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar__ctrl {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  transition: color var(--transition);
}

.sidebar__ctrl:hover {
  color: var(--color-navy);
}

.sidebar__ctrl-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.sidebar__ctrl-sep {
  color: var(--color-text-muted);
  font-weight: 300;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  line-height: 1;
}

/* ---- RIGHT: HERO IMAGE ---- */
.hero-image {
  flex: 1;
  height: 100vh;
  overflow: hidden;
  position: relative;       /* anchor for the dots and location label */
  background: #1a1a1a;      /* visible while first image loads — prevents white flash */
}

/* ---- SLIDESHOW ---- */
.hero-slideshow {
  width: 100%;
  height: 100%;
  position: relative;
}

/* picture elements are block wrappers with no height — slides position absolutely
   relative to .hero-slideshow. display:contents is intentionally avoided here
   because it breaks responsive <source> selection in Safari when multiple sources exist. */
.hero-slideshow picture {
  display: block;
}

/* All slides stacked on top of each other */
.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

/* Active slide is fully visible */
.slide--active {
  opacity: 1;
}

/* ---- LOCATION LABEL ---- */
.hero-location {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.88);
  z-index: 10;
  /* Subtle text shadow so it reads over any colour of photo */
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.hero-location svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.hero-location-text {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: opacity 0.4s ease-in-out;
}

/* ---- DOT INDICATORS ---- */
.hero-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0;
  z-index: 10;
}

/* Button is the tap target (28×28); ::before is the visible dot (12px circle) */
.hero-dot {
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-dot::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.3s ease-in-out, transform 0.3s ease-in-out;
  flex-shrink: 0;
}

.hero-dot--active::before {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.3);
}

/* ---- MOBILE-ONLY SHOP PREVIEW ---- */
/* Hidden on desktop — only renders on mobile */
.mobile-shop-preview {
  display: none;
}

/* ---- MOBILE — 767px and below ---- */
@media (max-width: 767px) {
  .page-home {
    overflow: auto;
    height: auto;
  }

  .home-layout {
    flex-direction: column;
    height: auto;
  }

  .sidebar {
    width: 100%;
    height: auto;
    padding: 1.25rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
  }

  .sidebar__nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    flex-basis: 100%;
    margin-top: var(--space-sm);
  }

  .sidebar__link,
  .sidebar__shop-group {
    text-align: center;
  }

  .sidebar__social,
  .sidebar__bottom {
    display: none;
  }

  .hero-image {
    flex: none;   /* stop flex-basis:0 from fighting the explicit height */
    height: auto; /* grow to match the slideshow's intrinsic size */
  }

  /* 4:3 box matches the exported beach images — no black bars, cover fills it cleanly */
  .hero-slideshow {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  /* Remove watermark on mobile hero */
  .hero-image::after {
    display: none;
  }

  /* Location tag: pull below the dot row and tighten it to the left edge */
  .hero-location {
    bottom: 0.625rem;
    left: 0.875rem;
  }

  .hero-location-text {
    font-size: 0.65rem;
  }

  /* ---- Mobile shop preview ---- */
  .mobile-shop-preview {
    display: block;
  }

  .mobile-shop-label {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 0.1em;
    color: var(--color-text);
    text-align: center;
    padding: 0.875rem 1.5rem 0.625rem;
    margin: 0;
  }

  .mobile-shop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
  }

  .mobile-shop-item {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
  }

  .mobile-shop-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    max-width: none;  /* override global img max-width:100% which would limit to container */
  }

  .mobile-shop-btn {
    display: block;
    width: 100%;
    background: var(--color-navy);
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 1.25rem;
    letter-spacing: 0.1em;
    text-align: center;
    padding: 1.25rem 1.5rem;
    border-radius: 0;
    text-decoration: none;
  }

  .mobile-gallery-btn {
    background: transparent;
    color: var(--color-navy);
    border: 1px solid var(--color-navy);
    margin-top: 0.75rem;
  }

}
