/* Facebook-like Mobile App Styling */

:root {
    --fb-blue: #1877f2;
    --fb-dark-blue: #166fe5;
    --fb-gray: #f0f2f5;
    --fb-dark-gray: #65676b;
    --fb-text: #050505;
    --fb-border: #ccd0d5;
    --fb-white: #ffffff;
    --fb-green: #42b72a;
    --fb-red: #e41e3f;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--fb-gray);
    color: var(--fb-text);
    margin: 0;
    padding: 0;
    line-height: 1.34;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

/* Remove underlines from all links */
a {
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: none;
}

/* Remove bullets from all lists */
ul, ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Navigation Bar - Facebook Style */
.navbar {
    background-color: var(--fb-white);
    border-bottom: 1px solid var(--fb-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    min-height: 50px;
    margin-bottom: 0;
}

.navbar .container {
    padding: 0 16px;
}

.navbar-header {
    height: 50px;
    display: flex;
    align-items: center;
}

.navbar-brand {
    color: var(--fb-blue) !important;
    font-weight: 700;
    font-size: 20px;
    padding: 12px 0 !important;
    height: 50px;
    line-height: 26px;
    display: flex;
    align-items: center;
}

.navbar-nav {
    margin: 0;
    list-style: none;
    padding: 0;
}

.navbar-nav > li {
    float: left;
    list-style: none;
}

.navbar-nav > li > a {
    color: var(--fb-text) !important;
    font-weight: 600;
    padding: 14px 16px !important;
    border-radius: 8px;
    transition: background-color 0.2s;
    line-height: 22px;
    text-decoration: none !important;
}

.navbar-nav > li > a:hover,
.navbar-nav > li > a:focus {
    text-decoration: none !important;
}

.navbar-nav > li > a:hover {
    background-color: var(--fb-gray) !important;
}

.navbar-toggle {
    border: none;
    margin: 8px 0;
    padding: 9px 10px;
    background-color: transparent;
    float: right;
    display: block;
}

.navbar-toggle:hover,
.navbar-toggle:focus {
    background-color: var(--fb-gray) !important;
    outline: none;
}

.navbar-toggle .icon-bar {
    background-color: var(--fb-text);
    width: 22px;
    height: 2px;
    border-radius: 1px;
    display: block;
    margin: 4px 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.navbar-collapse {
    border-top: 1px solid var(--fb-border);
    padding: 0;
    clear: both;
}

.navbar-collapse.collapse {
    display: none !important;
}

.navbar-collapse.collapse.in {
    display: block !important;
}

@media (min-width: 769px) {
    .navbar-collapse {
        display: block !important;
        height: auto !important;
        padding-bottom: 0;
        overflow: visible !important;
        border-top: none;
    }
    
    .navbar-toggle {
        display: none !important;
    }
    
    .navbar-nav {
        float: left;
    }
    
    .navbar-nav > li {
        float: left;
    }
}

/* Main Container */
.container {
    max-width: 1400px;
    padding: 0 20px;
    margin: 0 auto;
}

.body-content {
    padding: 0;
    max-width: 100%;
    margin-top: 50px;
}

.main-content {
    max-width: 1400px;
    margin: 50px auto 0;
    padding: 16px 24px;
    width: 100%;
    box-sizing: border-box;
}

/* Cards - Facebook Style */
.card {
    background-color: var(--fb-white);
    border: 1px solid var(--fb-border);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.card-body {
    padding: 16px;
}

/* Page Header */
.page-header {
    background-color: var(--fb-white);
    border-bottom: 1px solid var(--fb-border);
    padding: 16px;
    margin: 0 0 16px 0;
}

.page-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--fb-text);
}

/* Buttons - Facebook Style */
.btn {
    border-radius: 6px;
    font-weight: 600;
    padding: 8px 16px;
    border: none;
    transition: all 0.2s;
    font-size: 15px;
}

.btn-primary {
    background-color: var(--fb-blue);
    color: var(--fb-white);
}

.btn-primary:hover {
    background-color: var(--fb-dark-blue);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-default {
    background-color: var(--fb-gray);
    color: var(--fb-text);
    border: 1px solid var(--fb-border);
}

.btn-default:hover {
    background-color: #e4e6eb;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

/* Forms - Facebook Style */
.form-control {
    border: 1px solid var(--fb-border);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 15px;
    background-color: var(--fb-white);
    color: var(--fb-text);
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--fb-blue);
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.1);
}

.form-group {
    margin-bottom: 16px;
}

.control-label {
    font-weight: 600;
    color: var(--fb-text);
    margin-bottom: 6px;
    display: block;
}

/* Input Groups */
.input-group-addon {
    background-color: var(--fb-gray);
    border: 1px solid var(--fb-border);
    color: var(--fb-text);
    border-radius: 6px 0 0 6px;
}

.input-group .form-control {
    border-radius: 0 6px 6px 0;
}

/* Panels - Facebook Style */
.panel {
    background-color: var(--fb-white);
    border: 1px solid var(--fb-border);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.panel-heading {
    background-color: var(--fb-white);
    border-bottom: 1px solid var(--fb-border);
    padding: 12px 16px;
    border-radius: 8px 8px 0 0;
}

.panel-heading h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--fb-text);
}

.panel-body {
    padding: 16px;
}

/* Alerts - Facebook Style */
.alert {
    border-radius: 8px;
    border: none;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 15px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

/* Tables - Facebook Style */
.table {
    background-color: var(--fb-white);
    border-radius: 8px;
    overflow: hidden;
}

.table > thead > tr > th {
    background-color: var(--fb-gray);
    border-bottom: 2px solid var(--fb-border);
    font-weight: 600;
    color: var(--fb-text);
    padding: 12px;
}

.table > tbody > tr {
    border-bottom: 1px solid var(--fb-border);
}

.table > tbody > tr:hover {
    background-color: var(--fb-gray);
}

.table > tbody > tr > td {
    padding: 12px;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: var(--fb-white);
}

.table-striped > tbody > tr:nth-of-type(even) {
    background-color: var(--fb-gray);
}

/* Labels - Facebook Style */
.label {
    border-radius: 4px;
    padding: 4px 8px;
    font-weight: 600;
    font-size: 12px;
}

.label-success {
    background-color: var(--fb-green);
    color: var(--fb-white);
}

/* Auction Item Cards */
.auction-card {
    background-color: var(--fb-white);
    border: 1px solid var(--fb-border);
    border-radius: 8px;
    margin-bottom: 0;
    overflow: hidden;
    transition: all 0.2s;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.auction-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.auction-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--fb-gray);
}

.auction-card-body {
    padding: 12px;
}

.auction-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--fb-text);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.auction-title a {
    color: var(--fb-text);
    text-decoration: none;
}

.auction-title a:hover {
    color: var(--fb-blue);
    text-decoration: none;
}

.auction-description {
    color: var(--fb-dark-gray);
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.auction-description * {
    display: inline;
    margin: 0;
    padding: 0;
}

.auction-description br {
    display: block;
    content: "";
    margin-top: 0.5em;
}

.auction-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--fb-border);
    margin-top: 12px;
}

.auction-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--fb-blue);
}

.auction-reserve {
    font-size: 13px;
    color: var(--fb-dark-gray);
}

.auction-time {
    font-size: 13px;
    color: var(--fb-dark-gray);
}

/* Footer */
.footer {
    background-color: var(--fb-white);
    border-top: 1px solid var(--fb-border);
    padding: 24px 16px;
    margin-top: 32px;
    text-align: center;
    color: var(--fb-dark-gray);
    font-size: 13px;
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
    .container {
        padding: 0;
    }

    .body-content {
        padding: 0;
        margin-top: 50px;
    }

    .page-header {
        padding: 12px;
        margin: 0 0 12px 0;
    }

    .page-header h2 {
        font-size: 18px;
    }

    .card-body,
    .panel-body {
        padding: 12px;
    }

    .auction-image {
        height: 180px;
    }

    .btn-lg {
        padding: 10px 20px;
        font-size: 15px;
    }

    .navbar-brand {
        font-size: 18px;
    }

    .navbar-toggle {
        display: block !important;
    }

    .navbar-nav {
        float: none !important;
        margin: 0;
    }

    .navbar-nav > li {
        float: none;
        border-bottom: 1px solid var(--fb-border);
    }

    .navbar-nav > li:last-child {
        border-bottom: none;
    }

    .navbar-nav > li > a {
        padding: 12px 16px !important;
        border-radius: 0;
    }

    .navbar-collapse {
        background-color: var(--fb-white);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        margin-top: 0;
    }
    
    .navbar-collapse.collapse:not(.in) {
        display: none !important;
    }
    
    .navbar-collapse.collapse.in {
        display: block !important;
    }
}

/* Grid System */
.row {
    margin: 0 -8px;
    display: flex;
    flex-wrap: wrap;
}

.col-lg-4,
.col-md-4,
.col-md-6,
.col-md-8,
.col-md-12,
.col-sm-6,
.col-xs-12 {
    padding: 0 8px;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.col-lg-4 {
    width: 33.333333%;
}

.col-md-6 {
    width: 50%;
}

.col-md-4 {
    width: 33.333333%;
}

.col-md-8 {
    width: 66.666667%;
}

.col-md-12 {
    width: 100%;
}

.col-sm-6 {
    width: 50%;
}

.col-xs-12 {
    width: 100%;
}

@media (max-width: 992px) {
    .col-lg-4 {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .row {
        margin: 0 -4px;
    }
    
    .col-lg-4,
    .col-md-4,
    .col-md-6,
    .col-sm-6 {
        width: 100%;
        padding: 0 4px;
    }
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.image-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--fb-border);
}

/* Form Styling */
.form-horizontal .form-group {
    margin-left: 0;
    margin-right: 0;
}

.form-horizontal .control-label {
    text-align: left;
    margin-bottom: 6px;
}

/* Checkbox Styling */
.checkbox label {
    font-weight: normal;
    cursor: pointer;
}

.checkbox input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

/* File Upload Styling */
input[type="file"] {
    padding: 8px;
    border: 1px dashed var(--fb-border);
    border-radius: 6px;
    background-color: var(--fb-gray);
    width: 100%;
}

input[type="file"]:hover {
    border-color: var(--fb-blue);
    background-color: #f0f2f5;
}

/* Text Muted */
.text-muted {
    color: var(--fb-dark-gray);
    font-size: 13px;
}

/* Help Block */
.help-block {
    font-size: 13px;
    color: var(--fb-dark-gray);
    margin-top: 4px;
}

/* Validation Messages */
.text-danger {
    color: var(--fb-red);
    font-size: 13px;
    margin-top: 4px;
    display: block;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Smooth Transitions */
* {
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

/* Remove Bootstrap Defaults */
.navbar-inverse {
    background-color: var(--fb-white);
    border-color: var(--fb-border);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--fb-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--fb-dark-gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8a8d91;
}
