:root {
  --ccpn-accent: #0f8b8d;
  --ccpn-sidebar-width: 270px;
  --ccpn-adminbar-height: 0px;
  --ccpn-top-nav-height: 0px;
  --ccpn-header-height: 0px;
  --ccpn-sticky-stack-height: 0px;
  --ccpn-content-max: 1290px;
}

body.ccpn-v2-enabled {
  overflow-x: clip;
}

/* Keep archive product images uniformly square and edge-to-edge. */
body.ccpn-v2-enabled [data-products] .product figure .ct-media-container {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f4f2ef;
}

body.ccpn-v2-enabled [data-products] .product figure .ct-media-container img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Keep every single-product gallery image fully visible in a stable square frame. */
body.single-product .woocommerce-product-gallery figure.ct-media-container {
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  overflow: hidden;
  background: #f7f4ee;
}

body.single-product .woocommerce-product-gallery figure.ct-media-container > img:not(.zoomImg) {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center !important;
}

/* Preserve WooCommerce's native hover-zoom layer at its full natural size. */
body.single-product .woocommerce-product-gallery figure.ct-media-container > img.zoomImg {
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: initial !important;
  object-position: initial !important;
}

body.ccpn-v2-enabled .ccpn-top-wrap:not(.ccpn-v2-top-wrap),
body.ccpn-v2-enabled #main .ccpn-sidebar-host {
  display: none !important;
}

.ccpn-v2-top-wrap,
.ccpn-v2-top-wrap *,
.ccpn-v2-sidebar-host,
.ccpn-v2-sidebar-host *,
.ccpn-v2-drawer,
.ccpn-v2-drawer * {
  box-sizing: border-box;
}

.ccpn-v2-top-wrap {
  width: 100%;
  border-bottom: 1px solid #e6ecee;
  background: #fff;
  color: #20313b;
}

.ccpn-v2-top {
  width: min(calc(100% - 30px), var(--ccpn-content-max));
  margin: 0 auto;
}

.ccpn-v2-mobile-trigger {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  border: 0;
  padding: 11px 15px;
  background: var(--ccpn-accent);
  color: #fff;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.ccpn-v2-mobile-trigger b {
  font-size: 18px;
  line-height: 1;
}

.ccpn-v2-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ccpn-v2-list--top {
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 58px;
}

.ccpn-v2-list--top > .ccpn-v2-group {
  position: relative;
  margin: 0;
}

.ccpn-v2-list--top .ccpn-v2-parent {
  display: flex;
  align-items: center;
  height: 100%;
  min-height: 58px;
  padding: 11px 15px;
  color: #263740;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.ccpn-v2-list--top .ccpn-v2-parent:hover,
.ccpn-v2-list--top .ccpn-v2-group:focus-within > .ccpn-v2-parent,
.ccpn-v2-list--top .is-active > .ccpn-v2-parent {
  background: color-mix(in srgb, var(--ccpn-accent) 12%, #fff);
  color: var(--ccpn-accent);
}

.ccpn-v2-list--top .ccpn-v2-children {
  position: absolute;
  z-index: 100020;
  top: 100%;
  left: 0;
  display: none;
  width: max-content;
  min-width: 220px;
  margin: 0;
  padding: 8px;
  border: 1px solid #dfe8eb;
  border-radius: 0 0 9px 9px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(24, 42, 52, 0.16);
  list-style: none;
}

.ccpn-v2-list--top .ccpn-v2-group:hover > .ccpn-v2-children,
.ccpn-v2-list--top .ccpn-v2-group:focus-within > .ccpn-v2-children {
  display: block;
}

.ccpn-v2-list--top .ccpn-v2-children a {
  display: block;
  border-radius: 5px;
  padding: 9px 11px;
  color: #31434c;
  font-size: 13px;
  line-height: 1.45;
  text-decoration: none;
  white-space: nowrap;
}

.ccpn-v2-list--top .ccpn-v2-children a:hover,
.ccpn-v2-list--top .ccpn-v2-children a[aria-current="page"] {
  background: #eef7f7;
  color: var(--ccpn-accent);
}

body.ccpn-v2-sticky-enabled.ccpn-v2-sticky-ready .ccpn-v2-top-wrap {
  position: fixed;
  z-index: 99992;
  top: var(--ccpn-adminbar-height);
  left: 0;
}

body.ccpn-v2-sticky-enabled.ccpn-v2-sticky-ready #header {
  position: fixed !important;
  z-index: 99990 !important;
  top: calc(var(--ccpn-adminbar-height) + var(--ccpn-top-nav-height));
  right: 0;
  left: 0;
  width: 100%;
  /* 不覆盖 Blocksy 原来的黑色说明条和绿色到蓝色渐变背景。 */
  box-shadow: 0 7px 22px rgba(20, 42, 52, 0.08);
}

/*
 * Blocksy 会把 middle 行再包进一个独立的 fixed 容器，导致它脱离已经固定的整块 #header，
 * 跑到顶部分类条下面并遮住黑条。这里关闭主题内部的二次吸顶，只保留整块页头吸顶。
 */
body.ccpn-v2-sticky-enabled.ccpn-v2-sticky-ready #header .ct-sticky-container > div {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  width: 100% !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  z-index: auto !important;
}

/*
 * CoutureClip 线上 Blocksy 页头的真实颜色。
 * 吸顶后必须保留黑色说明条和绿色到蓝色渐变，避免白色菜单文字落在白底上消失。
 */
body.ccpn-v2-sticky-enabled.ccpn-v2-sticky-ready #header [data-row="top"] {
  background-color: #000 !important;
  background-image: none !important;
}

body.ccpn-v2-sticky-enabled.ccpn-v2-sticky-ready #header [data-row="middle"] {
  background-color: #b7f8db !important;
  background-image: linear-gradient(135deg, #b7f8db 0%, #50a7c2 100%) !important;
}

body.ccpn-v2-sticky-enabled.ccpn-v2-sticky-ready #header [data-row="middle"] .menu-item:not(.current-menu-item):not(.current_page_item) > .ct-menu-link {
  color: #fff !important;
}

body.ccpn-v2-sticky-enabled.ccpn-v2-sticky-ready #header [data-row="middle"] .current-menu-item > .ct-menu-link,
body.ccpn-v2-sticky-enabled.ccpn-v2-sticky-ready #header [data-row="middle"] .current_page_item > .ct-menu-link {
  color: #192a3d !important;
}

/* Desktop header: remove Claw Clip and place the four social icons after Contact Us. */
body.ccpn-v2-enabled #header [data-device="desktop"] #menu-item-2391 {
  display: none !important;
}

body.ccpn-v2-compact-header-ready #header [data-device="desktop"] [data-row="bottom"] {
  display: none !important;
}

body.ccpn-v2-enabled #header [data-device="desktop"] .ccpn-v2-social-menu-item {
  display: flex !important;
  align-self: stretch;
  align-items: center;
  padding-left: 16px;
}

body.ccpn-v2-enabled #header [data-device="desktop"] .ccpn-v2-header-socials,
body.ccpn-v2-enabled #header [data-device="desktop"] .ccpn-v2-header-socials .ct-social-box {
  display: flex !important;
  align-items: center;
}

body.ccpn-v2-enabled #header [data-device="desktop"] .ccpn-v2-header-socials .ct-social-box {
  gap: 10px;
}

body.ccpn-v2-enabled #header [data-device="desktop"] .ccpn-v2-header-socials a {
  display: flex !important;
  width: 30px !important;
  height: 30px !important;
  align-items: center;
  justify-content: center;
  color: #344b63 !important;
}

body.ccpn-v2-enabled #header [data-device="desktop"] .ccpn-v2-header-socials a:hover {
  color: #192a3d !important;
}

body.ccpn-v2-enabled #header [data-device="desktop"] .ccpn-v2-header-socials .ct-icon-container {
  color: inherit !important;
}

body.ccpn-v2-enabled #header [data-device="desktop"] .ccpn-v2-header-socials svg {
  width: 22px !important;
  height: 22px !important;
  fill: currentColor !important;
}

/* Keep the WordPress category dropdown readable on content pages. */
.wp-block-categories-dropdown select.postform {
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 36px 0 14px !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
}

.wp-block-categories-dropdown select.postform option {
  font-size: 16px !important;
  font-weight: 400 !important;
}

body.ccpn-v2-sticky-enabled.ccpn-v2-sticky-ready #main-container {
  padding-top: var(--ccpn-sticky-stack-height);
}

body.ccpn-v2-enabled #main.ccpn-v2-main-layout {
  display: grid;
  grid-template-columns: var(--ccpn-sidebar-width) minmax(0, 1fr);
  column-gap: 24px;
  width: min(calc(100% - 30px), var(--ccpn-content-max));
  max-width: none;
  margin-right: auto;
  margin-left: auto;
  padding-top: 24px;
}

body.ccpn-v2-enabled #main.ccpn-v2-main-layout > .ccpn-v2-sidebar-host {
  grid-column: 1;
  grid-row: 1 / span 99;
  align-self: stretch;
  min-width: 0;
}

body.ccpn-v2-enabled #main.ccpn-v2-main-layout > :not(.ccpn-v2-sidebar-host) {
  grid-column: 2;
  min-width: 0;
  width: 100%;
}

body.ccpn-v2-enabled #main.ccpn-v2-main-layout > .hero-section,
body.ccpn-v2-enabled #main.ccpn-v2-main-layout > .ct-container {
  max-width: none;
  margin-right: 0;
  margin-left: 0;
}

/* Blocksy shop pages can add their own WooCommerce sidebar inside .ct-container.
   Hide that duplicate sidebar so it cannot cover the plugin's category panel. */
body.ccpn-v2-enabled #main.ccpn-v2-main-layout > .ct-container {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.ccpn-v2-enabled #main.ccpn-v2-main-layout > .ct-container > #sidebar {
  display: none !important;
}

body.ccpn-v2-enabled #main.ccpn-v2-main-layout > .ct-container > section {
  grid-column: 1 !important;
  min-width: 0;
  width: 100%;
}

.ccpn-v2-sidebar-host {
  position: relative;
}

.ccpn-v2-sidebar {
  position: sticky;
  top: calc(var(--ccpn-adminbar-height) + var(--ccpn-sticky-stack-height) + 18px);
  max-height: calc(100vh - var(--ccpn-adminbar-height) - var(--ccpn-sticky-stack-height) - 36px);
  overflow: auto;
  border: 1px solid #dfe8eb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(25, 40, 55, 0.08);
  scrollbar-width: thin;
}

.ccpn-v2-sidebar h2 {
  margin: 0;
  padding: 16px 18px;
  background: var(--ccpn-accent);
  color: #fff;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: 0.05em;
}

.ccpn-v2-list--side {
  padding: 8px 0 14px;
}

.ccpn-v2-list--side > .ccpn-v2-group {
  margin: 0;
  border-bottom: 1px solid #edf1f2;
}

.ccpn-v2-list--side > .ccpn-v2-group:last-child {
  border-bottom: 0;
}

.ccpn-v2-list--side .ccpn-v2-parent {
  display: block;
  padding: 12px 16px 9px;
  color: #20323b;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
}

.ccpn-v2-list--side .ccpn-v2-group.is-active > .ccpn-v2-parent,
.ccpn-v2-list--side .ccpn-v2-parent:hover {
  color: var(--ccpn-accent);
}

.ccpn-v2-list--side .ccpn-v2-children,
.ccpn-v2-list--drawer .ccpn-v2-children {
  margin: 0;
  padding: 0 10px 9px 28px;
  list-style: none;
}

.ccpn-v2-list--side .ccpn-v2-children a,
.ccpn-v2-list--drawer .ccpn-v2-children a {
  display: block;
  position: relative;
  padding: 6px 8px 6px 12px;
  color: #5b6970;
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
}

.ccpn-v2-list--side .ccpn-v2-children a::before,
.ccpn-v2-list--drawer .ccpn-v2-children a::before {
  position: absolute;
  top: 12px;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #a9b8be;
  content: "";
}

.ccpn-v2-list--side .ccpn-v2-children a:hover,
.ccpn-v2-list--side .ccpn-v2-children a[aria-current="page"],
.ccpn-v2-list--drawer .ccpn-v2-children a:hover,
.ccpn-v2-list--drawer .ccpn-v2-children a[aria-current="page"] {
  color: var(--ccpn-accent);
}

.ccpn-v2-list--side .ccpn-v2-children a[aria-current="page"]::before,
.ccpn-v2-list--drawer .ccpn-v2-children a[aria-current="page"]::before {
  background: var(--ccpn-accent);
}

.ccpn-v2-empty {
  margin: 0;
  padding: 16px;
  color: #6b777c;
  font-size: 13px;
}

.ccpn-v2-overlay {
  display: block;
  position: fixed;
  z-index: 100040;
  inset: 0;
  background: rgba(16, 29, 36, 0.58);
}

.ccpn-v2-overlay[hidden] {
  display: none;
}

.ccpn-v2-drawer {
  position: fixed;
  z-index: 100041;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(88vw, 380px);
  overflow: auto;
  background: #fff;
  box-shadow: 12px 0 34px rgba(0, 0, 0, 0.22);
  transform: translateX(-105%);
  transition: transform 0.24s ease;
}

.ccpn-v2-drawer.is-open {
  transform: translateX(0);
}

.ccpn-v2-drawer-head {
  display: flex;
  position: sticky;
  z-index: 2;
  top: 0;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 12px 16px;
  background: var(--ccpn-accent);
  color: #fff;
}

.ccpn-v2-drawer-head strong {
  font-size: 16px;
}

.ccpn-v2-drawer-head button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.ccpn-v2-list--drawer {
  padding: 8px 0 24px;
}

.ccpn-v2-list--drawer > .ccpn-v2-group {
  border-bottom: 1px solid #edf1f2;
}

.ccpn-v2-list--drawer .ccpn-v2-parent {
  display: block;
  padding: 13px 18px 9px;
  color: #20323b;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

body.ccpn-v2-drawer-open {
  overflow: hidden;
}

@media (max-width: 899px) {
  .ccpn-v2-mobile-trigger {
    display: flex;
  }

  .ccpn-v2-list--top {
    display: none;
  }

  body.ccpn-v2-enabled #main.ccpn-v2-main-layout {
    display: block;
    width: min(calc(100% - 24px), var(--ccpn-content-max));
    padding-top: 12px;
  }

  body.ccpn-v2-enabled #main.ccpn-v2-main-layout > .ccpn-v2-sidebar-host {
    display: none !important;
  }

  body.ccpn-v2-sticky-enabled.ccpn-v2-sticky-ready #header {
    top: calc(var(--ccpn-adminbar-height) + var(--ccpn-top-nav-height));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ccpn-v2-drawer {
    transition: none;
  }
}
