/*
 * PixelMaistir studio polish layer.
 * Loaded after the legacy theme and the homepage refresh so the same visual
 * language can be used across the storefront, editorial pages and Model Vault.
 */

body.pm-studio-polish {
  --pm-radius: 10px;
  --pm-polish-radius: 14px;
  --pm-polish-radius-large: 22px;
  --pm-polish-surface: color-mix(in srgb, var(--pm-card) 94%, transparent);
  --pm-polish-raised: 0 20px 50px rgba(28, 32, 31, 0.1);
  --pm-polish-lift: 0 24px 60px rgba(28, 32, 31, 0.15);
  --pm-polish-focus: 0 0 0 3px color-mix(in srgb, var(--pm-ocean) 34%, transparent);
  background:
    radial-gradient(circle at 92% 4%, color-mix(in srgb, var(--pm-coral) 8%, transparent), transparent 28rem),
    radial-gradient(circle at 8% 32%, color-mix(in srgb, var(--pm-ocean) 7%, transparent), transparent 32rem),
    var(--pm-gradient-paper);
}

:root[data-theme="dark"] body.pm-studio-polish {
  --pm-polish-surface: color-mix(in srgb, var(--pm-card) 93%, transparent);
  --pm-polish-raised: 0 24px 56px rgba(0, 0, 0, 0.34);
  --pm-polish-lift: 0 28px 70px rgba(0, 0, 0, 0.46);
}

body.pm-studio-polish :focus-visible {
  outline: 0;
  box-shadow: var(--pm-polish-focus);
}

body.pm-studio-polish .site-main {
  overflow: clip;
}

/* Header and information architecture */
body.pm-studio-polish .site-header {
  z-index: 1000;
  background: color-mix(in srgb, var(--pm-paper) 91%, transparent);
  border-bottom-color: color-mix(in srgb, var(--pm-ocean) 18%, var(--pm-line));
  box-shadow: 0 8px 30px rgba(22, 29, 28, 0.06);
  backdrop-filter: blur(18px) saturate(1.2);
}

body.pm-studio-polish .site-header::after {
  height: 1px;
  background: linear-gradient(90deg, transparent 7%, var(--pm-ocean), var(--pm-coral), transparent 93%);
  opacity: 0.5;
}

body.pm-studio-polish .site-header__inner {
  width: min(1280px, calc(100% - 40px));
  min-height: 74px;
  gap: 20px;
}

body.pm-studio-polish .site-branding {
  min-width: 196px;
  gap: 10px;
}

body.pm-studio-polish .site-branding__mark {
  width: 62px;
  height: 48px;
  filter: drop-shadow(0 6px 12px rgba(20, 47, 40, 0.14));
}

body.pm-studio-polish .site-branding__name {
  color: var(--pm-ink);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

body.pm-studio-polish .site-branding__meta {
  color: var(--pm-ink-soft);
  font-size: 0.68rem;
}

body.pm-studio-polish .site-nav {
  justify-self: center;
}

body.pm-studio-polish .primary-menu {
  flex-wrap: nowrap;
  gap: 4px;
}

body.pm-studio-polish .primary-menu > li > a,
body.pm-studio-polish .primary-menu > li > .pm-submenu-toggle {
  min-height: 42px;
  padding: 9px 12px;
  color: var(--pm-ink);
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 0.79rem;
  font-weight: 760;
  letter-spacing: -0.01em;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

body.pm-studio-polish .primary-menu > li > a:hover,
body.pm-studio-polish .primary-menu > li > a:focus-visible,
body.pm-studio-polish .primary-menu > li > .pm-submenu-toggle:hover,
body.pm-studio-polish .primary-menu > li > .pm-submenu-toggle:focus-visible,
body.pm-studio-polish .primary-menu > .menu-item--open > .pm-submenu-toggle {
  color: var(--pm-ink);
  background: color-mix(in srgb, var(--pm-ocean) 9%, var(--pm-polish-surface));
  border-color: color-mix(in srgb, var(--pm-ocean) 18%, var(--pm-line));
  transform: translateY(-1px);
}

body.pm-studio-polish .primary-menu .sub-menu {
  top: calc(100% + 12px);
  min-width: 230px;
  gap: 3px;
  padding: 8px;
  background: color-mix(in srgb, var(--pm-card) 97%, transparent);
  border-color: color-mix(in srgb, var(--pm-ocean) 17%, var(--pm-line));
  border-radius: 14px;
  box-shadow: var(--pm-polish-raised);
  backdrop-filter: blur(18px) saturate(1.1);
}

body.pm-studio-polish .primary-menu .sub-menu::after {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  content: "";
  background: var(--pm-card);
  border-top: 1px solid var(--pm-line);
  border-left: 1px solid var(--pm-line);
  transform: translateX(-50%) rotate(45deg);
}

body.pm-studio-polish .primary-menu .sub-menu a {
  position: relative;
  z-index: 1;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--pm-ink-soft);
  border-radius: 8px;
  font-size: 0.82rem;
}

body.pm-studio-polish .primary-menu .sub-menu a:hover,
body.pm-studio-polish .primary-menu .sub-menu a:focus-visible {
  color: var(--pm-ink);
  background: color-mix(in srgb, var(--pm-ocean) 9%, transparent);
}

body.pm-studio-polish .primary-menu .pm-menu-vault--direct > a {
  gap: 8px;
  display: inline-flex;
  align-items: center;
  color: var(--pm-ink);
  background: color-mix(in srgb, var(--pm-coral) 7%, transparent);
  border-color: color-mix(in srgb, var(--pm-coral) 18%, var(--pm-line));
}

body.pm-studio-polish .primary-menu .pm-menu-vault--direct > a::before {
  width: 7px;
  height: 7px;
  margin: 0;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--pm-coral);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--pm-coral) 14%, transparent);
  content: "";
}

body.pm-studio-polish .site-header__actions {
  gap: 8px;
}

body.pm-studio-polish .pm-theme-toggle,
body.pm-studio-polish .pm-cart-button {
  min-width: 42px;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  background: var(--pm-polish-surface);
  border: 1px solid var(--pm-line);
  border-radius: 12px;
  box-shadow: none;
}

body.pm-studio-polish .pm-theme-toggle__text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

body.pm-studio-polish .pm-cart-button:hover,
body.pm-studio-polish .pm-cart-button:focus-visible,
body.pm-studio-polish .pm-theme-toggle:hover,
body.pm-studio-polish .pm-theme-toggle:focus-visible {
  background: color-mix(in srgb, var(--pm-ocean) 9%, var(--pm-card));
  border-color: color-mix(in srgb, var(--pm-ocean) 28%, var(--pm-line));
  box-shadow: var(--pm-polish-focus);
  transform: translateY(-1px);
}

body.pm-studio-polish .pm-header-cta {
  min-height: 42px;
  padding: 0 17px;
  color: #fff;
  background: linear-gradient(135deg, #b44d24, #8e351c);
  border-color: color-mix(in srgb, #8e351c 74%, #fff);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(142, 53, 28, 0.18);
  font-size: 0.84rem;
}

body.pm-studio-polish .pm-header-cta:hover,
body.pm-studio-polish .pm-header-cta:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, #c65c2b, #9e3b20);
  box-shadow: 0 14px 28px rgba(142, 53, 28, 0.24), var(--pm-polish-focus);
}

/* Editorial rhythm shared by ordinary pages and the storefront */
body.pm-studio-polish .pm-section {
  padding-block: clamp(64px, 7vw, 96px);
}

body.pm-studio-polish .pm-section__eyebrow,
body.pm-studio-polish .pmr-eyebrow {
  color: var(--pm-ocean);
  font-size: 0.72rem;
  letter-spacing: 0.17em;
}

body.pm-studio-polish .pm-section__title,
body.pm-studio-polish .page-title,
body.pm-studio-polish .entry-title {
  color: var(--pm-ink);
  font-family: var(--pm-serif);
  letter-spacing: -0.045em;
  text-wrap: balance;
}

body.pm-studio-polish .pm-section__lede,
body.pm-studio-polish .entry-content > p:first-child {
  max-width: 68ch;
  color: var(--pm-ink-soft);
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  line-height: 1.75;
}

body.pm-studio-polish .entry-content > .pm-section {
  margin-top: clamp(44px, 6vw, 78px);
  padding: 0;
  background: transparent;
}

body.pm-studio-polish .entry-content > .pm-section > .pm-wrap {
  width: 100%;
}

/* The Vault supplies its own editorial hero, so the generic page title and
 * outer page padding would create a duplicate heading and an empty band. */
body.pm-studio-polish.page-id-651 .site-main > .pm-section {
  padding-block: 0;
}

body.pm-studio-polish.page-id-651 article > .pm-section__eyebrow,
body.pm-studio-polish.page-id-651 article > .pm-section__title {
  display: none;
}

body.pm-studio-polish .pm-button,
body.pm-studio-polish .button,
body.pm-studio-polish button,
body.pm-studio-polish input[type="submit"],
body.pm-studio-polish .wp-block-button__link,
body.pm-studio-polish .woocommerce a.button,
body.pm-studio-polish .woocommerce button.button,
body.pm-studio-polish .woocommerce input.button {
  min-height: 46px;
  border-radius: 9px;
  box-shadow: none;
  letter-spacing: -0.01em;
  transition: transform 170ms ease, box-shadow 170ms ease, background 170ms ease, border-color 170ms ease;
}

body.pm-studio-polish .pm-button:hover,
body.pm-studio-polish .button:hover,
body.pm-studio-polish .woocommerce a.button:hover,
body.pm-studio-polish .woocommerce button.button:hover {
  box-shadow: 0 12px 26px color-mix(in srgb, var(--pm-ocean) 20%, transparent);
  transform: translateY(-2px);
}

/* Homepage refresh: preserve the photography, refine the surrounding system. */
body.pm-studio-polish.pm-theme-refresh-home .pmr-hero {
  min-height: min(700px, calc(100svh - 74px));
}

body.pm-studio-polish.pm-theme-refresh-home .pmr-hero::after {
  background:
    linear-gradient(90deg, rgba(6, 10, 11, 0.92) 0%, rgba(8, 13, 14, 0.72) 38%, rgba(8, 13, 14, 0.18) 72%, transparent 100%),
    linear-gradient(0deg, rgba(6, 10, 11, 0.3), transparent 44%);
}

body.pm-studio-polish.pm-theme-refresh-home .pmr-hero h1 {
  letter-spacing: -0.06em;
  text-wrap: balance;
}

body.pm-studio-polish.pm-theme-refresh-home .pmr-made {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.pm-studio-polish.pm-theme-refresh-home .pmr-made::before {
  width: 22px;
  height: 1px;
  background: rgba(255, 255, 255, 0.5);
  content: "";
}

body.pm-studio-polish .pm-product-spotlight,
body.pm-studio-polish .pm-featured-product-card,
body.pm-studio-polish .pm-card {
  border-color: color-mix(in srgb, var(--pm-ocean) 12%, var(--pm-line));
  border-radius: var(--pm-polish-radius);
  box-shadow: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

body.pm-studio-polish .pm-featured-product-card:hover,
body.pm-studio-polish .pm-card:hover {
  border-color: color-mix(in srgb, var(--pm-ocean) 28%, var(--pm-line));
  box-shadow: var(--pm-polish-raised);
  transform: translateY(-4px);
}

body.pm-studio-polish .pm-product-spotlight {
  overflow: hidden;
  background: var(--pm-polish-surface);
  box-shadow: var(--pm-polish-raised);
}

body.pm-studio-polish .pmr-custom {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 14%, rgba(117, 190, 181, 0.12), transparent 24rem),
    linear-gradient(140deg, #121b1e, #182127 58%, #1e2428);
}

body.pm-studio-polish .pmr-process li > span {
  color: var(--pm-coral);
}

body.pm-studio-polish .pmr-story__visual,
body.pm-studio-polish .pmr-event {
  border-radius: var(--pm-polish-radius);
}

/* Shop and product presentation */
body.pm-studio-polish.woocommerce-page .site-main {
  width: min(1180px, calc(100% - 40px));
  padding-block: clamp(76px, 8vw, 118px);
}

body.pm-studio-polish.woocommerce-page .woocommerce-products-header__title,
body.pm-studio-polish.woocommerce-page .product_title {
  font-family: var(--pm-serif);
  letter-spacing: -0.052em;
  text-wrap: balance;
}

body.pm-studio-polish.woocommerce-shop .woocommerce-products-header::before {
  display: block;
  margin-bottom: 10px;
  color: var(--pm-ocean);
  content: "PRINTED IN BRASSTOWN";
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.17em;
}

body.pm-studio-polish .woocommerce .woocommerce-result-count {
  color: var(--pm-ink-soft);
}

body.pm-studio-polish .woocommerce .woocommerce-ordering select,
body.pm-studio-polish .woocommerce select,
body.pm-studio-polish .woocommerce input,
body.pm-studio-polish .woocommerce textarea {
  background: var(--pm-polish-surface);
  border-color: var(--pm-line);
  border-radius: 9px;
}

body.pm-studio-polish .woocommerce ul.products {
  gap: 20px;
}

body.pm-studio-polish .woocommerce ul.products li.product {
  overflow: hidden;
  padding: 14px 14px 18px;
  background: var(--pm-polish-surface);
  border: 1px solid color-mix(in srgb, var(--pm-ocean) 12%, var(--pm-line));
  border-radius: var(--pm-polish-radius);
  box-shadow: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

body.pm-studio-polish .woocommerce ul.products li.product:hover {
  border-color: color-mix(in srgb, var(--pm-ocean) 30%, var(--pm-line));
  box-shadow: var(--pm-polish-raised);
  transform: translateY(-5px);
}

body.pm-studio-polish .woocommerce ul.products li.product > a:first-child img {
  aspect-ratio: 16 / 10;
  margin: 0 0 18px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 260ms ease;
}

body.pm-studio-polish .woocommerce ul.products li.product:hover > a:first-child img {
  transform: scale(1.015);
}

body.pm-studio-polish .woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: var(--pm-ink);
  font-family: var(--pm-serif);
  font-size: 1.05rem;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

body.pm-studio-polish .woocommerce ul.products li.product .price {
  color: var(--pm-copper);
  font-weight: 780;
}

body.pm-studio-polish.single-product div.product {
  gap: clamp(42px, 6vw, 78px);
}

body.pm-studio-polish.single-product .woocommerce-product-gallery__wrapper,
body.pm-studio-polish.single-product .summary {
  border-radius: var(--pm-polish-radius);
}

/* Gallery and editorial cards */
body.pm-studio-polish .pm-card-grid {
  gap: 22px;
}

body.pm-studio-polish .pm-card > a:first-child {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: color-mix(in srgb, var(--pm-ocean) 6%, var(--pm-card));
}

body.pm-studio-polish .pm-card > a:first-child img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 260ms ease;
}

body.pm-studio-polish .pm-card:hover > a:first-child img {
  transform: scale(1.025);
}

body.pm-studio-polish .pm-card__body {
  padding: 22px;
}

body.pm-studio-polish .pm-card__body h3 {
  font-family: var(--pm-serif);
  letter-spacing: -0.025em;
}

body.pm-studio-polish .pm-inspiration-entry {
  margin-top: clamp(44px, 6vw, 78px);
  padding: clamp(28px, 4vw, 48px);
  background:
    radial-gradient(circle at 92% 4%, color-mix(in srgb, var(--pm-coral) 15%, transparent), transparent 19rem),
    color-mix(in srgb, var(--pm-card) 94%, transparent);
  border: 1px solid var(--pm-line);
  border-radius: var(--pm-polish-radius-large);
  box-shadow: var(--pm-polish-raised);
}

/* Footer */
body.pm-studio-polish .site-footer {
  position: relative;
  padding: 82px 0 38px;
  color: #dbe4df;
  background:
    radial-gradient(circle at 12% 10%, rgba(20, 125, 122, 0.18), transparent 23rem),
    linear-gradient(145deg, #111a1b, #172126 58%, #1a2024);
  border-top: 0;
}

body.pm-studio-polish .site-footer::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, var(--pm-ocean), var(--pm-coral), var(--pm-amber));
}

body.pm-studio-polish .site-footer h2 {
  color: #fff8e8;
  font-family: var(--pm-serif);
  letter-spacing: -0.025em;
}

body.pm-studio-polish .site-footer p,
body.pm-studio-polish .site-footer a {
  color: #c6d0cb;
}

body.pm-studio-polish .site-footer a:hover,
body.pm-studio-polish .site-footer a:focus-visible {
  color: #fff8e8;
}

body.pm-studio-polish .footer-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  justify-items: start;
}

/* Mobile refinements */
@media (max-width: 1080px) and (min-width: 921px) {
  body.pm-studio-polish .site-header__inner {
    gap: 10px;
  }

  body.pm-studio-polish .site-branding {
    min-width: 164px;
  }

  body.pm-studio-polish .site-branding__meta {
    display: none;
  }

  body.pm-studio-polish .primary-menu > li > a,
  body.pm-studio-polish .primary-menu > li > .pm-submenu-toggle {
    padding-inline: 9px;
    font-size: 0.74rem;
  }

  body.pm-studio-polish .pm-header-cta {
    width: 42px;
    min-width: 42px;
    padding: 0;
  }

  body.pm-studio-polish .pm-header-cta__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
}

@media (max-width: 920px) {
  body.pm-studio-polish .site-header__inner {
    width: min(100% - 24px, 1280px);
    padding-block: 9px;
  }

  body.pm-studio-polish .site-branding {
    min-width: 0;
  }

  body.pm-studio-polish .site-branding__mark {
    width: 54px;
    height: 42px;
  }

  body.pm-studio-polish .site-nav {
    padding-top: 10px;
  }

  body.pm-studio-polish .primary-menu {
    gap: 7px;
  }

  body.pm-studio-polish .primary-menu > li > a,
  body.pm-studio-polish .primary-menu > li > .pm-submenu-toggle {
    width: 100%;
    min-height: 46px;
    justify-content: center;
    background: var(--pm-polish-surface);
    border-color: var(--pm-line);
  }

  body.pm-studio-polish .primary-menu .sub-menu {
    min-width: 0;
    padding: 6px;
    background: color-mix(in srgb, var(--pm-ocean) 6%, transparent);
    border-radius: 10px;
    box-shadow: none;
    backdrop-filter: none;
  }

  body.pm-studio-polish .primary-menu .sub-menu::after {
    display: none;
  }

  body.pm-studio-polish.woocommerce-page .site-main {
    width: min(100% - 24px, 1180px);
    padding-block: 58px;
  }
}

@media (max-width: 640px) {
  body.pm-studio-polish .site-branding__name {
    font-size: 0.92rem;
  }

  body.pm-studio-polish .site-branding__meta {
    display: none;
  }

  body.pm-studio-polish.pm-theme-refresh-home .pmr-hero {
    min-height: 0;
  }

  body.pm-studio-polish .pm-section {
    padding-block: 52px;
  }

  body.pm-studio-polish .entry-content > .pm-section {
    margin-top: 38px;
    padding: 0;
  }

  body.pm-studio-polish .pm-card__body {
    padding: 18px;
  }

  body.pm-studio-polish .woocommerce ul.products li.product {
    padding: 12px 12px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.pm-studio-polish *,
  body.pm-studio-polish *::before,
  body.pm-studio-polish *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
