/*
Theme Name: Ohye Style
Theme URI: https://example.com/ohye-style
Author: Custom Build
Author URI: https://example.com
Description: ohye.kr의 리스트형 서점 레이아웃(붉은 구분선, 회전 인용구, Load More)을 참고해 새로 제작한 워드프레스 테마입니다.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ohye-style
*/

/* ==========================================================================
   0. 디자인 토큰
   ========================================================================== */
:root {
    --oh-bg: #ffffff;
    --oh-ink: #111111;
    --oh-muted: #9a9a9a;
    --oh-faint: #d5d5d5;
    --oh-line: #ececec;
    --oh-accent: #ff3b2f;
    --oh-badge-bg: #232323;

    --oh-font-body: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --oh-font-logo: 'Georgia', 'Times New Roman', serif;

    --oh-tracking-label: 0.06em;
    --oh-container: 1720px;
    --oh-gutter: 3vw;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--oh-bg);
    color: var(--oh-ink);
    font-family: var(--oh-font-body);
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, textarea, select { font-family: inherit; }

:focus-visible { outline: 2px solid var(--oh-ink); outline-offset: 2px; }

.oh-container { max-width: var(--oh-container); margin: 0 auto; padding: 0 var(--oh-gutter); }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   1. 헤더
   ========================================================================== */
.oh-header { padding: 22px var(--oh-gutter) 18px; }
.oh-header__row { display: flex; align-items: center; gap: 46px; }
.oh-header__left { display: flex; align-items: center; gap: 14px; margin-right: 6px; }
.oh-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; background: none; border: none; cursor: pointer;
    color: var(--oh-ink); padding: 0;
}
.oh-icon-btn svg { width: 100%; height: 100%; }

.oh-logo {
    font-family: var(--oh-font-logo);
    font-style: italic;
    font-weight: 400;
    font-size: 30px;
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.oh-logo img { max-height: 30px; }

.oh-nav-primary, .oh-nav-secondary { display: flex; align-items: center; }
.oh-nav-primary ul, .oh-nav-secondary ul { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.oh-nav-primary a, .oh-nav-secondary a { font-size: 15px; font-weight: 500; }
.oh-nav-primary a:hover, .oh-nav-secondary a:hover,
.oh-nav-primary .current-menu-item > a, .oh-nav-secondary .current-menu-item > a { color: var(--oh-muted); }

.oh-header__right { display: flex; align-items: center; gap: 24px; margin-left: auto; }

.oh-search-form {
    display: flex; align-items: center; gap: 8px;
    border-bottom: 1px solid var(--oh-faint); padding-bottom: 4px; min-width: 190px;
}
.oh-search-form input[type="search"] { flex: 1; border: none; background: transparent; font-size: 13px; color: var(--oh-ink); }
.oh-search-form input[type="search"]::placeholder { color: var(--oh-faint); }
.oh-search-form input[type="search"]:focus { outline: none; }
.oh-search-form button {
    border: none; background: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    width: 15px; height: 15px; padding: 0; color: var(--oh-muted);
}
.oh-search-form button svg { width: 100%; height: 100%; }

.oh-cart-btn { width: 20px; height: 20px; }

.oh-menu-toggle {
    display: none; background: none; border: 1px solid var(--oh-line);
    width: 34px; height: 34px; align-items: center; justify-content: center; cursor: pointer;
}
.oh-menu-toggle span, .oh-menu-toggle span::before, .oh-menu-toggle span::after {
    content: ""; display: block; width: 16px; height: 1px; background: var(--oh-ink); position: relative;
}
.oh-menu-toggle span::before { position: absolute; top: -5px; }
.oh-menu-toggle span::after { position: absolute; top: 5px; }
.oh-nav__close { display: none; }

/* ==========================================================================
   2. 인용구 슬라이더
   ========================================================================== */
.oh-quote { padding: 70px var(--oh-gutter) 56px; display: flex; justify-content: flex-end; }
.oh-quote__inner { max-width: 640px; text-align: left; }
.oh-quote__slide { display: none; }
.oh-quote__slide.is-active { display: block; }
.oh-quote__text { font-size: 16px; line-height: 1.85; color: #1a1a1a; margin: 0 0 18px; }
.oh-quote__source { font-size: 13px; color: var(--oh-muted); margin-bottom: 18px; }
.oh-quote__source a:hover { color: var(--oh-ink); }
.oh-quote__dots { display: flex; gap: 10px; }
.oh-quote__dots button { border: none; background: none; cursor: pointer; font-size: 14px; color: var(--oh-faint); padding: 0; line-height: 1; }
.oh-quote__dots button::before { content: "\2014"; }
.oh-quote__dots button.is-active { color: var(--oh-ink); }

@media (max-width: 720px) {
    .oh-quote { justify-content: flex-start; padding: 40px var(--oh-gutter) 32px; }
    .oh-quote__inner { max-width: 100%; }
}

/* ==========================================================================
   3. 리스트(표형)
   ========================================================================== */
.oh-list { padding: 0 var(--oh-gutter) 40px; }
.oh-row {
    display: grid;
    grid-template-columns: 74px minmax(160px, 2.4fr) 1fr 1fr 60px 84px 64px 56px;
    align-items: center; gap: 18px; padding: 13px 0;
    border-bottom: 2px solid var(--oh-accent);
}
.oh-row__label { font-size: 13px; color: var(--oh-ink); }
.oh-row__title { font-size: 15px; font-weight: 700; }
.oh-row__title a:hover { color: var(--oh-muted); }
.oh-row__author, .oh-row__publisher, .oh-row__year, .oh-row__genre, .oh-row__pages { font-size: 14px; color: #333; }
.oh-row__status { display: flex; justify-content: flex-end; }
.oh-badge {
    display: inline-block; background: var(--oh-badge-bg); color: #fff;
    font-size: 11px; letter-spacing: var(--oh-tracking-label); padding: 4px 9px; border-radius: 2px; white-space: nowrap;
}
.oh-row--available .oh-badge { background: #6b6b6b; }

@media (max-width: 1100px) {
    .oh-row { grid-template-columns: 60px 2fr 1fr 1fr 70px; }
    .oh-row__pages, .oh-row__year { display: none; }
}
@media (max-width: 720px) {
    .oh-row { grid-template-columns: 1fr auto; row-gap: 4px; padding: 14px 0; }
    .oh-row__label { grid-column: 1 / 2; order: 1; }
    .oh-row__status { grid-column: 2 / 3; order: 1; }
    .oh-row__title { grid-column: 1 / 3; order: 2; }
    .oh-row__author { grid-column: 1 / 3; order: 3; color: var(--oh-muted); }
    .oh-row__publisher, .oh-row__year, .oh-row__genre, .oh-row__pages { display: none; }
}

.oh-loadmore-wrap { display: flex; justify-content: flex-start; padding: 30px var(--oh-gutter) 90px; }
.oh-loadmore { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--oh-ink); border-bottom: 1px solid var(--oh-ink); padding-bottom: 2px; }
.oh-loadmore:hover { color: var(--oh-muted); border-color: var(--oh-muted); }
.oh-loadmore__chev { font-size: 12px; }

/* ==========================================================================
   4. 페이지 헤드
   ========================================================================== */
.oh-page-head { padding: 30px var(--oh-gutter) 10px; }
.oh-page-head__eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: var(--oh-tracking-label); color: var(--oh-muted); margin-bottom: 6px; }
.oh-page-head__title { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -0.02em; }

/* ==========================================================================
   5. 단일 상세
   ========================================================================== */
.oh-single { display: grid; grid-template-columns: 320px 1fr; gap: 60px; padding: 50px var(--oh-gutter) 90px; }
@media (max-width: 900px) { .oh-single { grid-template-columns: 1fr; gap: 26px; padding: 30px var(--oh-gutter) 56px; } }
.oh-single__cover { aspect-ratio: 2/3; background: #faf9f6; overflow: hidden; }
.oh-single__cover img { width: 100%; height: 100%; object-fit: cover; }
.oh-single__cover--empty { display: flex; align-items: center; justify-content: center; color: var(--oh-faint); font-size: 11px; letter-spacing: var(--oh-tracking-label); text-transform: uppercase; height: 100%; }
.oh-single__label { font-size: 12px; color: var(--oh-muted); margin-bottom: 8px; }
.oh-single__title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 14px; }
.oh-single__meta-table { border-top: 2px solid var(--oh-accent); border-bottom: 2px solid var(--oh-accent); padding: 14px 0; margin-bottom: 24px; font-size: 13px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; color: var(--oh-muted); }
.oh-single__meta-table span { color: var(--oh-ink); }
.oh-single__content { font-size: 14.5px; line-height: 1.85; color: #2b2b2b; }
.oh-single__content p { margin: 0 0 1.2em; }
.oh-status-badge { display: inline-block; background: var(--oh-badge-bg); color: #fff; font-size: 11px; letter-spacing: var(--oh-tracking-label); padding: 5px 10px; margin-bottom: 16px; }

/* ==========================================================================
   6. 고정 페이지
   ========================================================================== */
.oh-page-content { max-width: 760px; padding: 40px var(--oh-gutter) 90px; font-size: 15px; line-height: 1.85; }

/* ==========================================================================
   7. 푸터
   ========================================================================== */
.oh-footer { border-top: 2px solid var(--oh-accent); margin-top: 20px; }
.oh-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 30px; padding: 34px var(--oh-gutter) 18px; font-size: 13px; color: var(--oh-muted); }
@media (max-width: 780px) { .oh-footer__grid { grid-template-columns: 1fr; gap: 18px; } }
.oh-footer__brand { color: var(--oh-ink); font-weight: 500; margin-bottom: 6px; }
.oh-footer__copy { margin-bottom: 10px; }
.oh-footer__policies { display: flex; flex-wrap: wrap; gap: 4px; }
.oh-footer__policies a:hover { color: var(--oh-ink); }
.oh-footer__policies .sep { margin: 0 6px; color: var(--oh-faint); }
.oh-footer__line { margin-bottom: 4px; }
.oh-footer__line a:hover { color: var(--oh-ink); }
.oh-footer__bottom { border-top: 1px solid var(--oh-line); padding: 12px var(--oh-gutter); font-size: 11px; color: var(--oh-faint); }

/* ==========================================================================
   8. 반응형 헤더(모바일 메뉴)
   ========================================================================== */
@media (max-width: 900px) {
    .oh-header__row { flex-wrap: wrap; gap: 14px 20px; }
    .oh-nav-primary, .oh-nav-secondary { display: none; }
    .oh-menu-toggle { display: inline-flex; margin-left: auto; }
    .oh-mobile-nav {
        position: fixed; inset: 0; background: var(--oh-bg); z-index: 100;
        padding: 24px var(--oh-gutter); transform: translateX(100%); transition: transform .25s ease; overflow-y: auto;
    }
    .oh-mobile-nav.is-open { transform: translateX(0); }
    .oh-mobile-nav ul { display: flex; flex-direction: column; gap: 2px; }
    .oh-mobile-nav a { display: block; padding: 12px 0; font-size: 16px; }
    .oh-mobile-nav .oh-nav__close { display: block; align-self: flex-end; background: none; border: none; cursor: pointer; font-size: 22px; margin-bottom: 20px; }
    .oh-mobile-nav__group + .oh-mobile-nav__group { margin-top: 18px; border-top: 1px solid var(--oh-line); padding-top: 14px; }
}

/* ==========================================================================
   9. WooCommerce 최소 정합
   ========================================================================== */
.woocommerce div.product form.cart .button {
    background: var(--oh-ink); color: var(--oh-bg); border-radius: 0;
    padding: 12px 22px; font-size: 12px; text-transform: uppercase; letter-spacing: var(--oh-tracking-label);
}
.woocommerce span.onsale { display: none; }
