/*
 * SHOWPLACE.ART — Layout: Hero
 * ─────────────────────────────────────────────────────────────────────────────
 * Full-width. Prominent hero header (featured image right, text left).
 * Below the hero: 4-column thumbnail grid with pagination.
 * Horizontal nav across the top.
 */

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

.sp-preview {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1;
}
footer {
  padding: 20px;
  text-align: center;
}
.powered-by {
  font-size: 10px;
  text-transform: none;
}
.powered-by a {
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Navigation ─────────────────────────────────────────────────────────── */

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

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

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

/* ── Main content ────────────────────────────────────────────────────────── */

.sp-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── Hero section ────────────────────────────────────────────────────────── */

.sp-hero {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  padding: 25px 50px 50px;
  justify-content: center;
}

.sp-hero-text {
  flex: 0 0 36%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 400px;
}

.sp-hero-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 14px;
}

.sp-hero-meta {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.sp-hero-price {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.sp-hero-cta {
  display: inline-block;
  padding: 11px 24px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  align-self: flex-start;
}

.sp-hero-image {
  flex: 0 0 64%;
  overflow: hidden;
  justify-items: flex-end;
  max-width: 800px;
}

.sp-hero-image img,
.sp-hero-image .artwork-placeholder {
  max-height: 600px;
  max-width: 100%;
  object-fit: cover;
  display: block;
}

/* ── Thumbnail grid section ──────────────────────────────────────────────── */

.sp-grid-section {
  flex: 1;
  padding: 32px 32px 24px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 28px;
}

.artwork-card {
  display: flex;
  flex-direction: column;
}

.artwork-link {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.artwork-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  width: 100%;
}

.artwork-image img,
.artwork-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.sp-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.sp-page-btn {
  padding: 8px 20px;
  font-size: 12px;
  cursor: pointer;
  background: transparent;
  border: none;
}

.sp-page-btn:disabled,
.sp-page-btn--disabled {
  opacity: 0.35;
  cursor: default;
}

.sp-page-info {
  font-size: 12px;
}

/* ── 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%;
  max-height: 100%;
  margin-inline: auto;
  display: block;
}

.sp-product-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sp-product-card .sp-product-details {
  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: 32px 24px 8px;
}

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

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

/* ── Collections: homepage preview strip ────────────────────────────────── */

.sp-collections-preview {
  width: 100%;
  padding: 32px 32px 24px;
}

.sp-collections-preview-title,
.sp-all-artworks-title {
  margin-bottom: 16px;
}

.sp-collections-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}

.sp-collection-card {
  display: block;
}

.sp-collection-card-thumb {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  margin-bottom: 12px;
}

.sp-collection-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sp-collection-card-name {
  margin-top: 10px;
}

.sp-collection-card-count {
  margin-top: 2px;
  display: block;
}

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

@media (max-width: 768px) {
  .sp-nav {
    padding: 16px;
    height: auto;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .sp-hero {
    flex-direction: column;
    padding: 10px 20px;
  }

  .sp-hero-text {
    flex: unset;
    padding: 32px 24px;
    order: 2;
  }

  .sp-hero-image {
    flex: unset;
    height: 300px;
    order: 1;
  }
  .sp-hero-image img {
    height: 100%;
    margin-inline: auto;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sp-hero-text {
    padding: 16px 0;
  }

  .sp-hero-title {
    font-size: 22px;
  }

  .gallery-grid {
    gap: 16px;
  }

  .sp-grid-section {
    padding: 16px 16px 12px;
  }

  .sp-collections-preview {
    padding: 16px 16px 12px;
  }
  .sp-collections-row {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

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

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

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

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