/* 올리브영 클론 - 실제 올리브영 사이트 참고 스타일 */

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

body {
    font-family: -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    background-color: #fff;
    color: #333;
    line-height: 1.5;
}

a { text-decoration: none; color: inherit; }

/* 헤더 - 올리브영 스타일 (흰 배경, 초록 로고) */
.header {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    color: #9bce26;
}

.header-search {
    flex: 1;
    max-width: 400px;
    margin: 0 40px;
    position: relative;
}

.header-search input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 2px solid #9bce26;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
}

.header-icons { display: flex; align-items: center; gap: 16px; }
.header-icons a { font-size: 13px; color: #666; }

.auth-buttons, .user-menu { display: flex; align-items: center; gap: 10px; }

/* 카테고리 내비게이션 */
.category-nav {
    background: #fff;
    border-bottom: 1px solid #eee;
}

.category-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 32px;
}

.category-nav a {
    padding: 14px 0;
    font-size: 14px;
    color: #555;
    font-weight: 500;
    border-bottom: 2px solid transparent;
}

.category-nav a:hover { color: #9bce26; border-bottom-color: #9bce26; }

/* 버튼 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    border: none;
    font-weight: 500;
}

.btn-primary { background: #9bce26; color: #fff; }
.btn-primary:hover { background: #8ab822; }
.btn-outline { background: transparent; border: 1px solid #ddd; color: #555; }
.btn-outline:hover { border-color: #9bce26; color: #9bce26; }
.btn-lg { padding: 12px 28px; font-size: 15px; }

.badge {
    background: #ff6b35;
    color: #fff;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 11px;
    margin-left: 4px;
}

/* 메인 배너 */
.main-banner {
    background: linear-gradient(135deg, #f7fee7 0%, #ecfccb 100%);
    padding: 48px 20px;
    text-align: center;
}

.main-banner h2 { font-size: 28px; font-weight: 700; color: #333; margin-bottom: 8px; }
.main-banner p { font-size: 15px; color: #666; margin-bottom: 20px; }

/* 섹션 */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title { font-size: 20px; font-weight: 700; color: #333; }
.section-more { font-size: 13px; color: #999; }

/* 카테고리 그리드 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px;
    background: #f8f8f8;
    border-radius: 12px;
    transition: all 0.2s;
}

.category-card:hover { background: #f0f9e0; box-shadow: 0 2px 8px rgba(155,206,38,0.1); }
.category-icon { font-size: 28px; margin-bottom: 8px; }
.category-name { font-size: 13px; color: #555; font-weight: 500; }

/* 상품 그리드 - 올리브영 스타일 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    transition: all 0.2s;
    cursor: pointer;
}

.product-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); transform: translateY(-2px); }

.product-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8f8f8;
}

.product-image img { width: 100%; height: 100%; object-fit: cover; }

.product-info { padding: 14px; }
.product-brand { font-size: 12px; color: #999; margin-bottom: 4px; }
.product-name { font-size: 14px; font-weight: 500; color: #333; margin-bottom: 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { font-size: 16px; font-weight: 700; color: #333; }
.product-original-price { font-size: 12px; color: #bbb; text-decoration: line-through; margin-right: 4px; }
.product-discount { font-size: 14px; font-weight: 700; color: #ff6b35; margin-right: 4px; }

/* 상품 상세 */
.product-detail {
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.product-detail-image { border-radius: 8px; overflow: hidden; background: #f8f8f8; }
.product-detail-image img { width: 100%; }

.product-detail-info h1 { font-size: 22px; font-weight: 600; margin-bottom: 6px; }
.product-detail-info .brand { font-size: 14px; color: #999; margin-bottom: 16px; }
.product-detail-info .price { font-size: 26px; font-weight: 700; color: #333; margin-bottom: 16px; }
.product-detail-info .description { font-size: 14px; color: #666; line-height: 1.8; margin-bottom: 24px; }

.quantity-control { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.quantity-control button { width: 32px; height: 32px; border: 1px solid #ddd; background: #fff; border-radius: 4px; cursor: pointer; font-size: 16px; }
.quantity-control span { font-size: 16px; min-width: 30px; text-align: center; }

/* 장바구니 */
.cart-section, .orders-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 20px;
}

.cart-section h2, .orders-section h2 { font-size: 20px; margin-bottom: 20px; }

.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #f0f0f0;
}

.cart-item-image { width: 80px; height: 80px; border-radius: 8px; overflow: hidden; background: #f8f8f8; }
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 500; margin-bottom: 4px; font-size: 14px; }
.cart-item-price { color: #333; font-weight: 700; }

.cart-summary {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 24px;
    margin-top: 20px;
}

.cart-total { font-size: 18px; font-weight: 700; text-align: right; margin-bottom: 12px; }

.btn-danger { background: #ff4444; color: #fff; border: none; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; }

/* 주문 내역 */
.order-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 12px;
    border: 1px solid #f0f0f0;
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    color: #999;
}

.order-status {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    background: #e8f5e9;
    color: #2e7d32;
}

/* 폼 */
.form-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 36px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
}

.form-container h2 { text-align: center; margin-bottom: 28px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; color: #666; }
.form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}
.form-group input:focus { outline: none; border-color: #9bce26; }

/* 필터 */
.filter-bar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-btn {
    padding: 8px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: #fff;
    color: #666;
    cursor: pointer;
    font-size: 13px;
}
.filter-btn.active, .filter-btn:hover { border-color: #9bce26; background: #9bce26; color: #fff; }

/* 챗봇 배너 */
.chatbot-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 48px 20px;
    text-align: center;
    color: #fff;
    border-radius: 12px;
    max-width: 1200px;
    margin: 40px auto;
}

.chatbot-banner h2 { font-size: 24px; margin-bottom: 8px; }
.chatbot-banner p { opacity: 0.85; margin-bottom: 16px; }
.chatbot-banner .btn-primary { background: #fff; color: #764ba2; }

/* 푸터 */
.footer {
    background: #f8f8f8;
    border-top: 1px solid #eee;
    padding: 32px 20px;
    text-align: center;
    color: #999;
    font-size: 12px;
    margin-top: 60px;
}

/* 반응형 */
@media (max-width: 768px) {
    .header-top { flex-wrap: wrap; gap: 12px; }
    .header-search { max-width: 100%; margin: 8px 0; order: 3; }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .product-detail { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}
