/*
Theme Name: Merellia
Theme URI: https://truliesmods.co.uk
Author: Trulie's Mods
Author URI: https://truliesmods.co.uk
Description: A clean, modern block-first WooCommerce theme for boutiques and online stores.
Version: 0.9.10
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: merellia
Tags: e-commerce, block-patterns, custom-logo, full-site-editing, wide-blocks
*/

/* Brand fallback: show the site title until a logo is chosen. */
.merellia-brand:has(.custom-logo) .wp-block-site-title { display:none; }
.merellia-brand .wp-block-site-title { margin:0; }
.merellia-brand .wp-block-site-title a { text-decoration:none; }

/* Keep store content away from the viewport edge. */
.woocommerce main,
.woocommerce-page main { box-sizing:border-box; }

@media (max-width: 782px) {
  /* Compact Merellia header on phones. */
  .wc-blocks-header-pattern > .wp-block-columns {
    min-height:0 !important;
    margin:0 !important;
    padding:10px 18px !important;
    align-items:center !important;
  }
  .wc-blocks-header-pattern > .wp-block-columns .wp-block-column,
  .wc-blocks-header-pattern > .wp-block-columns .wp-block-group {
    min-height:0 !important;
    margin-top:0 !important;
    margin-bottom:0 !important;
  }
  .wc-blocks-header-pattern .merellia-brand img { max-height:54px; width:auto !important; }
  .wc-blocks-header-pattern .merellia-brand .wp-block-site-title { font-size:24px !important; }

  .wc-blocks-header-pattern > .wp-block-group {
    min-height:0 !important;
    height:auto !important;
    margin:0 !important;
    padding:8px 18px !important;
    gap:24px !important;
  }
  .wc-blocks-header-pattern > .wp-block-separator { margin:0 !important; }
  .wc-block-navigation__responsive-container-open { margin:0 !important; }

  /* Homepage */
  main > .wp-block-cover:first-child { min-height:440px !important; }
  main > .wp-block-group { padding-left:18px !important; padding-right:18px !important; }
  .wp-block-columns { gap:18px !important; }

  /* WooCommerce content */
  .woocommerce main,
  .woocommerce-page main,
  .wp-site-blocks > main { padding-left:18px; padding-right:18px; }

  /* Footer: remove the giant mobile gaps inherited from the editor export. */
  footer .wp-block-group,
  footer .wp-block-columns,
  footer .wp-block-column { min-height:0 !important; }
  footer .wp-block-group { padding-top:24px !important; padding-bottom:24px !important; }
  footer .wp-block-columns { margin-top:0 !important; margin-bottom:0 !important; gap:28px !important; }
  footer .wp-block-navigation { margin-top:8px !important; }
  footer .wp-block-navigation__container { gap:12px !important; }
  footer .wp-block-site-logo img { max-height:70px; width:auto !important; }
}


/* Merellia 0.5 dynamic commercial category cards */
.merellia-category-card{position:relative;display:block;overflow:hidden;aspect-ratio:1/1;text-decoration:none;background:#f3eef0}
.merellia-category-card img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s ease}
.merellia-category-card:hover img{transform:scale(1.025)}
.merellia-category-label{position:absolute;left:50%;bottom:7%;transform:translateX(-50%);min-width:46%;max-width:86%;box-sizing:border-box;padding:14px 20px;background:#b86f8b;color:#fff;text-align:center;text-transform:uppercase;font-weight:600;letter-spacing:.02em;line-height:1.15}
.merellia-category-empty{display:flex;align-items:center;justify-content:center;padding:24px;box-sizing:border-box;color:#555;text-align:center}
@media(max-width:782px){.merellia-category-label{padding:13px 16px;font-size:1rem;min-width:52%}}

/* Flexible category grid — Merellia 0.6 */
.merellia-category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin-top:32px}
@media(max-width:782px){.merellia-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}}
@media(max-width:480px){.merellia-category-grid{grid-template-columns:1fr}}

/* Merellia 0.6.1 */
.wc-blocks-header-pattern .wp-block-site-logo img{width:auto!important;max-width:min(220px,45vw)!important;max-height:90px!important;object-fit:contain}
.merellia-social-links{display:flex;flex-wrap:wrap;gap:14px;margin-top:8px}.merellia-social-links a{color:inherit;text-decoration:none}.merellia-social-links a:hover{text-decoration:underline}


/* Merellia 0.6.2 — commercial navigation + footer */
.merellia-main-nav{display:flex;align-items:center;justify-content:center;position:relative}
.merellia-main-nav__toggle{display:none;background:transparent;border:0;padding:8px;cursor:pointer;line-height:0}
.merellia-main-nav__toggle svg{width:30px;height:30px}
.merellia-main-nav__links{display:flex;align-items:center;justify-content:center;gap:30px;list-style:none;margin:0;padding:0}
.merellia-main-nav__links a{text-decoration:none;color:inherit}
.merellia-main-nav__close{display:none}
.merellia-social-links{gap:10px}.merellia-social-links a{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border:1px solid currentColor;border-radius:50%;text-decoration:none!important}.merellia-social-links svg{width:19px;height:19px;fill:currentColor}
.merellia-footer-grid{display:grid;grid-template-columns:minmax(260px,2fr) 1fr 1fr;gap:48px;align-items:start}
.merellia-footer-brand .custom-logo{max-width:260px;max-height:90px;width:auto;height:auto}
.merellia-footer-brand h5{margin:28px 0 10px}.merellia-footer-brand p{margin:0 0 22px}
.merellia-footer-column h5{margin:0 0 14px}.merellia-footer-links{list-style:none;margin:0;padding:0;display:grid;gap:10px}.merellia-footer-links a{text-decoration:none;color:inherit}
.merellia-footer-bottom{text-align:center;margin-top:34px;padding-top:22px;border-top:1px solid rgba(0,0,0,.12)}
@media(max-width:782px){
 .merellia-main-nav__toggle{display:inline-flex}
 .merellia-main-nav__links{display:none;position:fixed;inset:0;z-index:100000;background:#fff;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:0;padding:92px 28px 40px;overflow:auto}
 .merellia-main-nav.is-open .merellia-main-nav__links{display:flex}
 .merellia-main-nav__links li{width:100%;border-bottom:1px solid rgba(0,0,0,.08)}
 .merellia-main-nav__links a{display:block;padding:18px 0;font-size:1.25rem}
 .merellia-main-nav__close{display:block;position:absolute;top:24px;right:24px;border:0;background:transparent;font-size:38px;line-height:1;cursor:pointer}
 body.merellia-menu-open{overflow:hidden}
 .merellia-footer-grid{grid-template-columns:1fr;gap:28px}
 .merellia-footer-brand .custom-logo{max-width:220px}
 .merellia-footer-bottom{margin-top:26px}
}

/* Merellia 0.6.3 — compact configurable footer */
.wc-blocks-footer-pattern{padding:32px 40px!important}
.merellia-footer-grid{grid-template-columns:minmax(240px,1.5fr) repeat(2,minmax(150px,1fr));gap:36px;max-width:1200px;margin:0 auto}
.merellia-footer-brand p{margin:16px 0 18px;max-width:440px}.merellia-footer-site-name{font-size:1.35rem}
.merellia-footer-bottom{max-width:1200px;margin:26px auto 0;padding-top:18px}
@media(max-width:782px){.wc-blocks-footer-pattern{padding:28px 20px!important}.merellia-footer-grid{grid-template-columns:1fr;gap:24px}.merellia-footer-bottom{text-align:left;margin-top:24px}}


/* Merellia 0.6.4 — editable commercial hero */
.merellia-hero{min-height:520px;background:#ead6df;background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;padding:64px 24px;box-sizing:border-box;text-align:center}
.merellia-hero__inner{width:min(900px,100%);margin:auto}.merellia-hero h1{font-size:clamp(42px,7vw,82px);line-height:1.05;margin:0 0 24px}.merellia-hero p{font-size:clamp(18px,2vw,24px);line-height:1.5;margin:0 auto 30px;max-width:760px}.merellia-hero__button{display:inline-block;text-decoration:none}.merellia-hero.has-image .merellia-hero__inner{background:rgba(255,250,252,.82);padding:38px;box-sizing:border-box}
@media(max-width:782px){.merellia-hero{min-height:440px;padding:48px 20px}.merellia-hero.has-image .merellia-hero__inner{padding:28px 20px}}


/* Merellia 0.6.6 — product page polish */
/* Store links use the Merellia charcoal rather than browser blue. */
.woocommerce a:not(.wp-element-button):not(.button),
.woocommerce-page a:not(.wp-element-button):not(.button),
.wc-block-components-breadcrumbs a,
.wp-block-post-terms a {
  color:#2f2f2f;
}
.woocommerce a:not(.wp-element-button):not(.button):hover,
.woocommerce-page a:not(.wp-element-button):not(.button):hover,
.wc-block-components-breadcrumbs a:hover,
.wp-block-post-terms a:hover {
  color:#b86f8b;
}

/* Product gallery: thumbnails form a rail beside the main image on desktop. */
.single-product .wc-block-product-gallery {
  display:grid;
  grid-template-columns:84px minmax(0,1fr);
  gap:16px;
  align-items:start;
}
.single-product .wc-block-product-gallery-thumbnails {
  grid-column:1;
  grid-row:1;
  width:84px;
  min-width:0;
}
.single-product .wc-block-product-gallery-large-image {
  grid-column:2;
  grid-row:1;
  min-width:0;
}
.single-product .wc-block-product-gallery-thumbnails__thumbnail {
  width:84px!important;
  height:84px!important;
  margin:0 0 10px!important;
}
.single-product .wc-block-product-gallery-thumbnails__thumbnail img {
  width:100%!important;
  height:100%!important;
  object-fit:cover;
}

@media(max-width:782px){
  .single-product .wc-block-product-gallery {
    display:flex;
    flex-direction:column;
    gap:12px;
  }
  .single-product .wc-block-product-gallery-large-image { order:1; width:100%; }
  .single-product .wc-block-product-gallery-thumbnails {
    order:2;
    width:100%;
    display:flex;
    gap:10px;
    overflow-x:auto;
  }
  .single-product .wc-block-product-gallery-thumbnails__thumbnail {
    flex:0 0 72px;
    width:72px!important;
    height:72px!important;
    margin:0!important;
  }
}

/* Merellia 0.6.8: keep homepage New Arrivals product titles on-brand. */
.wp-block-woocommerce-product-collection .wp-block-post-title a,
.wp-block-woocommerce-product-collection .wc-block-components-product-name { color:#2f2f2f !important; text-decoration:none; }
.wp-block-woocommerce-product-collection .wp-block-post-title a:hover,
.wp-block-woocommerce-product-collection .wc-block-components-product-name:hover { color:#b86f8b !important; }

/* 0.7.4: consistent category art for all merchant image proportions. */
.merellia-category-grid {align-items:stretch;}
.merellia-category-card {width:100%;min-width:0;aspect-ratio:1 / 1;isolation:isolate;}
.merellia-category-card > img,.merellia-category-art {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;display:block;}
.merellia-category-art {background:radial-gradient(ellipse at 78% 18%,rgba(255,255,255,.8),transparent 45%),linear-gradient(145deg,#eee8e7,#d8ccd0 58%,#f7f3f0);}
.merellia-category-card--fallback-2 .merellia-category-art {background:radial-gradient(circle at 18% 78%,#fff9f3,transparent 48%),linear-gradient(135deg,#e6dce0,#d9d7d0);}
.merellia-category-card--fallback-3 .merellia-category-art {background:radial-gradient(circle at 78% 80%,#f9f7f3,transparent 42%),linear-gradient(145deg,#e8e3df,#d7c9c9);}
.merellia-category-card--fallback-4 .merellia-category-art {background:radial-gradient(circle at 20% 15%,#fefbf7,transparent 43%),linear-gradient(155deg,#dcd9d4,#eadde0);}
.merellia-category-card--fallback-5 .merellia-category-art {background:radial-gradient(circle at 75% 30%,#fffdf9,transparent 45%),linear-gradient(125deg,#e9e2dc,#d9d5d7);}
.merellia-category-card--fallback-6 .merellia-category-art {background:radial-gradient(circle at 15% 65%,#fcf8f7,transparent 45%),linear-gradient(145deg,#ded2d5,#eee8e1);}
.merellia-category-label {z-index:1;white-space:normal;overflow-wrap:anywhere;}
/* Shortcode wrappers can inherit global block spacing; keep the hero and next section together. */
main > .wp-block-shortcode:has(> .merellia-hero) {margin-block:0;}
main > .wp-block-shortcode:has(> .merellia-hero) + .wp-block-group {margin-block-start:0;}
@media(max-width:782px){
  .merellia-hero{min-height:0;padding:28px 16px;}
  .merellia-hero.has-image .merellia-hero__inner{padding:24px 18px;}
  .merellia-hero h1{font-size:clamp(36px,9vw,56px);}
  main > .wp-block-shortcode:has(> .merellia-hero) + .wp-block-group {padding-top:32px!important;}
}

/* 0.7.5: image-backed, unbranded fallback for category cards without merchant images. */
.merellia-category-card--fallback .merellia-category-art,
.merellia-category-card--fallback-2 .merellia-category-art,
.merellia-category-card--fallback-3 .merellia-category-art,
.merellia-category-card--fallback-4 .merellia-category-art,
.merellia-category-card--fallback-5 .merellia-category-art,
.merellia-category-card--fallback-6 .merellia-category-art {
    background: #f3eef0 url('assets/images/category-default.jpg') center center / cover no-repeat;
}


/* Portable header live product search */
.merellia-search{position:relative;display:inline-flex;align-items:center;z-index:30}
.merellia-search__toggle{display:flex;align-items:center;justify-content:center;background:transparent;border:0;color:inherit;cursor:pointer;width:42px;height:42px;padding:9px}
.merellia-search__toggle:focus-visible,.merellia-search__panel a:focus-visible{outline:2px solid #b86f8b;outline-offset:3px}
.merellia-search__panel{position:absolute;right:0;top:calc(100% + 10px);width:min(370px,calc(100vw - 24px));padding:14px;background:#fff;box-shadow:0 8px 30px #0002;border:1px solid #ead6df;border-radius:6px;color:#292429;z-index:100}
.merellia-search__panel[hidden]{display:none!important}
.merellia-search__panel form{display:flex;gap:6px;margin:0}
.merellia-search__panel input{width:100%;min-width:0;padding:10px;border:1px solid #bcb3b8;border-radius:3px;font:inherit}
.merellia-search__panel form button{background:#b86f8b;color:white;border:0;border-radius:3px;padding:9px 14px;cursor:pointer;flex:0 0 auto;min-width:78px;white-space:nowrap;word-break:normal;overflow-wrap:normal}
.merellia-search__results{font-size:14px}
.merellia-search__results ul{list-style:none;padding:0;margin:10px 0 0;max-height:330px;overflow:auto}
.merellia-search__results li+li{border-top:1px solid #f3eef0}
.merellia-search__results a{display:flex;gap:12px;align-items:center;padding:9px 0;text-decoration:none;color:inherit}
.merellia-search__results img{width:48px;height:56px;object-fit:cover;flex:none}
.merellia-search__results strong,.merellia-search__results small{display:block}
.merellia-search__results small{margin-top:3px;color:#6a5860}

/* Mobile live search: keep the popover fully inside the viewport. */
@media (max-width: 600px) {
  .merellia-search__panel {
    position: fixed;
    top: 110px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    box-sizing: border-box;
    padding: 12px;
  }
  .merellia-search__panel form { width: 100%; min-width: 0; }
  .merellia-search__panel input[type="search"] {
    flex: 1 1 0; width: 0; min-width: 0; box-sizing: border-box;
    font-size: 16px;
  }
  .merellia-search__panel form button {
    flex: 0 0 auto; white-space: nowrap; overflow-wrap: normal;
  }
}

/* Merellia 0.8.0: native product quantity stepper fills its full height. */
form.cart .merellia-quantity-enhanced > .merellia-qty-minus,
form.cart .merellia-quantity-enhanced > .merellia-qty-plus {
  display:flex; align-items:center; justify-content:center; align-self:stretch;
  height:100%; min-height:0; margin:0; padding:0; box-sizing:border-box;
}
/* Friendly empty-category action follows the theme's standard button palette. */
.merellia-empty-shop-button .wp-block-button__link {
  background:#b86f8b; color:#fff; text-decoration:none;
  border-radius:4px; padding:.8em 1.4em;
}
.merellia-empty-shop-button .wp-block-button__link:hover { background:#985874; }

/* 0.8.0 r2: lock the stepper into three explicit equal-height grid cells.
   Woo/block/global button rules can otherwise leave an unpainted strip. */
form.cart .quantity.merellia-quantity-enhanced {
 display: inline-grid !important; grid-template-columns: 42px 58px 42px !important;
 grid-template-rows: 44px !important; width: 142px !important; height: 44px !important;
 align-items: stretch !important; justify-items: stretch !important;
 padding: 0 !important; gap: 0 !important; box-sizing: border-box !important;
}
form.cart .quantity.merellia-quantity-enhanced > button.merellia-qty-minus,
form.cart .quantity.merellia-quantity-enhanced > button.merellia-qty-plus {
 display: flex !important; width: 100% !important; min-width: 0 !important;
 height: 100% !important; min-height: 0 !important; max-height: none !important;
 margin: 0 !important; padding: 0 !important; border: 0 !important;
 border-radius: 0 !important; background: #f3eef0 !important;
 align-self: stretch !important; justify-self: stretch !important;
 align-items: center !important; justify-content: center !important;
 box-sizing: border-box !important; line-height: 1 !important;
}
form.cart .quantity.merellia-quantity-enhanced > input.qty {
 width: 100% !important; min-width: 0 !important; height: 100% !important;
 min-height: 0 !important; margin: 0 !important; padding: 0 !important;
 box-sizing: border-box !important; border-radius: 0 !important;
}
form.cart .quantity.merellia-quantity-enhanced > button:hover { background: #ead6df !important; }

/* 0.8.1: paint the entire quantity stepper, including its right-hand cell.
   Explicit grid placement and button appearance prevent inherited theme styles
   from leaving a thin unpainted strip on desktop. */
body.single-product form.cart .quantity.merellia-quantity-enhanced {
  display: inline-grid !important;
  grid-template-columns: 42px 58px 42px !important;
  grid-template-rows: 44px !important;
  width: 144px !important; height: 46px !important;
  padding: 0 !important; margin-right: 12px !important;
  border: 1px solid #d9c3cc !important; border-radius: 5px !important;
  gap: 0 !important; overflow: hidden !important;
  align-items: stretch !important; justify-items: stretch !important;
  background: #f3eef0 !important; box-sizing: border-box !important;
}
body.single-product form.cart .quantity.merellia-quantity-enhanced > .merellia-qty-minus,
body.single-product form.cart .quantity.merellia-quantity-enhanced > .merellia-qty-plus {
  appearance: none !important; -webkit-appearance: none !important;
  position: static !important; display: grid !important; place-items: center !important;
  width: 100% !important; height: 100% !important; min-width: 0 !important;
  min-height: 0 !important; max-width: none !important; max-height: none !important;
  padding: 0 !important; margin: 0 !important;
  background: #f3eef0 !important; color: #71465b !important;
  border: 0 !important; border-radius: 0 !important;
  line-height: 1 !important; box-shadow: none !important;
  box-sizing: border-box !important;
}
body.single-product form.cart .quantity.merellia-quantity-enhanced > .merellia-qty-minus { grid-column: 1; grid-row: 1; }
body.single-product form.cart .quantity.merellia-quantity-enhanced > input.qty {
  grid-column: 2; grid-row: 1; width: 100% !important; height: 100% !important;
  min-height: 0 !important; padding: 0 !important; margin: 0 !important;
  border: 0 !important; border-left: 1px solid #e9dce1 !important;
  border-right: 1px solid #e9dce1 !important; border-radius: 0 !important;
  background: #fff !important; box-sizing: border-box !important;
}
body.single-product form.cart .quantity.merellia-quantity-enhanced > .merellia-qty-plus { grid-column: 3; grid-row: 1; }
body.single-product form.cart .quantity.merellia-quantity-enhanced > button:hover { background: #ead6df !important; }



/* Merellia 0.8.9 — unified WooCommerce product image layout.
   Covers Woo Blocks product collections and classic product grids.
   Keep the complete image visible while making the photo frame fill the card. */
.wp-block-woocommerce-product-collection .wc-block-product-template > li,
.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-template > li {
  min-width:0; box-sizing:border-box;
  background:rgba(255,250,252,.94); border:1px solid rgba(185,117,142,.16);
  border-radius:12px; padding:14px; box-shadow:0 5px 22px rgba(105,48,70,.065);
}
.wp-block-woocommerce-product-collection :is(.wp-block-woocommerce-product-image,.wc-block-components-product-image) {
  display:block !important; position:relative; width:100% !important; max-width:none !important;
  min-width:0 !important; height:auto !important; aspect-ratio:1 / 1;
  margin:0 auto 14px !important; padding:0 !important; overflow:hidden;
  border-radius:8px; background:#fffafc;
}
.wp-block-woocommerce-product-collection :is(.wp-block-woocommerce-product-image,.wc-block-components-product-image) > a,
.wp-block-woocommerce-product-collection .wc-block-components-product-image__wrapper,
.wp-block-woocommerce-product-collection .wc-block-components-product-image__wrapper > a {
  display:block !important; width:100% !important; max-width:none !important;
  min-width:0 !important; height:100% !important; margin:0 !important; padding:0 !important;
}
.wp-block-woocommerce-product-collection :is(.wp-block-woocommerce-product-image,.wc-block-components-product-image) img,
.wp-block-woocommerce-product-collection img[data-testid="product-image"],
.woocommerce ul.products li.product a img {
  display:block !important; width:100% !important; max-width:100% !important;
  min-width:0 !important; height:100% !important; aspect-ratio:1 / 1;
  object-fit:cover !important; object-position:center !important; margin:0 !important;
}
/* Remove the inline intrinsic-width behaviour on modern WooCommerce image blocks. */
.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-image[style],
.wp-block-woocommerce-product-collection .wc-block-components-product-image[style] {
  width:100% !important; max-width:100% !important;
}
/* Single product photos should be generously sized, without clipping. */
body.single-product .wc-block-product-gallery-large-image,
body.single-product .wc-block-product-gallery-large-image__inner-blocks {width:100%;max-width:100%;min-width:0;}
body.single-product .wc-block-product-gallery-large-image img {width:100% !important;max-width:100% !important;height:auto !important;object-fit:contain !important;}
/* Delicate pink cloud marble, scaled consistently instead of oversized grey veins. */
body:not(.wp-admin) {
  background-color:#f8e9ed;
  background-image:url('assets/images/rose-marble.jpg?v=0815');
  background-size:cover;
  background-position:center top;
  background-repeat:no-repeat;
  background-attachment:fixed;
}
body:not(.wp-admin) .wp-site-blocks, body:not(.wp-admin) .wp-site-blocks > main {background:transparent;}
body:not(.wp-admin) .wp-site-blocks > header {background:rgba(255,250,252,.9);}
body:not(.wp-admin) .wp-block-woocommerce-product-collection .wp-block-button__link,
body:not(.wp-admin) .wp-block-woocommerce-product-collection .add_to_cart_button {background:#bd788f;color:#fff;border-radius:5px;}
@media(max-width:782px) {body:not(.wp-admin){background-attachment:scroll;background-size:cover;background-position:center top;}}

/* Merellia 0.8.10: Woo Blocks image wrappers can retain intrinsic sizes.
   Stretch the actual image element, not merely the outer product card. */
body .wp-block-woocommerce-product-collection .wp-block-woocommerce-product-image,
body .wp-block-woocommerce-product-collection .wc-block-components-product-image {
  width:100% !important; max-width:100% !important; aspect-ratio:1/1 !important;
}
body .wp-block-woocommerce-product-collection .wp-block-woocommerce-product-image > a,
body .wp-block-woocommerce-product-collection .wc-block-components-product-image > a {
  display:flex !important; align-items:stretch !important; width:100% !important; height:100% !important;
}
body .wp-block-woocommerce-product-collection .wp-block-woocommerce-product-image img,
body .wp-block-woocommerce-product-collection .wc-block-components-product-image img,
body .wp-block-woocommerce-product-collection img[data-testid="product-image"] {
  display:block !important; width:100% !important; height:100% !important;
  max-width:none !important; max-height:none !important; object-fit:cover !important;
}
/* Gallery media, including the nested Woo product image block. */
body.single-product .wc-block-product-gallery-large-image .wp-block-woocommerce-product-image,
body.single-product .wc-block-product-gallery-large-image .wp-block-woocommerce-product-image img {
  width:100% !important; max-width:100% !important; height:auto !important;
}

/* Merellia 0.8.12: default customer-replaceable brand and continuous marble. */
.merellia-default-brand{display:inline-flex;align-items:center;max-width:235px;text-decoration:none}
.merellia-default-brand img{display:block;width:100%;height:auto;max-height:84px;object-fit:contain}
.merellia-brand .custom-logo-link img{max-width:235px;height:auto;object-fit:contain}
/* Let the marble show through layout/footer containers; retain legible content panels. */
body:not(.wp-admin) .wp-site-blocks > footer,
body:not(.wp-admin) .wp-site-blocks > footer > .wp-block-group,
body:not(.wp-admin) footer.wp-block-template-part,
body:not(.wp-admin) .wp-site-blocks > main > .wp-block-group.alignfull:not(.has-background) {
 background-color:transparent !important;
 background-image:none !important;
}
body:not(.wp-admin) .wp-site-blocks > footer {border-top:1px solid rgba(166,87,121,.22)}
@media(max-width:600px){.merellia-default-brand{max-width:155px}.merellia-default-brand img{max-height:58px}}

/* Merellia 0.8.13 — boutique rose-gold finish. Preserve working product grids. */
body:not(.wp-admin) {
 background-color:#f9e9ef;
 background-image:linear-gradient(118deg,rgba(255,247,250,.11),rgba(255,224,233,.08) 48%,rgba(255,246,249,.1)),url('assets/images/rose-marble.jpg?v=0815');
 background-size:cover,cover;
 background-repeat:no-repeat,no-repeat;
 background-position:center top,center top;
}
/* Use one uninterrupted marble surface behind the whole page and footer. */
body:not(.wp-admin) .wp-site-blocks {background:transparent!important;min-height:100vh;}
body:not(.wp-admin) .wp-site-blocks > footer,
body:not(.wp-admin) .wp-site-blocks > footer .wc-blocks-footer-pattern {background:transparent!important;background-image:none!important;}
body:not(.wp-admin) .wp-site-blocks > footer {border-top:1px solid rgba(176,103,117,.35)!important;}
body:not(.wp-admin) .wc-blocks-footer-pattern {padding-top:26px!important;padding-bottom:20px!important;}
body:not(.wp-admin) .wc-blocks-footer-pattern a {text-decoration-color:#b9758e;text-underline-offset:3px;}
body:not(.wp-admin) .wc-blocks-footer-pattern h2,
body:not(.wp-admin) .wc-blocks-footer-pattern h3 {color:#874c66;}
body:not(.wp-admin) .merellia-default-brand img {filter:drop-shadow(0 2px 3px rgba(111,54,77,.12));}
body:not(.wp-admin) .wp-block-woocommerce-product-collection .wc-block-product-template > li,
body:not(.wp-admin) .wp-block-woocommerce-product-collection .wp-block-woocommerce-product-template > li {
 box-shadow:0 8px 24px rgba(118,64,82,.11);border-color:rgba(186,112,134,.24);
}
@media(max-width:782px){
 body:not(.wp-admin){background-attachment:scroll,scroll;background-size:auto 100%,auto 100%;background-position:center top,center top;}
 body:not(.wp-admin) .wc-blocks-footer-pattern{padding:26px 20px 18px!important;}
 body:not(.wp-admin) .wp-site-blocks > footer {margin-top:0!important;}
}

/* Merellia 0.8.14: updated pink and metallic rose-gold marble artwork. */

/* Merellia 0.8.15: vivid metallic rose-gold marble, cache-busted background asset. */

/* 0.8.16: frosted rose-gold marble storefront; original image unchanged. */
body:not(.wp-admin){background-image:linear-gradient(115deg,rgba(255,252,253,.74),rgba(255,246,250,.68) 55%,rgba(255,252,253,.74)),url('assets/images/rose-marble.jpg?v=0815');background-size:cover,cover;background-position:center top,center top;background-repeat:no-repeat,no-repeat}
body:not(.wp-admin) .wp-site-blocks > header{background:rgba(255,251,252,.83)!important;box-shadow:0 1px 12px rgba(120,59,79,.05)}
body:not(.wp-admin) .wc-blocks-header-pattern > .wp-block-columns{max-width:1240px;margin-left:auto!important;margin-right:auto!important}
body:not(.wp-admin) .wc-blocks-header-pattern > .wp-block-group{background:rgba(255,255,255,.42)}
body:not(.wp-admin) .merellia-hero{min-height:380px;background-size:cover!important;background-position:center!important;display:flex;align-items:center;position:relative}
body:not(.wp-admin) .merellia-hero:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(255,249,251,.94),rgba(255,249,251,.78) 34%,rgba(255,249,251,.04) 72%);pointer-events:none}
body:not(.wp-admin) .merellia-hero__inner{position:relative;z-index:1;max-width:1240px;width:100%;margin:0 auto;padding:50px 26px;box-sizing:border-box}
body:not(.wp-admin) .merellia-hero h1{font-family:Georgia,serif;color:#a51f58;font-weight:400;font-size:clamp(2.8rem,5vw,4.8rem);line-height:1.05;max-width:510px;margin:0 0 16px}
body:not(.wp-admin) .merellia-hero p{max-width:410px;color:#292127;font-size:1.06rem;line-height:1.5;margin:0 0 20px}
body:not(.wp-admin) .merellia-hero__button{background:#b86f8b;color:#fff;border-radius:5px;padding:12px 23px;text-decoration:none}
.merellia-benefits{max-width:1240px;margin:0 auto;padding:18px 25px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;background:rgba(255,255,255,.74);box-sizing:border-box}
.merellia-benefits>div{display:flex;align-items:center;justify-content:center;gap:13px}
.merellia-benefits strong,.merellia-benefits small{display:block;line-height:1.4}
.merellia-benefits strong{font-size:.92rem;color:#52263b}.merellia-benefits small{font-size:.77rem;color:#77656e}.merellia-benefit-icon{font-size:2rem;line-height:1;color:#b01e62}
body:not(.wp-admin) .wp-block-woocommerce-product-collection .wc-block-product-template>li,body:not(.wp-admin) .wp-block-woocommerce-product-collection .wp-block-woocommerce-product-template>li{background:rgba(255,255,255,.93);border-radius:11px;padding:13px!important;box-shadow:0 5px 16px rgba(110,61,78,.12)}
body:not(.wp-admin) .wp-block-woocommerce-product-collection .wp-block-heading{font-family:Georgia,serif;font-weight:400;color:#261c23}
body:not(.wp-admin) .wp-block-woocommerce-product-collection .wp-block-button__link,body:not(.wp-admin) .wp-block-woocommerce-product-collection .add_to_cart_button{background:#b86f8b!important;color:#fff!important;border-radius:5px!important}
.merellia-newsletter{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:22px 28px;margin:30px 0;background:rgba(255,255,255,.88);border-radius:9px}.merellia-newsletter strong{color:#692b45}.merellia-newsletter p{font-size:.85rem;margin:4px 0 0}.merellia-newsletter-button{background:#b86f8b;color:white!important;padding:12px 32px;text-decoration:none;border-radius:5px}
body:not(.wp-admin) .wc-blocks-footer-pattern{background:rgba(255,250,252,.42)!important}body:not(.wp-admin) .merellia-footer-bottom{border-color:#c68da2;color:#6e5260}
@media(max-width:782px){body:not(.wp-admin){background-attachment:scroll,scroll;background-size:auto 100%,auto 100%}body:not(.wp-admin) .merellia-hero{min-height:410px;background-position:65% center!important}body:not(.wp-admin) .merellia-hero:before{background:linear-gradient(90deg,rgba(255,249,251,.92),rgba(255,249,251,.52))}body:not(.wp-admin) .merellia-hero__inner{padding:45px 20px}body:not(.wp-admin) .merellia-hero h1{font-size:clamp(2.35rem,9vw,3.6rem);max-width:390px}.merellia-benefits{grid-template-columns:1fr;padding:18px 24px;gap:16px}.merellia-benefits>div{justify-content:flex-start}.merellia-newsletter{flex-direction:column;align-items:stretch}.merellia-newsletter-button{text-align:center}}

/* 0.8.21: mobile palette continuity and stationary marble (iOS Safari safe). */
@media (max-width:782px) {
  body:not(.wp-admin) {
    background-image:none !important;
    background-color:transparent !important;
    isolation:isolate;
    background-attachment:initial !important;
  }
  body:not(.wp-admin)::before {
    content:"";
    position:fixed;
    inset:0;
    width:100%;
    height:100vh;
    height:100dvh;
    pointer-events:none;
    z-index:-1;
    background-image:var(--merellia-mobile-marble) !important;
    background-position:center center;
    background-size:cover;
    background-repeat:no-repeat;
  }
  body:not(.wp-admin) .wp-site-blocks {position:relative;z-index:0;background:transparent !important;}
  body:not(.wp-admin) .wp-site-blocks > header,
  body:not(.wp-admin) .wc-blocks-header-pattern {
    background-color:rgba(255,255,255,.80) !important;
    border-color:var(--merellia-accent) !important;
  }
  body:not(.wp-admin) .wc-blocks-header-pattern > .wp-block-group {
    background:rgba(255,255,255,.40) !important;
    border-color:var(--merellia-accent) !important;
  }
  body:not(.wp-admin) .wp-site-blocks > footer,
  body:not(.wp-admin) .wp-site-blocks > footer .wc-blocks-footer-pattern {
    background-color:transparent !important;
    background-image:none !important;
    border-color:var(--merellia-accent) !important;
  }
  body:not(.wp-admin) .merellia-footer-bottom,
  body:not(.wp-admin) .wc-blocks-footer-pattern .wp-block-separator {
    border-color:var(--merellia-accent) !important;
  }
  body:not(.wp-admin) .wc-blocks-footer-pattern a,
  body:not(.wp-admin) .wc-blocks-footer-pattern h2,
  body:not(.wp-admin) .wc-blocks-footer-pattern h3 {color:var(--merellia-ink) !important;}
}

/* 0.8.27: Category imagery remains unfiltered; gentle card separation on marble backgrounds. */
.merellia-category-card{box-shadow:0 2px 12px rgba(0,0,0,.14);border:1px solid rgba(70,70,70,.12)}
.merellia-category-card::after{content:none!important;display:none!important}
.merellia-category-card>img,.merellia-category-card .merellia-category-art{filter:none!important;opacity:1!important;mix-blend-mode:normal!important}

/* 0.8.28: Neutral champagne beige default category artwork; uploaded photos stay unaltered. */
.merellia-category-card--fallback{background-color:#e8dccb!important}
.merellia-category-card--fallback .merellia-category-art{background-color:#e8dccb!important;filter:none!important;opacity:1!important}

/* 0.8.29: Refined champagne fallback, clearly separated from marble. */
.merellia-category-card--fallback{background:#e1d3be!important;border:1px solid rgba(127,99,65,.3)!important;box-shadow:0 5px 18px rgba(56,43,30,.17)!important}
.merellia-category-card--fallback .merellia-category-art{background-image:url('assets/images/category-universal.jpg')!important;background-position:center!important;background-size:cover!important;background-color:#f8f8f8!important;filter:none!important;opacity:1!important}
.merellia-category-card--fallback::before{content:none!important;display:none!important}

/* 0.8.30: Genuine warm beige marble fallback; no tint on merchant photos. */
.merellia-category-card--fallback .merellia-category-art{background:#e8d7bf url("assets/images/category-universal.jpg") center/cover no-repeat!important;}

/* Native Site Logo: keep uploaded branding tidy in standalone mode. */
.merellia-brand .wp-block-site-logo { margin: 0; }
.merellia-brand .wp-block-site-logo img { max-height: 88px; width: auto; object-fit: contain; }
.merellia-brand:has(.wp-block-site-logo img) .wp-block-site-title { display: none; }

/* Benefits strip: responsive for any number of enabled panels. */
.merellia-benefits{grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));}
.merellia-benefits>.merellia-benefit{display:flex;align-items:center;justify-content:center;gap:13px;}
.merellia-benefit-link{display:flex;align-items:center;justify-content:center;gap:13px;color:inherit;text-decoration:none;}
.merellia-benefit-link:hover,.merellia-benefit-link:focus-visible{text-decoration:underline;}
@media(max-width:782px){.merellia-benefits>.merellia-benefit,.merellia-benefit-link{justify-content:flex-start;}}

/* 0.9.9 standalone homepage and footer polish. */
.merellia-standalone-categories-section{max-width:1200px;margin:0 auto;padding:18px 0 30px;text-align:center}
.merellia-standalone-categories-section h2{font-weight:400;margin:0 0 20px;color:var(--merellia-ink,#52263b)}
.merellia-standalone-categories-section .merellia-category-grid{text-align:left}
.wc-blocks-footer-pattern .merellia-footer-grid{width:100%}
.wc-blocks-footer-pattern .merellia-footer-column h5{font-size:1rem;color:var(--merellia-ink,#52263b)}
.wc-blocks-footer-pattern .merellia-footer-links a:hover{text-decoration:underline}
@media(max-width:782px){.merellia-standalone-categories-section{padding:12px 0 20px}.wc-blocks-footer-pattern .merellia-footer-grid{gap:24px}}

/* 0.9.10: centre one or two homepage collections without changing shop grids. */
.merellia-standalone-categories-section{width:100%;box-sizing:border-box;}
.merellia-standalone-categories-section .merellia-category-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:24px;max-width:1200px;margin:24px auto 0;justify-content:center;
}
.merellia-standalone-categories-section .merellia-category-grid--count-1{
  grid-template-columns:minmax(0,380px);
}
.merellia-standalone-categories-section .merellia-category-grid--count-2{
  grid-template-columns:repeat(2,minmax(0,380px));
}
@media(max-width:782px){
  .merellia-standalone-categories-section .merellia-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
  .merellia-standalone-categories-section .merellia-category-grid--count-1{grid-template-columns:minmax(0,380px);}
}
@media(max-width:480px){
  .merellia-standalone-categories-section .merellia-category-grid,
  .merellia-standalone-categories-section .merellia-category-grid--count-1,
  .merellia-standalone-categories-section .merellia-category-grid--count-2{grid-template-columns:minmax(0,1fr);max-width:380px;}
}

/* 0.9.11: Mobile two-product cards, compact WooCommerce purchase buttons.
   Homepage categories intentionally remain one per row on phones. */
@media (max-width:480px) {
  body:not(.wp-admin) .wp-block-woocommerce-product-collection .wp-block-button__link,
  body:not(.wp-admin) .wp-block-woocommerce-product-collection .add_to_cart_button {
    box-sizing:border-box; max-width:100%;
    padding:9px 7px !important;
    font-size:clamp(10px,2.9vw,13px) !important;
    line-height:1.3 !important;
    white-space:nowrap;
    overflow-wrap:normal;
    word-break:normal;
  }
}

/* 0.9.9: Keep the header search action consistent with the active colour collection. */
body:not(.wp-admin) .wc-blocks-header-pattern .wp-block-search__button {
    background-color: var(--merellia-accent, #b86f8b) !important;
    border-color: var(--merellia-accent, #b86f8b) !important;
    color: #fff !important;
}
body:not(.wp-admin) .wc-blocks-header-pattern .wp-block-search__button svg {
    fill: currentColor;
}
