/* MotoIlan - Premium Theme */

/* ============ VARIABLES ============ */
:root {
    --primary: #ff5722;
    --primary-dark: #e64a19;
    --primary-light: #ff8a65;
    --secondary: #3d2b1f;
    --secondary-light: #4e3828;
    --accent: #ffc107;
    --dark: #0f0f1a;
    --dark-card: #1e1e30;
    --text-light: #b0b3b8;
    --success: #00c853;
    --danger: #ff1744;
    --gradient-hero: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 40%, #1b2838 100%);
    --gradient-accent: linear-gradient(135deg, #ff5722, #ff9800);
    --gradient-cta: linear-gradient(135deg, #ff5722 0%, #e64a19 50%, #d84315 100%);
    --shadow-card: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.15);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 8px;
}

/* ============ GENERAL ============ */
body {
    font-family: 'Nunito', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f7;
    -webkit-font-smoothing: antialiased;
    color: #1a1a2e;
}

a { transition: all 0.25s ease; }

::selection {
    background: var(--primary);
    color: #fff;
}

/* ============ BREADCRUMB BOXES ============ */
.breadcrumb-box {
    display: inline-flex;
    align-items: center;
    background: #f0f0f3;
    border: 1px solid #e0e0e5;
    border-radius: 8px;
    padding: 0.4rem 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}
.breadcrumb-box:hover {
    background: var(--primary);
    border-color: var(--primary);
}
.breadcrumb-box:hover .breadcrumb-box-label {
    color: #fff;
}
.breadcrumb-box-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #444;
    line-height: 1.2;
}
.breadcrumb-box-active {
    background: var(--secondary);
    border-color: var(--secondary);
}
.breadcrumb-box-active .breadcrumb-box-label {
    color: #fff;
}
.breadcrumb-box + .breadcrumb-box::before {
    content: '›';
    position: absolute;
    left: -14px;
    font-size: 1.1rem;
    color: #aaa;
    font-weight: bold;
}

/* ============ UPLOAD ZONE ============ */
.upload-zone {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}
.upload-zone:hover {
    border-color: var(--primary);
    background: #fff5f2;
}
.upload-zone-drag {
    border-color: var(--primary) !important;
    background: #fff0eb !important;
    transform: scale(1.01);
}
.upload-zone-content i {
    font-size: 3rem;
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}
.upload-zone-content p {
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.25rem;
}
.upload-zone-content small {
    color: #999;
    font-size: 0.8rem;
}
.upload-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #eee;
    flex-shrink: 0;
}
.upload-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.upload-cover-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    text-align: center;
    padding: 2px 0;
    text-transform: uppercase;
}

/* ============ SEARCH HERO ============ */
.search-hero::placeholder { color: #fff; opacity: 1; }

/* ============ NAVBAR MOBILE ============ */
@media (max-width: 991.98px) {
    .navbar-collapse {
        padding: 0.5rem 0;
    }
    .navbar-collapse form {
        max-width: 100% !important;
        width: 100%;
    }
    .navbar-nav {
        gap: 0.25rem;
    }
}

/* ============ NAVBAR ============ */
.navbar {
    background: var(--secondary) !important;
    backdrop-filter: blur(20px);
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.navbar-brand {
    font-size: 1.6rem;
    letter-spacing: -0.5px;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand i {
    -webkit-text-fill-color: var(--primary);
}

.navbar .nav-link {
    color: rgba(255,255,255,0.75) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-xs);
    transition: all 0.2s;
}

.navbar .nav-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.08);
}

.navbar .btn-warning {
    background: var(--gradient-accent);
    border: none;
    font-weight: 700;
    color: #fff;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(255,87,34,0.3);
    transition: all 0.3s;
}

.navbar .btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255,87,34,0.4);
    color: #fff;
}

.navbar .dropdown-menu {
    background: var(--secondary);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.navbar .dropdown-item {
    color: rgba(255,255,255,0.8);
    border-radius: var(--radius-xs);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.navbar .dropdown-item:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.navbar .dropdown-item.text-danger {
    color: var(--danger) !important;
}

.navbar .dropdown-item.text-success {
    color: var(--success) !important;
}

.navbar .dropdown-divider {
    border-color: rgba(255,255,255,0.1);
}

.navbar .badge.bg-danger {
    background: var(--danger) !important;
    font-size: 0.65rem;
    padding: 0.2rem 0.45rem;
    border-radius: 50px;
}

/* ============ COMPACT SEARCH BAR ============ */
.compact-search .form-control,
.compact-search .form-select,
.compact-search .input-group-text {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    border-radius: var(--radius-xs);
}

.compact-search .form-control::placeholder {
    color: rgba(255,255,255,0.5);
}

.compact-search .form-control:focus,
.compact-search .form-select:focus {
    background: rgba(255,255,255,0.15);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255,87,34,0.2);
    color: #fff;
}

.compact-search .form-select option {
    background: var(--secondary);
    color: #fff;
}

/* ============ HERO ============ */
.hero-section {
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,87,34,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,193,7,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section h1 {
    font-weight: 900;
    letter-spacing: -1px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-section .lead {
    color: rgba(255,255,255,0.7);
}

.hero-section .form-control-lg,
.hero-section .form-select-lg {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 0.7rem 1.3rem;
    font-size: 0.95rem;
}

.hero-section .form-control-lg::placeholder {
    color: rgba(255,255,255,0.5);
}

.hero-section .form-control-lg:focus,
.hero-section .form-select-lg:focus {
    background: rgba(255,255,255,0.15);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,87,34,0.2);
    color: #fff;
}

.hero-section .form-select-lg option {
    background: var(--secondary);
    color: #fff;
}

.hero-section .btn-warning {
    background: var(--gradient-accent);
    border: none;
    border-radius: 50px;
    font-weight: 700;
    color: #fff;
    padding: 0.7rem 2rem;
    box-shadow: 0 4px 20px rgba(255,87,34,0.4);
}

.hero-section .btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255,87,34,0.5);
    color: #fff;
}

/* ============ CATEGORY CARDS ============ */
.category-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid rgba(0,0,0,0.04) !important;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover) !important;
}

.category-card:hover .category-icon i {
    color: var(--primary) !important;
    transform: scale(1.15);
}

.category-icon {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon i {
    transition: all 0.3s;
}

/* ============ LISTING CARDS ============ */
.listing-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.04) !important;
}

.listing-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover) !important;
}

.listing-image-wrapper {
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #e8e8e8, #f5f5f5);
    position: relative;
}

.listing-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.listing-card:hover .listing-image-wrapper img {
    transform: scale(1.08);
}

.listing-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    font-weight: 600;
}

.listing-card .card-body {
    padding: 1rem;
}

.listing-card .text-danger {
    color: var(--primary) !important;
}

/* ============ LISTING DETAIL ============ */
.listing-detail-img {
    max-height: 500px;
    object-fit: contain;
    background: var(--dark);
    border-radius: var(--radius);
}

.listing-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-xs);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}

.listing-thumb:hover,
.listing-thumb.active {
    border-color: var(--primary);
    opacity: 0.85;
}

/* ============ CARDS ============ */
.card {
    border-radius: var(--radius);
    border: none;
}

.card-header {
    font-weight: 600;
    border-radius: var(--radius) var(--radius) 0 0 !important;
}

.shadow-sm {
    box-shadow: var(--shadow-card) !important;
}

/* ============ BUTTONS ============ */
.btn {
    border-radius: var(--radius-xs);
    font-weight: 600;
    transition: all 0.25s;
    font-size: 0.9rem;
}

.btn-lg {
    border-radius: 50px;
    padding: 0.65rem 1.8rem;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255,87,34,0.3);
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
}

.btn-warning {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* ============ BANNERS ============ */
.banner-slot {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.banner-slot:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.banner-slot img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    display: block;
}

.btn-outline-warning:hover {
    color: var(--dark);
}

/* ============ FORMS ============ */
.form-control, .form-select {
    border-radius: var(--radius-xs);
    border: 1.5px solid #e0e0e0;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,87,34,0.1);
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #444;
    margin-bottom: 0.3rem;
}

/* ============ PROFILE SIDEBAR ============ */
.list-group-item {
    border: none;
    padding: 0.7rem 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.list-group-item:hover {
    background: rgba(255,87,34,0.05);
    color: var(--primary);
}

.list-group-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.list-group-item i {
    width: 20px;
    text-align: center;
    margin-right: 0.3rem;
}

/* ============ TABLES ============ */
.table th {
    color: #555;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-hover tbody tr:hover {
    background-color: rgba(255,87,34,0.03);
}

/* ============ BADGES ============ */
.badge {
    font-weight: 600;
    border-radius: 50px;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
}

/* ============ ALERTS ============ */
.alert {
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.alert-success {
    background: rgba(0,200,83,0.1);
    color: #00873e;
}

.alert-danger {
    background: rgba(255,23,68,0.1);
    color: #c41230;
}

.alert-info {
    background: rgba(255,87,34,0.08);
    color: var(--primary-dark);
    border-left: 4px solid var(--primary);
}

/* ============ PAGINATION ============ */
.page-btn {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
}

.page-btn:hover {
    background: var(--primary);
    color: #fff;
}

.page-btn.active {
    background: var(--primary);
    color: #fff;
}

.page-btn.disabled {
    color: #ccc;
    pointer-events: none;
}

/* ============ CTA SECTION ============ */
.cta-section {
    background: var(--gradient-cta);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

/* ============ FOOTER ============ */
footer {
    background: var(--dark) !important;
}

footer h5, footer h6 {
    font-weight: 700;
}

footer a {
    color: var(--text-light) !important;
    text-decoration: none;
}

footer a:hover {
    color: var(--primary) !important;
}

footer .text-muted {
    color: var(--text-light) !important;
}

footer hr {
    border-color: rgba(255,255,255,0.08);
}

/* ============ STORE PANEL ============ */
.store-stat-card {
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}

.store-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.store-stat-card:nth-child(1)::before { background: var(--primary); }
.store-stat-card:nth-child(2)::before { background: var(--success); }
.store-stat-card:nth-child(3)::before { background: #9e9e9e; }
.store-stat-card:nth-child(4)::before { background: #2196f3; }

.store-stat-card h3 {
    font-weight: 800;
    font-size: 2rem;
}

/* Store import cards */
.import-upload-zone {
    border: 2px dashed #ddd;
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    background: #fafafa;
}

.import-upload-zone:hover {
    border-color: var(--primary);
    background: rgba(255,87,34,0.02);
}

/* ============ LISTING DESCRIPTION ============ */
.listing-description {
    line-height: 1.8;
    white-space: pre-wrap;
}

/* ============ SOLD OVERLAY ============ */
.listing-card .sold-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: rgba(255,23,68,0.9);
    color: white;
    padding: 6px 24px;
    font-weight: 800;
    border-radius: 6px;
    font-size: 1.1rem;
    z-index: 2;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ============ FEATURED BORDER ============ */
.listing-card.border-warning {
    border: 2px solid var(--accent) !important;
    box-shadow: 0 4px 20px rgba(255,193,7,0.2) !important;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

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

/* Tablet */
@media (max-width: 991px) {
    .sticky-top {
        position: relative !important;
        top: auto !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .listing-image-wrapper {
        height: 160px;
    }

    .hero-section {
        padding: 2rem 0 !important;
    }

    .hero-section h1 {
        font-size: 1.6rem;
    }

    .hero-section .lead {
        font-size: 0.95rem;
    }

    .hero-section .form-control-lg,
    .hero-section .form-select-lg,
    .hero-section .btn-lg {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }

    .listing-detail-img {
        max-height: 300px;
    }

    .navbar-nav .btn {
        margin: 5px 0;
    }

    .col-lg-3 .card-body {
        max-height: none;
    }

    footer { padding: 2rem 0 !important; }
    footer .row > div { margin-bottom: 1rem; }
}

/* Small Mobile */
@media (max-width: 576px) {
    .container { padding-left: 12px; padding-right: 12px; }

    .listing-image-wrapper {
        height: 130px;
    }

    .listing-card .card-body {
        padding: 0.6rem;
    }

    .listing-card .fs-5 {
        font-size: 0.95rem !important;
    }

    .listing-card .small {
        font-size: 0.7rem;
    }

    .hero-section .row > div {
        margin-bottom: 0.25rem;
    }

    h1 { font-size: 1.4rem; }
    h2 { font-size: 1.3rem; }
    h4 { font-size: 1.1rem; }

    .category-icon { height: 50px; }
    .category-icon .display-4 { font-size: 2rem !important; }

    .card.sticky-top { margin-bottom: 1rem; }

    .store-stat-card h3 { font-size: 1.5rem; }
}

/* ============ ANIMATIONS ============ */
html { scroll-behavior: smooth; }

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

.listing-card { animation: fadeInUp 0.4s ease-out; }
.category-card { animation: fadeInUp 0.3s ease-out; }

/* WhatsApp button */
.btn-success i.bi-whatsapp { font-size: 1.1em; }

/* ============ UTILITY ============ */
.text-gradient {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-dark-custom {
    background: var(--secondary);
}
