/*
 * SHOWPLACE.ART — Layout: Standard
 * ─────────────────────────────────────────────────────────────────────────────
 * Controls structure only: grid, sizing, spacing, element arrangement.
 * No colours, no fonts — those are the theme's job.
 * Any theme can be layered on top without conflict.
 */

/* ── 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 bar ─────────────────────────────────────────────────────── */

.sp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  min-height: 56px;
  flex-shrink: 0;
  gap: 24px;
}
.sp-nav.nav-collapsed {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-block: 12px;
}

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

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

/* ── Gallery wrapper ─────────────────────────────────────────────────────── */

.sp-gallery-wrap {
  padding: 28px 10%;
  max-width: 1200px;
  margin-inline: auto;
}

/* ── Grid ────────────────────────────────────────────────────────────────── */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── Card ────────────────────────────────────────────────────────────────── */

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

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

.artwork-image {
  overflow: hidden;
  width: 100%;
}

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

/* Empty (no-image) placeholder needs its own size — an image supplies its own
   intrinsic height, but an empty div would otherwise collapse to nothing. */
.artwork-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
}

.artwork-info {
  padding: 10px;
  flex: 1;
}

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

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

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

.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;
}

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

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

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

.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;
}

.sp-product-card .sp-product-image img {
  max-width: none;
}

.sp-product-card .sp-product-details {
  padding: 24px;
}

/* ── 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 {
  max-width: 1200px;
  padding: 28px 10%;
  margin-inline: auto;
}

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

.sp-collections-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 24px;
}

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

.sp-collection-card-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

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

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

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

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

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sp-nav {
    padding: 0 20px;
  }

  .sp-gallery-wrap {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

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

  .sp-gallery-wrap {
    padding: 16px;
  }

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

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

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

  .sp-collections-preview {
    padding: 16px;
  }
  .sp-collections-row {
    padding: 12px;
    grid-template-columns: auto auto;
  }
}