/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* CHIYUE design system — 2026-09-23
 * Single source of truth for the site palette, interaction and a11y layer.
 * Accent is the Logo-derived 梅紫 #7B1F66 (accent only, never a large fill).
 */
:root {
  /* --- Brand accent, extracted from the CHIYUE PACK logo ------------------ */
  --cy-color-accent:        #7B1F66; /* CTA · links · selected · icon emphasis */
  --cy-color-accent-dark:   #621952; /* hover / pressed, one step deeper */
  --cy-color-accent-muted:  #D9BFD2; /* hairlines, tag borders, dividers */
  --cy-color-accent-tint:   #F7F0F5; /* section / card-hover / badge fill */

  /* --- Neutral scale (the clean, understated base) ----------------------- */
  --cy-color-surface:       #FFFFFF; /* page background */
  --cy-color-surface-soft:  #FAF8FA; /* section alt / zebra stripes */
  --cy-color-text:          #2B2230; /* primary text (faint plum-grey) */
  --cy-color-text-muted:    #6B6470; /* secondary text */
  --cy-color-border:        #E8E3EA; /* default hairline / divider */

  /* Status colours — kept apart from the brand accent. */
  --cy-color-success:       #1F7A4D;
  --cy-color-warning:       #B26B00;
  --cy-color-danger:        #B3261E;

  --cy-shadow-card:         0 1px 2px rgba(43, 34, 48, .04), 0 12px 32px -18px rgba(43, 34, 48, .18);
  --cy-shadow-raised:       0 2px 4px rgba(43, 34, 48, .05), 0 18px 44px -20px rgba(43, 34, 48, .24);
  --cy-shadow-sticky:       0 1px 0 var(--cy-color-border), 0 10px 30px -18px rgba(43, 34, 48, .28);
  --cy-focus-ring:          0 0 0 3px rgba(123, 31, 102, .35);

  --cy-radius-sm: 12px;
  --cy-radius-card: 20px;
  --cy-radius-pill: 999px;
  --cy-container-width: 1290px;
  --cy-section-space: clamp(64px, 8vw, 120px);
  --cy-dur: 160ms;
  --cy-ease: cubic-bezier(.22, 1, .36, 1);
  --cy-touch: 44px;
  --cy-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Arial, sans-serif;

  /* Legacy aliases kept so older rules keep resolving to the same brand. */
  --cy-purple: var(--cy-color-accent);
  --cy-brand: var(--cy-color-accent);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--cy-font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Base heading voice for theme-driven content only (products, posts, archives).
   Elementor headings are excluded on purpose: their typography has to stay
   editable from the Elementor panel, and an !important rule here was silently
   overriding every font change made in the editor. */
body :is(h1, h2, h3, h4, h5, h6):not(.elementor-heading-title) {
  font-family: var(--cy-font);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

body h1:not(.elementor-heading-title) { font-size: clamp(2.5rem, 5vw, 4.75rem); line-height: 1.04; }
body h2:not(.elementor-heading-title) { font-size: clamp(2rem, 3.7vw, 3.75rem); line-height: 1.1; }
body h3:not(.elementor-heading-title) { font-size: clamp(1.35rem, 2.2vw, 2rem); line-height: 1.2; }

body :is(a, button, input, textarea, select):not(.elementor-button) {
  font-family: var(--cy-font);
}

body .e-con.e-con-boxed > .e-con-inner {
  max-width: min(var(--cy-container-width), calc(100% - 48px));
}

body .elementor-widget-button .elementor-button,
body :is(.button, button[type="submit"], input[type="submit"]) {
  min-height: 48px;
  padding: 12px 26px;
  border-width: 1px;
  border-style: solid;
  border-radius: var(--cy-radius-pill);
  font-weight: 600;
  line-height: 1.2;
  transition: color .35s var(--cy-ease), background-color .35s var(--cy-ease), border-color .35s var(--cy-ease), box-shadow .35s var(--cy-ease), transform .35s var(--cy-ease);
}

body .elementor-widget-button .elementor-button:hover,
body .elementor-widget-button .elementor-button:focus-visible,
body :is(.button, button[type="submit"], input[type="submit"]):hover {
  transform: translateY(-1px);
}

body :is(input:not([type="checkbox"]):not([type="radio"]), textarea, select) {
  border-width: 1px;
  border-style: solid;
  border-radius: var(--cy-radius-sm);
  transition: border-color .25s ease, box-shadow .25s ease;
}

/* Elementor global Header (template 1500). */
body [data-elementor-type="header"] {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 252, 255, .72);
  border-bottom: 1px solid rgba(123, 31, 102, .08);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
}

body.admin-bar [data-elementor-type="header"] { top: 32px; }

body [data-elementor-type="header"] .elementor-nav-menu--main .elementor-item {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: color .25s ease, opacity .25s ease;
}

body [data-elementor-type="header"] .elementor-nav-menu--dropdown {
  padding: 10px;
  border-radius: var(--cy-radius-sm);
  -webkit-backdrop-filter: saturate(165%) blur(18px);
  backdrop-filter: saturate(165%) blur(18px);
}

body [data-elementor-type="header"] .elementor-nav-menu--dropdown .elementor-item {
  border-radius: 8px;
}

body [data-elementor-type="header"] .elementor-nav-menu--main .sub-menu {
  border-radius: 14px;
  -webkit-backdrop-filter: saturate(165%) blur(18px);
  backdrop-filter: saturate(165%) blur(18px);
  overflow: hidden;
}

@media (min-width: 1025px) {
  body [data-elementor-type="header"] .elementor-element-40105b18 {
    --min-height: 40px !important;
    min-height: 40px !important;
    padding-block: 0 !important;
  }

  body [data-elementor-type="header"] .elementor-element-2b114ef {
    --min-height: 60px !important;
    min-height: 60px !important;
    padding-block: 2px !important;
  }

  body [data-elementor-type="header"] .elementor-element-7e9d21c6 img {
    width: auto !important;
    height: auto !important;
    max-height: 44px !important;
    object-fit: contain;
  }

  body [data-elementor-type="header"] .elementor-nav-menu--main .elementor-item {
    padding-block: 10px !important;
    padding-inline: 8px !important;
  }

  body [data-elementor-type="header"] .elementor-nav-menu--main .sub-arrow {
    padding-inline: 5px 0 !important;
  }

  body [data-elementor-type="header"] select {
    height: 40px !important;
    min-height: 40px !important;
  }
}

/* Shared cards and product imagery, without altering links or dynamic content. */
body :is(.elementor-image-box-wrapper, .elementor-icon-box-wrapper, [data-products] .product) {
  border-radius: var(--cy-radius-card);
}

body [data-products] .product {
  border-style: none;
  transition: border-color .4s var(--cy-ease), box-shadow .4s var(--cy-ease), transform .4s var(--cy-ease);
}

body [data-products] .product:hover {
  transform: translateY(-3px);
}

body [data-products] .product img {
  object-fit: contain;
  transform-origin: center;
  transition: transform .55s var(--cy-ease);
}

body [data-products] .product:hover img { transform: scale(1.035); }

/* ===== CHIYUE Home — Phase 3 ===== */
body.home .elementor-929 > .e-con:not(.elementor-element-cb1eb18) {
  scroll-margin-top: 110px;
}

body.home .elementor-element-107d675,
body.home .elementor-element-ae66234,
body.home .elementor-element-3a863cc {
  padding-block: var(--cy-section-space);
}

body.home :is(.elementor-element-e29b9e1, .elementor-element-f1b1211, .elementor-element-f9395f6) .elementor-image-box-wrapper {
  height: 100%;
  padding: 26px 22px;
  border-radius: var(--cy-radius-card);
  transition: border-color .4s var(--cy-ease), box-shadow .4s var(--cy-ease), transform .4s var(--cy-ease);
}

body.home :is(.elementor-element-e29b9e1, .elementor-element-f1b1211, .elementor-element-f9395f6) .elementor-widget-image-box:hover .elementor-image-box-wrapper {
  transform: translateY(-3px);
}

body.home :is(.elementor-element-e29b9e1, .elementor-element-f1b1211, .elementor-element-f9395f6) .elementor-image-box-img img {
  transform-origin: center;
  transition: transform .5s var(--cy-ease);
}

body.home :is(.elementor-element-e29b9e1, .elementor-element-f1b1211, .elementor-element-f9395f6) .elementor-widget-image-box:hover .elementor-image-box-img img {
  transform: scale(1.04);
}

body.home main .elementor-widget-image img {
  border-radius: var(--cy-radius-card);
}

body.home main .elementor-widget-image:not(.elementor-widget-theme-site-logo) img {
  transition: transform .55s var(--cy-ease), box-shadow .55s var(--cy-ease);
}

body.home main .elementor-widget-image:not(.elementor-widget-theme-site-logo):hover img {
  transform: scale(1.025);
}

body.home .elementor-widget-counter {
  height: 100%;
  padding: 22px 18px;
  border-width: 1px;
  border-style: solid;
  border-radius: var(--cy-radius-card);
}

body.home .elementor-counter-number-wrapper {
  font-family: var(--cy-font);
  font-weight: 700;
  letter-spacing: -.035em;
}

body.home .elementor-counter-title {
  font-family: var(--cy-font);
}

body.home .elementor-form {
  max-width: 960px;
  margin-inline: auto;
  padding: clamp(22px, 4vw, 44px);
  border-width: 1px;
  border-style: solid;
  border-radius: var(--cy-radius-card);
}

body.home .elementor-form .elementor-field {
  min-height: 52px;
  padding: 13px 16px;
}

body.home .elementor-form textarea.elementor-field {
  min-height: 150px;
}

/* Homepage factory video, metrics and factory carousel.
 * Structure only: all colors remain controlled by Elementor. */
body.home .elementor-element-85570b5 .elementor-wrapper,
body.home .elementor-element-85570b5 iframe,
body.home .elementor-element-85570b5 video {
  border-radius: var(--cy-radius-card);
}

body.home .elementor-element-85570b5 .elementor-wrapper {
  overflow: hidden;
}

body.home :is(
  .elementor-element-8d27897,
  .elementor-element-a6ffcb9,
  .elementor-element-048d876
) {
  align-items: stretch;
}

body.home :is(
  .elementor-element-8d27897,
  .elementor-element-a6ffcb9,
  .elementor-element-048d876
) .elementor-widget-counter {
  align-self: stretch;
  min-height: 176px;
  border-style: none;
  text-align: center;
}

body.home :is(
  .elementor-element-8d27897,
  .elementor-element-a6ffcb9,
  .elementor-element-048d876
) .elementor-widget-counter > .elementor-widget-container {
  display: grid;
  height: 100%;
  grid-template-rows: 72px minmax(52px, auto);
  align-content: center;
  justify-items: center;
}

body.home :is(
  .elementor-element-8d27897,
  .elementor-element-a6ffcb9,
  .elementor-element-048d876
) :is(.elementor-counter-number-wrapper, .elementor-counter-title) {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
}

body.home .elementor-element-1b81c02 :is(
  .swiper-slide,
  .swiper-slide-inner,
  figure,
  img
) {
  border-radius: var(--cy-radius-sm);
}

body.home .elementor-element-1b81c02 :is(
  .swiper-slide,
  .swiper-slide-inner,
  figure
) {
  overflow: hidden;
}

/* Replace endless animated headline loops with a stable, readable state. */
body.home .elementor-headline-dynamic-wrapper svg {
  animation-iteration-count: 1 !important;
}

/* ===== Archives, products and editorial pages — Phase 4 ===== */
body [data-products] {
  gap: clamp(18px, 2.4vw, 32px);
}

body [data-products] .product {
  overflow: hidden;
  padding: clamp(14px, 2vw, 22px);
  --horizontal-alignment: center;
  --text-horizontal-alignment: center;
  align-items: center;
  text-align: center;
}

body [data-products] .product figure {
  display: grid;
  min-height: 260px;
  place-items: center;
  border-radius: 16px;
  overflow: hidden;
}

body [data-products] .product figure img {
  width: 100%;
  height: 260px;
  object-fit: contain;
}

body [data-products] :is(.woocommerce-loop-product__title, .woocommerce-loop-category__title) {
  width: 100%;
  font-family: var(--cy-font);
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

body [data-products] .product :is(.entry-meta, .price, .ct-woo-card-actions) {
  width: 100%;
  justify-content: center;
  text-align: center;
}

body .woocommerce-product-gallery,
body .entry-summary {
  border-radius: var(--cy-radius-card);
}

body .woocommerce-product-gallery {
  padding: clamp(14px, 2vw, 24px);
  border-width: 1px;
  border-style: solid;
}

body .woocommerce-product-gallery img {
  object-fit: contain;
}

body .entry-summary .entry-title {
  font-family: var(--cy-font);
  font-size: clamp(2rem, 3.2vw, 3.4rem);
  line-height: 1.08;
}

body :is(.blog, .archive) .entry-card {
  overflow: hidden;
  border-width: 1px;
  border-style: solid;
  border-radius: var(--cy-radius-card);
  transition: border-color .4s var(--cy-ease), box-shadow .4s var(--cy-ease), transform .4s var(--cy-ease);
}

body :is(.blog, .archive) .entry-card:hover {
  transform: translateY(-3px);
}

body :is(.blog, .archive) .entry-card img {
  transition: transform .55s var(--cy-ease);
}

body :is(.blog, .archive) .entry-card:hover img {
  transform: scale(1.035);
}

body .ct-breadcrumbs {
  font-family: var(--cy-font);
  letter-spacing: .04em;
}

body .yith-wcan-filters {
  border-style: none;
  border-radius: var(--cy-radius-card);
}

/* Products archive controls and cards.
 * Structure only: colors remain controlled by Elementor and WooCommerce. */
body.woocommerce-shop .elementor-element-39a0193 .yith-wcan-filters {
  padding-inline-start: 1em;
  border-style: none;
}

body.woocommerce-shop .elementor-element-a92277a .e-search-submit {
  border-radius: 10px;
}

body.woocommerce-shop .elementor-element-6558af12 [data-products] .product {
  border-style: none;
}

body.woocommerce-shop .elementor-element-6558af12 [data-products] .product .entry-meta {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
}

body.woocommerce-shop .elementor-element-6558af12 [data-products] .product .meta-categories {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

body.woocommerce-shop .elementor-element-6558af12 [data-products] .product .meta-categories a {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
}

/* GTranslate: the header already carries a language selector, so the
 * floating switcher only duplicated it — and it sat fixed on top of page
 * content at z-index 999999. Keep it out of the way. */
body .gt_switcher_wrapper {
  display: none !important;
}

body .switcher,
body .gt_float_switcher {
  z-index: 900;
}

@media (max-width: 1024px) {
  body .e-con.e-con-boxed > .e-con-inner {
    max-width: calc(100% - 40px);
  }

  body [data-elementor-type="header"] {
    position: relative;
    top: auto;
    -webkit-backdrop-filter: saturate(145%) blur(12px);
    backdrop-filter: saturate(145%) blur(12px);
  }

  /* The Elementor header template marks its only navigation row as hidden on
   * tablet/mobile. Re-enable that existing row; the contained Elementor menu
   * already uses its accessible burger/dropdown behavior. */
  body [data-elementor-type="header"] .elementor-element-2b114ef {
    display: flex !important;
    --min-height: 76px !important;
    --flex-direction: row !important;
    --justify-content: space-between !important;
    --align-items: center !important;
    height: 76px !important;
    min-height: 76px !important;
    padding: 10px 22px;
  }

  body [data-elementor-type="header"] .elementor-element-2b114ef > .e-con-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 100%;
  }

  body [data-elementor-type="header"] .elementor-element-5a70712e {
    --width: auto !important;
    width: auto !important;
    margin-left: auto;
  }

  body [data-elementor-type="header"] .elementor-element-7e9d21c6 img {
    width: auto;
    max-height: 38px;
    object-fit: contain;
  }

  /* The existing tablet Hero centers a long copy block inside a desktop-sized
   * fixed-height container. Increase only its available height; preserve its
   * Elementor layout, imagery and responsive variant. */
  body.home .elementor-929 .elementor-element.elementor-element-8484cee {
    --min-height: 640px !important;
    min-height: 640px !important;
  }

  body .switcher,
  body .gt_float_switcher {
    right: 16px !important;
    left: auto !important;
    bottom: 16px !important;
  }

  /* Tablet-only Why Choose Us structure: two readable columns instead of
   * five compressed columns with mid-word wrapping. */
  body.home .elementor-element-f1b1211 {
    flex-flow: row wrap;
    gap: 28px 24px;
    justify-content: center;
  }

  body.home .elementor-element-f1b1211 > .elementor-element {
    width: calc(50% - 12px) !important;
    max-width: none !important;
  }

  body.home .elementor-element-f1b1211 .elementor-image-box-title {
    overflow-wrap: normal;
    word-break: normal;
  }
}

@media (max-width: 782px) {
  body.admin-bar [data-elementor-type="header"] { top: 46px; }
}

@media (max-width: 767px) {
  body .e-con.e-con-boxed > .e-con-inner {
    max-width: calc(100% - 28px);
  }

  body h1 { font-size: clamp(2.25rem, 11vw, 3.25rem); }
  body h2 { font-size: clamp(1.9rem, 9vw, 2.75rem); }

  body.home .elementor-929 .elementor-element.elementor-element-7fd8227 {
    min-height: 760px !important;
  }

  body.home .elementor-element-9b87ec0 {
    --width: min(78%, 290px) !important;
    width: min(78%, 290px) !important;
    margin: 0 !important;
  }

  body.home .elementor-element-e171c78 {
    --container-widget-width: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.home .elementor-element-e171c78 .elementor-heading-title {
    font-size: clamp(1.75rem, 8vw, 2.15rem) !important;
    line-height: 1.08 !important;
    overflow-wrap: normal;
    word-break: normal;
  }

  body [data-products] .product figure,
  body [data-products] .product figure img {
    min-height: 220px;
    height: 220px;
  }

  body .elementor-widget-button .elementor-button,
  body :is(.button, button[type="submit"], input[type="submit"]) {
    min-height: 46px;
    padding-inline: 22px;
  }

  body .switcher,
  body .gt_float_switcher {
    max-width: 150px;
    transform: scale(.9);
    transform-origin: left bottom;
  }
}

/* ============================================================
   CHIYUE — Interaction & accessibility baseline (spec §4 / §5)
   ============================================================ */

/* --- Transitions: 150–200ms, transform & opacity only ---------
   Overrides the earlier blanket transition, which animated
   non-compositable properties and stuttered on mobile. */
body .elementor-widget-button .elementor-button,
body :is(.button, button[type="submit"], input[type="submit"]) {
  transition: background-color var(--cy-dur) var(--cy-ease),
              border-color var(--cy-dur) var(--cy-ease),
              color var(--cy-dur) var(--cy-ease),
              box-shadow var(--cy-dur) var(--cy-ease),
              transform var(--cy-dur) var(--cy-ease);
}

body .elementor-widget-button .elementor-button:hover,
body .elementor-widget-button .elementor-button:focus-visible,
body :is(.button, button[type="submit"], input[type="submit"]):hover {
  transform: translateY(-1px);
}

/* Scale feedback — pressed state, nothing below .95. */
body .elementor-widget-button .elementor-button:active,
body :is(.button, button[type="submit"], input[type="submit"]):active {
  transform: scale(.97);
  transition-duration: 120ms;
  transition-timing-function: ease-out;
}

/* --- Focus-visible: ring for keyboard users only --------------
   Never remove the ring; only gate it to :focus-visible so mouse
   clicks stay clean. */
body :is(a, button, summary, [tabindex]):focus-visible,
body :is(input, textarea, select):focus-visible,
body .elementor-button:focus-visible {
  outline: 2px solid var(--cy-color-accent);
  outline-offset: 2px;
  box-shadow: var(--cy-focus-ring);
  border-radius: var(--cy-radius-sm);
}

/* --- Touch targets: ≥44×44 with 8pt separation ---------------- */
/* NOTE: 仅限导航菜单项（含页脚竖排菜单，同为 elementor-item）。
   不要把 footer a / .ct-breadcrumbs a 放进来——正文里的行内链接
   （如 mailto 邮箱）会被 inline-flex + 44px min-height 撑高，
   文字垂直居中导致与前后文字错位（2026-10-14 修复）。 */
body :is(.elementor-nav-menu--dropdown .elementor-item,
         .elementor-nav-menu--main .elementor-item) {
  min-height: var(--cy-touch);
  display: inline-flex;
  align-items: center;
}

/* --- Sticky header: shadow only once the page has scrolled ---- */
body [data-elementor-type="header"] {
  transition: box-shadow var(--cy-dur) var(--cy-ease),
              background-color var(--cy-dur) var(--cy-ease);
}

body.cy-scrolled [data-elementor-type="header"] {
  box-shadow: var(--cy-shadow-sticky);
}

/* --- Breadcrumbs --------------------------------------------- */
body .ct-breadcrumbs {
  font-size: 13px;
  color: var(--cy-color-text-muted);
}

body .ct-breadcrumbs a {
  color: var(--cy-color-text-muted);
  text-decoration: none;
  transition: color var(--cy-dur) var(--cy-ease);
}

body .ct-breadcrumbs a:hover { color: var(--cy-color-accent); }

/* --- Cards: hairline + soft shadow, never a heavy block ------- */
body :is(.elementor-image-box-wrapper, .elementor-icon-box-wrapper, [data-products] .product) {
  border: 1px solid var(--cy-color-border);
  box-shadow: var(--cy-shadow-card);
}

/* --- Skeleton screen: same shape as the real card grid -------- */
.cy-skeleton {
  border-radius: var(--cy-radius-card);
  background: linear-gradient(100deg,
              var(--cy-color-surface-soft) 30%,
              var(--cy-color-accent-tint) 50%,
              var(--cy-color-surface-soft) 70%);
  background-size: 220% 100%;
  animation: cy-skeleton-sweep 1.4s ease-in-out infinite;
}

@keyframes cy-skeleton-sweep {
  from { background-position: 120% 0; }
  to   { background-position: -20% 0; }
}

/* --- Scroll reveal: fade + 16px rise, played once ------------- */
body .cy-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 480ms var(--cy-ease), transform 480ms var(--cy-ease);
  will-change: opacity, transform;
}

body .cy-reveal.is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* ---------------------------------------------------------- language switcher
   Polylang inline switcher rendered in the header top bar via
   [cy_language_switcher]. Replaces the retired GTranslate shortcode. */
.cy-lang-switcher ul {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cy-lang-switcher li {
  margin: 0;
  line-height: 1;
}

.cy-lang-switcher a {
  font-size: 13px;
  font-weight: 500;
  color: var(--cy-color-text, #2b2230);
  text-decoration: none;
  transition: color .16s ease;
}

.cy-lang-switcher a:hover {
  color: var(--cy-color-accent, #7b1f66);
}

.cy-lang-switcher li.lang-item-current a {
  color: var(--cy-color-accent, #7b1f66);
  font-weight: 600;
}

/* The floating enquiry / WhatsApp dock is provided by the existing
   sticky-elements widget, so no second dock is rendered here. */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  /* Never hide content when the user asks for less motion. */
  body .cy-reveal,
  body .cy-reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .cy-skeleton { animation: none !important; }

  body *,
  body *::before,
  body *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Shared brand colour for actions and the single language dropdown. */
body .elementor-widget-button .elementor-button,
body :is(.button, button[type="submit"], input[type="submit"]),
body .cy-lang-switcher .cy-language-select {
  background-color: var(--cy-color-accent, #7B1F66) !important;
  background-image: none;
  border-color: var(--cy-color-accent, #7B1F66) !important;
  color: #fff !important;
}
body .elementor-widget-button .elementor-button:hover,
body .elementor-widget-button .elementor-button:focus-visible,
body :is(.button, button[type="submit"], input[type="submit"]):hover,
body .cy-lang-switcher .cy-language-select:hover {
  background-color: #621952 !important;
  border-color: #621952 !important;
  color: #fff !important;
}
.cy-lang-switcher { display: inline-flex; align-items: center; max-width: 100%; position: relative; }
.cy-lang-switcher::after {
  content: ''; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
body .cy-lang-switcher .cy-language-select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  width: auto; min-width: 150px; max-width: 100%; min-height: 44px;
  padding: 9px 38px 9px 16px; margin: 0;
  border: 1px solid; border-radius: var(--cy-radius-pill, 24px);
  font-size: 14px; font-weight: 500; line-height: 1.5;
}
body .cy-lang-switcher .cy-language-select option { background: #fff; color: #2b2230; }

/* Compact header: keep social actions together, remove nested container padding. */
body [data-elementor-type="header"] .elementor-widget-social-icons {
  width: max-content !important; max-width: none !important;
  --container-widget-width: auto; flex: 0 0 auto !important;
}
body [data-elementor-type="header"] .elementor-social-icons-wrapper {
  display: flex !important; flex-wrap: nowrap !important;
  align-items: center; gap: 6px; width: max-content;
}
body [data-elementor-type="header"] .elementor-social-icons-wrapper .elementor-grid-item {
  display: inline-flex; flex: 0 0 auto; margin: 0 !important;
}
@media (min-width: 1025px) {
  body [data-elementor-type="header"] .elementor-element-40105b18 {
    --min-height: 40px !important; min-height: 40px !important;
    --padding-top: 0px; --padding-bottom: 0px;
    padding: 0 24px !important; margin: 0 !important;
  }
  body [data-elementor-type="header"] .elementor-element-40105b18 > .e-con-inner {
    padding: 0 !important; gap: 0 !important; align-items: center;
  }
  body [data-elementor-type="header"] :is(.elementor-element-47e081c1, .elementor-element-5dcf59c2) {
    width: auto !important; --width: auto; flex: 0 0 auto !important;
    padding: 0 !important; margin: 0 !important; min-height: 0 !important;
    gap: 14px !important; flex-wrap: nowrap !important; align-items: center;
  }
  body [data-elementor-type="header"] .elementor-element-efab954 {
    width: auto !important; flex: 0 0 auto; margin: 0 !important;
  }
  body [data-elementor-type="header"] .elementor-shortcode { line-height: 1; }
  body [data-elementor-type="header"] .cy-lang-switcher .cy-language-select {
    min-height: 36px !important; height: 36px !important;
    min-width: 140px; padding-block: 5px;
  }
  body [data-elementor-type="header"] .elementor-element-2b114ef {
    --min-height: 56px !important; min-height: 56px !important;
    --padding-top: 0px; --padding-bottom: 0px;
    padding: 0 24px !important; margin: 0 !important;
  }
  body [data-elementor-type="header"] .elementor-element-2b114ef > .e-con-inner {
    padding: 0 !important; min-height: 56px; gap: 20px !important;
    flex-direction: row; flex-wrap: nowrap; align-items: center;
  }
  body [data-elementor-type="header"] .elementor-element-7e9d21c6 {
    width: 140px !important; max-width: 140px !important;
    padding: 0 !important; margin: 0 !important; flex: 0 0 140px !important;
    line-height: 0;
  }
  body [data-elementor-type="header"] .elementor-element-7e9d21c6 img {
    width: 140px !important; max-width: 100% !important;
    height: auto !important; max-height: 46px !important;
    object-fit: contain; transform: none !important; vertical-align: middle;
  }
  body [data-elementor-type="header"] .elementor-element-5a70712e {
    width: auto !important; --width: auto; flex: 1 1 auto !important;
    min-width: 0; padding: 0 !important; gap: 0 !important; justify-content: center;
  }
  body [data-elementor-type="header"] .elementor-nav-menu--main > .elementor-nav-menu {
    flex-wrap: nowrap; justify-content: flex-end;
  }
  body [data-elementor-type="header"] .elementor-nav-menu--main .elementor-item {
    font-size: 14px !important; padding: 12px 8px !important; white-space: nowrap;
  }
}
@media (min-width: 1025px) and (max-width: 1199px) {
  body [data-elementor-type="header"] .elementor-nav-menu--main .elementor-item {
    font-size: 12px !important; padding-inline: 6px !important;
  }
}

/* Single-language content: remove empty bilingual subtitles and allow natural wrapping. */
body .cy-custom-page.cy-custom-page :is(span,small):empty {display:none!important;}
body .cy-custom-page.cy-custom-page .hero h1 {font-size:clamp(36px,5.2vw,72px);line-height:1.12;}
body .cy-custom-page.cy-custom-page :is(.button,.text-link,.check-options label){white-space:normal;overflow-wrap:anywhere;}
body .cy-custom-page.cy-custom-page .finish-list summary{grid-template-columns:minmax(0,1fr) auto;}
body .cy-custom-page.cy-custom-page :is(.material-panel,.inquiry,.package-layout)>*{min-width:0;}
body .cy-custom-page.cy-custom-page :is(input,textarea,select){max-width:100%;}
body .cy-custom-page .section-nav .wrap{gap:22px;justify-content:flex-start;}

body [data-elementor-type="header"] .elementor-nav-menu--main .elementor-item{white-space:normal;}
@media(max-width:600px){body .cy-custom-page.cy-custom-page .check-options{grid-template-columns:repeat(2,minmax(0,1fr));}body .cy-custom-page.cy-custom-page .actions{align-items:stretch;}}


/* Both translations occupy the same grid cell; the larger copy reserves space. */
cy-copy { display: inline-grid; grid-template-columns:minmax(0,1fr); vertical-align:top; max-width:100%; min-width:0; text-align:inherit; }
cy-copy > cy-text, cy-copy > cy-measure { grid-area:1 / 1; min-width:0; overflow-wrap:break-word; }
cy-copy > cy-measure { display:none!important; pointer-events:none; user-select:none; }
/* [2026-10-14 v2] 全站：隐藏占位不再占任何宽度（原为 visibility:hidden 同格撑宽）。
   「按较宽一方撑宽」在以下位置造成可见空白：按钮（页脚「更多产品」被 More Products、
   「联系我们」被 GET IN TOUCH 撑宽数十像素）、行内标签（「邮箱：」与链接间出现空隙）等。
   语言切换为服务端整页渲染，不存在客户端切换跳动，占位宽度无实际收益，故全站隐藏。
   原导航菜单例外规则（display:none）已并入此全局规则，语义（aria-hidden/inert）不变。 */
.elementor-nav-menu cy-copy { display:inline; max-width:none; }
.elementor-nav-menu cy-text { display:inline; }
body .cy-custom-page.cy-custom-page .material-name {min-height:3.4em;display:block;}
body .cy-custom-page.cy-custom-page #material-title {min-height:2.8em;}
body .cy-custom-page.cy-custom-page #material-description {min-height:7em;}
body .cy-custom-page.cy-custom-page .color-note p {min-height:3.4em;flex:1;}
body .cy-custom-page.cy-custom-page .color-sample {display:block!important;height:auto;aspect-ratio:1 / 1;}
body .cy-custom-page.cy-custom-page .color-sample::before {content:none;}
body .cy-custom-page.cy-custom-page .color-sample img {width:100%;height:100%;object-fit:cover;display:block;}
body .cy-custom-page.cy-custom-page .color-sample.transparent img {object-position:72% center;}
body .cy-custom-page.cy-custom-page .color-option strong {min-height:3em;line-height:1.5;}
body .cy-custom-page.cy-custom-page .section-nav a {flex:0 0 auto;}
@media(max-width:600px){body .cy-custom-page.cy-custom-page #material-description{min-height:8.5em;}}

/* Compact footer products and circular social icons matching the header. */
body [data-elementor-type="footer"] .cy-footer-products-short .elementor-nav-menu > li:nth-child(n+6){display:none;}
body [data-elementor-type="footer"] .elementor-element-5901d0b > .elementor-widget-heading{margin-bottom:20px;}
body [data-elementor-type="footer"] .cy-footer-more-products .elementor-button{min-height:44px;padding:10px 20px;font-size:14px;}
body [data-elementor-type="footer"] .elementor-widget-social-icons{width:176px!important;--container-widget-width:176px;max-width:100%;align-self:flex-start;margin-inline:0;transform:none;}
body [data-elementor-type="footer"] .elementor-social-icons-wrapper{display:flex;width:100%;gap:0;flex-wrap:nowrap;align-items:center;justify-content:space-between;}
body [data-elementor-type="footer"] .elementor-social-icons-wrapper .elementor-grid-item{display:inline-flex;flex:0 0 40px;width:40px;margin:0!important;}
body [data-elementor-type="footer"] a.elementor-social-icon{width:40px;height:40px;min-height:40px;padding:10px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;}
body [data-elementor-type="footer"] a.elementor-social-icon i,body [data-elementor-type="footer"] a.elementor-social-icon svg{width:20px;height:20px;font-size:20px;}
body [data-elementor-type="footer"] a.elementor-social-icon,body [data-elementor-type="footer"] a.elementor-social-icon:hover{flex:0 0 40px;transform:none;animation:none;}
/* Shared header dropdown: 85% white background and edge-to-edge hover rows. */
/* Center CTA labels within their existing dimensions, including translated copy. */
body :is(.elementor-button, .button, .cy-btn, .cy-submit, .cy-tab, button[type="submit"], input[type="submit"]),
body .cy-news-v2 :is(.nv-topic-filters a, .nv-pagination > *) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}
body .elementor-button .elementor-button-content-wrapper {
  display: flex;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
}
body .elementor-button .elementor-button-text {
  flex-grow: 0;
  text-align: center !important;
}
body .elementor-button .elementor-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body :is(.elementor-button, .button, .cy-btn, .cy-submit, .cy-tab, button[type="submit"]) cy-copy {
  align-items: center;
  justify-items: center;
  vertical-align: middle;
  text-align: center;
}
body [data-elementor-type="header"] .elementor-nav-menu--dropdown{padding-inline:0;}
body [data-elementor-type="header"] .elementor-nav-menu--dropdown li{margin-inline:0;width:100%;}
body [data-elementor-type="header"] .elementor-nav-menu--dropdown a.elementor-sub-item,
body [data-elementor-type="header"] .elementor-nav-menu--dropdown a.elementor-item{display:flex;box-sizing:border-box;width:100%;margin-inline:0;border-radius:0;}
