/* Portal Iklan - Main Stylesheet */

:root {
    /* Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    
    /* Neutrals */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--gray-900);
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    color: var(--gray-600) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius);
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary) !important;
    background-color: rgba(99, 102, 241, 0.1);
}

.btn-login {
    background: var(--gradient-primary);
    color: white !important;
    border: none;
    padding: 0.5rem 1.5rem !important;
    border-radius: var(--radius-lg);
    font-weight: 600;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-hero);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* Search Box */
.search-box {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
}

.search-input {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    outline: none;
}

.btn-search {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: var(--transition);
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* Categories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.category-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--gray-100);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.category-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.category-name {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.category-count {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 0.25rem;
}

/* Ad Cards */
.ad-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--gray-100);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ad-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.ad-card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--gray-100);
}

.ad-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ad-card:hover .ad-card-image img {
    transform: scale(1.05);
}

.ad-card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
}

.ad-card-bookmark {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
}

.ad-card-bookmark:hover {
    background: var(--danger);
    color: white;
}

.ad-card-bookmark.active {
    background: var(--danger);
    color: white;
}

.ad-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ad-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ad-card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.ad-card-location {
    font-size: 0.875rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: auto;
}

.ad-card-time {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 0.5rem;
}

/* Hashtags */
.hashtag {
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-2xl);
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0.25rem;
    transition: var(--transition-fast);
}

.hashtag:hover {
    background: var(--primary);
    color: white;
}

/* Section */
.section {
    padding: 3rem 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--gray-500);
    margin-bottom: 2rem;
}

/* Buttons */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--gradient-primary);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Forms */
.form-control, .form-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    transition: var(--transition-fast);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* Cards */
.card {
    background: white;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.card-header {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

/* Sidebar */
.sidebar-widget {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-100);
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-title {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-400);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: center;
    color: var(--gray-500);
}

/* Pagination */
.pagination {
    gap: 0.5rem;
}

.page-link {
    border: none;
    border-radius: var(--radius) !important;
    padding: 0.5rem 1rem;
    color: var(--gray-600);
}

.page-link:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.page-item.active .page-link {
    background: var(--primary);
    color: white;
}

/* Loading */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-section {
        padding: 2.5rem 0;
    }
    
    .search-box {
        padding: 1rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .category-card {
        padding: 1rem 0.5rem;
    }
    
    .category-icon {
        font-size: 1.5rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

/* Ad Detail Page */
.ad-gallery {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--gray-100);
}

.ad-gallery-main {
    aspect-ratio: 16/10;
}

.ad-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--gray-900);
}

.ad-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    overflow-x: auto;
    background: white;
}

.ad-gallery-thumb {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.ad-gallery-thumb:hover,
.ad-gallery-thumb.active {
    border-color: var(--primary);
}

.ad-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.seller-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.seller-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-light);
}

.seller-name {
    font-weight: 600;
    font-size: 1.125rem;
}

.seller-since {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Status badges */
.badge-status {
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-2xl);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-pending { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-sold { background: rgba(99, 102, 241, 0.1); color: var(--primary); }
.badge-expired { background: rgba(100, 116, 139, 0.1); color: var(--secondary); }
.badge-rejected { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--gray-500);
}

/* Modal improvements */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--gray-100);
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--gray-100);
    padding: 1rem 1.5rem;
}

/* File upload */
.file-upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    background: var(--gray-50);
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.file-upload-icon {
    font-size: 2.5rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

/* Price display */
.price-display {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.price-negotiable {
    font-size: 0.875rem;
    color: var(--success);
    font-weight: 500;
}
