/* ============================================
   크리스피아(한샘크리스탈산업) - 공통 스타일
   ============================================ */

html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'Noto Sans KR', sans-serif; font-weight: 500; color: #333; line-height: 1.7; font-size: 16px; }
* { word-break: keep-all; }

/* 전역: 최소 폰트 14px 강제 (너무 작은 글자 방지) */
main, main *, section, section *, .max-w-\[1140px\], .max-w-\[1140px\] *,
.max-w-\[960px\], .max-w-\[960px\] * {
    font-size: revert;
}
main p, main span, main a, main td, main th, main li, main label, main input, main textarea, main select, main button,
section p, section span, section a, section td, section th, section li {
    min-height: auto;
}
/* 하드코딩된 작은 폰트 오버라이드 */
main .text-\[11px\] { font-size: 13px !important; }
main .text-\[12px\] { font-size: 14px !important; }
main .text-\[13px\] { font-size: 14px !important; }
footer .text-\[11px\] { font-size: 12px !important; }
footer .text-\[12px\] { font-size: 13px !important; }

/* 서브페이지 배경 흰색 */
main { background: #fff; }

/* 히스토리(breadcrumb) - 원본 스타일 */
#history { display:flex; align-items:center; gap:0; font-size:14px; font-weight:500; color:#666; padding:8px 0; }
#history a { color:#666; text-decoration:none; font-weight:500; }
#history a:hover { color:#333; }
#history .history_home { vertical-align:middle; margin-right:2px; }
#history .history_bull { display:inline-flex; align-items:center; margin:0 8px; }
#history .history_bull img { vertical-align:middle; }
#history .current { color:#333; font-weight:700; }

/* 카테고리 페이지 헤더 */
.category-header { background: linear-gradient(135deg, #2b231c 0%, #504336 100%); padding: 32px 0; margin-bottom: 24px; }
.category-title { font-size: 30px; font-weight: 900; color: #fff; letter-spacing: -0.5px; }
.category-count { font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.6); margin-top: 4px; }
.category-tab { font-size: 14px; font-weight: 700; padding: 10px 22px; border-radius: 0; border: 1px solid #ddd; color: #444; background: #fff; transition: all 0.2s; cursor: pointer; }
.category-tab:hover { background: #f5f0eb; border-color: #9c876a; color: #9c876a; }
.category-tab.active { background: #9c876a; color: #fff; border-color: #9c876a; }
.breadcrumb { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.5); }
.breadcrumb a { color: rgba(255,255,255,0.5); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .current { color: #fff; }

/* 상품 카드 */
.product-card { border-radius: 0 !important; border: 1px solid #e8e8e8; box-shadow: none; }
.product-card:hover { border-color: #9c876a; box-shadow: 0 4px 20px rgba(156,135,106,0.15); }
.product-name { font-size: 14px; font-weight: 600; color: #333; line-height: 1.5; }
.product-price { font-size: 17px; font-weight: 900; color: #c0392b; }

/* 서브페이지 공통 */
.sub-page-title { font-size: 28px; font-weight: 900; color: #222; letter-spacing: -0.5px; }
.sub-page-title span { font-size: 14px; font-weight: 400; color: #999; }

/* 테이블 */
.data-table th { font-size: 14px; font-weight: 700; color: #555; }
.data-table td { font-size: 14px; font-weight: 500; color: #333; }
.data-table td a { font-weight: 600; }

/* Noise texture overlay */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scroll animation */
.reveal {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Product card hover */
.product-card {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px -15px rgba(156, 135, 106, 0.15);
}
.product-card:hover .product-img img {
    transform: scale(1.05);
}
.product-img img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Tab active */
.tab-btn {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.tab-btn.active {
    background: linear-gradient(135deg, #9c876a, #c0a27a);
    color: white;
    box-shadow: 0 4px 20px -4px rgba(156, 135, 106, 0.4);
}

/* Marquee */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.marquee-track {
    animation: marquee 30s linear infinite;
}

/* Float animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* Gradient rotation */
@keyframes gradientRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Banner fade */
.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.banner-slide.active {
    opacity: 1;
}

/* Sidebar */
.sidebar-panel {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Category dropdown */
.cat-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.cat-trigger:hover .cat-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #faf7f2; }
::-webkit-scrollbar-thumb { background: #d4bfa0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9c876a; }

/* Number font */
.num { font-variant-numeric: tabular-nums; }

/* Spring transition helper */
.spring-transition {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
