/* ===== PC端鲜花商城 公共样式 ===== */
:root {
    --primary: #e85a71;       /* 主色 玫粉 */
    --primary-dark: #d04560;
    --accent: #d48b4a;        /* 辅助 暖金 */
    --text: #333;
    --text-light: #666;
    --text-muted: #999;
    --border: #eee;
    --bg: #f7f7f7;
    --bg-white: #fff;
    --radius: 8px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    min-width: 1024px;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
img { display: block; max-width: 100%; }
ul, li { list-style: none; }
input, button { font-family: inherit; outline: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== 顶部 topbar ===== */
.pc-topbar {
    background: #f5f5f5;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 32px; }
.topbar-right a { margin-left: 16px; color: var(--text-light); }
.topbar-right a:hover { color: var(--primary); }

/* ===== 导航栏 ===== */
.pc-navbar { background: #fff; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.navbar-inner { display: flex; align-items: center; height: 70px; gap: 30px; }
.logo { font-size: 22px; font-weight: bold; color: var(--primary); white-space: nowrap; }
.nav-menu { display: flex; gap: 8px; flex: 1; }
.nav-item {
    padding: 8px 16px; border-radius: 6px; color: var(--text);
    font-size: 15px; position: relative; transition: all .2s;
}
.nav-item:hover, .nav-item.active { background: var(--primary); color: #fff; }
.nav-cart-badge {
    position: absolute; top: 2px; right: 4px; background: #ff4d4f; color: #fff;
    font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; text-align: center;
    border-radius: 9px; padding: 0 4px;
}
.nav-search { display: flex; width: 320px; }
.nav-search input {
    flex: 1; height: 36px; padding: 0 12px; border: 2px solid var(--primary);
    border-right: none; border-radius: 18px 0 0 18px; font-size: 14px;
}
.nav-search button {
    height: 36px; padding: 0 20px; background: var(--primary); color: #fff;
    border: none; border-radius: 0 18px 18px 0; cursor: pointer; font-size: 14px;
}
.nav-search button:hover { background: var(--primary-dark); }
.nav-right { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.nav-user { color: var(--primary); font-weight: 500; }
.nav-link { color: var(--text-light); }

/* ===== 按钮 ===== */
.pc-btn {
    display: inline-block; padding: 8px 20px; border: none; border-radius: 6px;
    cursor: pointer; font-size: 14px; transition: all .2s; text-align: center;
}
.pc-btn-primary { background: var(--primary); color: #fff; }
.pc-btn-primary:hover { background: var(--primary-dark); color: #fff; }
.pc-btn-default { background: #fff; color: var(--text); border: 1px solid var(--border); }
.pc-btn-default:hover { color: var(--primary); border-color: var(--primary); }
.pc-btn-block { display: block; width: 100%; }
.pc-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ===== 卡片 ===== */
.pc-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }

/* ===== 商品网格 ===== */
.goods-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.goods-card {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    cursor: pointer; transition: transform .2s, box-shadow .2s;
}
.goods-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(232, 90, 113, 0.15); }
.goods-card .goods-img { width: 100%; height: 240px; object-fit: cover; background: #f5f5f5; }
.goods-card .goods-info { padding: 12px; }
.goods-card .goods-title { font-size: 14px; color: var(--text); height: 40px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.goods-card .goods-title:hover { color: var(--primary); }
.goods-card .goods-price { color: var(--primary); font-size: 18px; font-weight: bold; margin-top: 6px; }
.goods-card .goods-sub { color: var(--text-muted); font-size: 12px; margin-top: 2px; }

/* ===== 表单 ===== */
.form-item { margin-bottom: 18px; }
.form-item label { display: block; margin-bottom: 6px; color: var(--text-light); font-size: 14px; }
.form-item input, .form-item select, .form-item textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px;
}
.form-item input:focus, .form-item select:focus { border-color: var(--primary); }
.form-row { display: flex; gap: 12px; }
.form-row .form-item { flex: 1; }

/* ===== 分页器 ===== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 30px 0; flex-wrap: wrap; }
.page-btn {
    min-width: 36px; height: 36px; padding: 0 12px; background: #fff; border: 1px solid var(--border);
    border-radius: 4px; cursor: pointer; font-size: 13px; color: var(--text);
}
.page-btn:hover:not([disabled]) { color: var(--primary); border-color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn[disabled] { opacity: .4; cursor: not-allowed; }
.page-info { color: var(--text-muted); font-size: 13px; margin-left: 8px; }

/* ===== toast ===== */
.pc-toast {
    position: fixed; top: 40%; left: 50%; transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75); color: #fff; padding: 10px 24px; border-radius: 6px;
    font-size: 14px; z-index: 9999; opacity: 0; transition: opacity .3s; pointer-events: none;
}
.pc-toast.show { opacity: 1; }

/* ===== 弹窗 ===== */
.pc-mask {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5);
    z-index: 1000; display: flex; align-items: center; justify-content: center;
}
.pc-dialog { background: #fff; border-radius: var(--radius); min-width: 360px; max-width: 90%; overflow: hidden; }
.pc-dialog-body { padding: 24px; font-size: 15px; }
.pc-dialog-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); }

/* 通用弹窗（表单用） */
.pc-modal { background: #fff; border-radius: var(--radius); width: 480px; max-width: 90%; }
.pc-modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border); font-size: 16px; font-weight: bold; display: flex; justify-content: space-between; }
.pc-modal-close { cursor: pointer; color: var(--text-muted); font-size: 20px; line-height: 1; }
.pc-modal-body { padding: 20px; }
.pc-modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); text-align: right; }

/* ===== 空状态 ===== */
.pc-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.pc-empty .empty-icon { font-size: 60px; margin-bottom: 12px; }
.pc-empty .empty-text { font-size: 15px; margin-bottom: 16px; }

/* ===== 底部 ===== */
.pc-footer { background: #fff; border-top: 1px solid var(--border); margin-top: 40px; padding: 40px 0 20px; }
.footer-cols { display: flex; justify-content: space-around; padding-bottom: 30px; border-bottom: 1px solid var(--border); }
.footer-col h4 { font-size: 15px; margin-bottom: 12px; color: var(--text); }
.footer-col p { margin-bottom: 8px; font-size: 13px; color: var(--text-light); }
.footer-col a:hover { color: var(--primary); }
.footer-copy { text-align: center; padding-top: 20px; color: var(--text-muted); font-size: 12px; }
.footer-record { text-align: center; padding-top: 8px; color: var(--text-muted); font-size: 12px; }
.footer-record a { color: var(--text-muted); }
.footer-record a:hover { color: var(--primary); }
.footer-links { text-align: center; padding: 10px 0 20px; font-size: 14px; }
.footer-links a { color: var(--text-light); margin: 0 10px; }
.footer-links a:hover { color: var(--primary); }
.footer-links .footer-sep { color: var(--border); }

/* ===== 通用工具 ===== */
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.text-right { text-align: right; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
