/* Kernow Skies — clean, centred, Bellota everywhere. Matches the original palette. */

:root {
  --primary: #4d6d9a;
  --primary-hover: #304460;
  --text: #232323;
  --text-muted: #6b6b6b;
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --border: #e5e5e5;
  --shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
  --font: 'Bellota Text', system-ui, -apple-system, sans-serif;
  --max: 1200px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-weight: 400;
  font-size: 18px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font); font-weight: 700; margin: 0; line-height: 1.2; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 1rem; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: var(--max); margin: 0 auto; padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center;
}
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__brand img { height: 48px; width: auto; }
.nav__brand-text { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.nav__links { display: flex; gap: 28px; font-size: 1.05rem; }
.nav__links a { color: var(--text); font-weight: 400; }
.nav__links a:hover, .nav__links a.active { color: var(--primary); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.6rem 1.4rem; font-weight: 700; cursor: pointer;
  border: 2px solid transparent; border-radius: 4px;
  font-family: var(--font); font-size: 1rem;
  box-shadow: var(--shadow); transition: all 0.15s;
  text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-primary:disabled { opacity: 0.5; cursor: wait; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); box-shadow: none; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-block { display: flex; width: 100%; }

/* Hero */
.hero { padding: 80px 16px 100px; text-align: center; background: var(--bg); }
.hero__title {
  font-size: clamp(2.4rem, 5.5vw, 4.6rem);
  line-height: 1.1; max-width: 900px; margin: 0 auto;
}
.hero__lede {
  margin: 24px auto 0; max-width: 620px;
  font-size: 1.15rem; color: var(--text-muted);
}
.hero__ctas { display: flex; gap: 12px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }

/* Section */
.section { padding: 60px 0; }
.section--soft { background: var(--bg-soft); }
.section__head { text-align: center; margin-bottom: 48px; }
.section__head h2 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  margin-bottom: 8px;
}
.section__head p { color: var(--text-muted); margin: 0; }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 36px 24px;
}
.card { display: block; color: inherit; }
.card__link { display: block; color: inherit; cursor: pointer; }
.card__img {
  aspect-ratio: 3/4;
  background: var(--bg-soft);
  overflow: hidden;
  border: 1px solid var(--border);
}
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card__link:hover .card__img img { transform: scale(1.04); }
.card__meta { margin-top: 14px; text-align: center; }
.card__title { font-family: var(--font); font-size: 1.25rem; font-weight: 700; color: var(--text); }
.card__location { color: var(--text-muted); font-size: 0.95rem; margin-top: 2px; }
.card__price { color: var(--primary); font-weight: 700; font-size: 0.95rem; margin-top: 6px; }

.card__tags { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-top: 10px; }
.card__tag {
  display: inline-block; font-size: 0.72rem; padding: 2px 9px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-muted); text-decoration: none;
  transition: all 0.12s; line-height: 1.4;
}
.card__tag:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: var(--bg-soft); color: var(--text-muted);
  font-weight: 700; padding: 16px; text-align: center;
}

/* Filters */
.filters {
  position: sticky; top: 73px; z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.filters__row {
  max-width: var(--max); margin: 0 auto; padding: 16px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.filters input, .filters select {
  padding: 0.5rem 0.8rem; border: 1px solid var(--border);
  background: #fff; font-family: var(--font); font-size: 1rem; color: var(--text);
  border-radius: 4px;
}
.filters input:focus, .filters select:focus { outline: none; border-color: var(--primary); }
.filters__search { flex: 1; min-width: 200px; }
.filters__count { margin-left: auto; font-size: 0.95rem; color: var(--text-muted); }
.filters__clear {
  background: none; border: 0; font-family: var(--font); font-size: 0.95rem;
  color: var(--text-muted); text-decoration: underline; cursor: pointer;
}
.filters__clear:hover { color: var(--primary); }

/* Product page */
.product { padding: 48px 16px; display: grid; grid-template-columns: 1fr; gap: 48px; max-width: var(--max); margin: 0 auto; }
@media (min-width: 900px) { .product { grid-template-columns: 1fr 1fr; align-items: start; } }
.product__image { background: var(--bg-soft); border: 1px solid var(--border); }
.product__title { font-size: clamp(2rem, 3.8vw, 3rem); margin-top: 4px; }
.product__location { color: var(--text-muted); margin-top: 4px; font-size: 1.05rem; }
.product__desc { margin-top: 24px; font-size: 1.1rem; color: var(--text); }

.chooser { margin-top: 40px; }
.chooser__label {
  display: block; margin-bottom: 10px; font-weight: 700;
  color: var(--text); font-size: 0.95rem;
}
.chooser__row { display: grid; gap: 8px; }
.chooser__row--3 { grid-template-columns: repeat(3, 1fr); }
.chooser__row--2 { grid-template-columns: repeat(2, 1fr); }
.chooser__opt { cursor: pointer; }
.chooser__opt input { position: absolute; opacity: 0; pointer-events: none; }
.chooser__opt-box {
  display: block; padding: 14px 12px; text-align: center;
  border: 2px solid var(--border); border-radius: 4px;
  background: #fff; transition: all 0.15s;
}
.chooser__opt input:checked + .chooser__opt-box {
  border-color: var(--primary); background: var(--primary); color: #fff;
}
.chooser__opt-size { font-weight: 700; font-size: 1.2rem; }
.chooser__opt-dim { font-size: 0.8rem; opacity: 0.8; margin-top: 2px; }
.chooser__opt-paper-label { font-weight: 700; font-size: 1.05rem; }
.chooser__opt-paper-desc { font-size: 0.85rem; opacity: 0.8; margin-top: 4px; line-height: 1.4; }

.totals {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 20px; margin-top: 28px; border-top: 1px solid var(--border);
}
.totals__label { font-weight: 700; color: var(--text-muted); }
.totals__price { font-weight: 700; font-size: 2rem; color: var(--primary); }
.note { font-size: 0.85rem; color: var(--text-muted); text-align: center; margin-top: 10px; }

/* Prose pages */
.prose { max-width: 720px; margin: 0 auto; padding: 80px 16px; text-align: center; }
.prose h1 { font-size: clamp(2.2rem, 4vw, 3.5rem); margin-bottom: 20px; }
.prose p { font-size: 1.1rem; line-height: 1.6; color: var(--text); margin-top: 16px; }
.prose a { color: var(--primary); text-decoration: underline; }

/* Footer */
.footer { border-top: 1px solid var(--border); background: var(--bg-soft); margin-top: 80px; }
.footer__inner {
  max-width: var(--max); margin: 0 auto; padding: 48px 16px;
  display: grid; gap: 32px;
}
@media (min-width: 700px) { .footer__inner { grid-template-columns: 2fr 1fr 1fr; } }
.footer__brand-logo { height: 56px; margin-bottom: 12px; }
.footer__tag { color: var(--text-muted); margin: 0; }
.footer__col h4 {
  font-size: 1rem; color: var(--text); margin-bottom: 12px;
}
.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col li { margin-top: 6px; }
.footer__col a { color: var(--text); }
.footer__col a:hover { color: var(--primary); }
.footer__bottom {
  max-width: var(--max); margin: 0 auto;
  border-top: 1px solid var(--border);
  padding: 16px; font-size: 0.9rem; color: var(--text-muted); text-align: center;
}

.empty { text-align: center; padding: 64px 0; color: var(--text-muted); }
.hidden { display: none !important; }

/* Category / tag chips on the product page */
.categories { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.chip {
  display: inline-block; padding: 5px 12px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 16px; font-size: 0.85rem; color: var(--text);
  transition: all 0.15s; white-space: nowrap;
}
.chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip--region { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }
.chip--region:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

/* "You might also like" horizontal gallery */
.similar { padding: 48px 0 16px; border-top: 1px solid var(--border); margin-top: 48px; }
.similar__title { font-size: 1.4rem; margin-bottom: 20px; text-align: center; }
.similar__scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 160px;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 700px) { .similar__scroll { grid-auto-columns: 200px; } }
.similar__scroll::-webkit-scrollbar { height: 6px; }
.similar__scroll::-webkit-scrollbar-track { background: var(--bg-soft); }
.similar__scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.similar__scroll::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.similar__card { scroll-snap-align: start; text-align: center; color: inherit; display: block; }
.similar__card-img {
  aspect-ratio: 3/4; background: var(--bg-soft);
  overflow: hidden; border: 1px solid var(--border);
}
.similar__card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.similar__card:hover .similar__card-img img { transform: scale(1.04); }
.similar__card-title { font-family: var(--font); font-weight: 700; font-size: 0.95rem; margin-top: 8px; line-height: 1.2; }
.similar__card-location { color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }

.preview-note {
  font-size: 0.9rem; color: var(--text-muted); text-align: center;
  margin: 12px 0 0; padding: 10px 14px;
  background: #fff7e6; border: 1px solid #f0dcb0; border-radius: 4px;
}
.preview-note strong { color: var(--text); }
