@charset "UTF-8";

/* =========================================================
   Main Page Styles - ARCHDERMA
   메인 페이지(main.php) 전용 CSS  (Section 1 ~ 5)
   ========================================================= */

/* bootstrap.css가 all.css 뒤에 로드되므로 body 기본 폰트/색상을 Pretendard로 고정 */
:root {
    --bs-body-font-family: 'Pretendard', 'Apple SD Gothic Neo', -apple-system, sans-serif;
    --bs-body-color: #212121;
    --bs-body-font-size: 1rem;
}

.section { padding: 5rem 0; }
.section-title-center {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #1a1a1a;
    margin-bottom: 2.5rem;
}
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.2rem;
}
.section-head__eyebrow { font-size: 0.9rem; color: var(--secondary); margin-bottom: 0.4rem; }
.section-head__title { font-size: 2.6rem; font-weight: 800; letter-spacing: 0.02em; color: var(--primary); }
/* View More 버튼 (make-on 스타일: 배경 슬라이드 채움 + 원형 아이콘 반전) */
.btn-more {
    position: relative; z-index: 0; overflow: hidden;
    display: inline-flex; align-items: center; gap: 0.7rem;
    padding: 0.55rem 0.55rem 0.55rem 1.4rem;
    border: 1px solid #d5dbe1; border-radius: 999px;
    font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em; color: #333;
    transition: color .35s ease, border-color .35s ease;
}
.btn-more::before {  /* 왼쪽 → 오른쪽으로 채워지는 배경 */
    content: ""; position: absolute; z-index: -1; inset: 0;
    background: var(--primary);
    transform: scaleX(0); transform-origin: right center;
    transition: transform .45s cubic-bezier(.7, 0, .2, 1);
}
.btn-more span {  /* 원형 아이콘 */
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--primary); color: #fff; font-size: 1rem; line-height: 1;
    transition: background .35s ease, color .35s ease, transform .45s cubic-bezier(.7, 0, .2, 1);    font-weight: 800;
}
.btn-more:hover { color: #fff; border-color: var(--primary); }
.btn-more:hover::before { transform: scaleX(1); transform-origin: left center; }
.btn-more:hover span { background: #fff; color: var(--primary); transform: translateX(3px); }
.star { color: #ffb400; }

/* ===== Section 1. 메인 비주얼 슬라이더 ===== */
.hero { position: relative; overflow: hidden; }
.hero-slider { position: relative; }
.hero-track { display: flex; transition: transform .5s ease; }
.hero-slide { flex: 0 0 100%; background: var(--slide-bg, #eaf3fb); }
/* 이미지 배너형 슬라이드 (배경 이미지 + 텍스트 오버레이)
   ─ 슬라이드별 디자인은 .hero-banner--{variant} 클래스에서 CSS 변수로 개별 조정한다.
   ─ 아래 값들은 "기본값"이며, variant 클래스에서 덮어쓰면 슬라이드마다 다르게 구성된다. */
/* 이미지 슬라이드는 자체 높이를 가진다 (레거시 슬라이드의 min-height에 의존하지 않도록) */
.hero-slide--image { position: relative; display: flex; align-items: stretch; overflow: hidden; min-height: 580px; }
.hero-slide__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-slide__overlay { position: absolute; inset: 0; display: flex; align-items: var(--ht-valign, center); }
.hero-banner-text {
    max-width: var(--ht-max, 620px);
    text-align: var(--ht-align, left);
    margin-left: var(--ht-ml, 0);
    margin-right: var(--ht-mr, 0);
}
.hero-banner-text__logo {
    display: block; width: auto; max-width: 100%;
    height: var(--ht-logo-h, clamp(30px, 3vw, 44px));
    margin-bottom: var(--ht-logo-mb, 1.6rem);
}
.hero-banner-text__eyebrow {
    font-size: var(--ht-eyebrow-size, 1rem);
    font-weight: var(--ht-eyebrow-weight, 600);
    letter-spacing: var(--ht-eyebrow-ls, 0.32em);
    color: var(--ht-eyebrow-color, #2a3542);
    margin-bottom: var(--ht-eyebrow-mb, 1.4rem);
}
.hero-banner-text__title {
    font-size: var(--ht-title-size, clamp(1.8rem, 4.4vw, 3.4rem));
    font-weight: var(--ht-title-weight, 800);
    line-height: var(--ht-title-lh, 1.12);
    letter-spacing: var(--ht-title-ls, 0.01em);
    color: var(--ht-title-color, var(--ink));
    margin-bottom: var(--ht-title-mb, 1.4rem);
}
.hero-banner-text__desc {
    font-size: var(--ht-desc-size, 1.05rem);
    font-weight: var(--ht-desc-weight, 400);
    letter-spacing: var(--ht-desc-ls, 0.01em);
    color: var(--ht-desc-color, #3a4552);
}

/* ── 슬라이드 : 의료 등급 품질 CGMP II 시설 (국문 타이틀, 다크 네이비) ── */
.hero-banner--cgmp {
    --ht-max: 620px;
    --ht-eyebrow-ls: 0.3em;
    --ht-eyebrow-color: #47525f;
    --ht-title-size: clamp(1.9rem, 4.3vw, 3.3rem);
    --ht-title-ls: -0.01em;
    --ht-title-lh: 1.2;
    --ht-title-color: #1a2432;
    --ht-desc-size: clamp(0.92rem, 1.35vw, 1.05rem);
    --ht-desc-color: #47525f;
}
/* ── 슬라이드 1 : CAOGEN421 4 PEPTIDES (좌측 정렬, 큰 타이틀) ── */
.hero-banner--caogen {
    --ht-max: 640px;
    --ht-eyebrow-ls: 0.34em;
    --ht-title-size: clamp(1.9rem, 4.6vw, 3.6rem);
    --ht-title-ls: 0.02em;
    --ht-title-lh: 1.1;
    --ht-desc-size: clamp(0.9rem, 1.3vw, 1.05rem);
}
/* ── 슬라이드 2 : ARCH BC-PDRN MICRO-EDGE PATCH (조금 작고 타이트한 타이틀) ── */
.hero-banner--bcpdrn {
    --ht-max: 600px;
    --ht-title-size: clamp(1.7rem, 3.9vw, 3.05rem);
    --ht-title-ls: 0em;
    --ht-title-lh: 1.16;
    --ht-title-weight: 800;
    --ht-desc-size: clamp(0.95rem, 1.4vw, 1.15rem);
    --ht-desc-color: #5a6472;
}

/* ── 슬라이드 로드 등장 효과 (텍스트 순차 페이드업 + 배경 켄번스) ──
   JS가 .hero-slider--ready 를 붙였을 때만 동작 → JS 미작동 시 텍스트 항상 노출.
   .is-entering = 등장 애니메이션 재생 (fill both 로 종료 상태 유지).
   ─ 배경 기본 스케일을 켄번스 시작값(1.3)으로 둬서, 루프 복귀 시 클론과 실제 슬라이드가
     같은 스케일에서 이어져 "갑작스런 축소" 없이 천천히 줄어든다.
   ─ 지나간 슬라이드는 is-entering 을 유지하므로 스케일 1·텍스트 노출 상태를 그대로 둔다
     (슬라이드가 빠져나갈 때 튀지 않음). */

/* 배경 켄번스: 기본 1.3 확대 → 등장 슬라이드만 원래 크기로 서서히 축소 */
.hero-slider--ready .hero-slide__img { transform: scale(1.3); }
.hero-slider--ready .hero-slide.is-entering .hero-slide__img { animation: heroKen 6s ease-out both; }

/* 오버레이 텍스트: 기본 숨김 → 등장 시 순차 페이드업 후 노출 유지(fill both) */
.hero-slider--ready .hero-slide--image .hero-banner-text__logo,
.hero-slider--ready .hero-slide--image .hero-banner-text__eyebrow,
.hero-slider--ready .hero-slide--image .hero-banner-text__title,
.hero-slider--ready .hero-slide--image .hero-banner-text__desc {
    opacity: 0; transform: translateY(26px);
}
.hero-slider--ready .hero-slide--image.is-entering .hero-banner-text__logo    { animation: heroTextIn 1.8s cubic-bezier(.2,.7,.2,1) both; animation-delay: .10s; }
.hero-slider--ready .hero-slide--image.is-entering .hero-banner-text__eyebrow { animation: heroTextIn 1.8s cubic-bezier(.2,.7,.2,1) both; animation-delay: .18s; }
.hero-slider--ready .hero-slide--image.is-entering .hero-banner-text__title   { animation: heroTextIn 1.8s cubic-bezier(.2,.7,.2,1) both; animation-delay: .28s; }
.hero-slider--ready .hero-slide--image.is-entering .hero-banner-text__desc    { animation: heroTextIn 1.8s cubic-bezier(.2,.7,.2,1) both; animation-delay: .42s; }

/* 색상 배경형(레거시) 텍스트 슬라이드 등장 효과 */
.hero-slider--ready .hero-slide .hero-slide__brand,
.hero-slider--ready .hero-slide .hero-slide__title,
.hero-slider--ready .hero-slide .hero-slide__desc {
    opacity: 0; transform: translateY(26px);
}
.hero-slider--ready .hero-slide.is-entering .hero-slide__brand { animation: heroTextIn 1.8s cubic-bezier(.2,.7,.2,1) both; animation-delay: .12s; }
.hero-slider--ready .hero-slide.is-entering .hero-slide__title { animation: heroTextIn 1.8s cubic-bezier(.2,.7,.2,1) both; animation-delay: .24s; }
.hero-slider--ready .hero-slide.is-entering .hero-slide__desc  { animation: heroTextIn 1.8s cubic-bezier(.2,.7,.2,1) both; animation-delay: .38s; }

@keyframes heroTextIn {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroKen {
    from { transform: scale(1.3); }
    to   { transform: scale(1); }
}

/* 모션 최소화 설정 존중 */
@media (prefers-reduced-motion: reduce) {
    .hero-slider--ready .hero-slide__img,
    .hero-slider--ready .hero-slide--image .hero-banner-text__logo,
    .hero-slider--ready .hero-slide--image .hero-banner-text__eyebrow,
    .hero-slider--ready .hero-slide--image .hero-banner-text__title,
    .hero-slider--ready .hero-slide--image .hero-banner-text__desc,
    .hero-slider--ready .hero-slide .hero-slide__brand,
    .hero-slider--ready .hero-slide .hero-slide__title,
    .hero-slider--ready .hero-slide .hero-slide__desc {
        animation: none !important; opacity: 1 !important; transform: none !important;
    }
}
.hero-slide__inner {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 580px; gap: 2rem;
}
.hero-slide__text { flex: 1; padding: 2rem 0; }
.hero-slide__brand { font-size: 0.85rem; letter-spacing: 0.15em; color: var(--secondary); font-weight: 600; margin-bottom: 1rem; }
.hero-slide__title { font-size: 2.6rem; font-weight: 800; line-height: 1.28; color: #1a1a1a; }
.hero-slide__desc { margin-top: 1.2rem; color: #555; font-size: 1.05rem; }
.hero-slide__visual { position: relative; flex: 0 0 46%; display: flex; justify-content: center; }
.hero-slide__box {
    width: 100%; max-width: 440px; height: 300px;
    background: #fff; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: #c7ccd1; font-weight: 700; letter-spacing: 0.2em;
    box-shadow: var(--shadow-soft);
}
.hero-badge {
    position: absolute; top: 10px; left: -10px; z-index: 2;
    width: 84px; height: 84px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.35rem; font-weight: 800;
}
.hero-badge--pink { background: #e6005c; }
.hero-badge--blue { background: var(--primary); left: auto; right: -6px; }
.hero-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 46px; height: 46px; border-radius: 50%; border: none;
    background: rgba(255,255,255,.85); color: #333; font-size: 30px; line-height: 1;
    cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.1); z-index: 3;    font-weight: 700;
}
.hero-arrow--prev { left: 24px; }
.hero-arrow--next { right: 24px; }
.hero-arrow:hover { background: #fff; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 8px; z-index: 3; }
.hero-dots button { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(0,0,0,.25); cursor: pointer; padding: 0; }
.hero-dots button.is-active { background: var(--primary); width: 22px; border-radius: 5px; }

/* ===== Section 2. PRODUCTS ===== */
/* 상품 슬라이더 (4개씩 노출, 페이지 단위 이동) */
.product-viewport { overflow: hidden; }
.product-track { display: flex; gap: 1.5rem; transition: transform .5s ease; }
.product-slide { flex: 0 0 calc((100% - 4.5rem) / 4); }

.product-card { transition: transform .2s ease; position: relative; }
.product-card:hover { transform: translateY(-4px); }
.product-card__thumb {
    position: relative; aspect-ratio: 1/1; background: #f2f3f4; border-radius: var(--radius);
    margin-bottom: 1rem; overflow: hidden;
}
.product-card__img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .3s ease;
}
.product-card:hover .product-card__img { transform: scale(1.04); }
.product-card__sale {
    position: absolute; top: 10px; left: 10px;
    background: #fff; border: 1px solid #eee; color: var(--primary);
    font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-pill);
}
.product-card__name { font-size: 1rem; font-weight: 600; color: #222; }
.product-card__desc { font-size: 0.85rem; color: var(--secondary); margin-top: 0.2rem; }
.product-card__price { margin-top: 0.8rem; display: flex; align-items: baseline; gap: 0.4rem; flex-wrap: wrap; }
.product-card__price strong { font-size: 1.15rem; color: #111; }
.product-card__price del { font-size: 0.85rem; color: #b0b6bc; }
.product-card__rate-off { color: #e6005c; font-weight: 800; font-size: 1rem; }
.product-card__review { margin-top: 0.4rem; font-size: 0.82rem; color: var(--secondary); }

/* ===== Section 3. ARCH BRAND ===== */
.brand_bg {
    position: relative; overflow: hidden;
    background: var(--paper);
    padding: 4.5rem 0;
}
.brand_bg::before {  /* 배경 이미지 레이어 (텍스트와 분리하여 단독 등장) */
    content: ""; position: absolute; inset: 0; z-index: 0;
    background: url('/public/images/main/brand_bg.png') center center / cover no-repeat;
}
.brand_bg > * { position: relative; z-index: 1; }  /* 콘텐츠는 배경 위 */
/* JS 활성 시에만 숨김 → 스크롤 진입하면 페이드 + 은은한 줌인(켄번스)
   진입은 keyframe(첫 페인트 전에도 항상 재생), 이탈은 transition */
.reveal-ready .brand_bg::before {
    opacity: 0; transform: scale(1.08);
    transition: opacity 1.2s ease, transform 1.8s ease;
}
.reveal-ready .brand_bg.is-inview::before {
    opacity: 1; transform: scale(1);
    animation: kjBrandBgIn 1.8s ease both;
}
@keyframes kjBrandBgIn {
    0%   { opacity: 0; transform: scale(1.08); }
    67%  { opacity: 1; }
    100% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .reveal-ready .brand_bg::before { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; }
}
.products__note { margin: 1rem auto 3rem; text-align: center; font-size: 0.92rem; color: #888; line-height: 1.7; }
.brand__eyebrow_s { font-size: 15px; font-weight: 800; color: #dedbd5; letter-spacing: 2em; margin-bottom: 0rem; }
.brand__eyebrow { font-size: 1rem; font-weight: 700; color: var(--primary); letter-spacing: 0.15em; margin-bottom: 1rem; }
.brand__title { font-size: 1.7rem; font-weight: 800; line-height: 1.4; color: #1a1a1a; margin-bottom: 1.4rem; }
.brand__desc { font-size: 0.95rem; color: #666; line-height: 1.9; margin-bottom: 2rem; }
.btn-circle { display: inline-flex; align-items: center; gap: 1rem; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.1em; color: #222; }
.btn-circle__dot {
    width: 40px; height: 40px; border-radius: 50%; background: #111; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem;
    transition: transform .2s;
}
.btn-circle:hover .btn-circle__dot { transform: translateX(4px); }

/* ===== Section 4. BEST REVIEW ===== */
.review-viewport { overflow: hidden; }
.review-track { display: flex; gap: 1.5rem; transition: transform .5s ease; }
.review-card {
    flex: 0 0 calc((100% - 4.5rem) / 4); background: #fff;
    border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease; position: relative;
}
.review-card:hover { transform: translateY(-4px); }
.review-card__thumb { aspect-ratio: 4/3; background: #dfeaf6; overflow: hidden; }
.review-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.review-card:hover .review-card__img { transform: scale(1.04); }
.review-card__body { padding: 1rem 1.1rem 1.3rem; }
.review-card__title { font-size: 0.9rem; font-weight: 600; color: #222; }
.review-card__rate { font-size: 0.8rem; color: var(--secondary); margin: 0.3rem 0 0.7rem; }
.review-card__text { font-size: 0.85rem; color: #555; line-height: 1.6; min-height: 4.1em;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.review-card__meta { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.9rem; font-size: 0.75rem; color: #9aa0a6; }
.review-card__meta .stars { color: #ffb400; letter-spacing: -1px; }
.review-card__tag { margin-left: auto; background: var(--primary-soft); color: var(--primary); padding: 2px 9px; border-radius: var(--radius-pill); font-weight: 600; }
/* 리뷰한 제품 썸네일(좌) + 제목·평점(우) */
.review-card__head { display: flex; align-items: center; gap: 0.7rem; }
.review-card__headtext { min-width: 0; }
.review-card__product {
    flex: 0 0 auto; width: 48px; height: 48px;
    border: 1px solid #eef0f2; border-radius: 8px;
    background: #f7f8f9; overflow: hidden;
    transition: border-color .2s ease;
}
.review-card__product img { width: 100%; height: 100%; object-fit: cover; display: block; }
.review-card:hover .review-card__product { border-color: #dfe4ea; }
.review-nav { display: flex; justify-content: center; align-items: center; gap: 1.2rem; margin-top: 2rem; }
.review-arrow {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid #d5dbe1; background: #fff;
    font-size: 1.3rem; color: #555; cursor: pointer;
}
.review-arrow:hover { border-color: var(--primary); color: var(--primary); }
.review-count { font-size: 0.9rem; color: #555; }

/* ===== Section 5. 4가지 약속 ===== */
.promise { background: var(--paper); }

/* 영상 배경 프로미스 섹션 */
.promise--video { position: relative; overflow: hidden; background: #ffffff; }
.promise__bg {
    position: absolute; inset: 0; width: 150%; height: 150%;
    object-fit: cover; z-index: 0; pointer-events: none; opacity: 0.2;
}
.promise--video::after {  /* 가독성 확보용 그라데이션 오버레이 */
    content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(165deg, rgba(32, 77, 141, 0.18) 0%, rgba(149, 199, 255, 0.15) 100%) ;
}
.promise--video > .container-xxl { position: relative; z-index: 2; }
.promise--video .section-title-center { color: #000000; }
.promise--video .promise__icon { color: #000000; }
.promise--video .promise__label { color: rgba(0, 0, 0, 0.92); }

.promise__row { text-align: center; }
.promise__item { padding: 1rem; position:relative;  transition: transform .2s ease;}
.promise__item:hover { transform: translateY(-4px); }
.promise__icon { width: 74px; height: 74px; margin: 0 auto 1rem; }
.promise__icon img { width: 100%; height: 100%; object-fit: contain; }
.promise__label { font-size: 1.1rem; font-weight: 600; color: #333; line-height: 1.2; }

/* ===== 반응형 ===== */
@media (max-width: 991.98px) {
    .hero-slide__inner { flex-direction: column; text-align: center; min-height: auto; padding: 1rem 0; }
    .hero-slide__title { font-size: 2rem; }
    /* 배너 타이틀/설명은 variant의 clamp()가 반응형까지 처리 (슬라이드별 크기 유지) */
    .hero-banner-text__eyebrow { letter-spacing: 0.24em; }
    .hero-slide--image { min-height: 420px; }
    .review-card,
    .product-slide { flex-basis: calc((100% - 1.5rem) / 2); }
    .brand__title { font-size: 1.4rem; }
    /* 브랜드 섹션 여백/자간 축소 */
    .brand_bg { padding: 3rem 0; }
    
    .brand_bg::before {    background-position: center left;  }
    .brand__eyebrow_s { font-size: 13px; letter-spacing: 0.8em; }
    /* 모바일에선 텍스트가 배경 전체 폭 위에 오므로 가독성용 밝은 스크림 */
    .brand_bg::after {
        content: ""; position: absolute; inset: 0; z-index: 0;
        background: rgba(255, 255, 255, 0.7);
    }
}

/* 태블릿 이하: 배너 텍스트 가독성 확보 (배경 이미지 위 흰색 스크림) */
@media (max-width: 767.98px) {
    .hero-slide__inner {  max-height: 380px;}
    .hero-slide--image::after {
        content: ""; position: absolute; inset: 0; z-index: 1;
        background: linear-gradient(100deg, rgba(255,255,255,.94) 0%, rgba(255,255,255,.48) 50%, rgba(255,255,255,.1) 100%);
    }
    .hero-slide__overlay { z-index: 2; }
    .hero-banner-text { max-width: 100%; }
    /* 배너 이미지를 오른쪽 기준으로 크롭 (제품이 잘리지 않도록) */
    .hero-slide__img { object-position: right center; }
    /* 화살표 축소 + 가장자리로 */
    .hero-arrow { width: 36px; height: 36px; font-size: 22px; }
    .hero-arrow--prev { left: 8px; }
    .hero-arrow--next { right: 8px; }
}

@media (max-width: 575.98px) {
    .section { padding: 3rem 0; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .section-head__title, .hero-slide__title { font-size: 1.7rem; }
    .hero-banner-text__eyebrow { font-size: 0.8rem; margin-bottom: 0.8rem; }
    .hero-slide--image { min-height: 360px; }
    .review-card,
    .product-slide { flex-basis: 100%; }
    /* 모바일에선 강제 줄바꿈(<br>) 해제 → 화면 폭에 맞춰 자연스럽게 흐르도록 */
    .products__note br,
    .brand__title br,
    .brand__desc br { display: none; }
    .brand_bg { padding: 2.2rem 0; }
    .brand__eyebrow_s { font-size: 12px; letter-spacing: 0.35em; }
    .brand__desc { line-height: 1.7; margin-bottom: 1.5rem; }
    /* 약속 섹션 아이콘/라벨 축소 */
    .promise__item { padding: 0.5rem; }
    .promise__icon { width: 56px; height: 56px; margin-bottom: 0.6rem; }
    .promise__label { font-size: 0.92rem; }
}

/* 스크롤 리빌([data-reveal])은 모든 페이지 공통이므로 common_layout.css 로 이동 */
