/* ============================================================
   살림on (LIVING ON) - 웜 에디토리얼 리빙 디자인 시스템
   ============================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1E4D2B;
    --primary-dark: #14361D;
    --primary-soft: #EEF4EF;
    --charcoal: #2F363D;
    --charcoal-deep: #1F2429;
    --olive: #6F6E40;
    --accent-color: #B85A43;
    --accent-hover: #9E4934;
    --accent-soft: rgba(184, 90, 67, 0.12);
    --secondary-color: #686E74;
    --success-color: #1E4D2B;
    --danger-color: #B84A4A;
    --text-dark: #22262A;
    --text-light: #686E74;
    --text-subtle: #8C9197;
    --bg-page: #FFFFFF;
    --bg-soft: #FAF8F5;
    --bg-hero-beige: #F4E8DA;
    --bg-light: #F6F4F0;
    --border-color: #EBE6DF;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 2px 10px rgba(31, 36, 41, 0.04);
    --shadow-md: 0 10px 28px rgba(31, 36, 41, 0.07);
    --shadow-lg: 0 18px 42px rgba(31, 36, 41, 0.12);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    font-family: 'Pretendard Variable', Pretendard, 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
    color: var(--text-dark);
    background: var(--bg-page);
    line-height: 1.6;
    word-break: keep-all;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

img {
    max-inline-size: 100%;
    display: block;
}

.tabular-nums {
    font-variant-numeric: tabular-nums;
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(30, 77, 43, 0.45);
    outline-offset: 2px;
}

.container {
    max-width: 1240px;
    margin-inline: auto;
    padding-inline: 20px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   헤더 & 내비게이션 (화이트 글래스 + 포레스트 그린 로고)
   ============================================================ */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 18px rgba(31, 36, 41, 0.04);
    isolation: isolate;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-block: 14px;
    gap: 16px;
}

.logo a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary-color);
}

.logo-img {
    block-size: clamp(36px, 30px + 1vw, 46px);
    inline-size: auto;
    display: block;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.logo a:hover .logo-img {
    transform: scale(1.02);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-buttons,
.user-menu {
    display: flex;
    gap: 6px;
    align-items: center;
    color: var(--text-dark);
    font-size: 14px;
}

.btn-text {
    text-decoration: none;
    color: var(--charcoal);
    font-size: 14px;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-text:hover {
    color: var(--primary-color);
    background: var(--primary-soft);
}

.cart-icon {
    position: relative;
    inline-size: 42px;
    block-size: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 17px;
    color: var(--charcoal-deep);
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.cart-icon:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #FFFFFF;
    transform: translateY(-2px);
}

.cart-count {
    position: absolute;
    inset-block-start: -5px;
    inset-inline-end: -5px;
    background: var(--accent-color);
    color: #FFFFFF;
    border-radius: 50%;
    inline-size: 20px;
    block-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(184, 90, 67, 0.35);
}

.nav {
    border-top: 1px solid var(--border-color);
    padding-block: 6px;
}

.nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    flex-wrap: balance;
    align-items: safe center;
    justify-content: center;
    gap: 6px;
}

.nav a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14.5px;
    padding: 8px 14px;
    border-radius: 999px;
    position: relative;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav a:hover {
    color: var(--primary-color);
    background: var(--primary-soft);
}

.nav a[aria-current="page"] {
    color: #FFFFFF;
    background: var(--primary-color);
    font-weight: 600;
}

/* ============================================================
   공통 버튼 & 폼 컨트롤 (서브 페이지 호환)
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: #FFFFFF;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--charcoal-deep);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hero-beige);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea,
.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-dark);
    background: #FFFFFF;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 77, 43, 0.14);
}

/* ============================================================
   섹션 1: 살림on 에디토리얼 히어로 (웜 베이지 좌우 분할)
   ============================================================ */
.hero-livingon {
    background-color: var(--bg-hero-beige);
    overflow: clip;
    border-bottom: 1px solid var(--border-color);
}

.hero-shell {
    max-inline-size: 1320px;
    margin-inline: auto;
}

.hero-grid {
    display: grid;
    grid-template-columns: 52% 48%;
    align-items: stretch;
    min-block-size: clamp(380px, 50dvh, 560px);
}

.hero-copy-col {
    display: flex;
    align-items: center;
    padding-block: clamp(2.25rem, 1.5rem + 3vw, 4.5rem);
    padding-inline: clamp(1.25rem, 0.8rem + 3.2vw, 4.5rem) clamp(1rem, 0.6rem + 1.5vw, 2.75rem);
}

.hero-copy-inner {
    max-inline-size: 520px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-block-end: 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--olive);
    text-transform: uppercase;
}

.hero-eyebrow-bar {
    inline-size: 26px;
    block-size: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

.hero-title {
    margin-block-end: 16px;
    font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.95rem);
    font-weight: 700;
    line-height: 1.24;
    letter-spacing: -0.03em;
    color: var(--charcoal-deep);
}

.hero-title em {
    font-style: normal;
    color: var(--primary-color);
}

.hero-subtitle {
    margin-block-end: 26px;
    font-size: clamp(0.9375rem, 0.85rem + 0.3vw, 1.0625rem);
    color: #4B5055;
    line-height: 1.68;
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-block-end: 28px;
}

.btn-living-solid {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: 999px;
    background-color: var(--charcoal-deep);
    color: #FFFFFF;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-living-solid:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-living-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1.5px solid var(--charcoal);
    color: var(--charcoal-deep);
    background: rgba(255, 255, 255, 0.55);
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-living-outline:hover {
    background-color: #FFFFFF;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.hero-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(47, 54, 61, 0.14);
}

.metric-item strong {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.25;
}

.metric-item span {
    font-size: 12.5px;
    color: var(--text-light);
}

.hero-media-col {
    position: relative;
    min-block-size: 320px;
    overflow: clip;
}

.hero-media-img {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    object-position: center 35%;
}

/* ============================================================
   섹션 2: 살림on 브랜드 가치 스트립
   ============================================================ */
.brand-pillars {
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border-color);
    padding-block: 42px;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.pillar-item {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pillar-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.pillar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.pillar-icon {
    inline-size: 42px;
    block-size: 42px;
    border-radius: 12px;
    background: var(--bg-hero-beige);
    color: var(--primary-color);
    display: grid;
    place-items: center;
    font-size: 18px;
}

.pillar-num {
    font-size: 12px;
    font-weight: 700;
    color: var(--olive);
    letter-spacing: 0.08em;
}

.pillar-item h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--charcoal-deep);
    margin-bottom: 6px;
}

.pillar-item p {
    font-size: 13.5px;
    color: var(--text-light);
    line-height: 1.55;
}

/* ============================================================
   공통 섹션 헤더
   ============================================================ */
.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 30px;
}

.section-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--olive);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.section-title {
    font-size: clamp(1.4rem, 1.15rem + 1vw, 2rem);
    font-weight: 700;
    color: var(--charcoal-deep);
    letter-spacing: -0.025em;
}

.section-desc {
    font-size: 14.5px;
    color: var(--text-light);
    margin-top: 4px;
}

/* ============================================================
   섹션 3: 공간별 살림 컬렉션 (6개 카테고리 3x2 그리드)
   ============================================================ */
.product-categories {
    padding-block: 64px;
    background: var(--bg-page);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.category-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.category-image {
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: clip;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    margin-bottom: 14px;
}

.category-image img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.04);
}

.category-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
    color: var(--charcoal-deep);
    margin-bottom: 6px;
}

.category-card h3 i {
    color: var(--primary-color);
    font-size: 15px;
}

.category-card p {
    font-size: 13.5px;
    color: var(--text-light);
    line-height: 1.5;
}

/* ============================================================
   섹션 4: 매일 곁에 두고 싶은 살림 (필터 탭 + 상품 그리드)
   ============================================================ */
.featured-products {
    padding-block: 64px 80px;
    background: var(--bg-soft);
    border-top: 1px solid var(--border-color);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    flex-wrap: balance;
    align-items: safe center;
    gap: 8px;
    margin-bottom: 28px;
}

.filter-pill {
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: var(--charcoal);
    background-color: #FFFFFF;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-pill:hover {
    background-color: var(--bg-hero-beige);
    border-color: var(--olive);
}

.filter-pill.is-active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #FFFFFF;
    font-weight: 600;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.product-card {
    container: product-card / inline-size;
    display: grid;
    grid-template-rows: auto 1fr;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: clip;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(30, 77, 43, 0.35);
}

.product-image {
    aspect-ratio: 1 / 1;
    background: #FFFFFF;
    border-bottom: 1px solid var(--border-color);
    overflow: clip;
    padding: 12px;
}

.product-image img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.04);
}

.product-info {
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.product-category {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--olive);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.product-name {
    font-size: clamp(0.9rem, 4.2cqi, 1rem);
    font-weight: 600;
    color: var(--charcoal-deep);
    line-height: 1.45;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: clip;
}

.product-price {
    margin-top: auto;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.product-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.product-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    background: var(--bg-light);
    color: var(--text-light);
}

.badge-seller {
    background: var(--primary-soft);
    color: var(--primary-color);
}

/* ============================================================
   푸터 (딥 차콜 + 살림on 로고 배지)
   ============================================================ */
.footer {
    background: var(--charcoal-deep);
    color: #D7D2CA;
    padding-block: 56px 36px;
    margin-top: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-section h3 {
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
}

.footer-section p {
    font-size: 14px;
    color: #C4BEB5;
    margin-bottom: 6px;
}

.footer-section .phone-number {
    font-size: 20px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 8px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #C4BEB5;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

.footer-bottom {
    padding-top: 28px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.footer-brand-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.footer-logo-badge {
    display: inline-flex;
    align-items: center;
    background: #FFFFFF;
    padding: 6px 12px;
    border-radius: 10px;
}

.footer-logo-badge img {
    block-size: 28px;
    inline-size: auto;
}

.company-info p {
    font-size: 13px;
    color: #ABA59C;
    line-height: 1.7;
}

.company-info strong {
    color: #EFECE6;
}

.footer-copyright p {
    font-size: 13px;
    color: #8E8880;
}

/* ============================================================
   반응형 브레이크포인트
   ============================================================ */
@media (max-width: 1024px) {
    .pillars-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        min-block-size: auto;
    }
    .hero-media-col {
        min-block-size: 260px;
        order: -1;
    }
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .nav ul {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        scrollbar-width: none;
    }
    .nav ul::-webkit-scrollbar {
        display: none;
    }
    .nav a {
        white-space: nowrap;
        font-size: 13.5px;
        padding: 7px 12px;
    }
}

@media (max-width: 480px) {
    .pillars-grid {
        grid-template-columns: 1fr;
    }
    .header-top {
        padding-block: 10px;
    }
    .btn-text {
        padding: 6px 10px;
        font-size: 13px;
    }
}
