/* ========================================
   SELLCRAFT - FULL WEBSITE
   ======================================== */

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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-100);
    color: var(--gray-900);
    line-height: 1.5;
    min-height: 100vh;
}

/* ========================================
   NAVIGATION
   ======================================== */

.top-nav {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.4rem;
    font-weight: 700;
}

.logo-sell {
    color: var(--primary);
}

.logo-craft {
    color: var(--gray-900);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* ========================================
   MAIN LAYOUT
   ======================================== */

.main-content {
    min-height: calc(100vh - 64px);
}

.content-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 380px;
    min-height: calc(100vh - 64px);
}

/* ========================================
   LEFT COLUMN - FORM
   ======================================== */

.form-column {
    padding: 32px;
    background: #fff;
    border-right: 1px solid var(--gray-200);
}

.form-header {
    margin-bottom: 32px;
}

.form-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.form-header p {
    color: var(--gray-500);
    font-size: 0.95rem;
}

.listing-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label,
.upload-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
}

.required {
    color: var(--danger);
}

.optional {
    color: var(--gray-400);
    font-weight: 400;
}

.photo-count {
    font-weight: 400;
    color: var(--gray-400);
}

.form-input {
    padding: 12px 14px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--gray-900);
    background: #fff;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
    min-height: 120px;
}

.form-input.small {
    min-height: 80px;
}

.form-input::placeholder {
    color: var(--gray-400);
}

.form-input:hover {
    border-color: var(--gray-400);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Upload Zone */
.upload-zone {
    position: relative;
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--gray-50);
    margin-top: 8px;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.02);
}

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-icon-wrap {
    margin-bottom: 12px;
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--gray-400);
}

.upload-zone:hover .upload-icon {
    color: var(--primary);
}

.upload-text {
    font-size: 0.95rem;
    color: var(--gray-600);
}

.upload-text span {
    color: var(--primary);
    font-weight: 500;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-top: 4px;
}

/* Preview Grid */
.preview-grid {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.preview-item:hover .preview-remove {
    opacity: 1;
}

/* Submit Button */
.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    align-self: flex-start;
}

.submit-btn:hover {
    background: var(--primary-dark);
}

/* ========================================
   RIGHT COLUMN - SIDEBAR
   ======================================== */

.sidebar-column {
    padding: 32px 24px;
    background: var(--gray-50);
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Highlight Card */
.tip-card.highlight {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: #fff;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.tip-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.tip-card.highlight h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.tip-card.highlight p {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.5;
}

/* Tips Section */
.tips-section,
.features-section {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid var(--gray-200);
}

.tips-section h3,
.features-section h3,
.result-block h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 16px;
}

.tip-item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.tip-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tip-item:first-of-type {
    padding-top: 0;
}

.tip-num {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tip-item strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.tip-item p {
    font-size: 0.8rem;
    color: var(--gray-500);
    line-height: 1.4;
}

/* Features Grid */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-700);
}

.feature-item svg {
    color: var(--primary);
    flex-shrink: 0;
}

/* ========================================
   RESULTS
   ======================================== */

.result-header {
    margin-bottom: 20px;
}

.result-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #dcfce7;
    color: var(--success);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.result-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.result-block {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--gray-200);
}

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

.copy-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--gray-100);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--gray-200);
}

.copy-btn.copied {
    background: var(--success);
    color: #fff;
}

.listing-text {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--gray-700);
    white-space: pre-wrap;
    padding: 14px;
    background: var(--gray-50);
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.card-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.card-item img {
    width: 100%;
    height: auto;
    display: block;
}

.card-label {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--primary);
    color: #fff;
    padding: 2px 8px;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 4px;
}

.card-download {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.card-item:hover .card-download {
    opacity: 1;
}

.new-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary);
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.new-btn:hover {
    background: var(--gray-50);
    border-color: var(--primary);
}

/* ========================================
   LOADING
   ======================================== */

.loading-wrap {
    text-align: center;
    padding: 60px 20px;
}

.loader {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
}

.loader-ring {
    width: 100%;
    height: 100%;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-wrap h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 6px;
}

.loading-wrap p {
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* ========================================
   ERROR
   ======================================== */

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--danger);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-message::before {
    content: '!';
    width: 20px;
    height: 20px;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .content-container {
        grid-template-columns: 1fr;
    }

    .sidebar-column {
        position: static;
        height: auto;
        border-left: none;
        border-top: 1px solid var(--gray-200);
    }

    .form-column {
        border-right: none;
    }
}

@media (max-width: 600px) {
    .nav-container {
        padding: 0 16px;
    }

    .nav-links {
        display: none;
    }

    .form-column {
        padding: 24px 16px;
    }

    .sidebar-column {
        padding: 24px 16px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .cards-grid {
        grid-template-columns: 1fr 1fr;
    }
}
