/* Colours and fonts below are defaults — config.js overrides them. */
:root {
  --primary: #3b2f2a;
  --on-primary: #ffffff;
  --accent: #b5653c;
  --on-accent: #ffffff;
  --bg: #faf7f2;
  --surface: #ffffff;
  --text: #2a2420;
  --muted: #6f655c;
  --border: #e7dfd3;
  --wa: #1f8f4e;
  --radius: 14px;
  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -48px; background: var(--primary); color: var(--on-primary); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, filter .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn-sm { padding: 8px 14px; font-size: .875rem; }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-light { background: rgba(255,255,255,.95); color: var(--primary); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--text); filter: none; }
.btn-wa { background: var(--wa); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand img { height: 44px; width: auto; flex: none; }
.brand span { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) {
  .brand img { height: 36px; }
  .brand span { font-size: 1rem; }
}
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav > a:not(.btn) { text-decoration: none; font-weight: 500; color: var(--muted); }
.main-nav > a:not(.btn):hover { color: var(--text); }
.menu-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; margin-right: -10px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px; box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav > a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--border); color: var(--text); }
  .main-nav .btn { margin-top: 14px; padding: 12px; font-size: 1rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff;
  min-height: min(78vh, 640px);
  display: grid; align-items: center;
  background-color: var(--primary);
  background-size: cover; background-position: center;
}
.hero-inner { padding: 80px 0; max-width: 720px; margin-left: max(16px, (100% - 1200px) / 2); }
.hero h1 { font-size: clamp(2rem, 5.5vw, 3.6rem); }
.hero p { font-size: clamp(1rem, 2.2vw, 1.2rem); opacity: .92; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (max-width: 760px) {
  .hero { background-position: var(--hero-mobile-x, 50%) center; }
}

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: color-mix(in srgb, var(--accent) 6%, var(--bg)); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.section-head p { color: var(--muted); }
#collection:focus { outline: none; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 12px; }
.search { position: relative; flex: 1 1 260px; max-width: 360px; }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; padding: 12px 16px 12px 42px; font: inherit;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text);
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; font-size: .9rem; font-weight: 500; white-space: nowrap;
}
.chip:hover { border-color: var(--text); }
.chip[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.result-count { color: var(--muted); font-size: .9rem; margin: 0 0 16px; }
.category-intro {
  margin: 8px 0 16px; padding: 14px 18px; max-width: 820px;
  background: var(--surface); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
}

/* ---------- Shop by space ---------- */
.spaces { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.space-card {
  display: flex; flex-direction: column; text-align: left; padding: 0; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .2s ease, transform .2s ease;
}
.space-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.space-media { display: block; aspect-ratio: 4 / 3; background: var(--border); overflow: hidden; }
.space-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.space-card:hover .space-media img { transform: scale(1.04); }
.space-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.space-name { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 600; }
.space-desc { color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.space-link { margin-top: auto; padding-top: 6px; color: var(--accent); font-weight: 600; font-size: .92rem; }
@media (max-width: 560px) {
  .spaces { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .space-body { padding: 10px 12px 12px; }
  .space-name { font-size: 1.05rem; }
  .space-desc { display: none; }
  .space-link { font-size: .8rem; padding-top: 0; }
}

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media { position: relative; display: block; padding: 0; border: 0; background: var(--border); cursor: pointer; aspect-ratio: 4 / 3; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--accent); color: var(--on-accent);
  font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
}
.card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.card-cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 4px; }
.card-title { font-size: 1.15rem; margin: 0 0 6px; }
.card-price { font-weight: 600; color: var(--accent); margin: 0 0 14px; }
.card-actions { display: flex; gap: 8px; margin-top: auto; }
.card-actions .btn { flex: 1; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.photo-note { text-align: center; color: var(--muted); font-size: .85rem; font-style: italic; margin: 28px 0 0; }

@media (max-width: 560px) {
  .section { padding: 56px 0; }
  .filters { display: block; }
  .search { display: block; max-width: none; margin-bottom: 12px; }
  /* Chips scroll sideways on phones instead of wrapping */
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 2px 16px 6px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-body { padding: 10px 12px 12px; }
  .card-title { font-size: 1rem; }
  .card-price { font-size: .9rem; margin-bottom: 10px; }
  .card-actions { flex-direction: column; gap: 6px; }
  .card-actions .btn { padding: 8px 10px; font-size: .8rem; }
  .badge { top: 8px; left: 8px; font-size: .7rem; padding: 3px 8px; }
}

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.about h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.about-logo { width: min(280px, 70%); height: auto; margin-bottom: 20px; }
.about p { color: var(--muted); font-size: 1.05rem; }
.highlights { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.highlights li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.highlights strong { display: block; font-family: var(--font-heading); font-size: 1.35rem; color: var(--primary); }
.highlights span { color: var(--muted); font-size: .95rem; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 380px) { .highlights { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.contact-card h3 { font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.contact-card p { margin: 0 0 12px; white-space: pre-line; overflow-wrap: anywhere; }
.contact-card a:not(.btn) { color: var(--accent); font-weight: 600; text-decoration: none; }
.contact-card a:not(.btn):hover { text-decoration: underline; }
.map { margin-top: 24px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.map iframe { display: block; width: 100%; height: 340px; border: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary); color: var(--on-primary); padding: 48px 0 24px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-inner strong { font-family: var(--font-heading); font-size: 1.4rem; }
.footer-inner p { opacity: .75; margin: 4px 0 0; }
.social { list-style: none; display: flex; flex-wrap: wrap; gap: 20px; padding: 0; margin: 0; }
.social a { text-decoration: none; opacity: .85; }
.social a:hover { opacity: 1; text-decoration: underline; }
.footer-bottom { border-top: 1px solid color-mix(in srgb, var(--on-primary) 18%, transparent); margin-top: 32px; padding-top: 20px; opacity: .7; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 50;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 30px; height: 30px; }
@media (max-width: 560px) { .wa-float { right: 14px; bottom: 14px; width: 54px; height: 54px; } }

/* ---------- Product modal ---------- */
.modal {
  width: min(980px, 100% - 32px); max-width: none; max-height: calc(100% - 32px);
  padding: 0; border: 0; border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal::backdrop { background: rgba(20, 15, 12, .65); }
body.modal-open { overflow: hidden; }
.modal-inner { display: grid; grid-template-columns: 1.15fr 1fr; position: relative; }
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.95); color: #222; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.modal-close svg { width: 20px; height: 20px; }
.gallery { background: var(--surface); display: flex; flex-direction: column; }
.gallery-main { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: var(--border); }
.thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; background: var(--surface); }
.thumb { flex: none; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--border); opacity: .7; }
.thumb[aria-current="true"] { border-color: var(--accent); opacity: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal-details { padding: 32px 28px; display: flex; flex-direction: column; }
.modal-details h2 { font-size: clamp(1.5rem, 3vw, 2rem); padding-right: 40px; }
.modal-price { font-size: 1.3rem; font-weight: 600; color: var(--accent); margin-bottom: 16px; }
.modal-desc { color: var(--muted); }
.features { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; font-size: .95rem; }
.features li { position: relative; padding-left: 22px; }
.features li::before { content: ""; position: absolute; left: 4px; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 8px 0 24px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: .95rem; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 500; }
.modal-actions { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.modal-code { font-size: .8rem; color: var(--muted); text-align: center; margin: 0; }

@media (max-width: 760px) {
  .modal { width: 100%; height: 100%; max-height: 100%; border-radius: 0; margin: 0; }
  .modal-inner { grid-template-columns: 1fr; }
  .modal-details { padding: 22px 18px 28px; }
  .modal-details h2 { padding-right: 0; }
  .specs { grid-template-columns: 1fr; gap: 2px; }
  .specs dd { margin-bottom: 8px; }
  .modal-actions { position: sticky; bottom: 0; background: var(--surface); padding-top: 12px; margin-bottom: -12px; }
}

.noscript { text-align: center; padding: 40px 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
