/*
 * SHOWPLACE.ART — Layout: Slideshow
 * ─────────────────────────────────────────────────────────────────────────────
 * Full-width, full-height. One image on screen at a time with prev/next
 * pagination controls. Left sidebar holds the site navigation.
 */

/* ── Powered by ─────────────────────────────────────────────────────────── */
/*
homepage has sidebar (for desktop), and footer (for mobile)
product / inner page has footer for both
show footer by default, hide on homepage desktop.
hide homepage sidebar on mobile.
*/
.sp-preview footer,
.sp-inner-page footer {
  display: block;
  padding: 20px;
  text-align: center;
}
@media (min-width: 768px) { /* hide footer on desktop */
  .sp-preview:not(.sp-inner-page) footer {
    display: none;
  }
}
@media (max-width: 768px) { /* hide sidebar on mobile */
  .sp-sidebar-nav .powered-by {
    display: none;
  }
}
.powered-by {
  margin-top: auto;
  font-size: 10px;
  text-transform: none;
}
.powered-by a {
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Page shell ─────────────────────────────────────────────────────────── */

.sp-preview {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1;
}

/* ── Slideshow wrapper (sidebar + main) ──────────────────────────────────── */

.sp-slideshow-wrap {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ── Sidebar navigation ──────────────────────────────────────────────────── */

.sp-sidebar-nav {
  width: 20%;
  max-width: 250px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 32px 20px;
  gap: 36px;
}

.sp-sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sp-nav-link {
  font-size: 12px;
}

/* ── Slideshow main area ─────────────────────────────────────────────────── */

.sp-slideshow-main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  align-items: center;
  padding: 28px 32px;
}

/* ── Slide display ───────────────────────────────────────────────────────── */

.sp-slide-display {
  min-height: 0;
  position: relative;
  flex: 1;
  margin-bottom: 24px;
}

.sp-slide {
  height: 100%;
  display: none;
}

.sp-slide.active {
  display: block;
}

.sp-slide img {
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
  margin-inline: auto;
}

.sp-slide .artwork-placeholder {
  height: 100%;
  aspect-ratio: 1 / 1;
  max-width: 100%;
  min-height: 320px;
  margin-inline: auto;
  display: block;
}

/* ── Slide caption ───────────────────────────────────────────────────────── */

.sp-slide-info {
  flex: 0;
  width: 90%;
}

.sp-slide-info p {
  margin-block: 4px;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */

.sp-slide-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}

/* ── Pagination controls ─────────────────────────────────────────────────── */

.sp-pagination {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 0 0;
  flex: 0;
}

.sp-page-btn {
  padding: 6px 20px;
  font-size: 18px;
  cursor: pointer;
  background: transparent;
  border: none;
  line-height: 1;
}

.sp-page-counter {
  font-size: 12px;
  min-width: 56px;
  text-align: center;
}

/* ── Top nav (used on inner pages: product, contact) ────────────────────── */

.sp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 56px;
  flex-shrink: 0;
}

.sp-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
}

/* ── Slide view-details link ───────────────────────────────────────────── */

.sp-slide-view-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Inner-page override (resets slideshow’s full-height on contact / product) */

.sp-inner-page.sp-preview {
  overflow: visible;
}

/* ── Inner pages (contact / product) ────────────────────────────────────── */

.sp-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
}

.sp-page-content {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 28px 64px;
}

.sp-page-title {
  margin-bottom: 8px;
}

.sp-page-subtitle {
  margin-bottom: 32px;
}

.sp-enquiry-subject {
  margin-bottom: 24px;
}

.sp-alert {
  padding: 14px 18px;
  margin-bottom: 28px;
}

.sp-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 4px;
}

.sp-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sp-form-input,
.sp-form-textarea {
  width: 100%;
  padding: 10px 14px;
  border-width: 1px;
  border-style: solid;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.sp-form-textarea {
  min-height: 130px;
  resize: vertical;
}

.sp-form-btn {
  display: inline-block;
  padding: 12px 28px;
  cursor: pointer;
  border: none;
  font-family: inherit;
  align-self: flex-start;
}

/* Multi-image gallery for the product page — theme-agnostic, works with
    whatever sizing/aspect-ratio each layout already applies to .sp-product-image img.
    !important below overrides each layout's `.sp-product-image img { display: block }`,
    which otherwise outranks the plain .sp-gallery-slide selector on specificity. */
.sp-product-gallery-main { position: relative; height: 550px; }
.sp-gallery-slide { display: none !important; width: 100%; }
.sp-gallery-slide.is-active { display: block !important; }
.sp-product-thumbs { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.sp-product-thumb { padding: 0; border: none; width: 150px; aspect-ratio:1; cursor: pointer; background: none; flex-shrink: 0; }
.sp-product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-product-thumb.is-active { opacity: 1; }
.sp-product-thumb:not(.is-active) { opacity: 0.55; }
.sp-product-thumb:hover { opacity: 0.85; }

.sp-product-image {
  margin-bottom: 24px;
}

.sp-product-image img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  margin-inline: auto;
  display: block;
}

.sp-product-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
}

.sp-product-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sp-product-meta-row {
  display: flex;
  gap: 16px;
  align-items: baseline;
}

.sp-product-meta-label {
  min-width: 80px;
  flex-shrink: 0;
}

/* ── Collections: page header ───────────────────────────────────────────── */

.sp-collection-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px 4px;
  flex: 0;
}

.sp-collection-header .sp-collection-title {
  margin-bottom: 12px;
}

.sp-collection-header .sp-collection-blurb {
  max-width: 68ch;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .sp-slideshow-wrap {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
  }

  .sp-sidebar-nav {
    width: 100%;
    max-width: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px;
    gap: 16px;
  }

  .sp-sidebar-links {
    flex-direction: row;
    gap: 20px;
  }

  .sp-slideshow-main {
    flex: 1;
    min-height: 0;
    padding: 16px;
    height: auto;
  }

  .sp-slide-meta,
  .sp-slide-caption {
    display: none;
  }

  .sp-page-content {
    padding: 28px 16px 48px;
  }

  .sp-product-image img {
    max-width: 100%;
  }

  .sp-product-meta-label {
    min-width: 64px;
  }

  .sp-collection-header {
    padding: 0;
  }
  .sp-collection-blurb {
    margin-bottom: 20px;
  }

  .sp-nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 16px;
    height: auto;
  }

  .sp-product-gallery-main {
    height: 350px;
  }
}
