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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    height: 100%;
    margin: 0;
    color: #333;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

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

.logo {
    font-size: 28px;
    font-weight: 700;
    color: #6366f1;
    text-decoration: none;
    letter-spacing: -1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 28px;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.nav-item { display:flex; align-items:center; }

.nav-item a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-item a:hover {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.nav-item a.active {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.15);
}

/* Right-side auth area inside nav */
.nav-auth { margin-left: 8px; gap: 10px; }
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid #e2e8f0; margin-right: 6px; }
.user-info { background:#f1f5f9; padding:6px 10px; border-radius:8px; font-size:14px; }
.user-menu-btn { margin-left: 6px; }

/* Main Content */
.main-content {
    flex: 1;               /* 남는 공간 차지 */
    margin-top: 80px;
    padding: 40px 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Page Styles */
.page {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Home Page */
.hero {
    text-align: center;
    padding: 60px 0;
}

.hero h1 {
    font-size: 48px;
    color: #2d3748;
    margin-bottom: 20px;
    font-weight: 300;
    letter-spacing: -2px;
}

.hero p {
    font-size: 18px;
    color: #718096;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* Login/Register Forms */
.auth-container {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #6366f1;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.social-login {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.social-btn {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
    text-transform: lowercase;
    min-width: 110px;
}

.social-btn:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

/* Brand accents */
.social-btn.brand-naver { color:#03C75A; border-color:#b9f3cb; }
.social-btn.brand-naver:hover { background:#ecfff3; }
.social-btn.brand-kakao { color:#000; border-color:#FEE500; }
.social-btn.brand-kakao:hover { background:#fffbea; }
.social-btn.brand-google { color:#4285F4; border-color:#cfe0ff; }
.social-btn.brand-google:hover { background:#f3f7ff; }

/* Chat Page */
.chat-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    min-height: calc(100vh - 200px);
    margin-bottom: 40px;
}

.chat-sidebar {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.new-chat-btn {
    width: 100%;
    background: #6366f1;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 20px;
    font-weight: 500;
}

.chat-history {
    list-style: none;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

/* 스크롤바 커스텀 스타일 */
.chat-history::-webkit-scrollbar {
    width: 6px;
}

.chat-history::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chat-history::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.chat-history::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.chat-history li {
    padding: 8px 12px;
    margin-bottom: 5px;
    background: #f7fafc;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.chat-history li:hover {
    background: #edf2f7;
}

.chat-history li.active {
    background: #6366f1;
    color: white;
}

.chat-history li.active:hover {
    background: #5b5fc7;
}

.chat-main {
    background: white;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-height: 700px;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f7fafc;
    border-radius: 15px 15px 0 0;
}

.chat-examples {
    font-size: 14px;
    color: #718096;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-height: 500px;
}

.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.message.user {
    align-items: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 12px 15px;
    border-radius: 15px;
    background: #f1f5f9;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.message.user .message-content {
    background: #6366f1;
    color: white;
}

/* 마크다운 요소 스타일 */
.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4,
.message-content h5,
.message-content h6 {
    margin: 12px 0 8px 0;
    font-weight: 600;
    line-height: 1.3;
}

.message-content h1 { font-size: 18px; }
.message-content h2 { font-size: 16px; }
.message-content h3 { font-size: 15px; color: #4a5568; }
.message-content h4 { font-size: 14px; color: #4a5568; }
.message-content h5 { font-size: 13px; color: #4a5568; }
.message-content h6 { font-size: 12px; color: #4a5568; }

.message-content strong {
    font-weight: 700;
    color: #2d3748;
}

.message-content em {
    font-style: italic;
    color: #4a5568;
}

.message-content p {
    margin: 8px 0;
    line-height: 1.5;
}

.message-content ul,
.message-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.message-content li {
    margin: 4px 0;
    line-height: 1.4;
}

.message-content a {
    color: #6366f1;
    text-decoration: none;
}

.message-content a:hover {
    text-decoration: underline;
}

.message-content blockquote {
    border-left: 3px solid #e2e8f0;
    padding-left: 12px;
    margin: 8px 0;
    color: #4a5568;
    font-style: italic;
}

.message-content code {
    background: #f7fafc;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.message-content pre {
    background: #f7fafc;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 8px 0;
}

.message-content pre code {
    background: none;
    padding: 0;
}

.chat-input {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    outline: none;
}

.send-btn {
    background: #6366f1;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
}

.chat-info {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 추천 향수 버튼 스타일 */
.perfume-recommendations {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    max-width: 70%;
    align-self: flex-start;
}

.perfume-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    width: fit-content;
    max-width: 100%;
    text-overflow: ellipsis;
    overflow: hidden;
}

.perfume-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
}

.weather-info,
.user-info {
    margin-bottom: 20px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
}

.recommended-perfumes {
    display: grid;
    gap: 15px;
}

.perfume-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.perfume-img {
    width: 60px;
    height: 80px;
    background: #f1f5f9;
    border-radius: 8px;
    margin: 0 auto 10px;
}

.more-btn {
    background: #6366f1;
    color: white;
    padding: 5px 15px;
    border: none;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 10px;
}

/* Products Page */
.products-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

.search-bar {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 16px;
    margin-bottom: 20px;
    outline: none;
}

.search-bar:focus {
    border-color: #6366f1;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.tag {
    background: #f1f5f9;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag:hover,
.tag.active {
    background: #6366f1;
    color: white;
}

.filters {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section h4 {
    margin-bottom: 10px;
    color: #2d3748;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.filter-option input {
    margin-right: 8px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.product-info {
    padding: 20px;
}

.product-brand {
    color: #718096;
    font-size: 14px;
    margin-bottom: 5px;
}

.product-name {
    font-weight: 600;
    margin-bottom: 10px;
    color: #2d3748;
}

.product-price {
    color: #6366f1;
    font-weight: 700;
    font-size: 18px;
}

/* Product Detail Page */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.product-detail-image {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 15px;
}

.product-detail-info h1 {
    font-size: clamp(18px, 4vw, 32px);  /* 길면 자동으로 줄임 */
    margin-bottom: 10px;
    color: #2d3748;
    line-height: 1.2;

    white-space: normal !important;     /* 줄바꿈 허용 */
    overflow: visible !important;       /* 숨김 해제 */
    text-overflow: clip !important;     /* ... 방지 */
    word-break: break-word;             /* 단어 단위 줄바꿈 */
}

.product-detail-brand {
    color: #718096;
    font-size: 18px;
    margin-bottom: 20px;
}

.product-detail-price {
    font-size: 28px;
    color: #6366f1;
    font-weight: 700;
    margin-bottom: 20px;
}

.product-description {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 30px;
}

.buy-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.notes-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.note-category h4 {
    margin-bottom: 15px;
    color: #2d3748;
    text-align: center;
}

.note-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.note-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: #f7fafc;
    border-radius: 8px;
    font-size: 12px;
}

.note-image {
    width: 30px;
    height: 30px;
    background: #e2e8f0;
    border-radius: 50%;
    margin-bottom: 5px;
}

/* Map Page */
.map-container {
    min-height: calc(100vh - 200px);
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    margin-bottom: 40px;
}

.map-view {
    background: #f1f5f9;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    font-size: 18px;
}

.map-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
}

.map-btn {
    background: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.map-sidebar {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.map-filters {
    margin-bottom: 20px;
}

.map-filter-btn {
    background: #f7fafc;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    margin-right: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 14px;
}

.map-filter-btn.active {
    background: #6366f1;
    color: white;
}

.store-list {
    list-style: none;
}

.store-item {
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.store-item:hover {
    background: #f7fafc;
    border-color: #6366f1;
}

.store-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.store-address {
    color: #718096;
    font-size: 14px;
}

/* My Page */
.mypage-container {
    display: grid;
    grid-template-columns: minmax(160px, 180px) 1fr 1fr;
    gap: 8px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    align-items: start;
    padding: 0 8px;
    box-sizing: border-box;

    flex: 1;            /* 🔑 main-content flex 안에서 공간을 채워 푸터를 밀어냄 */
    min-height: 0;      /* 🔑 grid가 불필요하게 커지지 않도록 보정 */
    min-height: calc(100vh - 200px); /* 헤더+푸터 제외 */
}

.profile-section {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    margin: 0 auto 15px;
}

.profile-name {
    text-align: center;
    font-weight: 600;
    margin-bottom: 20px;
}

.profile-menu {
    list-style: none;
}

.profile-menu li { margin-bottom: 8px; }
.profile-menu a {
    display: block;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #2d3748;
    text-decoration: none;
    font-weight: 500;
    background: #fff;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
    font-size: 16px !important; /* 14~18px 중 원하는 값 */
}
.profile-menu a:hover {
    border-color: #6366f1;
    background: rgba(99,102,241,0.06);
    color: #2d3748;
    transform: translateY(-1px);
}
.profile-menu a:visited { color: #2d3748; }
.profile-menu a:focus { outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.profile-menu a.danger {
    border-color: #fecaca;
    color: #b91c1c;
}
.profile-menu a.danger:hover {
    background: #fee2e2;
}

.recommendations-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.recommendation-card {
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
}

.recommendation-date {
    color: #718096;
    font-size: 12px;
    margin-bottom: 10px;
}

.favorites-section {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.favorite-item {
    aspect-ratio: 1;
    background: #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.favorite-item:hover {
    transform: scale(1.05);
}

.chatbot-header {
    padding: 20px;
    background: #6366f1;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-chatbot {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.sidebar-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.sidebar-chat-input {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

/* Footer */
.footer {
    background: #2d3748;
    color: #a0aec0;
    padding: 30px 0;
    text-align: center;
}

.footer-warnings {
    font-size: 12px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.footer-copyright {
    font-size: 14px;
    color: #718096;
}

/* Recommend Page */
.recommend-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.weather-recommend {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.analysis-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.chart-placeholder {
    width: 100%;
    height: 200px;
    background: #f1f5f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    margin: 20px 0;
}

.top-list {
    list-style: none;
}

.top-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rank {
    background: #6366f1;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .chat-container,
    .products-container,
    .map-container,
    .mypage-container {
        grid-template-columns: 1fr;
    }

    .product-detail,
    .recommend-container {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 32px;
    }
}

/* Gender selection styles */
.gender-selection {
    display: flex;
    gap: 10px;
}

.gender-btn {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.gender-btn.active {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

/* Date input styling */
.date-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #4a5568;
}

.date-input:focus {
    border-color: #6366f1;
    outline: none;
}

/* ===== yyh 상단 '추천받은 향수 내역' 전용 표형 레이아웃 시작===== */
.recommendations-section .rec-table { 
  margin-top: 12px;
}

.recommendations-section .rec-head{
  display: grid;
  grid-template-columns: 100px 54px 160px 1fr 100px;
  column-gap: 16px;
  padding: 10px 0 8px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.recommendations-section .rec-list{
  list-style: none;
  margin: 0;
  padding: 0;
}

.recommendations-section .rec-item{
  display: grid;
  grid-template-columns: 100px 54px 160px 1fr 100px;
  column-gap: 16px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

.recommendations-section .rec-date{
  color:#4b5563;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recommendations-section .rec-brand{
  font-weight: 500;
  color:#374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recommendations-section .rec-name{
  color: #2563eb;
  text-decoration: underline;   /* 원하면 none으로 둬도 됨 */
  white-space: normal;          /* 줄바꿈 허용 */
  overflow: visible;            /* 숨김 해제 */
  text-overflow: clip;          /* … 방지 */
  word-break: break-word;       /* 긴 단어 줄바꿈 */
  min-width: 0;
}
.recommendations-section .rec-name:hover{ text-decoration: underline; }

.recommendations-section .rec-count{
  text-align: right;
  color:#1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 모바일(선택): 2행으로 접기 */
@media (max-width: 640px){
  .recommendations-section .rec-head,
  .recommendations-section .rec-item{
    grid-template-columns: 100px 1fr; /* 날짜 | 나머지 */
    row-gap: 6px;
  }
  .recommendations-section .rec-brand{ order: 2; }
  .recommendations-section .rec-name{ order: 3; }
  .recommendations-section .rec-count{ order: 4; text-align: left; }
}

/* [FIX] 선호 영역: 항목이 1개여도 2열 폭 유지 */
.likes-section .recommendations-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  /* 두 칸 폭(카드 2개+갭) 만큼만 컨테이너를 제한 */
  max-width: 700px;            /* 카드 카드 + gap 합친 폭(원하는 값으로 약간 조정 가능) */
  margin: 15px 0 20px 0;       /* 가운데/좌측 정렬은 취향대로 */
}


.recommendation-card .feedback-btn{ 
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 56px !important;
  height: 32px !important;
  padding: 0 12px !important;
  border-radius: 16px !important;
  border: 1px solid #e2e8f0 !important;
  background: #f7fafc !important;
  color: #4a5568 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  cursor: pointer !important;
}

/* 활성 색상만 별도 */
.recommendation-card .like-btn.active{
  background:#4a90e2 !important; color:#fff !important; border:none !important;
}
.recommendation-card .dislike-btn.active{
  background:#e74c3c !important; color:#fff !important; border:none !important;
}
/* ===== yyh 상단 '추천받은 향수 내역' 전용 표형 레이아웃 끝===== */

/* 마이페이지 전용: main-content 좌우 여백 제거 */
body.mypage .main-content {
  padding: 40px 0 0 0 !important;  /* 위아래 40px, 좌우 0 */
}