* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "微软雅黑", sans-serif;
}

body {
    padding: 10px;
    background: #f5f5f5;
}
.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 搜索框+按钮 同行布局 */
.search {
    margin: 20px 0;
    text-align: center;
}

.search-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* 输入框和按钮之间的间距 */
    width: 90%;
    max-width: 500px;
    margin: 0 auto;
}

.search-wrap input {
    flex: 1; /* 输入框自动占满剩余宽度 */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.search-wrap button {
    flex-shrink: 0; /* 按钮不压缩 */
    padding: 10px 20px;
    border: none;
    background: #0088cc;
    color: #fff;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.item {
    background: #fff;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
    display: flex;
    gap: 12px;
    box-shadow: 0 1px 3px #eee;
}

.item img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.info {
    flex: 1;
}

.info h3 {
    font-size: 16px;
    margin-bottom: 6px;
}

.info h3 a {
    color: #333;
    text-decoration: none;
}

.info p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.wrapper {
    width: 100%;
    max-width: 670px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .wrapper {
        width: 670px;
    }
}

.page-nav {
    text-align: center;
    margin: 20px 0;
}

.page-nav a {
    padding: 5px 10px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
}

.page-nav span {
    padding: 5px 10px;
    margin: 0 3px;
    background: #0088cc;
    color: #fff;
    border-radius: 3px;
}

.page-info {
    margin-top: 10px;
    color: #666;
}


/* ========== 表单样式（用于 add.php 和 edit.php） ========== */
.form-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 5px;
}

.form-group label {
    display: block;
    margin: 20px 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.form-group label .required {
    color: #ff4444;
}

.form-group input:not([type="submit"]),
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group textarea {
    height: 550px;
    resize: vertical;
    font-family: monospace;
}

.help-text {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

.row {
    display: flex;
    gap: 20px;
}

.row .form-group {
    flex: 1;
}

.btn-submit {
    margin-top: 30px;
    width: 100%;
    padding: 14px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit:hover {
    background: #004999;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
        gap: 0;
    }
}

/* ========== 静态详情页样式 ========== */
.detail-container {
    max-width: 1200px;
    margin: 30px auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.detail-title {
    font-size: 32px;
    color: #1a1a2e;
    margin-bottom: 15px;
    font-weight: 600;
}

.detail-price {
    font-size: 28px;
    color: #ff6b35;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8e8e8;
    font-weight: bold;
}

.detail-location {
    background: #f0f9ff;
    padding: 12px 16px;
    margin-bottom: 25px;
    border-radius: 8px;
    color: #0066cc;
    font-size: 14px;
    border-left: 4px solid #0066cc;
}

.detail-location a {
    color: #0066cc;
    text-decoration: none;
}

.detail-location a:hover {
    text-decoration: underline;
}

.detail-content {
    line-height: 1.9;
    color: #333;
    font-size: 16px;
}

.detail-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.detail-content p {
    margin-bottom: 20px;
}

.detail-back {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    gap: 20px;
}

.detail-back a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 20px;
    transition: all 0.3s;
}

.detail-back a:hover {
    background: #0066cc;
    color: #fff;
}

@media (max-width: 768px) {
    .detail-container {
        padding: 20px;
        margin: 15px;
    }
    .detail-title {
        font-size: 24px;
    }
    .detail-price {
        font-size: 22px;
    }
}