/* assets/css/style.css - Farm Studio Design System */

:root {
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-dark: #064e3b;
    --primary-light: #ecfdf5;
    --primary-glow: rgba(16, 185, 129, 0.2);
    --primary-gradient: linear-gradient(135deg, #064e3b, #047857);
    
    --secondary: #0284c7;
    --secondary-light: #f0f9ff;
    
    --accent: #f59e0b;
    --accent-light: #fffbeb;
    
    --danger: #ef4444;
    --danger-light: #fef2f2;
    
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-focus: #10b981;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.15);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 1. 황금들녘 (Golden Amber Theme) */
[data-theme="golden"] {
    --primary: #d97706;
    --primary-hover: #b45309;
    --primary-dark: #78350f;
    --primary-light: #fffbeb;
    --primary-glow: rgba(217, 119, 6, 0.2);
    --primary-gradient: linear-gradient(135deg, #78350f, #b45309);
    --border-focus: #d97706;
    --shadow-glow: 0 0 20px rgba(217, 119, 6, 0.15);
}

/* 2. 청정바다 (Ocean Blue Theme) */
[data-theme="ocean"] {
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-dark: #0c4a6e;
    --primary-light: #f0f9ff;
    --primary-glow: rgba(2, 132, 199, 0.2);
    --primary-gradient: linear-gradient(135deg, #0c4a6e, #0284c7);
    --border-focus: #0284c7;
    --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.15);
}

/* 3. 프리미엄 다크 (Dark Mode Theme) */
[data-theme="dark"] {
    --primary: #34d399;
    --primary-hover: #10b981;
    --primary-dark: #064e3b;
    --primary-light: rgba(52, 211, 153, 0.15);
    --primary-glow: rgba(52, 211, 153, 0.3);
    --primary-gradient: linear-gradient(135deg, #064e3b, #0f766e);
    
    --secondary: #38bdf8;
    --secondary-light: rgba(56, 189, 248, 0.15);
    
    --accent: #fbbf24;
    --accent-light: rgba(251, 191, 36, 0.15);
    
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-glass: rgba(30, 41, 59, 0.85);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    
    --border-color: #334155;
    --border-focus: #34d399;
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 30px -3px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .farm-story-section {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .story-paragraph {
    color: #cbd5e1;
}

[data-theme="dark"] .story-paragraph strong {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(255,255,255,0) 65%, rgba(52, 211, 153, 0.4) 65%);
}

[data-theme="dark"] .story-highlight-box {
    background: #0f172a;
    color: #f1f5f9;
}

[data-theme="dark"] .story-sns-box {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .directory-search-input {
    background: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-textarea {
    background-color: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}

[data-theme="dark"] .card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .app-header {
    background: rgba(15, 23, 42, 0.88);
    border-color: #334155;
}

[data-theme="dark"] .mobile-drawer {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .modal-box {
    background: #1e293b;
    border: 1px solid #334155;
    color: #f8fafc;
}

[data-theme="dark"] .theme-palette-modal {
    background: #1e293b;
    border-color: #334155;
}

/* Theme Switcher Component */
.theme-switch-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.btn-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-theme-toggle:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.theme-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1000;
    min-width: 175px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    animation: fadeIn 0.15s ease;
}

.theme-dropdown-menu.active {
    display: flex;
}

.theme-opt-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.theme-opt-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.theme-opt-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 800;
}

.theme-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.theme-dot.emerald { background: #10b981; }
.theme-dot.golden { background: #d97706; }
.theme-dot.ocean { background: #0284c7; }
.theme-dot.dark { background: #334155; }

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

body {
    font-family: 'Noto Sans KR', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Header & Nav */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-glow);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--primary-dark);
    line-height: 1.2;
}

[data-theme="dark"] .logo-title {
    color: var(--primary);
}

.logo-sub {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.nav-item i {
    width: 18px;
    height: 18px;
}

.nav-item:hover {
    color: var(--primary-hover);
    background-color: var(--primary-light);
}

.nav-item.active {
    color: var(--primary-hover);
    background-color: var(--primary-light);
    font-weight: 700;
}

/* User Auth Area */
.user-auth-area {
    display: flex;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.btn-google {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.btn-google:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-outline:hover {
    background: #f1f5f9;
}

.btn-outline-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
}
.btn-outline-sm:hover {
    background: #f8fafc;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.btn-icon:hover {
    color: var(--danger);
    background: var(--danger-light);
    border-color: var(--danger-light);
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0.5rem 0.35rem 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
}

.avatar-ring {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #0284c7);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 700;
}

.user-role-tag {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--primary);
}

.user-role-tag.pending {
    color: var(--accent);
}

.user-role-tag.admin {
    color: #8b5cf6;
}

/* Main Container */
.main-content {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Common Card & Section */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    transition: var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.directory-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.directory-header-info {
    flex: 1;
    min-width: 280px;
}

.directory-search-wrapper {
    display: flex;
    align-items: center;
}

.directory-search-inner {
    position: relative;
    width: 260px;
}

.directory-search-input {
    width: 100%;
    padding-left: 2.3rem;
    height: 42px;
    border-radius: var(--radius-full);
    font-size: 0.92rem;
    background: white;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.directory-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.directory-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--text-subtle);
    pointer-events: none;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    word-break: keep-all;
}

.section-title i {
    color: var(--primary);
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    line-height: 1.5;
    word-break: keep-all;
}

/* Status Banner for Level 9 */
.status-banner {
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
}

.status-banner.pending {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fde68a;
    color: #92400e;
}

.status-banner.approved {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.status-banner-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.status-banner-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.status-banner-content p {
    font-size: 0.92rem;
    line-height: 1.5;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
}

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-control {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: #fff;
    color: var(--text-main);
    transition: var(--transition-fast);
    outline: none;
    font-family: inherit;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding-top: 0.4rem;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.92rem;
    cursor: pointer;
}

/* Product & Album Cards */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.album-item-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #000;
    box-shadow: var(--shadow-sm);
}

.album-item-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.album-item-card:hover img {
    transform: scale(1.05);
}

.album-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    color: white;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.album-item-card:hover .album-overlay {
    opacity: 1;
}

.album-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.4rem;
}

.btn-action-delete {
    background: rgba(239, 68, 68, 0.85);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-action-delete:hover {
    background: var(--danger);
    transform: scale(1.1);
}

/* Product Cards Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: var(--transition-normal);
}

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

.product-img-wrapper {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #f1f5f9;
    overflow: hidden;
}

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

.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
}

.product-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.product-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

/* Modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-box {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
    padding: 2.25rem;
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-box.large {
    max-width: 850px;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-subtle);
}
.modal-close:hover {
    color: var(--text-main);
}

.modal-icon-badge {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* Dev Login Box */
.dev-login-box {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--border-color);
    text-align: center;
}

.dev-divider {
    font-size: 0.78rem;
    color: var(--text-subtle);
    margin-bottom: 0.75rem;
}

.dev-btn-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: #0f172a;
    color: white;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: toastSlide 0.3s ease;
}

.toast.success { background: #065f46; border-left: 4px solid #10b981; }
.toast.error { background: #7f1d1d; border-left: 4px solid #ef4444; }

@keyframes toastSlide {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Table Style for Admin */
.admin-table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.admin-table th {
    background-color: #f8fafc;
    color: #475569;
    padding: 0.85rem 1rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
}

.admin-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: #1e293b;
}

.admin-table tr:hover td {
    background-color: #f8fafc;
}

/* Farm Directory Cards (Home) */
.farm-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.farm-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: var(--transition-normal);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.farm-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: #a7f3d0;
}

.farm-card-img-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #e2e8f0;
    overflow: hidden;
}

.farm-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.farm-card:hover .farm-card-img-wrap img {
    transform: scale(1.06);
}

.farm-card-badges {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.badge-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(6px);
    color: white;
}

.badge-stat.accent {
    background: rgba(245, 158, 11, 0.9);
}

.badge-stat.primary {
    background: rgba(16, 185, 129, 0.9);
}

.farm-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.farm-card-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.farm-card-addr {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.farm-card-story {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.farm-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.btn-view-farm {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #065f46;
    font-weight: 700;
    font-size: 0.88rem;
}

/* Farm Story Rich Formatted Styling */
.farm-story-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.farm-story-section {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: var(--transition-fast);
}

.farm-story-section:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.07);
    border-color: #cbd5e1;
}

.farm-story-section.highlight {
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
    border-color: #bbf7d0;
}

.farm-story-section.marketing {
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
    border-color: #fde68a;
}

.farm-story-section.sns {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-color: #e2e8f0;
}

.story-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.85rem;
    margin-bottom: 1.25rem;
    border-bottom: 1.5px solid #f1f5f9;
}

.story-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
}

.story-section-badge.green {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.story-section-badge.amber {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.story-section-badge.blue {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.story-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.story-paragraph {
    font-size: 0.98rem;
    line-height: 1.85;
    color: #334155;
    margin-bottom: 1.1rem;
    text-align: justify;
    word-break: keep-all;
}

.story-paragraph:last-child {
    margin-bottom: 0;
}

.story-paragraph strong {
    color: #0f172a;
    font-weight: 800;
    background: linear-gradient(180deg, rgba(255,255,255,0) 65%, #a7f3d0 65%);
    padding: 0 0.2rem;
    border-radius: 2px;
}

.story-highlight-box {
    background: #f8fafc;
    border-left: 4px solid var(--primary);
    padding: 1.1rem 1.4rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 1.25rem 0;
    font-size: 0.96rem;
    line-height: 1.75;
    color: #1e293b;
}

.story-sns-box {
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    font-size: 0.94rem;
    line-height: 1.75;
    color: #334155;
    position: relative;
}

.story-hashtag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.story-hashtag-chip {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    color: #0369a1;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
}

.story-hashtag-chip:hover {
    background: #e0f2fe;
    color: #0284c7;
    transform: translateY(-1px);
}

.btn-copy-sns {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid #cbd5e1;
    background: white;
    color: #475569;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-copy-sns:hover {
    background: var(--primary-light);
    color: #065f46;
    border-color: var(--primary);
}

/* Farm Detail View */
.farm-detail-hero {
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.farm-detail-header-info {
    position: relative;
    z-index: 2;
}

.farm-detail-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.farm-detail-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 600;
}

.farm-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 1.25rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.farm-nav-back:hover {
    color: var(--primary-hover);
    transform: translateX(-3px);
}

.header-right-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Mobile Menu Hamburger Button */
.btn-mobile-menu {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.btn-mobile-menu:hover {
    background: var(--primary-light);
    color: var(--primary-hover);
    border-color: var(--primary);
}

.btn-mobile-menu i {
    width: 22px;
    height: 22px;
}

/* Mobile Drawer Overlay */
.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Drawer Sidebar */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 82%;
    max-width: 340px;
    background: white;
    z-index: 1001;
    box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.mobile-drawer.active {
    transform: translateX(0);
}

.mobile-drawer-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: #fafafa;
}

.logo-icon.sm {
    width: 34px;
    height: 34px;
}

.mobile-drawer-user {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: #f8fafc;
}

.drawer-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar-ring.lg {
    width: 46px;
    height: 46px;
    font-size: 1.2rem;
}

.drawer-user-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.mobile-nav-links {
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.mobile-nav-section-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-subtle);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    color: #334155;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.mobile-nav-item i {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.mobile-nav-item:hover, .mobile-nav-item.active {
    background-color: var(--primary-light);
    color: #065f46;
    font-weight: 700;
}

.mobile-nav-item:hover i, .mobile-nav-item.active i {
    color: var(--primary-hover);
}

.mobile-drawer-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: #fafafa;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
    .header-container {
        padding: 0.75rem 1rem;
    }

    .nav-links {
        display: none !important;
    }

    .btn-mobile-menu {
        display: inline-flex;
    }

    /* 900px 이하: 1줄 제목, 2줄 설명, 3줄 검색 세로 스택 레이아웃 */
    .directory-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
        margin-bottom: 1.25rem;
    }

    .directory-header-info {
        width: 100%;
        min-width: 0;
    }

    .directory-header-info .section-title {
        font-size: 1.25rem;
        margin-bottom: 0.35rem;
    }

    .directory-header-info .section-subtitle {
        font-size: 0.88rem;
        line-height: 1.45;
        margin-top: 0;
    }

    .directory-search-wrapper {
        width: 100%;
    }

    .directory-search-inner {
        width: 100%;
    }

    .directory-search-input {
        width: 100%;
        height: 44px;
        font-size: 0.95rem;
    }
}

@media (max-width: 640px) {
    .header-container {
        padding: 0.65rem 0.85rem;
    }

    .logo-title {
        font-size: 1.1rem;
    }

    .logo-sub {
        font-size: 0.68rem;
    }

    .user-profile-badge {
        padding: 0.25rem 0.5rem;
    }

    .user-profile-badge .user-meta {
        display: none;
    }

    .card {
        padding: 1.25rem;
    }

    .farm-detail-hero {
        padding: 1.5rem;
    }

    .farm-directory-grid {
        grid-template-columns: 1fr;
    }

    .directory-header-info .section-title {
        font-size: 1.15rem;
    }

    .directory-header-info .section-subtitle {
        font-size: 0.84rem;
    }
}

/* Lightbox Gallery Modal with Navigation */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.lightbox-content-box {
    position: relative;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    padding: 1.25rem;
    user-select: none;
}

.lightbox-topbar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.lightbox-title {
    font-size: 1rem;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.lightbox-counter {
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
}

.lightbox-img-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 300px;
    max-width: 100%;
    max-height: 72vh;
}

.lightbox-main-img {
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transition: opacity 0.2s ease;
}

.lightbox-category-tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    color: white;
    flex-shrink: 0;
}

.lightbox-category-tag.farm {
    background: #059669;
}

.lightbox-category-tag.product {
    background: #d97706;
}

/* Screen Fixed Left/Right Navigation Buttons */
.lightbox-screen-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100000;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.lightbox-screen-nav i {
    width: 30px;
    height: 30px;
}

.lightbox-screen-nav.prev {
    left: 2rem;
}

.lightbox-screen-nav.next {
    right: 2rem;
}

.lightbox-screen-nav:hover:not(:disabled):not(.disabled) {
    background: #10b981;
    border-color: #34d399;
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.6);
}

.lightbox-screen-nav.disabled,
.lightbox-screen-nav:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%);
    box-shadow: none;
}

.lightbox-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lightbox-close-btn:hover {
    background: var(--danger);
}

.lightbox-bottom-desc {
    margin-top: 0.75rem;
    font-size: 0.88rem;
    color: #cbd5e1;
    text-align: center;
    max-width: 90%;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 768px) {
    .lightbox-screen-nav {
        width: 44px;
        height: 44px;
    }
    .lightbox-screen-nav i {
        width: 24px;
        height: 24px;
    }
    .lightbox-screen-nav.prev {
        left: 0.75rem;
    }
    .lightbox-screen-nav.next {
        right: 0.75rem;
    }
}
