/* ===================================================
   CC Brand Starter Theme — Main CSS
   커스터마이저의 --ccb-primary 변수로 색상 자동 변경
   =================================================== */

:root {
    --ccb-primary: #0c3ea4;
    --ccb-primary-dark: #082d7a;
    --ccb-text: #111111;
    --ccb-text-light: #666666;
    --ccb-border: #e0e0e0;
    --ccb-bg: #ffffff;
    --ccb-bg-light: #f5f6f8;
    --ccb-bg-dark: #1a1a1a;
    --ccb-radius: 8px;
    --ccb-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --ccb-shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
    --ccb-transition: 0.3s ease;
    --ccb-container: 1200px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--ccb-text);
    background: var(--ccb-bg);
    -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,h5,h6 { font-family: 'GmarketSans', 'Pretendard', sans-serif; font-weight: 700; line-height: 1.3; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
a { color: var(--ccb-primary); text-decoration: none; transition: color var(--ccb-transition); }
a:hover { color: var(--ccb-primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
.container { max-width: var(--ccb-container); margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }

/* ── Buttons ── */
.btn {
    display: inline-block; padding: 0.875rem 2rem; border-radius: var(--ccb-radius);
    font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: all var(--ccb-transition);
    text-align: center; border: 2px solid transparent;
}
.btn-primary { background: var(--ccb-primary); color: #fff; }
.btn-primary:hover { background: var(--ccb-primary-dark); color: #fff; }
.btn-outline { border-color: #fff; color: #fff; background: transparent; }
.btn-outline:hover { background: #fff; color: var(--ccb-primary); }

/* ── Header ── */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255,255,255,0.97); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ccb-border);
    transition: all var(--ccb-transition);
}
.site-header.scrolled { box-shadow: var(--ccb-shadow); }
.site-header.header-hidden { transform: translateY(-100%); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }

.site-logo { display: flex; align-items: center; gap: 0.75rem; color: var(--ccb-text); }
.site-logo:hover { color: var(--ccb-primary); }
.logo-text { font-family: 'GmarketSans', sans-serif; font-weight: 700; font-size: 1.5rem; letter-spacing: 0.1em; }
.logo-sub { display: block; font-size: 0.7rem; color: var(--ccb-text-light); letter-spacing: 0.05em; }
.site-logo .custom-logo { max-height: 44px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.main-nav a { padding: 0.5rem 1rem; font-size: 0.9rem; font-weight: 500; color: var(--ccb-text); border-radius: 6px; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--ccb-primary); background: rgba(12,62,164,0.06); }
.nav-dropdown { position: absolute; top: 100%; left: 0; background: #fff; box-shadow: var(--ccb-shadow); border-radius: var(--ccb-radius); padding: 0.5rem 0; min-width: 180px; display: none; }
.nav-item:hover > .nav-dropdown { display: block; }
.nav-dropdown a { display: block; padding: 0.5rem 1.25rem; }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.header-search, .menu-toggle { background: none; border: none; cursor: pointer; color: var(--ccb-text); padding: 0.5rem; }
.header-cart { position: relative; color: var(--ccb-text); padding: 0.5rem; }
.cart-count {
    position: absolute; top: -2px; right: -4px;
    background: var(--ccb-primary); color: #fff; font-size: 0.65rem; font-weight: 700;
    width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

/* Mobile Menu Toggle */
.menu-toggle { display: none; flex-direction: column; gap: 5px; padding: 0.5rem; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--ccb-text); transition: all var(--ccb-transition); }
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Main Content ── */
.site-main { padding-top: 70px; }

/* ── Hero Section ── */
.hero-section { position: relative; overflow: hidden; }
.hero-bg-image {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--ccb-bg-dark) 0%, var(--ccb-primary-dark) 100%);
    background-size: cover; background-position: center;
}
.hero-bg-image::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.heroSwiper .swiper-slide { height: 600px; position: relative; }
.hero-content { position: relative; z-index: 2; max-width: 700px; padding: 4rem 0; color: #fff; }
.badge-series {
    display: inline-block; padding: 0.4rem 1.25rem; background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3); border-radius: 50px;
    font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; margin-bottom: 1.5rem;
}
.hero-title { font-size: 2.75rem; margin-bottom: 1.25rem; color: #fff; line-height: 1.25; }
.text-accent { color: var(--ccb-primary); filter: brightness(1.8); }
.hero-desc { font-size: 1.05rem; opacity: 0.9; line-height: 1.8; margin-bottom: 2rem; }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.heroSwiper .swiper-button-next, .heroSwiper .swiper-button-prev { color: rgba(255,255,255,0.7); }
.heroSwiper .swiper-button-next:hover, .heroSwiper .swiper-button-prev:hover { color: #fff; }
.heroSwiper .swiper-pagination-bullet { background: rgba(255,255,255,0.5); width: 10px; height: 10px; }
.heroSwiper .swiper-pagination-bullet-active { background: #fff; width: 28px; border-radius: 5px; }

/* ── Section Common ── */
.section-badge-text {
    display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.2em;
    color: var(--ccb-primary); margin-bottom: 0.75rem;
}
.section-title { font-size: 2rem; margin-bottom: 0.75rem; }
.section-subtitle { color: var(--ccb-text-light); font-size: 1rem; }
.section-header { margin-bottom: 3rem; }

/* ── Brand Section ── */
.brand-section { padding: 5rem 0; background: var(--ccb-bg-light); }
.brand-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.brand-desc { font-size: 1rem; line-height: 1.9; color: var(--ccb-text-light); margin-bottom: 1.5rem; }
.brand-tags { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.brand-tag {
    padding: 0.5rem 1.25rem; background: #fff; border: 1px solid var(--ccb-border);
    border-radius: 50px; font-size: 0.85rem; font-weight: 500;
}

/* ── Categories Section ── */
.categories-section { padding: 5rem 0; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.category-card {
    position: relative; border-radius: var(--ccb-radius); overflow: hidden;
    box-shadow: var(--ccb-shadow); transition: all var(--ccb-transition); color: #fff;
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--ccb-shadow-hover); color: #fff; }
.cat-img {
    height: 240px; background: var(--ccb-primary-dark);
    background-size: cover; background-position: center;
    transition: transform var(--ccb-transition);
}
.category-card:hover .cat-img { transform: scale(1.05); }
.cat-info {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 1.5rem; background: linear-gradient(transparent, rgba(0,0,0,0.75));
}
.cat-info h3 { font-size: 1.15rem; margin-bottom: 0.25rem; }
.cat-info span { font-size: 0.85rem; opacity: 0.8; }

/* ── Products Section ── */
.products-section { padding: 5rem 0; background: var(--ccb-bg-light); }
.products-header-wrapper { position: relative; }
.view-all-link { color: var(--ccb-primary); font-weight: 600; font-size: 0.9rem; margin-top: 0.5rem; display: inline-block; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.product-card {
    background: #fff; border-radius: var(--ccb-radius); overflow: hidden;
    box-shadow: var(--ccb-shadow); transition: all var(--ccb-transition); color: var(--ccb-text);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--ccb-shadow-hover); color: var(--ccb-text); }
.prod-img { aspect-ratio: 1; overflow: hidden; background: var(--ccb-bg-light); display: flex; align-items: center; justify-content: center; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--ccb-transition); }
.product-card:hover .prod-img img { transform: scale(1.05); }
.prod-info { padding: 1rem 1.25rem; }
.prod-category { font-size: 0.75rem; color: var(--ccb-primary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.prod-title { font-size: 0.95rem; font-weight: 600; margin: 0.35rem 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-price { font-size: 0.95rem; font-weight: 700; color: var(--ccb-primary); }

/* ── Service Banner ── */
.service-banner { padding: 5rem 0; background: var(--ccb-bg-dark); color: #fff; text-align: center; }
.service-banner .section-badge-text { color: rgba(255,255,255,0.6); }
.service-banner .section-title { color: #fff; margin-bottom: 2.5rem; }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-top: 2rem; }
.service-item { text-align: center; padding: 2rem 1rem; }
.service-icon { font-size: 2rem; margin-bottom: 1rem; color: var(--ccb-primary); filter: brightness(1.6); }
.service-item h4 { font-size: 1rem; margin-bottom: 0.5rem; }
.service-item p { font-size: 0.85rem; opacity: 0.7; }

/* ── Page Header ── */
.page-header {
    padding: 3rem 0 2rem; background: var(--ccb-bg-light); border-bottom: 1px solid var(--ccb-border);
    margin-bottom: 2.5rem;
}
.page-header h1 { margin-top: 0.75rem; }

/* ── Breadcrumb ── */
.breadcrumb { font-size: 0.85rem; color: var(--ccb-text-light); }
.breadcrumb a { color: var(--ccb-text-light); }
.breadcrumb a:hover { color: var(--ccb-primary); }
.breadcrumb .separator { margin: 0 0.5rem; }
.breadcrumb .current { color: var(--ccb-text); font-weight: 500; }

/* ── Page Content ── */
.page-content { padding: 2rem 0 4rem; }
.page-content .container { max-width: 900px; }
.error-404 { padding: 6rem 0; }
.error-404 h1 { font-size: 6rem; color: var(--ccb-primary); margin-bottom: 1rem; }

/* ── Posts ── */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.post-card { background: #fff; border-radius: var(--ccb-radius); overflow: hidden; box-shadow: var(--ccb-shadow); }
.post-thumb img { width: 100%; height: 200px; object-fit: cover; }
.post-info { padding: 1.25rem; }
.post-date { font-size: 0.8rem; color: var(--ccb-text-light); }
.post-info h2 { font-size: 1.1rem; margin: 0.5rem 0; }
.post-info h2 a { color: var(--ccb-text); }
.post-info h2 a:hover { color: var(--ccb-primary); }
.single-post .post-header { margin-bottom: 2rem; }
.single-post .post-header h1 { margin-top: 0.5rem; }
.post-featured-image { margin-bottom: 2rem; border-radius: var(--ccb-radius); overflow: hidden; }
.post-body { font-size: 1.05rem; line-height: 1.85; }
.post-body p { margin-bottom: 1.25rem; }
.post-navigation { display: flex; justify-content: space-between; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--ccb-border); }

/* ── WooCommerce Shop ── */
.shop-content { padding: 0 0 4rem; }
.shop-content .woocommerce ul.products li.product { text-align: center; }
.shop-content .woocommerce ul.products li.product a img { border-radius: var(--ccb-radius); margin-bottom: 0.75rem; }
.shop-content .woocommerce ul.products li.product .price { color: var(--ccb-primary); font-weight: 700; }
.shop-content .woocommerce ul.products li.product .button {
    background: var(--ccb-primary); color: #fff; border-radius: var(--ccb-radius);
    padding: 0.6rem 1.5rem; font-size: 0.85rem;
}
.shop-content .woocommerce ul.products li.product .button:hover { background: var(--ccb-primary-dark); }

/* ── Footer ── */
.site-footer { background: var(--ccb-bg-dark); color: rgba(255,255,255,0.8); padding: 4rem 0 0; }
.footer-main { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; }
.footer-brand .logo-text { font-family: 'GmarketSans', sans-serif; font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 1rem; letter-spacing: 0.1em; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; opacity: 0.7; margin-bottom: 1.5rem; }
.footer-social { display: flex; gap: 0.75rem; }
.footer-social a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); transition: all var(--ccb-transition); }
.footer-social a:hover { background: var(--ccb-primary); color: #fff; }
.footer-nav h4 { color: #fff; font-size: 1rem; margin-bottom: 1.25rem; }
.footer-nav ul { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-nav a, .footer-nav li { color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.footer-nav a:hover { color: #fff; }
.footer-contact li { display: flex; align-items: center; gap: 0.75rem; }
.footer-contact svg { flex-shrink: 0; opacity: 0.5; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 1.5rem 0; display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; opacity: 0.5; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: rgba(255,255,255,0.5); }
.footer-links a:hover { color: #fff; }

/* ── Search Overlay ── */
.search-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; }
.search-overlay-inner { position: relative; width: 90%; max-width: 600px; }
.search-overlay form { display: flex; gap: 0.5rem; }
.search-overlay input[type="search"] { flex: 1; padding: 1rem 1.5rem; font-size: 1.1rem; border: none; border-radius: var(--ccb-radius); outline: none; }
.search-overlay button[type="submit"] { padding: 1rem 2rem; background: var(--ccb-primary); color: #fff; border: none; border-radius: var(--ccb-radius); cursor: pointer; font-weight: 600; }
.search-close { position: absolute; top: -3rem; right: 0; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; }

/* ── Scroll Animation ── */
.section-header, .category-card, .product-card, .service-item, .brand-grid {
    opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-in { opacity: 1; transform: translateY(0); }

/* ── Pagination ── */
.pagination { margin-top: 2rem; text-align: center; }
.pagination .nav-links { display: flex; justify-content: center; gap: 0.5rem; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--ccb-radius); background: #fff; border: 1px solid var(--ccb-border); font-size: 0.9rem; }
.pagination .page-numbers.current { background: var(--ccb-primary); color: #fff; border-color: var(--ccb-primary); }

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .hero-title { font-size: 2rem; }
    .heroSwiper .swiper-slide { height: 480px; }
    .brand-grid { grid-template-columns: 1fr; gap: 2rem; }
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .main-nav { display: none; position: fixed; top: 70px; left: 0; right: 0; bottom: 0; background: #fff; flex-direction: column; padding: 2rem; gap: 0; overflow-y: auto; z-index: 999; }
    .main-nav.mobile-open { display: flex; }
    .main-nav a { padding: 1rem; font-size: 1.1rem; border-bottom: 1px solid var(--ccb-border); width: 100%; }
    .nav-dropdown { position: static; box-shadow: none; display: block; padding-left: 1rem; }
    .menu-toggle { display: flex; }
    .header-search { display: none; }

    .hero-title { font-size: 1.75rem; }
    .heroSwiper .swiper-slide { height: 420px; }
    .hero-content { padding: 2rem 0; }
    .heroSwiper .swiper-button-next, .heroSwiper .swiper-button-prev { display: none; }

    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .category-grid { grid-template-columns: 1fr; }
    .service-grid { grid-template-columns: 1fr; }
    .footer-main { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
    .section-title { font-size: 1.5rem; }
    h1 { font-size: 1.75rem; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .prod-info { padding: 0.75rem; }
    .prod-title { font-size: 0.85rem; }
}
