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

/* ── 전체 페이지: 스크롤바 영역 고정으로 가로 흔들림 방지 ── */
html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

@supports (scrollbar-gutter: stable) {
    html {
        overflow-y: auto;
    }
}

/* ── 노트/향조 아카이브: 둥근 사각형(squircle) 이미지 ── */
.post-type-archive-note .ct-media-container,
.post-type-archive-fragrance .ct-media-container {
    border-radius: 22% !important;
    overflow: hidden !important;
    background: var(--theme-palette-color-7, #f5f5f5) !important;
}

.post-type-archive-note .ct-media-container img,
.post-type-archive-fragrance .ct-media-container img {
    object-fit: cover !important;
    border-radius: 22% !important;
}

/* ── 기타 CPT 아카이브: 크롭 방지, 원본 비율 유지 ── */
.post-type-archive-brand .ct-media-container,
.post-type-archive-scent .ct-media-container {
    aspect-ratio: auto !important;
}

.post-type-archive-brand .ct-media-container img,
.post-type-archive-scent .ct-media-container img {
    object-fit: contain !important;
    height: auto !important;
}

/* ── 노트 단일: 대표 이미지를 정보 카드 2칸 폭에 맞춤 ── */
.single-note .ct-featured-image:not(.alignwide):not(.alignfull) {
    max-width: calc((var(--theme-block-max-width, 720px) - 14px) / 2);
}

.single-note .ct-featured-image .ct-media-container {
    border-radius: 8px;
}

@media (max-width: 760px) {
    .single-note .ct-featured-image:not(.alignwide):not(.alignfull) {
        max-width: var(--theme-block-max-width, 720px);
    }
}

/* ── 향 느낌 아카이브: Blocksy 전역 타입/색상 상속, 구조만 지정 ── */
.scent-hub {
    word-break: keep-all;
}

.scent-hub__header,
.scent-hub__section {
    margin-bottom: var(--theme-content-spacing, 1.5em);
}

.scent-hub__intro,
.scent-hub__section-head,
.scent-hub__empty {
    max-width: var(--theme-block-max-width, 720px);
}

.scent-hub__footnote,
.fragrance-hub__footnote {
    width: 100vw;
    max-width: none;
    margin-top: calc(var(--theme-content-spacing, 1.5em) * 2);
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-top: 1em;
    padding-inline: calc((100vw - min(var(--theme-container-width-base, 90vw), var(--theme-normal-container-max-width, 1290px))) / 2);
    opacity: 0.72;
}

.scent-hub__footnote > *,
.fragrance-hub__footnote > * {
    max-width: none;
}

.scent-hub__footnote h2,
.fragrance-hub__footnote h2 {
    font-size: 1em;
}

.scent-hub__footnote p,
.fragrance-hub__footnote p {
    font-size: 0.875em;
    line-height: 1.65;
}

.scent-hub__footnote-ref {
    margin-left: 0.08em;
    font-size: 0.72em;
    font-weight: 600;
    line-height: 1;
    vertical-align: super;
}

.scent-hub__footnote-ref a,
.scent-hub__footnote-back {
    text-decoration: none;
}

.scent-hub__annotations {
    margin-top: calc(var(--theme-content-spacing, 1.5em) * 1.4);
    padding-top: 1em;
    border-top: 1px solid var(--theme-border-color, currentColor);
    opacity: 0.78;
}

.scent-hub__annotation {
    margin: 0;
    font-size: 0.875em;
    line-height: 1.65;
}

.scent-hub__footnote-back {
    margin-right: 0.35em;
    font-weight: 600;
}

.scent-hub__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75em;
    margin-bottom: var(--theme-content-spacing, 1.5em);
}

.scent-hub__tabs a,
.scent-hub__item {
    border: 1px solid var(--theme-border-color, currentColor);
    border-radius: var(--theme-button-border-radius, 3px);
    text-decoration: none;
}

.scent-hub__tabs a {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.55em 0.85em;
}

.scent-hub__tabs small,
.scent-hub__eyebrow,
.scent-hub__section-kicker,
.scent-hub__item-en,
.scent-hub__item-count,
.scent-hub__source,
.fragrance-hub__source {
    opacity: 0.68;
}

.scent-hub__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: var(--theme-content-spacing, 1.5em);
}

.scent-hub__section--primary .scent-hub__grid {
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.scent-hub__item {
    display: flex;
    min-height: 14rem;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 0.5em;
    padding: 1em;
    text-align: center;
}

.scent-hub__item-media {
    display: block;
    width: min(100%, 200px);
    max-width: 200px;
    aspect-ratio: 1 / 1;
    margin: 0 auto 1rem;
    border-radius: 22%;
    overflow: hidden;
    background: #f5f5f5;
}

.scent-hub__item-image {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 22%;
    object-fit: cover;
}

.scent-hub__item-title,
.scent-hub__item-en,
.scent-hub__item-count {
    display: block;
}

.scent-detail {
    line-height: 1.7;
    text-align: justify;
    text-justify: inter-character;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.scent-detail p,
.scent-detail li,
.scent-detail dd {
    text-align: justify;
    text-justify: inter-character;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.scent-detail a {
    color: var(--theme-link-initial-color);
    text-decoration: underline;
}

.scent-detail a:hover {
    color: var(--theme-link-hover-color);
}

.scent-hero-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 0 1.2em;
    text-align: center;
}

.scent-hero-image img {
    width: 300px;
    height: 300px;
    border-radius: 22%;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.scent-hero-caption {
    margin-top: 0.65em;
    color: var(--theme-text-color);
}

@media (max-width: 689px) {
    .scent-hub__grid,
    .scent-hub__section--primary .scent-hub__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .scent-hero-image img {
        width: 200px;
        height: 200px;
    }
}

/* ── 향조 아카이브: 현재 제품에 쓰이는 향조를 계열별로 표시 ── */
.fragrance-hub {
    word-break: keep-all;
}

.fragrance-hub__header,
.fragrance-hub__section {
    margin-bottom: calc(var(--theme-content-spacing, 1.5em) * 1.35);
}

.fragrance-hub__intro,
.fragrance-hub__empty {
    max-width: var(--theme-block-max-width, 720px);
}

.fragrance-hub__section {
    padding-top: calc(var(--theme-content-spacing, 1.5em) * 0.85);
    border-top: 1px solid var(--theme-border-color, currentColor);
}

.fragrance-hub__family {
    margin-bottom: var(--theme-content-spacing, 1.5em);
}

.fragrance-hub__family-link,
.fragrance-hub__child {
    text-decoration: none;
}

.fragrance-hub__family-link {
    display: inline-flex;
    align-items: baseline;
    gap: 0.55em;
    margin-bottom: 0.65em;
}

.fragrance-hub__family-title {
    font-size: 1.45em;
    font-weight: 700;
    line-height: 1.3;
}

.fragrance-hub__code,
.fragrance-hub__child-code,
.fragrance-hub__child-count {
    opacity: 0.68;
}

.fragrance-hub__code,
.fragrance-hub__child-code {
    font-weight: 700;
}

.fragrance-hub__family-description {
    width: 100%;
    margin-bottom: 8px;
    border: 1px solid var(--theme-border-color);
    border-radius: 8px;
    color: var(--theme-text-color);
    overflow: hidden;
}

.fragrance-hub__family-description summary {
    display: block;
    cursor: pointer;
    padding: 10px 16px;
    background: var(--theme-palette-color-7);
    color: var(--theme-text-color);
    font-weight: 600;
    list-style: none;
}

.fragrance-hub__family-description summary::-webkit-details-marker {
    display: none;
}

.fragrance-hub__family-description summary::before {
    content: "▸ ";
    font-size: 0.8em;
}

.fragrance-hub__family-description[open] summary::before {
    content: "▾ ";
}

.fragrance-hub__family-description-body {
    padding: 12px 16px;
    color: var(--theme-text-color);
    font-size: 0.92em;
    line-height: 1.8;
}

.fragrance-hub__family-description-body p {
    margin-bottom: 0.8em;
}

.fragrance-hub__children {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--theme-content-spacing, 1.5em);
}

.fragrance-hub__child {
    display: flex;
    min-height: 12rem;
    flex-direction: column;
    gap: 0.8em;
    padding: 1em;
    border: 1px solid var(--theme-border-color, currentColor);
    border-radius: var(--theme-button-border-radius, 3px);
    color: var(--theme-text-color);
}

.fragrance-hub__child:hover {
    border-color: var(--theme-link-hover-color, currentColor);
}

.fragrance-hub__child-head {
    display: flex;
    align-items: baseline;
    gap: 0.45em;
}

.fragrance-hub__child-title {
    font-weight: 700;
    line-height: 1.35;
}

.fragrance-hub__child-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 300px);
    max-width: 300px;
    margin: 0 auto 1rem;
    text-align: center;
}

.fragrance-hub__child-image-frame {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 22%;
    overflow: hidden;
    background: #f5f5f5;
}

.fragrance-hub__child-image {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 22%;
    object-fit: cover;
}

.fragrance-hub__child-caption {
    margin-top: 0.65em;
    font-size: 0.82em;
    line-height: 1.45;
    color: var(--theme-text-color);
    opacity: 0.76;
}

.fragrance-hub__child-summary {
    font-size: 0.92em;
    line-height: 1.7;
}

.fragrance-hub__child-summary p {
    margin-bottom: 0.75em;
}

.fragrance-hub__child-summary p:last-child {
    margin-bottom: 0;
}

.fragrance-hub__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45em;
}

.fragrance-hub__fact {
    display: inline-flex;
    align-items: center;
    min-height: 1.9em;
    padding: 0.28em 0.62em;
    border: 1px solid color-mix(in srgb, var(--theme-border-color, currentColor) 78%, transparent);
    border-radius: 999px;
    font-size: 0.78em;
    line-height: 1.2;
    background: color-mix(in srgb, var(--theme-palette-color-8, #ffffff) 88%, var(--theme-palette-color-1, #111111) 12%);
}

.fragrance-hub__fact--season {
    background: color-mix(in srgb, var(--theme-palette-color-8, #ffffff) 88%, #2f7d68 12%);
}

.fragrance-hub__fact--occasion {
    background: color-mix(in srgb, var(--theme-palette-color-8, #ffffff) 88%, #8a6f30 12%);
}

.fragrance-hub__child-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75em;
    margin-top: auto;
    padding-top: 0.2em;
}

.fragrance-hub__child-count,
.fragrance-hub__child-more {
    font-size: 0.86em;
}

.fragrance-hub__child-more {
    color: var(--theme-link-initial-color, currentColor);
    font-weight: 700;
}

@media (max-width: 999px) {
    .fragrance-hub__children {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 689px) {
    .fragrance-hub__children {
        grid-template-columns: 1fr;
    }

    .fragrance-hub__child {
        min-height: auto;
    }
}

/* ── 향조/향 느낌: 노트 상세처럼 제목 위계에 따른 좌우 들여쓰기 ── */
.post-type-archive-scent .scent-hub,
.post-type-archive-fragrance .fragrance-hub,
.single-fragrance .fragrance-detail,
.single-scent .scent-detail {
    --perfume-section-indent: 24px;
    --perfume-body-indent: 42px;
    --perfume-inner-indent: 18px;
}

.post-type-archive-scent .scent-hub__intro,
.post-type-archive-scent .scent-hub__tabs,
.post-type-archive-scent .scent-hub__section-head > p,
.post-type-archive-scent .scent-hub__grid,
.post-type-archive-scent .scent-hub__annotations,
.post-type-archive-scent .scent-hub__footnote > :not(h1):not(h2):not(h3):not(h4),
.post-type-archive-fragrance .fragrance-hub__intro,
.post-type-archive-fragrance .fragrance-hub__family-description,
.post-type-archive-fragrance .fragrance-hub__children,
.post-type-archive-fragrance .fragrance-hub__footnote > :not(h1):not(h2):not(h3):not(h4),
.single-fragrance .fragrance-detail > p,
.single-fragrance .fragrance-detail > ul,
.single-fragrance .fragrance-detail > .note-grid,
.single-fragrance .fragrance-detail > .similar-card,
.single-fragrance .fragrance-products > .products,
.single-fragrance .fragrance-products > .perfume-related-products-empty,
.single-scent .scent-detail > p {
    width: calc(100% - (var(--perfume-body-indent) * 2));
    margin-left: var(--perfume-body-indent) !important;
    margin-right: var(--perfume-body-indent) !important;
}

.single-scent .scent-products-group {
    margin-left: var(--perfume-section-indent);
    margin-right: var(--perfume-section-indent);
}

.single-scent .scent-products-group > .products {
    width: calc(100% - (var(--perfume-inner-indent) * 2));
    margin-left: var(--perfume-inner-indent) !important;
    margin-right: var(--perfume-inner-indent) !important;
    align-items: stretch;
}

.single-scent .scent-products-group > .products > li.product {
    display: flex !important;
    flex-direction: column;
    height: 100%;
}

.single-scent .scent-products-group > .products > li.product .entry-excerpt {
    flex: 1 1 auto;
}

.single-scent .scent-products-group > .products > li.product .scent-product-usage {
    width: 100%;
    margin-top: auto;
}

@media (max-width: 760px) {
    .post-type-archive-scent .scent-hub,
    .post-type-archive-fragrance .fragrance-hub,
    .single-fragrance .fragrance-detail,
    .single-scent .scent-detail {
        --perfume-section-indent: 14px;
        --perfume-body-indent: 26px;
        --perfume-inner-indent: 12px;
    }
}
