/* ═══════════════════════════════════════════════════════════════
   Broiling Kunming - Custom Styles
   greenbeans.co.kr inspired: warm earth tones, clean layout, natural feel
   ═══════════════════════════════════════════════════════════════ */

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; }

body.broiling-kunming {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--km-text-dark);
    background: var(--km-bg-white);
    line-height: 1.7;
}

.fc-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ─── Header ─── */
.km-header {
    background: var(--km-bg-white);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

.km-header.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.98);
}

.km-header .fc-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* Logo */
.km-logo-text {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--km-orange);
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.km-logo-text small {
    font-family: 'Pretendard', sans-serif;
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--km-text-muted);
    margin-top: 2px;
}

/* Nav */
.km-header .fc-nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.km-header .fc-nav-list li {
    list-style: none;
}

.km-header .fc-nav-list a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--km-text-dark);
    text-decoration: none;
    letter-spacing: 0.02em;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.km-header .fc-nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--km-orange);
    transition: width 0.3s ease;
}

.km-header .fc-nav-list a:hover {
    color: var(--km-orange);
}

.km-header .fc-nav-list a:hover::after {
    width: 100%;
}

/* Header Actions */
.km-header .fc-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.km-header .fc-header-actions a {
    color: var(--km-text-dark);
    transition: color 0.3s ease;
}

.km-header .fc-header-actions a:hover {
    color: var(--km-orange);
}

.km-header .fc-cart-icon {
    position: relative;
}

.km-header .fc-cart-icon .count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--km-orange);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Hamburger */
.km-menu-checkbox { display: none; }

.km-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 1010;
}

.km-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--km-text-dark);
    transition: all 0.3s ease;
}

/* Mobile Nav */
.km-mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--km-bg-white);
    z-index: 9999;
    transition: right 0.35s ease;
    padding: 2rem;
    box-shadow: -4px 0 30px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.km-mobile-nav-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--km-text-dark);
    line-height: 1;
}

.km-mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 3rem 0 0;
}

.km-mobile-nav li {
    border-bottom: 1px solid var(--fc-gray-light);
}

.km-mobile-nav a {
    display: block;
    padding: 1rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--km-text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.km-mobile-nav a:hover {
    color: var(--km-orange);
}

body:has(.km-menu-checkbox:checked) .km-mobile-nav {
    right: 0;
}

body:has(.km-menu-checkbox:checked)::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9998;
}

/* ─── Buttons ─── */
.km-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.85rem 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
    cursor: pointer;
    border: none;
}

.km-btn-primary {
    background: var(--km-orange);
    color: #fff;
}

.km-btn-primary:hover {
    background: var(--km-orange-dark);
    color: #fff;
    transform: translateY(-1px);
}

.km-btn-secondary {
    background: transparent;
    color: var(--km-orange);
    border: 2px solid var(--km-orange);
}

.km-btn-secondary:hover {
    background: var(--km-orange);
    color: #fff;
}

.km-btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.7);
}

.km-btn-outline:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: #fff;
}

/* ─── Section Headers ─── */
.km-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.km-section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--km-orange);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.km-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--km-text-dark);
    margin: 0 0 0.8rem;
    line-height: 1.3;
}

.km-section-desc {
    font-size: 1rem;
    color: var(--km-text-body);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ═══════ SECTION 1: Hero ═══════ */
.km-hero {
    position: relative;
    height: 75vh;
    min-height: 500px;
    max-height: 750px;
    overflow: hidden;
}

.km-hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.km-hero-slide.active {
    opacity: 1;
}

.km-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(93,64,55,0.75) 0%, rgba(191,54,12,0.55) 100%);
}

.km-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    height: 100%;
    color: #fff;
}

.km-hero-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    padding: 0.4rem 1.2rem;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 2px;
    margin-bottom: 1.5rem;
    color: rgba(255,255,255,0.9);
}

.km-hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 1rem;
    color: #fff;
}

.km-hero-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0 0 2rem;
    max-width: 550px;
    color: rgba(255,255,255,0.9);
}

.km-hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.km-hero-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.km-hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.km-hero-dot.active {
    background: var(--km-orange-light);
    transform: scale(1.2);
}

/* ═══════ SECTION 2: Origin Bar ═══════ */
.km-origin-bar {
    background: var(--km-bg-warm);
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.km-origin-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.km-origin-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem;
}

.km-origin-icon {
    color: var(--km-orange);
    flex-shrink: 0;
}

.km-origin-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--km-text-muted);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.km-origin-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--km-text-dark);
}

/* ═══════ SECTION 3: Regions ═══════ */
.km-regions {
    padding: 5rem 0;
    background: var(--km-bg-white);
}

.km-region-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
}

.km-region-card {
    text-align: center;
    padding: 2rem 1.2rem;
    border-radius: 8px;
    background: var(--km-bg-warm);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.km-region-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fc-shadow-lg);
    border-color: var(--km-orange-light);
    background: var(--km-bg-orange-soft);
}

.km-region-icon {
    color: var(--km-orange);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.km-region-card:hover .km-region-icon {
    transform: scale(1.1);
}

.km-region-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--km-text-dark);
    margin: 0 0 0.3rem;
}

.km-region-eng {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--km-tea);
    letter-spacing: 0.05em;
}

.km-region-desc {
    font-size: 0.8rem;
    color: var(--km-text-body);
    margin: 0.6rem 0 0;
    line-height: 1.5;
}

/* ═══════ SECTION 4: Featured Products ═══════ */
.km-featured-products {
    padding: 5rem 0;
    background: var(--km-bg-light);
}

/* Tabs */
.km-product-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.km-tab-btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: 2px solid var(--fc-gray-light);
    background: transparent;
    color: var(--km-text-body);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.km-tab-btn:hover {
    border-color: var(--km-orange);
    color: var(--km-orange);
}

.km-tab-btn.active {
    background: var(--km-orange);
    border-color: var(--km-orange);
    color: #fff;
}

/* Product Grid */
.km-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    transition: opacity 0.3s ease;
}

.km-product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.04);
}

.km-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fc-shadow-lg);
}

.km-product-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--km-bg-light);
}

.km-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.km-product-card:hover .km-product-img img {
    transform: scale(1.06);
}

.km-product-badges {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    z-index: 2;
}

.km-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 3px;
}

.km-badge-new { background: var(--km-orange); color: #fff; }
.km-badge-sale { background: var(--km-red); color: #fff; }
.km-badge-best { background: var(--km-gold); color: #fff; }

.km-product-actions {
    position: absolute;
    bottom: 0.8rem;
    right: 0.8rem;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s ease;
    z-index: 2;
}

.km-product-card:hover .km-product-actions {
    opacity: 1;
    transform: translateY(0);
}

.km-product-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--km-orange);
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: background 0.3s ease;
}

.km-product-action-btn:hover {
    background: var(--km-orange-dark);
    color: #fff;
}

.km-product-content {
    padding: 1.2rem;
}

.km-product-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.km-product-name a {
    color: var(--km-text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.km-product-name a:hover {
    color: var(--km-orange);
}

.km-product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--km-orange);
}

.km-product-price del {
    font-size: 0.85rem;
    color: var(--km-text-muted);
    font-weight: 400;
}

.km-product-price ins {
    text-decoration: none;
}

.km-products-more {
    text-align: center;
    margin-top: 2.5rem;
}

.km-empty-msg {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--km-text-muted);
}

/* ═══════ SECTION 5: Story ═══════ */
.km-story {
    padding: 5rem 0;
    background: var(--km-bg-white);
}

.km-story-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.km-story-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--km-text-dark);
    margin: 0.8rem 0 1.2rem;
    line-height: 1.4;
}

.km-story-desc {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--km-text-body);
    margin: 0 0 2rem;
}

.km-story-image {
    border-radius: 12px;
    overflow: hidden;
}

.km-story-image img {
    width: 100%;
    height: auto;
    display: block;
}

.km-story-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 350px;
    background: linear-gradient(135deg, var(--km-bg-warm) 0%, var(--km-bg-orange-soft) 100%);
    border-radius: 12px;
    color: var(--km-orange);
}

/* ═══════ SECTION 6: Trust ═══════ */
.km-trust {
    padding: 5rem 0;
    background: var(--km-bg-warm);
}

.km-trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.km-trust-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: var(--km-bg-white);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.04);
}

.km-trust-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fc-shadow-lg);
}

.km-trust-icon {
    color: var(--km-orange);
    margin-bottom: 1.2rem;
}

.km-trust-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.8rem;
    color: var(--km-text-dark);
}

.km-trust-card p {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--km-text-body);
    margin: 0;
}

/* ═══════ SECTION 7: Service Bar ═══════ */
.km-service-bar {
    padding: 2rem 0;
    background: var(--km-bg-white);
    border-top: 1px solid rgba(0,0,0,0.04);
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.km-service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.km-service-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
}

.km-service-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--km-bg-orange-soft);
    border-radius: 50%;
    color: var(--km-orange);
    flex-shrink: 0;
}

.km-service-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--km-text-dark);
}

.km-service-desc {
    font-size: 0.78rem;
    color: var(--km-text-muted);
}

/* ═══════ SECTION 8: Marketplace Link ═══════ */
.km-marketplace-link {
    padding: 3rem 0;
    background: var(--km-earth);
    text-align: center;
}

.km-marketplace-link p {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    margin: 0 0 1rem;
}

.km-marketplace-link .km-btn-primary {
    background: var(--km-orange);
}

.km-marketplace-link .km-btn-primary:hover {
    background: var(--km-orange-light);
}

/* ═══════ Footer ═══════ */
.km-footer {
    background: var(--km-earth);
    color: rgba(255,255,255,0.75);
    padding: 3rem 0 0;
}

.km-footer-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    padding-bottom: 2rem;
}

.km-footer-brand-name {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--km-orange-light);
    margin-bottom: 0.3rem;
}

.km-footer-tagline {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin: 0 0 1.2rem;
}

.km-footer-info {
    font-size: 0.78rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.5);
}

.km-footer-contact {
    margin-top: 1rem;
}

.km-footer-contact p {
    margin: 0.3rem 0;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.km-footer-links-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.km-footer-col h4 {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.9);
    margin: 0 0 1rem;
}

.km-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.km-footer-col li {
    margin-bottom: 0.5rem;
}

.km-footer-col a {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color 0.3s ease;
}

.km-footer-col a:hover {
    color: var(--km-orange-light);
}

.km-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.2rem 0;
}

.km-footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
}

.km-social-icons {
    display: flex;
    gap: 1rem;
}

.km-social-icons a {
    color: rgba(255,255,255,0.4);
    transition: color 0.3s ease;
}

.km-social-icons a:hover {
    color: var(--km-orange-light);
}

/* ═══════ WooCommerce Overrides ═══════ */
.broiling-kunming .woocommerce-page .fc-main,
.broiling-kunming .woocommerce .fc-main {
    padding-top: 2rem;
}

/* ═══════ Responsive ═══════ */
@media (max-width: 1024px) {
    .km-region-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .km-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .km-trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .km-story-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .fc-container {
        padding: 0 1.2rem;
    }

    /* Header */
    .km-header .fc-nav { display: none; }
    .km-hamburger { display: flex; }

    .km-header .fc-header-inner {
        height: 60px;
    }

    .km-logo-text {
        font-size: 1.3rem;
    }

    /* Hero */
    .km-hero {
        height: 60vh;
        min-height: 400px;
    }

    .km-hero-title {
        font-size: 1.8rem;
    }

    .km-hero-desc {
        font-size: 0.9rem;
    }

    /* Origin Bar */
    .km-origin-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Regions */
    .km-regions { padding: 3rem 0; }

    .km-region-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .km-section-title {
        font-size: 1.5rem;
    }

    /* Products */
    .km-featured-products { padding: 3rem 0; }

    .km-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .km-product-tabs {
        gap: 0.3rem;
    }

    .km-tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.78rem;
    }

    /* Story */
    .km-story { padding: 3rem 0; }

    .km-story-title {
        font-size: 1.4rem;
    }

    /* Trust */
    .km-trust { padding: 3rem 0; }

    .km-trust-grid {
        grid-template-columns: 1fr;
    }

    /* Service */
    .km-service-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    /* Footer */
    .km-footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .km-footer-links-group {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .km-footer-bottom-inner {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .km-hero {
        height: 50vh;
        min-height: 350px;
    }

    .km-hero-title {
        font-size: 1.5rem;
    }

    .km-hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .km-btn {
        justify-content: center;
        width: 100%;
    }

    .km-origin-grid {
        grid-template-columns: 1fr;
    }

    .km-region-grid {
        grid-template-columns: 1fr 1fr;
    }

    .km-product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }

    .km-footer-links-group {
        grid-template-columns: 1fr;
    }
}
