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

:root {
    --brand-green: #00ED64;
    --brand-green-dark: #00A35C;
    --brand-green-soft: #E3FCF7;
    --brand-teal-deep: #001E2B;
    --canvas: #FFFFFF;
    --surface: #F9FBFA;
    --surface-soft: #F3F5F4;
    --hairline: #E8EDEB;
    --ink: #001E2B;
    --steel: #5C6C75;
    --on-dark: #FFFFFF;
    --on-primary: #001E2B;

    --rounded-sm: 6px;
    --rounded-md: 8px;
    --rounded-lg: 12px;
    --rounded-full: 9999px;

    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;
    --spacing-hero: 120px;
}

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

body {
    font-family: 'Euclid Circular A', 'Inter', -apple-system, sans-serif;
    color: var(--ink);
    background-color: var(--surface-soft);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* Hero Section */
.hero {
    background-color: var(--brand-teal-deep);
    color: var(--on-dark);
    padding: 64px var(--spacing-lg);
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 500;
    letter-spacing: -0.5px;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    color: var(--hairline);
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Cards */
.card {
    background-color: var(--canvas);
    border-radius: var(--rounded-lg);
    border: 1px solid var(--hairline);
    padding: var(--spacing-xl);
    margin-top: -32px;
    box-shadow: rgba(0, 30, 43, 0.08) 0px 4px 12px 0px;
}

/* Buttons */
.button-primary {
    background-color: var(--brand-green);
    color: var(--on-primary);
    font-weight: 600;
    font-size: 14px;
    padding: 10px 22px;
    border-radius: var(--rounded-full);
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.button-primary:hover {
    background-color: var(--brand-green-dark);
    color: var(--on-dark);
}

.button-primary:disabled {
    background-color: var(--hairline);
    color: var(--steel);
    cursor: not-allowed;
}

.button-ghost {
    background-color: transparent;
    color: var(--ink);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: var(--rounded-md);
    border: 1px solid var(--hairline);
    cursor: pointer;
}

.button-ghost:hover {
    background-color: var(--surface);
}

/* File Upload */
.upload-area {
    border: 2px dashed var(--hairline);
    border-radius: var(--rounded-lg);
    padding: var(--spacing-xxl);
    text-align: center;
    background-color: var(--surface);
    margin-bottom: var(--spacing-xl);
    transition: border-color 0.2s ease;
}

.upload-area:hover {
    border-color: var(--brand-green-dark);
}

.upload-area input[type="file"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
    z-index: -1;
}

.upload-icon {
    font-size: 32px;
    margin-bottom: var(--spacing-md);
}

/* Table */
.data-table-wrapper {
    overflow-x: auto;
    margin-top: var(--spacing-lg);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th, .data-table td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--hairline);
}

.data-table th {
    background-color: var(--surface);
    font-weight: 500;
    color: var(--steel);
}

.data-table tr:hover td {
    background-color: var(--surface-soft);
}

/* Price Cells & Highlights */
.price-cell {
    font-weight: 500;
}

.lowest-price {
    color: var(--brand-green-dark);
    font-weight: 600;
    background-color: var(--brand-green-soft);
    padding: 4px 8px;
    border-radius: var(--rounded-sm);
}

.empty-price {
    color: var(--steel);
    font-style: italic;
}

/* Top bar */
/* Premium Navigation Bar */
.top-nav {
    background-color: var(--brand-teal-deep);
    padding: 16px 48px;
    display: flex;
    justify-content: flex-start; /* 왼쪽 정렬로 변경 */
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.logo {
    font-weight: 800;
    font-size: 22px;
    color: var(--brand-green);
    letter-spacing: -1px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 12px;
    margin-left: 40px; /* 로고 옆에 일정한 간격 추가 */
    background: rgba(255, 255, 255, 0.05);
    padding: 6px;
    border-radius: var(--rounded-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--rounded-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
    color: var(--on-primary);
    background-color: var(--brand-green);
    box-shadow: 0 4px 12px rgba(0, 237, 100, 0.3);
}

/* Enhanced Hero Section */
.hero {
    background: linear-gradient(135deg, var(--brand-teal-deep) 0%, #003045 100%);
    color: var(--on-dark);
    padding: 80px var(--spacing-lg) 120px;
    text-align: center;
}

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -1.5px;
    background: linear-gradient(to right, #FFFFFF, var(--brand-green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--spacing-md);
}

/* Card Refinement */
.card {
    background-color: var(--canvas);
    border-radius: 20px;
    border: 1px solid rgba(0, 30, 43, 0.05);
    padding: var(--spacing-xl);
    margin-top: -60px;
    box-shadow: 0 20px 40px rgba(0, 30, 43, 0.12);
}

/* Utility */
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Price Trends */
.trend-indicator {
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
    padding: 2px 5px;
    border-radius: 4px;
    display: inline-block;
    vertical-align: middle;
}
.trend-up {
    color: #ef4444;
    background-color: #fee2e2;
}
.trend-down {
    color: #22c55e;
    background-color: #dcfce7;
}

/* Wide Layout */
.container.wide {
    max-width: 100%;
    width: 98%;
}

/* Two Lines Text Truncation */
.title-two-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

/* Upload Styling */
.upload-area.dragover {
    border-color: var(--brand-green);
    background-color: var(--brand-green-soft);
}

.upload-progress {
    display: none;
    margin-top: 15px;
}

/* Hover Image Preview (600px) */
.hover-preview-container {
    position: fixed;
    display: none;
    z-index: 10000;
    pointer-events: none;
    background-color: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    box-shadow: 0 10px 30px rgba(0, 30, 43, 0.2);
    padding: 10px;
    max-width: 600px;
    width: 600px;
    transform: translate(-50%, calc(-100% - 20px));
}

.hover-preview-container img {
    width: 100%;
    height: auto;
    border-radius: var(--rounded-sm);
    display: block;
}

/* SKU List & Table Row Highlights */
.row-verified {
    background-color: rgba(0, 237, 100, 0.04) !important;
}

.row-verified:hover td {
    background-color: rgba(0, 237, 100, 0.08) !important;
}

.row-updated {
    background-color: rgba(59, 130, 246, 0.04) !important;
}

.row-updated:hover td {
    background-color: rgba(59, 130, 246, 0.08) !important;
}

.row-rithum {
    background-color: rgba(147, 51, 234, 0.04) !important;
}

.row-rithum:hover td {
    background-color: rgba(147, 51, 234, 0.08) !important;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: var(--rounded-sm);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-none {
    background-color: var(--surface-soft);
    color: var(--steel);
}

.badge-verified {
    background-color: rgba(0, 237, 100, 0.15);
    color: var(--brand-green-dark);
}

.badge-updated {
    background-color: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.badge-rithum {
    background-color: rgba(147, 51, 234, 0.15);
    color: #7e22ce;
}

/* Modal Overlay & Dialog */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 30, 43, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--canvas);
    border-radius: 20px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 30, 43, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--hairline);
    cursor: move;
    user-select: none;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--steel);
}

.modal-close:hover {
    color: var(--ink);
}

.modal-body {
    padding: 30px;
    display: flex;
    gap: 30px;
}

.modal-left {
    flex: 0.35;
    max-width: 35%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-right {
    flex: 0.65;
    max-width: 65%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-image-wrapper {
    width: 100%;
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    overflow: hidden;
    background-color: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4/3;
}

.modal-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-grid-form {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    grid-column: span 6;
}

.form-group.full-width {
    grid-column: span 12;
}

.form-group.half-width {
    grid-column: span 6;
}

.form-group.third-width {
    grid-column: span 4;
}

.form-group.quarter-width {
    grid-column: span 3;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--steel);
}

.form-group input, .form-group textarea {
    padding: 10px 14px;
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-md);
    background-color: var(--surface);
    color: var(--ink);
    font-size: 14px;
    transition: all 0.2s;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--brand-green-dark);
    background-color: var(--canvas);
    box-shadow: 0 0 0 3px rgba(0, 237, 100, 0.1);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 30px;
    border-top: 1px solid var(--hairline);
    background-color: var(--surface);
    border-radius: 0 0 20px 20px;
}

/* Thumbnail */
.sku-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: var(--rounded-sm);
    object-fit: cover;
    border: 1px solid var(--hairline);
    background-color: var(--surface);
}

/* Hoverable SKU cell */
.hoverable-sku {
    color: var(--brand-green-dark);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.hoverable-sku:hover {
    color: var(--brand-teal-deep);
}

/* Checkboxes in table */
.select-row-cb {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Modal Competitor Live Pricing Bar styling */
.modal-pricing-bar {
    padding: 15px 30px;
    border-bottom: 1px solid var(--hairline);
    background-color: var(--surface-soft);
}

.modal-pricing-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.competitor-price-card {
    background-color: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-md);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.01);
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 0; /* Prevents flex items from overflowing */
}

.competitor-price-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 30, 43, 0.08);
}

.competitor-price-card .comp-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--steel);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.competitor-price-card .comp-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}

.competitor-price-card .comp-price a {
    color: inherit;
    text-decoration: none;
    display: inline-block;
}

.competitor-price-card .comp-price a:hover {
    text-decoration: underline;
    color: var(--brand-green-dark);
}

.competitor-price-card .comp-title {
    font-size: 11px;
    color: var(--steel);
    line-height: 1.3;
    height: 30px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.competitor-price-card .lowest-highlight {
    color: var(--brand-green-dark);
    background-color: var(--brand-green-soft);
    padding: 2px 6px;
    border-radius: var(--rounded-sm);
    display: inline-block;
    font-weight: 700;
    width: fit-content;
}

