/* ── Custom Properties ──────────────────────────────────────────────────── */

:root {
  --clr-navy:    #112437;
  --clr-slate:   #3D3E4A;
  --clr-coastal: #466279;
  --clr-mist:    #C0C2D1;
  --clr-sand:    #D1C6B3;
  --clr-white:   #FFFFFF;
  --clr-warm:    #faf7f4;
  --ease:        0.28s ease;
  --content-pad: max(1.5rem, calc((100vw - 1100px) / 2 + 1.5rem));
}

/* ── Base ───────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--clr-warm);
  color: var(--clr-slate);
}

img { max-width: 100%; height: auto; display: block; }

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--clr-mist);
  position: sticky;
  top: 0;
  z-index: 200;
}

.site-header > .wp-block-group {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

/* Site title uses Eyesome (the artist's signature) */
.wp-block-site-title a {
  text-decoration: none !important;
  color: var(--clr-navy) !important;
  transition: color var(--ease);
}

.wp-block-site-title a:hover { color: var(--clr-coastal) !important; }

/* Navigation */
.wp-block-navigation a {
  text-decoration: none !important;
  color: var(--clr-slate);
  transition: color var(--ease);
}

.wp-block-navigation a:hover { color: var(--clr-coastal); }

.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
  color: var(--clr-navy);
}

/* ── Hero — painting first, label second ───────────────────────────────── */

.hero-primary {
  overflow: hidden !important;
  position: relative;
}

/* Convert the WP overlay span into a gradient that rises from the bottom.
   Top 50% of the painting is completely clear — you see the full work.
   The bottom third fades to navy for text legibility. */
.hero-primary .wp-block-cover__background {
  background: linear-gradient(
    to top,
    rgba(17, 36, 55, 0.78) 0%,
    rgba(17, 36, 55, 0.4)  30%,
    rgba(17, 36, 55, 0.05) 60%,
    transparent            100%
  ) !important;
  opacity: 1 !important;
}

/* Parallax — image taller than container, JS shifts it on scroll */
.hero-primary .wp-block-cover__image-background {
  height: 130% !important;
  top: -15% !important;
  will-change: transform;
}

/* Text at the bottom-left — absolutely positioned inside the cover block.
   WP Cover already has position:relative, so this anchors to its bottom edge. */
.hero-primary .wp-block-cover__inner-container {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: none !important;
  padding-left: var(--content-pad) !important;
  padding-right: 2rem !important;
  padding-bottom: 3.75rem !important;
}

/* ── Section eyebrows ───────────────────────────────────────────────────── */

.section-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clr-coastal);
  display: block;
  margin-bottom: 0.6rem;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.wp-block-button__link {
  transition: background-color var(--ease), color var(--ease), border-color var(--ease);
  border-radius: 0 !important;
}

/* Default (light background) */
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent !important;
  color: var(--clr-navy) !important;
  border: 1px solid var(--clr-mist) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--clr-navy) !important;
  border-color: var(--clr-navy) !important;
  color: var(--clr-white) !important;
}

/* On dark/navy backgrounds */
.hero-primary .wp-block-button.is-style-outline .wp-block-button__link,
.has-navy-background-color .wp-block-button.is-style-outline .wp-block-button__link {
  color: var(--clr-white) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  background: transparent !important;
}

.hero-primary .wp-block-button.is-style-outline .wp-block-button__link:hover,
.has-navy-background-color .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.8) !important;
}

/* White filled button on dark bg */
.hero-primary .is-style-fill .wp-block-button__link,
.has-navy-background-color .is-style-fill .wp-block-button__link {
  background: var(--clr-white) !important;
  color: var(--clr-navy) !important;
  border: none !important;
}

.hero-primary .is-style-fill .wp-block-button__link:hover,
.has-navy-background-color .is-style-fill .wp-block-button__link:hover {
  background: var(--clr-mist) !important;
}

/* ── WooCommerce — product grid ─────────────────────────────────────────── */

/* Base grid (shop page, archive) */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  float: none !important;
  width: 100% !important;
}

@media (max-width: 900px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (max-width: 520px) {
  .woocommerce ul.products { grid-template-columns: 1fr; }
}

/* ── Featured front-page grid: 1 large left + 2 stacked right ───────────── */

.shop-featured .woocommerce ul.products {
  grid-template-columns: 5fr 3fr !important;
  grid-template-rows: 1fr 1fr !important;
  gap: 1.25rem !important;
}

.shop-featured .woocommerce ul.products li.product:first-child {
  grid-row: 1 / 3;
}

.shop-featured .woocommerce ul.products li.product:first-child .woocommerce-loop-product__link {
  height: 100%;
}

.shop-featured .woocommerce ul.products li.product:first-child .woocommerce-loop-product__link img {
  height: 100% !important;
  min-height: 380px;
  aspect-ratio: auto !important;
  object-fit: cover;
}

@media (max-width: 700px) {
  .shop-featured .woocommerce ul.products {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }

  .shop-featured .woocommerce ul.products li.product:first-child {
    grid-row: auto;
  }

  .shop-featured .woocommerce ul.products li.product:first-child .woocommerce-loop-product__link img {
    height: auto !important;
    aspect-ratio: 4/3 !important;
  }
}

/* ── Product cards (shared) ─────────────────────────────────────────────── */

.woocommerce ul.products li.product {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
}

/* Clip container for the scale-on-hover — linen mat around each painting */
.woocommerce ul.products li.product .woocommerce-loop-product__link {
  display: block;
  overflow: hidden;
  background: var(--clr-sand);
  padding: 8px;
  box-shadow: 0 4px 20px rgba(17,36,55,0.08), 0 1px 4px rgba(17,36,55,0.04);
  transition: box-shadow 0.4s ease;
}

.woocommerce ul.products li.product:hover .woocommerce-loop-product__link {
  box-shadow: 0 8px 32px rgba(17,36,55,0.13), 0 2px 6px rgba(17,36,55,0.06);
}

.woocommerce ul.products li.product .woocommerce-loop-product__link img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.woocommerce ul.products li.product:hover .woocommerce-loop-product__link img {
  transform: scale(1.04);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: 'Lovelace', 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--clr-navy);
  margin-top: 0.75rem;
  padding: 0;
  line-height: 1.3;
}

.woocommerce ul.products li.product .price {
  font-size: 0.78rem;
  color: var(--clr-coastal);
  margin-top: 0.2rem;
  letter-spacing: 0.02em;
}

/* Ghost/outline "add to cart" — the painting is the CTA, not the button */
.woocommerce ul.products li.product .button {
  font-size: 0.68rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  background: transparent !important;
  color: var(--clr-slate) !important;
  border: 1px solid var(--clr-mist) !important;
  border-radius: 0 !important;
  padding: 0.5rem 1.1rem !important;
  margin-top: 0.65rem;
  transition: background var(--ease), border-color var(--ease), color var(--ease) !important;
  display: inline-block;
}

.woocommerce ul.products li.product .button:hover {
  background: var(--clr-navy) !important;
  border-color: var(--clr-navy) !important;
  color: var(--clr-white) !important;
}

/* ── Single product ─────────────────────────────────────────────────────── */

.woocommerce div.product .product_title {
  font-family: 'Lovelace', 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--clr-navy);
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
  font-size: 1.15rem;
  color: var(--clr-coastal);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  font-family: 'Lovelace', 'Cormorant Garamond', Georgia, serif;
}

/* All WooCommerce action buttons */
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce .single_add_to_cart_button {
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase !important;
  background: var(--clr-navy) !important;
  color: var(--clr-white) !important;
  border-radius: 0 !important;
  border: none !important;
  padding: 0.9rem 2.25rem !important;
  transition: background var(--ease) !important;
}

.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce .single_add_to_cart_button:hover {
  background: var(--clr-coastal) !important;
  color: var(--clr-white) !important;
}

/* Cart & checkout */
.woocommerce table.shop_table th { font-weight: 500; }

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  background: var(--clr-navy) !important;
  color: var(--clr-white) !important;
  border-radius: 0 !important;
  font-size: 0.8rem !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase !important;
}

/* Notices */
.woocommerce-message,
.woocommerce-info { border-top-color: var(--clr-coastal); }

.woocommerce-message::before,
.woocommerce-info::before { color: var(--clr-coastal); }

/* ── Footer — dark navy ─────────────────────────────────────────────────── */

/* WordPress block gap adds a whitespace sliver between the last full-width
   section and the footer template part. Remove it. */
footer.wp-block-template-part {
  margin-top: 0 !important;
}

.site-footer {
  background: var(--clr-navy);
  border-top: none;
}

.site-footer,
.site-footer p { color: var(--clr-mist); }

.site-footer .wp-block-site-title a {
  color: var(--clr-white) !important;
}

.site-footer a {
  text-decoration: none;
  color: var(--clr-mist);
  transition: color var(--ease);
}

.site-footer a:hover { color: var(--clr-white); }

.site-footer .wp-block-separator {
  border-color: rgba(192, 194, 209, 0.18) !important;
  color: rgba(192, 194, 209, 0.18) !important;
}

/* ── Blog ───────────────────────────────────────────────────────────────── */

.wp-block-post-title a {
  text-decoration: none;
  color: var(--clr-navy);
  transition: color var(--ease);
}

.wp-block-post-title a:hover { color: var(--clr-coastal); }

/* ── Separator ──────────────────────────────────────────────────────────── */

.wp-block-separator {
  border-color: var(--clr-mist) !important;
  color: var(--clr-mist) !important;
}

/* ── Colour utility classes ─────────────────────────────────────────────── */

.has-navy-background-color    { background-color: var(--clr-navy)    !important; }
.has-sand-background-color    { background-color: var(--clr-sand)    !important; }
.has-mist-background-color    { background-color: var(--clr-mist)    !important; }
.has-coastal-background-color { background-color: var(--clr-coastal) !important; }
.has-white-background-color   { background-color: var(--clr-white)   !important; }
.has-warm-background-color    { background-color: var(--clr-warm)    !important; }
.has-navy-color               { color: var(--clr-navy)    !important; }
.has-coastal-color            { color: var(--clr-coastal) !important; }
.has-mist-color               { color: var(--clr-mist)    !important; }
.has-white-color              { color: var(--clr-white)   !important; }
.has-slate-color              { color: var(--clr-slate)   !important; }

/* ── Paper texture ───────────────────────────────────────────────────────── */
/* Applied via JS (parallax.js) to warm-ground and sand sections */

.has-texture { background-repeat: repeat; }

/* ── Coming soon / holding page ─────────────────────────────────────────── */

.coming-soon-page {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--clr-white);
}

.coming-soon-page .wp-block-site-title a {
  font-size: clamp(2.8rem, 8vw, 5rem) !important;
  color: var(--clr-navy) !important;
  letter-spacing: 0.02em;
}

.coming-soon-page .wp-block-separator {
  width: 3rem;
  margin-left: auto;
  margin-right: auto;
}

/* Mailchimp for WordPress form */
.coming-soon-page .mc4wp-form {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.coming-soon-page .mc4wp-form-fields {
  display: flex;
  gap: 0;
}

.coming-soon-page .mc4wp-form input[type="email"] {
  flex: 1;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--clr-mist);
  border-right: none;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--clr-slate);
  background: var(--clr-white);
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
}

.coming-soon-page .mc4wp-form input[type="email"]:focus {
  border-color: var(--clr-coastal);
}

.coming-soon-page .mc4wp-form input[type="submit"] {
  padding: 0.85rem 1.5rem;
  background: var(--clr-navy);
  color: var(--clr-white);
  border: 1px solid var(--clr-navy);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease);
  border-radius: 0;
}

.coming-soon-page .mc4wp-form input[type="submit"]:hover {
  background: var(--clr-coastal);
  border-color: var(--clr-coastal);
}

.coming-soon-page .mc4wp-form .mc4wp-response p {
  font-size: 0.85rem;
  margin-top: 0.75rem;
  color: var(--clr-coastal);
}

@media (max-width: 480px) {
  .coming-soon-page .mc4wp-form-fields {
    flex-direction: column;
  }

  .coming-soon-page .mc4wp-form input[type="email"] {
    border-right: 1px solid var(--clr-mist);
    border-bottom: none;
  }
}
