/* ========== CHIKAKUMARKET PROFILE PAGE STYLES ========== */
:root {
    --primary: #7B2CBF;
    --primary-light: #9D4EDD;
    --primary-dark: #5A189A;
    --secondary: #F77F00;
    --secondary-light: #FF9E00;
    --accent: #FCBF49;
    --violet-500: #8B5CF6;
    --violet-600: #7C3AED;
    --dark: #1A1A1A;
    --dark-light: #2D3748;
    --light: #FFFFFF;
    --gray: #718096;
    --gray-light: #E2E8F0;
    --gray-lighter: #F7FAFC;
    --success: #10B981;
    --warning: #EF4444;
    --info: #3B82F6;
    --gradient-primary: linear-gradient(135deg, #7B2CBF 0%, #9D4EDD 100%);
    --gradient-sunset: linear-gradient(135deg, #F77F00, #FCBF49);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition-normal: 250ms ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--gray-lighter);
    color: var(--dark);
    line-height: 1.5;
}

/* ========== HEADER ========== */
.profile-header {
    background: var(--light);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark);
}

.logo-tagline {
    font-size: 0.7rem;
    color: var(--gray);
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.sell-btn {
    background: var(--gradient-sunset);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-normal);
}

.sell-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-icon-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    color: var(--dark);
    transition: var(--transition-normal);
}

.nav-icon-btn:hover {
    background: var(--gray-light);
}

/* ========== MAIN CONTAINER ========== */
.profile-main {
    max-width: 1280px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Loading State */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== PROFILE HERO ========== */
.profile-hero {
    background: var(--light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.profile-cover {
    height: 150px;
    background: var(--gradient-primary);
    position: relative;
}

.cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(123,44,191,0.3), rgba(0,0,0,0.2));
}

.profile-info-wrapper {
    padding: 0 2rem 2rem;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-end;
}

.profile-avatar-container {
    position: relative;
    margin-top: -50px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    border: 4px solid var(--light);
    box-shadow: var(--shadow-md);
}

.edit-avatar-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    background: var(--light);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    color: var(--primary);
    transition: var(--transition-normal);
}

.edit-avatar-btn:hover {
    transform: scale(1.1);
}

.profile-details {
    flex: 1;
}

.profile-name-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.profile-name-section h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.edit-name-btn {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition-normal);
}

.edit-name-btn:hover {
    color: var(--primary);
}

.profile-badges {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.verified-badge {
    background: #e0f2fe;
    color: #0284c7;
}

.seller-badge {
    background: #fef3c7;
    color: #d97706;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray);
}

.profile-stats {
    display: flex;
    gap: 1.5rem;
}

.stat-card {
    text-align: center;
    padding: 0.5rem 1rem;
    background: var(--gray-lighter);
    border-radius: var(--radius-md);
    min-width: 80px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray);
}

/* ========== TABS ========== */
.profile-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--gray-light);
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    font-weight: 600;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    margin-bottom: -2px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== LISTINGS GRID ========== */
.listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.listings-header h2 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary-sm {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition-normal);
}

.btn-primary-sm:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.listing-card {
    background: var(--light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.listing-image {
    height: 180px;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 2rem;
}

.listing-info {
    padding: 1rem;
}

.listing-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.listing-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.listing-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.listing-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit, .btn-delete {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-normal);
}

.btn-edit {
    background: var(--gray-light);
    color: var(--dark);
}

.btn-delete {
    background: #fee2e2;
    color: var(--warning);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background: var(--light);
    border-radius: var(--radius-lg);
}

.empty-state i {
    font-size: 3rem;
    color: var(--gray-light);
    margin-bottom: 1rem;
}

/* ========== ACTIVITY SECTION ========== */
.activity-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.activity-card {
    background: var(--light);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.activity-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.activity-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
}

.recent-activity h3 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-feed {
    background: var(--light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.activity-item {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.activity-item i {
    width: 32px;
    color: var(--primary);
}

/* ========== SETTINGS SECTION ========== */
.settings-section {
    background: var(--light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-section h3 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group label {
    font-weight: 500;
}

.form-input {
    padding: 0.75rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-family: inherit;
    transition: var(--transition-normal);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(123,44,191,0.1);
}

.notification-option {
    margin-bottom: 1rem;
}

.switch-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.switch-label input {
    display: none;
}

.switch-slider {
    width: 48px;
    height: 24px;
    background: var(--gray-light);
    border-radius: 24px;
    position: relative;
    transition: var(--transition-normal);
}

.switch-slider::after {
    content: '';
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 4px;
    transition: var(--transition-normal);
}

.switch-label input:checked + .switch-slider {
    background: var(--primary);
}

.switch-label input:checked + .switch-slider::after {
    transform: translateX(24px);
}

.btn-primary, .btn-outline, .btn-danger {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
    margin-right: 1rem;
    margin-top: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-outline {
    background: none;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-danger {
    background: var(--warning);
    color: white;
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--dark);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-md);
}

.toast.success { background: var(--success); }
.toast.error { background: var(--warning); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .profile-main { padding: 0 1rem; }
    .profile-info-wrapper { flex-direction: column; align-items: center; text-align: center; }
    .profile-meta { justify-content: center; }
    .profile-stats { width: 100%; justify-content: center; }
    .profile-name-section { justify-content: center; }
    .listings-grid { grid-template-columns: 1fr; }
    .profile-tabs { overflow-x: auto; }
    .tab-btn { padding: 0.75rem 1rem; white-space: nowrap; }
}