/* === VCF Ritual — Consolidated Styles === */

/* ── 1. Reset ── */
body {
    margin: 0 !important;
    padding: 0 !important;
}

/* ── 2. Layout: remove white space above hero ── */
.wp-site-blocks {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    gap: 0 !important;
    margin-top: 0 !important;
}

.wp-block-post-content,
.wp-block-post-content > *:first-child,
main.wp-block-group,
.wp-site-blocks > main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ── 3. Header ── */

/* 首頁：header 浮在 hero 上方，透明 */
body.home header.wp-block-template-part {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 1000 !important;
    background: transparent !important;
    display: block !important;
}

/* 內頁：header 正常流排版，黑色背景 */
body:not(.home) header.wp-block-template-part {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    height: auto !important;
    min-height: auto !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 1000 !important;
    background: #000000 !important;
    display: block !important;
}

/* about 頁：header fixed 透明疊在圖片上 */
body.page-id-20 header.wp-block-template-part {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: transparent !important;
}

/* 內頁主內容不需要推開 header */
body:not(.home) .wp-block-post-content,
body:not(.home) main.wp-block-group,
body:not(.home) .wp-site-blocks > main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ── 4. Post navigation / query spacing ── */
.wp-block-pattern-post-navigation { margin-bottom: 0 !important; }
.wp-block-query { margin-top: 0 !important; }
main > .wp-block-group > .wp-block-group { padding-top: 0 !important; padding-bottom: 0 !important; }
main .wp-block-group:has(.wp-block-post-terms) { padding-top: 0 !important; padding-bottom: 0 !important; }

/* ── 5. Account & Cart icon ── */
.vcf-account-icon a,
.vcf-cart-icon a {
    font-size: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: inherit;
}

.vcf-account-icon a::before,
.vcf-cart-icon a::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
}

.vcf-account-icon a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27currentColor%27 stroke-width=%271.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2%27/%3E%3Ccircle cx=%2712%27 cy=%277%27 r=%274%27/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27currentColor%27 stroke-width=%271.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2%27/%3E%3Ccircle cx=%2712%27 cy=%277%27 r=%274%27/%3E%3C/svg%3E");
}

.vcf-cart-icon a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27currentColor%27 stroke-width=%271.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z%27/%3E%3Cline x1=%273%27 y1=%276%27 x2=%2721%27 y2=%276%27/%3E%3Cpath d=%27M16 10a4 4 0 0 1-8 0%27/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27currentColor%27 stroke-width=%271.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z%27/%3E%3Cline x1=%273%27 y1=%276%27 x2=%2721%27 y2=%276%27/%3E%3Cpath d=%27M16 10a4 4 0 0 1-8 0%27/%3E%3C/svg%3E");
}

.vcf-account-icon + .vcf-cart-icon { margin-left: 4px; }

/* ── 6. 隱藏舊的 vcf-inner-header ── */
.vcf-inner-header,
.vcf-inner-mobile-menu {
    display: none !important;
}

/* 登入頁面置中 */
.woocommerce-account .woocommerce {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}
.woocommerce-account .woocommerce-form-login-toggle,
.woocommerce-account .woocommerce-form-login,
.woocommerce-account .u-column1,
.woocommerce-account .u-column2 {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}
.woocommerce-account .col2-set {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* 登入頁置中 */
.woocommerce-account .entry-content {
  display: flex !important;
  justify-content: center !important;
  padding: 60px 20px !important;
  box-sizing: border-box;
}
.woocommerce-account .entry-content > .woocommerce {
  width: 100% !important;
  max-width: 480px !important;
}

/* === Shop 頁面背景色 === */
.woocommerce-shop body,
body.woocommerce-shop,
body.woocommerce.archive {
    background-color: #e8e2d8 !important;
}
