/* Pilar Cereto Art — site styles. No framework, no build step. */
:root {
  --ink: #121212;
  --ink-soft: #4a4a4a;
  --muted: #6b6b6b;
  --line: #e6e2dc;
  --paper: #ffffff;
  --paper-warm: #f7f4ef;
  --copper: #9a5a2e;
  --copper-dark: #7a4420;
  --sold: #121212;
  --radius: 2px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --serif-head: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --serif-body: "Cardo", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.65 var(--serif-body);
  text-rendering: optimizeLegibility;
}
img, video, picture { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--copper); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--serif-head); font-weight: 400; line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.prose { max-width: calc(760px + 2 * var(--gutter)); }
.center { text-align: center; }
.muted { color: var(--muted); }
.eyebrow { font-family: var(--serif-head); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .75em; }
.eyebrow a { text-decoration: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5em 1em; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* Buttons */
.btn {
  display: inline-block; font: 400 1rem/1 var(--serif-head); letter-spacing: .02em;
  padding: 1em 1.6em; background: var(--ink); color: #fff; border: 1px solid var(--ink);
  border-radius: var(--radius); text-decoration: none; cursor: pointer; transition: background .15s, color .15s;
}
.btn:hover { background: var(--copper-dark); border-color: var(--copper-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-block { display: block; width: 100%; text-align: center; }
.link-arrow { font-family: var(--serif-head); font-size: .95rem; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link-arrow::after { content: " →"; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.logo img { width: 110px; height: auto; }
.menu-toggle { background: none; border: 0; cursor: pointer; width: 44px; height: 44px; padding: 13px 10px; }
.menu-toggle span:not(.visually-hidden) { display: block; height: 1.5px; background: var(--ink); margin-bottom: 6px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 4px 20px; }
.site-nav li { white-space: nowrap; }
.site-nav a { font-size: 1rem; text-decoration: none; color: var(--ink-soft); padding: 6px 0; display: inline-block; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
@media (min-width: 1181px) { .menu-toggle { display: none; } }
@media (max-width: 1180px) {
  .header-inner { flex-wrap: wrap; }
  .js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; }
  .js .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { font-size: 1.15rem; padding: 10px 0; display: block; }
}

/* Hero */
.hero { margin-top: 0 !important; position: relative; min-height: min(86vh, 820px); display: grid; align-items: end; overflow: hidden; background: var(--ink); }
.hero picture, .hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.55) 100%); }
.hero-text { position: relative; z-index: 1; color: #fff; max-width: var(--wrap); width: 100%; margin: 0 auto; padding: 0 var(--gutter) clamp(32px, 7vw, 80px); }
.hero-text h1 { font-size: clamp(2.5rem, 7vw, 4.75rem); margin-bottom: .2em; }
.hero-text p { max-width: 34em; font-size: 1.2rem; }
.hero-text .eyebrow { color: rgba(255,255,255,.85); }
.hero-text a:hover { color: #fff; opacity: .8; }

/* Sections */
main > section, .content-page > section { margin-block: clamp(40px, 7vw, 88px); }
.page-head { padding-top: clamp(32px, 6vw, 64px); margin-bottom: clamp(24px, 4vw, 40px); }
.page-head .lead { max-width: 46em; font-size: 1.2rem; color: var(--ink-soft); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.band { background: var(--paper-warm); padding-block: clamp(40px, 6vw, 72px); max-width: none; }
.band > * { max-width: 760px; margin-inline: auto; }

.media-block { display: grid; gap: clamp(24px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) {
  .media-block { grid-template-columns: 1fr 1fr; }
  .media-block.flip .media-block-img { order: 2; }
}
.media-block-img img { width: 100%; }

/* Rich text */
.rte h2 { margin-top: 1.4em; }
.rte h2:first-child, .rte h3:first-child { margin-top: 0; }
.rte h3 { margin-top: 1.4em; }
.rte img { margin-block: 1.5em; }
.rte ul, .rte ol { padding-left: 1.2em; }
.rte a { color: var(--copper-dark); }

/* Grid + cards */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(20px, 3vw, 36px) clamp(16px, 2.4vw, 28px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.card a { text-decoration: none; display: block; }
/* Painting cards show the whole image at its own shape (as on the old Shopify site). */
.card-media { position: relative; background: var(--paper-warm); overflow: hidden; }
.card-media img { width: 100%; height: auto; transition: transform .5s ease; }
/* Collection tiles stay square-cropped, like Shopify's collection list. */
.grid-collections .card-media { aspect-ratio: 1 / 1; }
.grid-collections .card-media picture { width: 100%; height: 100%; }
.grid-collections .card-media img { height: 100%; object-fit: cover; }
.card a:hover .card-media img { transform: scale(1.03); }
.card-title { font-size: 1.05rem; margin: .8em 0 .2em; }
.card-meta { color: var(--muted); margin: 0; font-size: 1rem; }
.badge { position: absolute; left: 10px; bottom: 10px; background: var(--sold); color: #fff; font: .75rem/1 var(--serif-head); letter-spacing: .08em; text-transform: uppercase; padding: .55em .8em; border-radius: 20px; }
.grid-collections .card-title { font-size: 1.2rem; }

/* Product */
.product { display: grid; gap: clamp(24px, 5vw, 64px); padding-top: clamp(24px, 4vw, 48px); }
@media (min-width: 900px) {
  .product { grid-template-columns: 7fr 5fr; align-items: start; }
  .product-info { position: sticky; top: 100px; }
}
.product-media { display: grid; gap: 16px; }
.product-media figure { margin: 0; background: var(--paper-warm); }
.product-media video { width: 100%; background: #000; }
.product-info h1 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
.price { font-size: 1.4rem; margin-bottom: .2em; }
.status { font-family: var(--serif-head); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1.2em; }
.status.available { color: #2f6b3a; }
.status.sold { display: inline-block; background: var(--sold); color: #fff; padding: .45em .9em; border-radius: 20px; }
.product-info .rte { margin-top: 2em; padding-top: 1.5em; border-top: 1px solid var(--line); }
.in-collections { color: var(--muted); }
.in-collections a { color: var(--ink); }
.enquire { margin-top: 2.5em; padding: clamp(20px, 3vw, 32px); background: var(--paper-warm); scroll-margin-top: 100px; }
.enquire h2 { font-size: 1.35rem; }
.related { border-top: 1px solid var(--line); padding-top: clamp(32px, 5vw, 56px); }

/* Forms */
.form { display: grid; gap: 16px; max-width: 560px; }
.form-inline { grid-template-columns: 1fr auto; gap: 10px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 1rem; }
.opt { color: var(--muted); }
input, textarea {
  font: inherit; font-size: 1.05rem; color: var(--ink); background: #fff;
  border: 1px solid #bdb6ac; border-radius: var(--radius); padding: .7em .85em; width: 100%;
}
input:focus, textarea:focus { outline: 2px solid var(--copper); outline-offset: 0; border-color: var(--copper); }
.form-inline .btn { padding-block: .85em; }
@media (max-width: 480px) { .form-inline { grid-template-columns: 1fr; } }
.form-section { margin-top: 0; }

/* Footer */
.site-footer { margin-top: clamp(48px, 8vw, 96px); border-top: 1px solid var(--line); padding-block: clamp(40px, 6vw, 64px) 32px; font-size: 1rem; }
.footer-signup { max-width: 640px; margin-bottom: 48px; }
.footer-signup h2 { font-size: 1.5rem; }
.footer-cols { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); padding-top: 32px; border-top: 1px solid var(--line); }
.footer-h { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35em; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.social { display: flex; gap: 16px; flex-wrap: wrap; }
.copyright { color: var(--muted); font-size: .9rem; margin-top: 40px; }

/* Cookie banner (only shown when Google Analytics is set up) */
.cookie-banner {
  position: fixed; z-index: 20; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin-inline: auto;
  background: var(--paper); border: 1px solid var(--line); box-shadow: 0 6px 30px rgba(0,0,0,.12);
  padding: 20px 22px; font-size: 1rem; display: grid; gap: 14px;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; }
.cookie-banner a { color: var(--copper-dark); }
.cookie-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.cookie-actions .btn { padding: .75em 1.4em; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button:hover { color: var(--copper); }

/* Buy reassurance on available paintings */
.buy-points { list-style: none; padding: 0; margin: 1em 0 0; font-size: 1rem; color: var(--ink-soft); }
.buy-points li { padding-left: 1.4em; position: relative; margin-bottom: .35em; }
.buy-points li::before { content: "✓"; position: absolute; left: 0; color: #2f6b3a; }
fieldset.choice { border: 0; padding: 0; margin: 0; }
fieldset.choice legend { font-size: 1rem; padding: 0; margin-bottom: 6px; }
fieldset.choice label { display: flex; gap: .6em; align-items: baseline; font-size: 1rem; margin-bottom: 4px; cursor: pointer; }
fieldset.choice input { width: auto; }

/* Sale prices: original crossed out, sale price in copper, "Sale" badge (as on Shopify) */
.was { color: var(--muted); text-decoration-thickness: 1px; margin-right: .35em; }
.now { color: var(--copper-dark); }
.badge-sale { background: var(--copper-dark); }
.badge-inline { position: static; display: inline-block; vertical-align: middle; color: #fff; font: .7rem/1 var(--serif-head); letter-spacing: .08em; text-transform: uppercase; padding: .5em .75em; border-radius: 20px; margin-left: .4em; }

/* Collection bar: count + sort control */
.collection-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.collection-bar .muted { margin: 0; }
.sort { display: inline-flex; align-items: center; gap: .6em; font-size: 1rem; color: var(--ink-soft); }
.sort[hidden] { display: none; }
.sort select { font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 1px solid #bdb6ac; border-radius: var(--radius); padding: .45em 2em .45em .7em; cursor: pointer; }
.sort select:focus { outline: 2px solid var(--copper); outline-offset: 0; }
