@import "theme.css";

/* —— Home hero —— */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.92;
}

.hero-inner {
  max-width: 64rem;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 1.5rem;
}

.hero-logo {
  height: 2.5rem;
  width: fit-content;
  margin-bottom: 2rem;
}

.hero-title {
  font-family: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2.75rem, 6vw, 3.75rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 40rem;
}

.hero-text {
  margin-top: 1rem;
  font-size: 1.15rem;
  color: rgb(255 255 255 / 0.85);
  max-width: 34rem;
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-on-dark-solid {
  background: #fff;
  color: hsl(var(--foreground));
}

.btn-on-dark-solid:hover {
  opacity: 0.9;
}

.btn-on-dark-outline {
  background: transparent;
  border-color: rgb(255 255 255 / 0.4);
  color: #fff;
}

.btn-on-dark-outline:hover {
  background: rgb(255 255 255 / 0.1);
}

/* —— Catalogue (brand-aligned search) —— */
.pub-page {
  min-height: 100vh;
  background: transparent;
}

.pub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  color: #fff;
  background: linear-gradient(
    125deg,
    hsl(var(--primary)) 0%,
    hsl(var(--secondary)) 58%,
    hsl(160 30% 10%) 100%
  );
  border-bottom: 1px solid hsl(var(--primary) / 0.35);
  box-shadow: 0 8px 24px hsl(var(--secondary) / 0.18);
}

.pub-header-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  min-height: 2.25rem;
}

.pub-header-brand img {
  height: 2rem;
  width: auto;
  max-width: 12rem;
  object-fit: contain;
}

.pub-header-name {
  font-family: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pub-header-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pub-header-link {
  color: rgb(255 255 255 / 0.86);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  transition: background-color 0.15s, color 0.15s;
}

.pub-header-link:hover {
  background: rgb(255 255 255 / 0.1);
  color: #fff;
}

.pub-header-link.is-active {
  background: rgb(255 255 255 / 0.16);
  color: #fff;
}

.pub-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.pub-main-wide {
  max-width: min(96rem, calc(100% - 2rem));
}

.pub-search-toolbar {
  display: grid;
  grid-template-columns: minmax(10rem, auto) minmax(0, 1fr);
  gap: 1rem 1.5rem;
  align-items: end;
  margin-bottom: 1.35rem;
}

.pub-search-heading {
  min-width: 0;
}

.pub-search-title {
  margin: 0;
  font-family: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  font-weight: 600;
  color: hsl(var(--foreground));
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.pub-search-count {
  margin: 0.3rem 0 0;
  font-size: 0.92rem;
  color: hsl(var(--muted-foreground));
  font-weight: 560;
}

.pub-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 9.5rem 8.5rem;
  gap: 0.55rem;
  align-items: center;
}

.pub-search-field {
  position: relative;
}

.pub-search-input {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.6rem 2.4rem 0.6rem 0.9rem;
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  background: hsl(var(--card) / 0.92);
  backdrop-filter: blur(6px);
  font: inherit;
  font-size: 0.98rem;
  color: hsl(var(--foreground));
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}

.pub-search-input:focus {
  outline: 2px solid hsl(var(--ring) / 0.4);
  outline-offset: 1px;
  border-color: hsl(var(--primary));
}

.pub-search-icon {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--muted-foreground));
  font-size: 1.1rem;
  pointer-events: none;
}

.pub-filter-select {
  min-height: 2.65rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  background: hsl(var(--card) / 0.92);
  font: inherit;
  color: hsl(var(--foreground));
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}

.pub-loading,
.pub-empty {
  margin: 2rem 0;
  color: hsl(var(--muted-foreground));
}

.pub-empty-hint {
  color: hsl(var(--muted-foreground));
  font-size: 0.92rem;
  opacity: 0.9;
}

.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: 1rem;
}

.pub-card {
  display: flex;
  flex-direction: column;
  background: hsl(var(--card) / 0.94);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  backdrop-filter: blur(6px);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.pub-card:hover {
  transform: translateY(-2px);
  border-color: hsl(var(--primary) / 0.35);
  box-shadow: 0 10px 28px hsl(var(--secondary) / 0.14);
}

.pub-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(145deg, hsl(var(--accent)) 0%, hsl(var(--muted)) 55%, hsl(var(--secondary) / 0.18) 100%);
  overflow: hidden;
}

.pub-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pub-card-img-empty {
  display: grid;
  place-items: center;
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
  height: 100%;
}

.pub-card-price {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  padding: 0.32rem 0.55rem;
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.1;
  border-radius: calc(var(--radius) - 4px);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.18);
}

.pub-card-photo-count {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 2;
  padding: 0.28rem 0.5rem;
  background: rgb(10 16 24 / 0.62);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.pub-card-peeks {
  position: absolute;
  left: 0.45rem;
  right: 0.45rem;
  bottom: 0.45rem;
  z-index: 2;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.3rem;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.pub-card:hover .pub-card-peeks,
.pub-card:focus-within .pub-card-peeks {
  opacity: 1;
  transform: translateY(0);
}

.pub-card-peek {
  appearance: none;
  border: 2px solid transparent;
  padding: 0;
  margin: 0;
  height: 2.35rem;
  border-radius: 0.3rem;
  overflow: hidden;
  cursor: pointer;
  background: rgb(255 255 255 / 0.25);
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.2);
}

.pub-card-peek.is-active {
  border-color: #fff;
}

.pub-card-peek img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pub-card-body {
  padding: 0.85rem 0.9rem 0.95rem;
}

.pub-card-title {
  margin: 0;
  font-family: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  line-height: 1.25;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pub-card-meta {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pub-detail-toolbar {
  margin-bottom: 0.85rem;
}

.pub-back {
  appearance: none;
  border: 1px solid transparent;
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.8rem;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  transition: opacity 0.15s;
}

.pub-back:hover {
  opacity: 0.9;
}

.pub-detail-top {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(17rem, 0.85fr);
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.75rem;
}

.pub-detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}

.pub-gallery-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background:
    linear-gradient(145deg, hsl(var(--accent)) 0%, hsl(var(--muted)) 55%, hsl(var(--secondary) / 0.18) 100%);
  overflow: hidden;
  outline: none;
}

.pub-gallery-stage:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.pub-gallery-hero {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: hsl(160 12% 12% / 0.04);
}

.pub-gallery-nav {
  appearance: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 999px;
  background: rgb(10 16 24 / 0.55);
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
  transition: background-color 0.15s;
}

.pub-gallery-nav:hover {
  background: rgb(10 16 24 / 0.72);
}

.pub-gallery-prev {
  left: 0.65rem;
}

.pub-gallery-next {
  right: 0.65rem;
}

.pub-gallery-counter {
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgb(10 16 24 / 0.58);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 650;
  backdrop-filter: blur(4px);
}

.pub-gallery-thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 4.5rem;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: thin;
}

.pub-gallery-thumb {
  appearance: none;
  border: 2px solid transparent;
  padding: 0;
  width: 4.5rem;
  height: 3.35rem;
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  cursor: pointer;
  background: hsl(var(--muted));
  flex: 0 0 auto;
}

.pub-gallery-thumb.is-active {
  border-color: hsl(var(--primary));
}

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

.pub-detail-summary {
  position: sticky;
  top: 1rem;
  padding: 1.15rem 1.2rem 1.25rem;
  background: hsl(var(--card) / 0.92);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  backdrop-filter: blur(6px);
}

.pub-detail-title {
  margin: 0;
  font-family: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 600;
  color: hsl(var(--foreground));
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.pub-detail-price {
  margin: 0.55rem 0 0;
  font-family: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.55rem;
  font-weight: 650;
  color: hsl(var(--primary));
  letter-spacing: -0.02em;
}

.pub-detail-tags {
  margin: 0.55rem 0 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.92rem;
}

.pub-enquire {
  display: inline-flex;
  margin-top: 1.1rem;
  min-width: 11rem;
  justify-content: center;
}

.pub-enquire-hint {
  margin-top: 1.1rem;
}

.pub-detail-block {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid hsl(var(--border));
}

.pub-detail-block-title {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.pub-detail-desc {
  margin: 0;
  color: hsl(var(--foreground) / 0.88);
  line-height: 1.55;
  white-space: pre-wrap;
  font-size: 0.95rem;
}

.pub-specs-title {
  margin: 0 0 0.85rem;
  font-family: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  padding-bottom: 0.5rem;
  border-bottom: 1px solid hsl(var(--border));
}

.pub-specs-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem 1.75rem;
  padding: 1.2rem 1.25rem;
  background: hsl(var(--accent) / 0.55);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
}

.pub-spec-heading {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  font-weight: 650;
  color: hsl(var(--foreground));
}

.pub-spec-list {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.3rem 0.65rem;
  margin: 0;
}

.pub-spec-list dt {
  margin: 0;
  color: hsl(var(--muted-foreground));
  font-weight: 600;
  font-size: 0.88rem;
}

.pub-spec-list dd {
  margin: 0;
  color: hsl(var(--foreground));
  font-size: 0.92rem;
}

/* —— Signup —— */
.pub-main-narrow {
  max-width: 44rem;
}

.pub-signup-form {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.pub-signup-section {
  padding: 1.15rem 1.2rem 1.25rem;
  background: hsl(var(--card) / 0.92);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}

.pub-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}

.pub-signup-person {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid hsl(var(--border));
}

.pub-signup-person-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.pub-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.65rem 0;
  font-size: 0.92rem;
}

.pub-signup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

@media (max-width: 960px) {
  .pub-search-toolbar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .pub-detail-top {
    grid-template-columns: 1fr;
  }

  .pub-detail-summary {
    position: static;
  }
}

@media (max-width: 720px) {
  .hero-inner {
    padding: 5.5rem 1.15rem 2.5rem;
    justify-content: flex-end;
  }

  .hero-title {
    font-size: clamp(2.15rem, 11vw, 2.75rem);
  }

  .hero-text {
    font-size: 1.02rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 1.75rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .pub-header {
    flex-wrap: wrap;
    padding: 0.75rem 0.9rem;
    gap: 0.65rem;
  }

  .pub-header-brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .pub-header-name {
    font-size: 1.05rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 55vw;
  }

  .pub-header-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.2rem;
    padding-bottom: 0.1rem;
  }

  .pub-header-link {
    flex: 0 0 auto;
    padding: 0.45rem 0.7rem;
    font-size: 0.88rem;
  }

  .pub-main,
  .pub-main-wide {
    max-width: none;
    padding: 1rem 0.9rem 2.5rem;
  }

  .pub-search-row {
    grid-template-columns: 1fr;
  }

  .pub-grid {
    grid-template-columns: 1fr;
  }

  .pub-card-peeks {
    opacity: 1;
    transform: none;
  }

  .pub-gallery-stage {
    aspect-ratio: 1;
  }

  .pub-signup-section {
    padding: 1rem;
  }

  .pub-signup-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .pub-signup-actions .btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .pub-form-grid {
    grid-template-columns: 1fr;
  }
}

.cms-page { max-width: 48rem; }
.cms-article { display: flex; flex-direction: column; gap: 1rem; }
.cms-page-title { margin: 0; font-size: 2rem; }
.cms-heading { margin: 0.5rem 0 0; }
.cms-paragraph { margin: 0; line-height: 1.55; }
.cms-image { max-width: 100%; height: auto; border-radius: 0.5rem; }
.cms-html { line-height: 1.5; }
.cms-lede { margin: 0; }
