:root {
    --bg-color: #fdfdfd;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --accent-color: #800020; /* Burgundy accent */
    --accent-glow: rgba(128, 0, 32, 0.3);
    --card-bg: #ffffff;
    --shadow-deep: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lift: 0 20px 40px rgba(0, 0, 0, 0.15);
    --transition-speed: 0.4s;
    --font-heading: 'Playfair Display', serif;
    --font-main: 'Noto Sans KR', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="4" height="4" viewBox="0 0 4 4"%3E%3Cpath fill="%23000000" fill-opacity="0.02" d="M1 3h1v1H1V3zm2-2h1v1H2V1z"%3E%3C/path%3E%3C/svg%3E');
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header Styles Redesign */
.main-header {
    background: var(--card-bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.8rem 2rem;
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Left Section: 25% */
.logo-section {
    flex: 0 0 25%;
    display: flex;
    flex-direction: column;
    align-items: center; /* 로고와 슬로건 전체 중앙 정렬 */
    text-align: center;
}

.logo-container {
    display: flex;
    justify-content: center; /* 이미지 중앙 정렬 */
    width: 100%;
}

.main-logo {
    max-height: 100px; /* 컴팩트한 사이즈 조절 */
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.main-logo:hover {
    transform: scale(1.05);
}

.tagline {
    font-weight: 400;
    color: #8a3333;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
    margin-top: 0.2rem;
    white-space: nowrap;
}

/* Right Section: 75% */
.nav-section {
    flex: 0 0 75%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-top-bar {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Category Navigation */
.category-nav {
    display: flex;
    gap: 1rem;
}

.nav-item {
    position: relative;
}

.nav-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-btn:hover, .nav-item:hover .nav-btn {
    color: var(--accent-color);
}

.nav-btn.active {
    color: var(--accent-color);
    background-color: transparent;
    border-bottom: 2px solid var(--accent-color);
    font-weight: 700;
}

/* Instagram Link */
.instagram-link {
    font-size: 1.5rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    text-decoration: none;
}

.instagram-link:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

/* Submenu Styles */
.submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: white;
    box-shadow: var(--shadow-deep);
    border-radius: 8px;
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1100;
    min-width: 140px;
}

.nav-item:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.sub-nav-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    text-align: center;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sub-nav-btn:hover {
    background-color: #f8f8f8;
    color: var(--accent-color);
}

.sub-nav-btn.active {
    background-color: rgba(128, 0, 32, 0.08);
    color: var(--accent-color);
    font-weight: 700;
}

/* Floating Chat Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10000;
}

.chat-toggle-btn {
    width: 60px;
    height: 60px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(128, 0, 32, 0.4);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-toggle-btn:hover {
    transform: scale(1.1) rotate(5deg);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    height: 450px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lift);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-window.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-header {
    background-color: var(--accent-color);
    color: white;
    padding: 0.5rem 1.2rem; /* 1.2rem -> 0.5rem으로 대폭 축소 */
    display: flex;
    justify-content: flex-end; /* 버튼만 있으므로 오른쪽 정렬 */
    align-items: center;
}

.close-chat {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-body {
    flex: 1;
    padding: 1.2rem;
    overflow-y: auto;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
}

.chat-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.opt-btn {
    background: white;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: fit-content;
    font-family: var(--font-main);
}

.opt-btn:hover {
    background-color: var(--accent-color);
    color: white;
}

.message img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 0.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.message {
    padding: 0.8rem 1rem;
    border-radius: 15px;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
    max-width: 85%;
    line-height: 1.4;
    word-break: break-all;
}

.message.bot {
    background-color: white;
    color: var(--text-primary);
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.message.user {
    background-color: var(--accent-color);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 2px;
}

.chat-footer {
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    background: white;
    border-top: 1px solid rgba(0,0,0,0.05);
}

#chat-input {
    flex: 1;
    border: 1px solid #eee;
    padding: 0.6rem 1rem;
    border-radius: 20px;
    outline: none;
    font-family: var(--font-main);
    font-size: 0.85rem;
}

#send-chat {
    background: var(--accent-color);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#send-chat:hover {
    transform: scale(1.1);
}

/* Gallery Wrapper adjustment */
.gallery-wrapper {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* Hairstyle Card Styles */
.hairstyle-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-deep);
    transition: all var(--transition-speed) cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    cursor: pointer;
}

.hairstyle-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lift);
}

.image-container {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hairstyle-card:hover .image-container img {
    transform: scale(1.1);
}

.card-info {
    padding: 1.2rem;
    text-align: center;
}

.card-category {
    font-size: 0.7rem;
    color: var(--accent-color);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    display: block;
}

.card-title {
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
    font-weight: 700;
}

.card-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Footer */
.main-footer {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .header-container { flex-direction: column; gap: 1rem; }
    .logo-section { flex: 1; align-items: center; }
    .nav-section { flex: 1; justify-content: center; width: 100%; }
    .tagline { white-space: normal; text-align: center; }
}

/* Contact Page Styles */
.contact-wrapper {
    max-width: 1000px;
    margin: 4rem auto;
    padding: 0 2rem;
    text-align: center;
}

.contact-header {
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

.map-section {
    margin-bottom: 3rem;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-deep);
}

.map-container {
    width: 100%;
    height: 450px;
}

.info-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.address-box {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.2rem;
    color: var(--text-primary);
    background: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.address-box i {
    color: var(--accent-color);
}

.action-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.action-btn.naver {
    background-color: #03c75a; /* Naver Green */
    color: white;
}

.action-btn.insta {
    background-color: var(--accent-color); /* Burgundy */
    color: white;
}

.action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Nav Link overrides for SPA-like feel */
.category-nav a {
    text-decoration: none;
}
