/* =========================================
   1. Imports & Fonts
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600&family=Inter:wght@300;400;500&display=swap');

/* =========================================
   2. Variables (Root)
   ========================================= */
:root {
    /* Color Palette - Luxury & Nature */
    --color-bg: #F9F8F6;       /* Soft Beige */
    --color-text-main: #1A1A1A;
    --color-text-sub: #555555;
    --color-accent: #2C3E50;   /* Muted Dark Blue/Green */
    --color-border: #E5E5E5;
    --color-white: #FFFFFF;
    
    /* Spacing */
    --container-width: 1280px;
    --section-padding: 100px;
    
    /* Transition */
    --transition: 0.3s ease;
}

/* =========================================
   3. Reset & Base Styles
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    padding-left: env(safe-area-inset-left);   /* iPhone Notch Support */
    padding-right: env(safe-area-inset-right);
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* Typography */
h1, h2, h3, h4 { 
    font-family: 'Cinzel', serif; 
    font-weight: 400; 
    line-height: 1.2; 
}

.display-text { font-size: 3.5rem; letter-spacing: -0.02em; }
.section-title { font-size: 2.2rem; margin-bottom: 2rem; text-align: center; }
.sub-title { 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    color: var(--color-text-sub); 
    margin-bottom: 1rem; 
    display: block; 
}
.text-center { text-align: center; }
.mt-4 { margin-top: 40px; }

/* =========================================
   4. Layout Utilities
   ========================================= */
.container { 
    max-width: var(--container-width); 
    margin: 0 auto; 
    padding: 0 20px; 
}
.section { padding: var(--section-padding) 0; }

/* Grid System (Mobile First) */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 40px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 30px; }

/* Desktop Grid Override */
@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); } /* 768px 이상에서 3단 그리드 복구 */
}

/* =========================================
   5. Components
   ========================================= */

/* --- Header & Navigation --- */
header {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: rgba(249, 248, 246, 0.95);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    backdrop-filter: blur(5px);
}
.nav-wrap { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo { font-family: 'Cinzel', serif; font-size: 1.5rem; font-weight: 600; letter-spacing: 1px; }

/* GNB Default (Desktop) */
.gnb-desktop { display: none; gap: 30px; } /* 기본 숨김 -> 미디어쿼리로 제어 */
.gnb-desktop > li { position: relative; padding: 20px 0; }
.gnb-desktop a { font-size: 0.9rem; letter-spacing: 0.5px; text-transform: uppercase; }
.gnb-desktop a:hover { opacity: 0.6; }

@media (min-width: 1024px) {
    .gnb-desktop { display: flex; } /* 1024px 이상에서만 보임 */
}

/* Dropdown */
.dropdown { 
    position: absolute; top: 100%; left: -20px; 
    background: #fff; min-width: 200px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
    opacity: 0; visibility: hidden; 
    transition: var(--transition); 
    padding: 15px 0; 
}
.gnb-desktop > li:hover .dropdown { opacity: 1; visibility: visible; top: 80%; }
.dropdown li a { display: block; padding: 10px 25px; text-transform: none; color: var(--color-text-sub); }

/* Mobile Menu Button */
.mobile-btn {
    display: none; /* 기본 숨김 */
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001;
    user-select: none;
}

/* --- Buttons --- */
.btn { 
    display: inline-block; padding: 15px 40px; 
    border: 1px solid var(--color-text-main); 
    text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; 
    background: transparent; cursor: pointer; 
}
.btn:hover { background: var(--color-text-main); color: #fff; }
.btn-primary { background: var(--color-text-main); color: #fff; }

/* --- Hero Section --- */
.hero { 
    height: 90vh; display: flex; align-items: center; 
    background-size: cover; background-position: center; 
    position: relative; 
}
.hero-content { position: relative; z-index: 2; max-width: 600px; }
.hero-overlay { position: absolute; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.1); }

/* --- Product Card --- */
.product-card { transition: var(--transition); }
.product-card:hover { transform: translateY(-5px); }
.product-img { background: #f0f0f0; aspect-ratio: 1/1.2; overflow: hidden; margin-bottom: 15px; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.product-card:hover img { transform: scale(1.05); }
.product-info h3 { font-size: 1.1rem; margin-bottom: 5px; font-family: 'Inter', sans-serif; font-weight: 500; }
.product-cat { font-size: 0.8rem; color: #888; text-transform: uppercase; }

/* --- Form --- */
input, textarea, select { 
    width: 100%; padding: 15px; margin-bottom: 20px; 
    border: 1px solid var(--color-border); 
    background: #fff; font-family: 'Inter', sans-serif; 
}
input:focus, textarea:focus { outline: none; border-color: var(--color-text-main); }

/* --- Footer --- */
footer { background: #111; color: #fff; padding: 80px 0 40px; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 60px; }
.footer-col h4 { color: #fff; margin-bottom: 20px; font-size: 1rem; }
.footer-col a { color: #999; display: block; margin-bottom: 10px; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.copyright { border-top: 1px solid #333; padding-top: 20px; text-align: center; color: #666; font-size: 0.8rem; }

/* --- Animations --- */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   6. Media Queries (Responsive)
   ========================================= */

/* --- Tablet & Mobile (Max Width: 1023px) --- */
/* 햄버거 메뉴 및 모바일 네비게이션 동작 정의 */
@media (max-width: 1023px) {
    .mobile-btn { display: block; } /* 햄버거 버튼 보이기 */

    .gnb-desktop {
        display: none; 
        flex-direction: column;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: #fff;
        padding: 20px;
        overflow-y: auto;
        border-top: 1px solid #eee;
        gap: 0;
    }

    /* Active Class for JS Toggle */
    .gnb-desktop.active {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }

    .gnb-desktop > li {
        width: 100%;
        padding: 15px 0;
        border-bottom: 1px solid #f5f5f5;
    }
    
    .gnb-desktop a {
        font-size: 1.1rem;
        display: block;
        width: 100%;
    }

    /* Mobile Dropdown (Always visible/indented) */
    .dropdown {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        padding: 10px 0 0 20px;
        display: none; /* JS 없이 CSS로만 할 경우 hover로 열리게 처리 */
        min-width: auto;
        border-top: 1px solid #eee;
        margin-top: 10px;
        background: #f9f9f9;
    }
    
    .gnb-desktop > li:hover .dropdown,
    .gnb-desktop > li:focus-within .dropdown {
        display: block;
    }
}

/* --- Mobile Only (Max Width: 768px) --- */
/* 레이아웃, 여백, 폰트 크기 최적화 */
@media (max-width: 768px) {
    /* Container & Layout */
    .container { padding-left: 24px; padding-right: 24px; width: 100%; }
    .section { padding: 60px 0; }
    
    /* Typography Resizing */
    .display-text { font-size: 2.2rem; }
    .section-title { font-size: 1.8rem; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    p, li, a { font-size: 0.95rem; line-height: 1.7; }

    /* Stack Grids Vertically */
    .grid-2, .grid-3 { display: block; }
    
    .grid-2 > div, 
    .grid-3 > div,
    .product-card {
        margin-bottom: 40px;
        width: 100%;
    }
    .grid-2 > div:last-child,
    .grid-3 > div:last-child { margin-bottom: 0; }

    /* Hero & Text Adjustments */
    .hero-content { padding: 0 10px; text-align: center; }
}