/**
 * 知其然亲子研学 - PC 桌面端样式
 * 依赖 /h5/assets/css/style.css 提供的 CSS 变量（--primary 等）与基础组件（toast/loader/confirm）
 * 桌面端布局：顶栏 + 导航 + 居中内容区(1200px) + 页脚
 */

body {
    background: #f5f6f8;
}

/* 覆盖 H5 移动端「最小 44px 触控目标」，桌面端导航/链接恢复正常高度 */
.pc-nav a, .pc-topbar a, .pc-action, .pc-user-avatar, .pc-topbar .pc-search button {
    min-height: 0;
    min-width: 0;
}

/* 桌面端恢复细滚动条（H5 全局隐藏了滚动条） */
::-webkit-scrollbar { display: block; width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 4px; }

/* ==================== 顶栏 ==================== */
.pc-topbar {
    background: linear-gradient(135deg, #FF6B35 0%, #E55A28 100%);
    color: #fff;
}
.pc-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0 20px;
    gap: 24px;
}
.pc-logo {
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    text-decoration: none;
}
.pc-logo:hover { color: #fff; opacity: .92; }
.pc-search {
    flex: 1;
    display: flex;
    max-width: 560px;
}
.pc-search input {
    flex: 1;
    height: 38px;
    border: none;
    border-radius: 19px 0 0 19px;
    padding: 0 16px;
    font-size: 14px;
    outline: none;
    color: #333;
    min-height: 0;
}
.pc-search button {
    height: 38px;
    border: none;
    border-radius: 0 19px 19px 0;
    padding: 0 22px;
    background: #fff;
    color: #FF6B35;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
}
.pc-search button:hover { background: #ffe9de; }
.pc-topbar-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    white-space: nowrap;
}
.pc-action {
    color: #fff;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    position: relative;
    text-decoration: none;
    cursor: pointer;
}
.pc-action:hover { color: #fff; opacity: .9; }
.pc-badge {
    position: absolute;
    top: -9px;
    right: -11px;
    background: #fff;
    color: #FF6B35;
    font-size: 11px;
    min-width: 17px;
    height: 17px;
    line-height: 17px;
    text-align: center;
    border-radius: 9px;
    padding: 0 4px;
    font-weight: bold;
}
.pc-user-box { display: inline-flex; align-items: center; gap: 8px; }
.pc-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 16px;
}
.pc-user-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ==================== 导航 ==================== */
.pc-nav {
    background: #fff;
    border-bottom: 1px solid #eee;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.pc-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    padding: 0 20px;
    overflow-x: auto;
}
.pc-nav a {
    display: inline-block;
    padding: 14px 18px;
    color: #333;
    font-size: 15px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    text-decoration: none;
}
.pc-nav a:hover { color: #FF6B35; }
.pc-nav a.active {
    color: #FF6B35;
    border-bottom-color: #FF6B35;
    font-weight: bold;
}

/* ==================== 主内容 ==================== */
.pc-main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    min-height: 60vh;
}

/* ==================== 页脚 ==================== */
.pc-footer {
    background: #fff;
    border-top: 1px solid #eee;
    margin-top: 40px;
    padding: 26px 20px 32px;
    text-align: center;
    color: #999;
    font-size: 13px;
    line-height: 2;
}
.pc-footer a { color: #999; text-decoration: none; }
.pc-footer a:hover { color: #FF6B35; }
.pc-footer-links { margin-bottom: 6px; }
.pc-footer-links a { margin: 0 10px; }

/* ==================== 通用组件 ==================== */
.pc-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    overflow: hidden;
}
.pc-card + .pc-card { margin-top: 16px; }
.pc-card-pad { padding: 20px; }
.pc-page-title {
    font-size: 20px;
    font-weight: bold;
    margin: 8px 0 16px;
    color: #333;
}
.pc-section-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pc-section-more { font-size: 13px; color: #999; cursor: pointer; font-weight: normal; }
.pc-section-more:hover { color: #FF6B35; }

.pc-empty { text-align: center; padding: 60px 20px; color: #999; }
.pc-empty .icon { font-size: 52px; margin-bottom: 14px; }
.pc-empty p { font-size: 14px; }

.pc-load-more { text-align: center; padding: 16px; color: #999; font-size: 13px; }

/* 桌面端按钮 */
.pc-btn {
    display: inline-block;
    padding: 9px 22px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    border: none;
    cursor: pointer;
    min-height: 0;
}
.pc-btn-primary { background: #FF6B35; color: #fff; }
.pc-btn-primary:hover { background: #E55A28; color: #fff; }
.pc-btn-outline { background: #fff; border: 1px solid #FF6B35; color: #FF6B35; }
.pc-btn-outline:hover { background: #fff4ef; }
.pc-btn-ghost { background: #fff; border: 1px solid #ddd; color: #666; }
.pc-btn-ghost:hover { color: #FF6B35; border-color: #FF6B35; }
.pc-btn-block { display: block; width: 100%; }
.pc-btn-sm { padding: 5px 14px; font-size: 13px; }
.pc-btn-lg { padding: 12px 30px; font-size: 16px; }

/* 桌面端商品网格（4 列，响应式递减） */
.pc-goods-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.pc-goods-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: transform .2s ease, box-shadow .2s ease;
}
.pc-goods-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.pc-goods-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #f5f5f5; }
.pc-goods-info { padding: 12px; }
.pc-goods-name {
    font-size: 14px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 20px;
    min-height: 40px;
}
.pc-goods-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.pc-goods-price { color: #FF6B35; font-size: 17px; font-weight: bold; }
.pc-goods-price::before { content: '¥'; font-size: 12px; }
.pc-goods-sales { font-size: 12px; color: #999; }

/* 桌面端订单项 */
.pc-order-item { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 16px; overflow: hidden; }
.pc-order-head { padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f5f5f5; font-size: 13px; color: #666; }
.pc-order-status { color: #FF6B35; font-weight: bold; }
.pc-order-status.gray { color: #999; font-weight: normal; }
.pc-order-goods { padding: 16px 20px; }
.pc-order-goods-row { display: flex; align-items: center; padding: 6px 0; }
.pc-order-goods-img { width: 64px; height: 64px; border-radius: 4px; object-fit: cover; margin-right: 12px; background: #f5f5f5; }
.pc-order-goods-info { flex: 1; }
.pc-order-goods-name { font-size: 14px; color: #333; }
.pc-order-goods-spec { font-size: 12px; color: #999; margin-top: 4px; }
.pc-order-goods-price { color: #333; font-size: 14px; }
.pc-order-foot { padding: 12px 20px; text-align: right; border-top: 1px solid #f5f5f5; }
.pc-order-total { font-size: 14px; color: #333; margin-bottom: 8px; }
.pc-order-total strong { color: #FF6B35; font-size: 18px; }

/* 桌面端表单行 */
.pc-form-row { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid #f5f5f5; }
.pc-form-row:last-child { border-bottom: none; }
.pc-form-label { width: 90px; font-size: 14px; color: #666; flex-shrink: 0; }
.pc-form-input {
    flex: 1;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 9px 12px;
    font-size: 14px;
    outline: none;
    min-height: 0;
}
.pc-form-input:focus { border-color: #FF6B35; }
.pc-form-textarea {
    flex: 1;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 9px 12px;
    font-size: 14px;
    outline: none;
    resize: vertical;
    min-height: 90px;
}

/* 标签 / 徽章 */
.pc-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}
.pc-tag-orange { background: #fff4ef; color: #FF6B35; }
.pc-tag-green { background: #f0f9eb; color: #52c41a; }
.pc-tag-gray { background: #f5f5f5; color: #999; }
.pc-tag-red { background: #fef0f0; color: #f5222d; }

/* 弹层 */
.pc-mask { position: fixed; left: 0; top: 0; right: 0; bottom: 0; background: rgba(0,0,0,.45); z-index: 900; }
.pc-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    z-index: 901;
    width: 480px;
    max-width: 92vw;
    max-height: 84vh;
    overflow-y: auto;
}
.pc-modal-title { font-size: 16px; font-weight: bold; padding: 16px 20px; border-bottom: 1px solid #f0f0f0; position: relative; }
.pc-modal-close { position: absolute; right: 12px; top: 12px; background: none; border: none; font-size: 22px; color: #999; cursor: pointer; }
.pc-modal-body { padding: 20px; }

/* 两列布局（详情页等） */
.pc-two-col { display: flex; gap: 20px; align-items: flex-start; }
.pc-two-col .col-left { flex-shrink: 0; }
.pc-two-col .col-right { flex: 1; min-width: 0; }

/* 分页器 */
.pc-pagination { display: flex; justify-content: center; gap: 8px; padding: 20px 0; align-items: center; }
.pc-pagination .pc-page-btn {
    min-width: 36px;
    height: 36px;
    line-height: 36px;
    padding: 0 10px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 14px;
}
.pc-pagination .pc-page-btn:hover { border-color: #FF6B35; color: #FF6B35; }
.pc-pagination .pc-page-btn.active { background: #FF6B35; border-color: #FF6B35; color: #fff; }
.pc-pagination .pc-page-btn.disabled { color: #ccc; cursor: not-allowed; }
.pc-pagination .pc-page-info { font-size: 13px; color: #999; }

/* 响应式 */
@media screen and (max-width: 900px) {
    .pc-goods-grid { grid-template-columns: repeat(3, 1fr); }
    .pc-topbar-inner { gap: 14px; }
}
@media screen and (max-width: 640px) {
    .pc-goods-grid { grid-template-columns: repeat(2, 1fr); }
    .pc-search { display: none; }
    .pc-two-col { flex-direction: column; }
    .pc-topbar-inner { height: 54px; }
}
