/*
Theme Name: Selectmon Child Affiliate
Theme URI: https://selectmon.com/
Description: 프레스런 제휴마케팅 테마 2.0.7용 셀렉트몬 자식 테마. 부모 테마의 상품/관리자/SEO/메타데이터 기능은 그대로 유지하고 프론트 디자인만 변경합니다.
Author: Selectmon
Template: presslearn-theme-affiliate
Version: 1.0.1
Text Domain: selectmon-child-affiliate
*/

:root{
  --sm-blue:#44a8ef;
  --sm-blue-deep:#328fdb;
  --sm-sky:#eef8ff;
  --sm-line:#dce8f2;
  --sm-text:#21364a;
  --sm-muted:#718398;
  --sm-wrap:1180px;
}

/* 부모 기능/콘텐츠 구조는 유지하고 시각 요소만 재정의 */
body{background:#fff;color:var(--sm-text)}
.wrap{max-width:var(--sm-wrap)}

/* ===== Selectmon header ===== */
.sm-site-header{position:relative;z-index:60;background:#fff;border-bottom:1px solid var(--sm-line)}
.sm-site-header.is-sticky{position:sticky;top:0}
.admin-bar .sm-site-header.is-sticky{top:32px}
.sm-header-main{height:82px;display:flex;align-items:center;gap:28px}
.sm-brand{display:flex;align-items:center;gap:10px;flex:0 0 auto;min-width:190px;font-weight:900;font-size:20px;letter-spacing:-.03em}
.sm-brand img{display:block;width:auto;max-width:150px;height:42px;object-fit:contain;border-radius:0}
.sm-brand .sm-logo-mark{width:34px;height:34px}

.sm-main-nav{display:flex;align-items:center;gap:6px;min-width:0;flex:1}
.sm-main-nav>a,.sm-cat-trigger{height:42px;display:inline-flex;align-items:center;justify-content:center;padding:0 14px;border-radius:10px;font-weight:700;font-size:14px;white-space:nowrap;transition:.18s ease}
.sm-main-nav>a:hover,.sm-cat-trigger:hover{background:var(--sm-sky);color:var(--sm-blue-deep)}
.sm-cat-trigger{border:0;background:transparent;color:inherit;cursor:default;font:inherit;font-weight:700}
.sm-cat-trigger::after{content:'▼';font-size:9px;margin-left:7px;color:#68c8e8}

.sm-search{margin-left:auto;flex:0 1 390px;min-width:240px}
.sm-search form{display:flex;border:1px solid #b9d2e7;border-radius:999px;overflow:hidden;background:#fff;height:46px}
.sm-search input{flex:1;min-width:0;border:0!important;outline:0!important;background:transparent!important;padding:0 18px!important;font-size:14px!important;box-shadow:none!important}
.sm-search button{width:58px;border:0;background:transparent;color:#41617b;font-size:0;cursor:pointer;position:relative}
.sm-search button::before{content:'';position:absolute;width:13px;height:13px;border:3px solid currentColor;border-radius:50%;left:19px;top:13px}
.sm-search button::after{content:'';position:absolute;width:9px;height:3px;background:currentColor;transform:rotate(45deg);left:33px;top:28px;border-radius:2px}

/* 카테고리를 최상단에 깔끔하게 정렬 */
.sm-category-row{border-top:1px solid #f1f5f9;background:#f8fcff}
.sm-category-inner{height:48px;display:flex;align-items:center;justify-content:center;gap:4px;overflow-x:auto;scrollbar-width:none}
.sm-category-inner::-webkit-scrollbar{display:none}
.sm-category-inner a{display:inline-flex;align-items:center;height:32px;padding:0 14px;border-radius:999px;font-size:13px;font-weight:700;color:#4d667e;white-space:nowrap}
.sm-category-inner a:hover,.sm-category-inner a.is-current{background:#fff;color:var(--sm-blue-deep);box-shadow:0 2px 10px rgba(50,143,219,.12)}
.sm-category-inner a.is-all::before{content:'▦';font-size:12px;margin-right:6px}

/* 공지바 */
.pdm-notice-bar{background:#eaf6ff!important;color:#536f86!important;border:0!important}
.pdm-notice-bar .wrap{max-width:var(--sm-wrap);text-align:center;padding-top:8px;padding-bottom:8px}

/* 부모 헤더바는 child header에서 호출하지 않지만 혹시 플러그인/캐시로 남으면 숨김 */
.pdm-headerbar{display:none!important}

/* ===== 홈 ===== */
.home .hero,.home .pdm-hero{border-radius:0}
.home .product-card,.archive .product-card,.search .product-card{box-shadow:0 4px 18px rgba(29,69,101,.08);border-color:#edf1f5;transition:transform .2s ease,box-shadow .2s ease}
.home .product-card:hover,.archive .product-card:hover,.search .product-card:hover{transform:translateY(-3px);box-shadow:0 10px 28px rgba(29,69,101,.13)}

/* ===== 상품 페이지: 콘텐츠/필드 구조를 바꾸지 않고 폭과 여백만 정리 ===== */
.single-post .product-detail,.single-post .pdm-product,.single-post .product-wrap{max-width:var(--sm-wrap);margin-left:auto;margin-right:auto}
.single-post .site-main{background:#fff}
.single-post .product-gallery img{border-radius:14px}
.single-post .cta-button,.single-post .pdm-cta,.single-post .btn-primary{border-radius:12px}

/* 기본 부모의 보라/파랑 등 설정값은 살리되 헤더만 셀렉트몬 톤 고정 */
.site-footer{border-top:1px solid var(--sm-line)}

@media (max-width: 980px){
  .sm-header-main{height:70px;gap:12px}
  .sm-brand{min-width:0}.sm-brand span{display:none}.sm-brand img{max-width:120px;height:36px}
  .sm-main-nav{display:none}
  .sm-search{flex:1;min-width:0;max-width:none}
  .sm-category-inner{justify-content:flex-start;padding-left:14px;padding-right:14px}
}
@media (max-width: 782px){.admin-bar .sm-site-header.is-sticky{top:46px}}
@media (max-width: 640px){
  .wrap{padding-left:14px;padding-right:14px}
  .sm-header-main{height:64px}
  .sm-brand img{max-width:102px;height:32px}
  .sm-search form{height:40px}.sm-search input{font-size:13px!important;padding-left:14px!important}.sm-search button{width:46px}
  .sm-search button::before{left:13px;top:10px}.sm-search button::after{left:27px;top:25px}
  .sm-category-row{position:relative}
  .sm-category-inner{height:44px;gap:2px}
  .sm-category-inner a{font-size:12px;padding:0 11px}
}

/* ===== v2 home redesign: hololive-like ecommerce layout ===== */
.sm-home{background:#fff;overflow:hidden}
.sm-home .wrap{max-width:none}
.sm-hero-stage{background:linear-gradient(180deg,#eef9ff 0,#dceeff 100%);padding:32px 0 26px;border-bottom:1px solid #d9e8f5;overflow:hidden}
.sm-hero-track{position:relative;height:360px;display:flex;align-items:center;justify-content:center;gap:20px;max-width:1920px;margin:0 auto;padding:0 0}
.sm-hero-card{position:relative;width:31.5vw;max-width:620px;min-width:390px;height:352px;border-radius:10px;overflow:hidden;box-shadow:none;transition:transform .28s ease,opacity .28s ease;flex:0 0 auto;background:#fff}
.sm-hero-card img{width:100%;height:100%;object-fit:cover;display:block}
.sm-hero-card.is-active{transform:scale(1.04);z-index:3}
.sm-hero-card.is-prev,.sm-hero-card.is-next{z-index:2;opacity:.98}
.sm-hero-card.is-hidden{display:none}
.sm-hero-caption{position:absolute;left:0;right:0;bottom:0;padding:32px 18px 14px;background:linear-gradient(transparent,rgba(0,0,0,.62));color:#fff;font-weight:800;font-size:16px;opacity:0;transition:.2s}
.sm-hero-card:hover .sm-hero-caption{opacity:1}
.sm-hero-arrow{position:absolute;top:50%;transform:translateY(-50%);width:64px;height:82px;border:0;border-radius:0 42px 42px 0;background:#fff;color:#4497e8;font-size:48px;line-height:1;z-index:10;cursor:pointer;box-shadow:0 2px 12px rgba(38,82,120,.1)}
.sm-hero-arrow.sm-prev{left:0}.sm-hero-arrow.sm-next{right:0;border-radius:42px 0 0 42px}
.sm-hero-thumbs{display:flex;gap:18px;overflow-x:auto;max-width:1920px;margin:26px auto 0;padding:0 0 4px;scrollbar-width:none}
.sm-hero-thumbs::-webkit-scrollbar{display:none}
.sm-hero-thumb{width:168px;height:96px;flex:0 0 auto;border:3px solid transparent;border-radius:7px;padding:0;background:#fff;overflow:hidden;opacity:.86;cursor:pointer}
.sm-hero-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.sm-hero-thumb.is-active{border-color:#50a8f0;opacity:1}

.sm-merch-section{padding:76px clamp(34px,4.5vw,86px) 92px;border-bottom:1px solid #e6ebf0;background:#fff}
.sm-merch-section:nth-of-type(even){background:#fff}
.sm-merch-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 24px}
.sm-merch-head h2{display:flex;align-items:center;gap:10px;margin:0;color:#4a9cf0;font-size:32px;line-height:1;font-weight:500;letter-spacing:.01em}
.sm-title-icon{font-size:28px;color:#4a9cf0}
.sm-cat-1 .sm-merch-head h2,.sm-cat-1 .sm-title-icon{color:#ff6262}
.sm-merch-head>a{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:800;color:#53697d}
.sm-merch-head>a span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:2px solid currentColor;border-radius:50%}
.sm-merch-row{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:20px}
.sm-merch-card{display:flex;flex-direction:column;min-width:0;background:#fff;border:1px solid #e7ebef;border-radius:9px;overflow:hidden;box-shadow:0 3px 12px rgba(25,51,75,.09);color:#172330;transition:.18s ease}
.sm-merch-card:hover{transform:translateY(-4px);box-shadow:0 10px 24px rgba(25,51,75,.13)}
.sm-merch-thumb{position:relative;aspect-ratio:1/1;background:#f7f8fa;overflow:hidden}
.sm-merch-thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .28s ease}
.sm-merch-card:hover .sm-merch-thumb img{transform:scale(1.03)}
.sm-noimage{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-weight:900;color:#a5b2bf;letter-spacing:.12em}
.sm-mini-new,.sm-mini-badge{position:absolute;top:0;left:0;z-index:2;height:20px;display:inline-flex;align-items:center;padding:0 7px;color:#fff;background:#050505;font-size:10px;font-weight:900;letter-spacing:.02em}
.sm-mini-badge{left:39px;background:#ef4c76}
.sm-merch-body{display:flex;flex-direction:column;min-height:120px;padding:11px 12px 14px}
.sm-merch-cat{font-size:10px;color:#91a0ae;margin-bottom:5px}
.sm-merch-body h3{font-size:13px;line-height:1.55;margin:0;font-weight:500;letter-spacing:-.02em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:41px}
.sm-merch-price{margin-top:auto;padding-top:16px;color:#586f83;font-size:12px}
.sm-merch-price strong{color:#ef4545;margin-right:5px;font-size:13px}
.sm-merch-price span{text-decoration:none;font-weight:700}

/* header refined to reference */
.sm-site-header{border-bottom:2px solid #49b9ef}
.sm-header-main{max-width:none!important;padding:0 34px;height:92px}
.sm-brand{min-width:210px}
.sm-brand img{max-width:175px;height:48px}
.sm-main-nav{gap:12px}
.sm-main-nav>a,.sm-cat-trigger{font-size:15px;color:#40576b}
.sm-search{max-width:380px}
.sm-category-row{background:#e9f6ff;border:0}
.sm-category-inner{max-width:none!important;justify-content:center;padding:0 4.5vw;height:40px;gap:6px}
.sm-category-inner a{height:28px;padding:0 11px;font-size:12px}
.pdm-notice-bar{order:2}

@media (max-width:1450px){
  .sm-merch-row{grid-template-columns:repeat(6,minmax(0,1fr))}
  .sm-merch-card:nth-child(n+7){display:none}
  .sm-hero-card{width:39vw;min-width:360px}
}
@media (max-width:1100px){
  .sm-merch-row{grid-template-columns:repeat(4,minmax(0,1fr))}
  .sm-merch-card:nth-child(n+5){display:none}
  .sm-hero-card{width:52vw;height:300px;min-width:320px}
  .sm-hero-track{height:310px}
}
@media (max-width:780px){
  .sm-header-main{height:66px;padding:0 14px}.sm-brand{min-width:auto}.sm-brand img{max-width:120px;height:36px}
  .sm-category-inner{padding:0 12px;justify-content:flex-start}
  .sm-hero-stage{padding:16px 0 14px}
  .sm-hero-track{height:220px;gap:8px;justify-content:flex-start;overflow:hidden;padding-left:16px}
  .sm-hero-card{width:82vw;min-width:82vw;height:210px}.sm-hero-card.is-prev,.sm-hero-card.is-next{display:none}.sm-hero-card.is-active{transform:none}
  .sm-hero-arrow{width:42px;height:58px;font-size:34px}.sm-hero-thumb{width:110px;height:64px}.sm-hero-thumbs{gap:8px;margin-top:12px;padding-left:16px}
  .sm-merch-section{padding:42px 16px 56px}
  .sm-merch-head h2{font-size:24px}.sm-title-icon{font-size:22px}
  .sm-merch-row{display:flex;gap:12px;overflow-x:auto;padding-bottom:8px;scroll-snap-type:x proximity;scrollbar-width:none}.sm-merch-row::-webkit-scrollbar{display:none}
  .sm-merch-card,.sm-merch-card:nth-child(n+5),.sm-merch-card:nth-child(n+7){display:flex;flex:0 0 44vw;scroll-snap-align:start}
}

/* 전체 상품 아카이브 */
.sm-all-products-page{background:#fff;padding:58px 0 90px;min-height:70vh}
.sm-all-products-wrap{max-width:1460px;margin:0 auto;padding:0 28px}
.sm-all-products-head{display:flex;align-items:flex-end;justify-content:space-between;gap:30px;margin-bottom:34px;padding-bottom:22px;border-bottom:1px solid #e9edf2}
.sm-all-products-kicker{margin:0 0 5px;font-size:12px;font-weight:800;letter-spacing:.12em;color:#5d9df2}
.sm-all-products-head h1{margin:0;font-size:34px;line-height:1.2}
.sm-all-products-head p{margin:9px 0 0;color:#6f7b88;font-size:14px}
.sm-all-products-search{display:flex;width:min(420px,100%);border:1px solid #dce3ec;border-radius:999px;overflow:hidden;background:#fff}
.sm-all-products-search input{flex:1;min-width:0;border:0;padding:13px 18px;outline:0;background:transparent}
.sm-all-products-search button{border:0;padding:0 23px;background:#4b8fe8;color:#fff;font-weight:700;cursor:pointer}
.sm-all-products-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:18px}
.sm-all-products-grid .sm-merch-card{width:auto;min-width:0}
.sm-all-products-pagination{display:flex;justify-content:center;gap:7px;margin-top:44px;flex-wrap:wrap}
.sm-all-products-pagination .page-numbers{display:inline-flex;min-width:38px;height:38px;align-items:center;justify-content:center;padding:0 10px;border:1px solid #dce3ec;border-radius:8px;color:#34495e;text-decoration:none;background:#fff}
.sm-all-products-pagination .current{background:#4b8fe8;border-color:#4b8fe8;color:#fff;font-weight:700}
.sm-empty-products{text-align:center;padding:80px 20px;color:#6f7b88}
@media (max-width:1200px){.sm-all-products-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (max-width:760px){.sm-all-products-page{padding-top:30px}.sm-all-products-wrap{padding:0 16px}.sm-all-products-head{display:block}.sm-all-products-head h1{font-size:28px}.sm-all-products-search{margin-top:20px;width:100%}.sm-all-products-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}

/* v2.1 전체 상품 아카이브: 카테고리 페이지와 동일한 레이아웃 */
.sm-all-archive-head { padding-top: 32px; }
.sm-all-chip-row { margin-top: 12px; }

/* ===== v2.2 계층형 카테고리 드롭다운 ===== */
.sm-category-inner{overflow:visible;position:relative}
.sm-category-link,.sm-category-parent{display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 14px;border:0;border-radius:999px;background:transparent;color:#4d667e;font-size:13px;font-weight:700;line-height:1;white-space:nowrap;text-decoration:none;cursor:pointer;font-family:inherit}
.sm-category-link:hover,.sm-category-parent:hover,.sm-category-menu.is-current-parent>.sm-category-parent,.sm-category-menu.is-open>.sm-category-parent{background:#fff;color:var(--sm-blue-deep);box-shadow:0 2px 10px rgba(50,143,219,.12)}
.sm-category-menu{position:relative;display:flex;align-items:center;flex:0 0 auto}
.sm-category-chevron{font-size:8px;margin-left:7px;color:#68c8e8;transition:transform .18s ease}
.sm-category-menu.is-open .sm-category-chevron{transform:rotate(180deg)}
.sm-category-dropdown{position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%);z-index:1000;min-width:160px;padding:8px;background:#fff;border:1px solid #dce8f2;border-radius:12px;box-shadow:0 12px 32px rgba(24,58,88,.16)}
.sm-category-dropdown[hidden]{display:none!important}
.sm-category-dropdown::before{content:'';position:absolute;left:50%;top:-6px;width:10px;height:10px;background:#fff;border-left:1px solid #dce8f2;border-top:1px solid #dce8f2;transform:translateX(-50%) rotate(45deg)}
.sm-category-dropdown a{position:relative;z-index:1;display:flex;align-items:center;width:100%;height:36px;padding:0 12px;border-radius:8px;color:#40576b;font-size:12px;font-weight:700;text-decoration:none;white-space:nowrap}
.sm-category-dropdown a:hover,.sm-category-dropdown a.is-current{background:#eef8ff;color:var(--sm-blue-deep);box-shadow:none}
.sm-category-all-child{border-bottom:1px solid #eef2f6;margin-bottom:5px;border-radius:7px 7px 0 0!important}

@media (max-width:780px){
  .sm-category-inner{overflow-x:auto;overflow-y:visible;justify-content:flex-start}
  .sm-category-dropdown{position:fixed;left:14px;right:14px;top:auto;transform:none;min-width:0;margin-top:4px}
  .sm-category-dropdown::before{display:none}
}

/* v2.1 - category navigation 1.5x scale */
@media (min-width: 769px){
  .sm-category-inner{height:60px;gap:9px}
  .sm-category-link,.sm-category-parent{height:42px;padding:0 17px;font-size:18px}
  .sm-category-inner a{height:42px;padding:0 17px;font-size:18px}
  .sm-category-inner a.is-all::before{font-size:16px;margin-right:8px}
  .sm-category-chevron{font-size:11px;margin-left:9px}
  .sm-category-dropdown{min-width:220px;padding:10px;border-radius:15px;top:calc(100% + 10px)}
  .sm-category-dropdown a{height:48px;padding:0 16px;font-size:16px}
}
