/* 全局重置与防溢出 */
* { box-sizing: border-box; margin: 0; padding: 0; min-width: 0; }
body.crab-body { background-color: #ffffff; color: #333333; font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif; overflow-x: hidden; width: 100%; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* 容器与顶部区域 */
.crab-container { max-width: 1200px; margin: 0 auto; padding: 0 15px; width: 100%; }
.crab-topbar { background-color: #fafafa; border-bottom: 1px solid #f0f0f0; color: #777; font-size: 12px; padding: 10px 0; }
.crab-topbar-wrap { display: flex; justify-content: space-between; align-items: center; }

/* 头部 Header */
.crab-header { padding: 25px 0; }
.crab-header-wrap { display: flex; justify-content: space-between; align-items: center; }
.crab-logo { font-size: 28px; font-weight: 900; color: #e83e8c; display: flex; align-items: center; gap: 8px; }
.crab-logo img { max-height: 40px; }
.crab-search-form { display: flex; border: 1px solid #ddd; border-radius: 30px; overflow: hidden; height: 40px; width: 400px; }
.crab-search-input { border: none; outline: none; padding: 0 20px; flex-grow: 1; font-size: 13px; }
.crab-search-btn { background: #fff; border: none; padding: 0 15px; cursor: pointer; color: #e83e8c; font-size: 16px; }
.crab-header-icons { display: flex; gap: 20px; font-size: 20px; color: #333; align-items: center; }
.crab-cart-icon { position: relative; }
.crab-cart-badge { position: absolute; top: -5px; right: -8px; background: #e83e8c; color: #fff; font-size: 10px; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }

/* 导航栏 */
.crab-navbar { border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; }
.crab-nav { display: flex; justify-content: center; list-style: none; }
.crab-nav-item a { display: block; padding: 15px 25px; font-size: 14px; font-weight: 600; color: #333; text-transform: uppercase; transition: color 0.3s; }
.crab-nav-item a:hover, .crab-nav-item.active a { color: #e83e8c; }

/* 通知与标题 */
.crab-notice { background: #fdf5f6; border-left: 4px solid #e83e8c; padding: 12px 20px; font-size: 14px; color: #555; margin: 20px auto; border-radius: 4px; }
.crab-sec-title { text-align: center; font-size: 28px; font-weight: 900; color: #111; margin: 60px 0 40px; text-transform: capitalize; }

/* 按钮 */
.crab-btn-dark { background: #111; color: #fff; padding: 12px 30px; border-radius: 30px; font-size: 14px; font-weight: bold; display: inline-block; border: none; cursor: pointer; transition: 0.3s; }
.crab-btn-dark:hover { background: #e83e8c; }

/* 方框一：巨幕 */
.crab-hero-sec { background-color: #f7e6e5; border-radius: 12px; margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 0 60px; min-height: 450px; overflow: hidden; position: relative; }
.crab-hero-content { z-index: 2; padding: 40px 0; }
.crab-hero-title { font-size: 54px; font-weight: 900; color: #111; line-height: 1.1; margin-bottom: 15px; }
.crab-hero-subtitle { font-size: 24px; color: #333; margin-bottom: 30px; }
.crab-hero-img { position: absolute; right: 0; bottom: 0; max-height: 120%; object-fit: contain; z-index: 1; transform: translateX(10%); }
@media (max-width: 768px) {
    .crab-hero-sec { grid-template-columns: 1fr; padding: 40px 20px; text-align: center; }
    .crab-hero-img { position: relative; transform: none; max-height: 250px; margin: 0 auto; }
}

/* 服务条 */
.crab-service-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 40px 0; border-bottom: 1px solid #f0f0f0; margin-bottom: 40px; }
@media(max-width: 768px) { .crab-service-bar { grid-template-columns: repeat(2, 1fr); } }
.crab-service-item { display: flex; align-items: center; gap: 15px; justify-content: center; }
.crab-service-icon { font-size: 30px; color: #111; }
.crab-service-text h4 { font-size: 15px; font-weight: bold; color: #111; margin-bottom: 4px; }
.crab-service-text p { font-size: 12px; color: #888; }

/* 方框二：异形环绕矩阵 */
.crab-topsale-wrap { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 30px; align-items: center; margin-bottom: 60px; }
@media(max-width: 992px) { .crab-topsale-wrap { grid-template-columns: 1fr; } }
.crab-ts-col { display: flex; flex-direction: column; gap: 40px; }
.crab-ts-item { display: flex; align-items: center; gap: 20px; transition: 0.3s; }
.crab-ts-item:hover { transform: translateY(-3px); }
.crab-ts-img { width: 80px; height: 80px; object-fit: contain; background: #fafafa; border-radius: 50%; padding: 10px; }
.crab-ts-info { flex-grow: 1; }
.crab-ts-info h4 { font-size: 16px; font-weight: bold; color: #111; margin-bottom: 5px; }
.crab-ts-info p { font-size: 12px; color: #888; }
.crab-ts-left .crab-ts-item { flex-direction: row; text-align: right; }
.crab-ts-right .crab-ts-item { flex-direction: row-reverse; text-align: left; }
.crab-ts-center { text-align: center; }
.crab-ts-center img { width: 100%; max-height: 400px; object-fit: contain; transition: transform 0.5s; }
.crab-ts-center:hover img { transform: scale(1.05); }

/* 四宫格/八宫格商品卡 */
.crab-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-bottom: 50px; }
@media (max-width: 992px) { .crab-grid-4 { grid-template-columns: repeat(2, 1fr); } }
.crab-prod-card { background: #ffffff; text-align: center; position: relative; padding: 20px; transition: 0.3s; border: 1px solid #f9f9f9; border-radius: 8px; }
.crab-prod-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.05); border-color: #eee; }
.crab-badge-green { position: absolute; top: 15px; left: 15px; background: #8bc34a; color: #fff; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: bold; }
.crab-badge-red { position: absolute; top: 15px; left: 15px; background: #e83e8c; color: #fff; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: bold; }
.crab-prod-img { width: 100%; height: 200px; object-fit: contain; margin-bottom: 20px; }
.crab-prod-title { font-size: 15px; color: #333; margin-bottom: 10px; font-weight: 500; }
.crab-stars { color: #ffc107; font-size: 12px; margin-bottom: 10px; letter-spacing: 2px; }
.crab-price-row { display: flex; justify-content: center; gap: 10px; align-items: baseline; }
.crab-price-curr { font-size: 18px; font-weight: bold; color: #e83e8c; }
.crab-price-old { font-size: 13px; color: #aaa; text-decoration: line-through; }

/* 广告海报双拼 */
.crab-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; margin-bottom: 60px; }
@media (max-width: 768px) { .crab-grid-2 { grid-template-columns: 1fr; } }
.crab-banner-box { border-radius: 8px; padding: 50px 40px; display: flex; justify-content: space-between; align-items: center; position: relative; overflow: hidden; min-height: 220px; }
.crab-banner-box.orange { background: #fcece0; }
.crab-banner-box.pink { background: #fbe6eb; }
.crab-banner-text { position: relative; z-index: 2; max-width: 60%; }
.crab-banner-text h3 { font-size: 26px; font-weight: bold; color: #111; margin-bottom: 10px; }
.crab-banner-text p { font-size: 14px; color: #666; }
.crab-banner-img { position: absolute; right: -10px; bottom: 0; max-height: 100%; object-fit: contain; z-index: 1; }

/* 博客图文区 */
.crab-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 50px; }
@media (max-width: 768px) { .crab-grid-3 { grid-template-columns: 1fr; } }
.crab-blog-card { background: #fff; transition: 0.3s; }
.crab-blog-card:hover { transform: translateY(-5px); }
.crab-blog-img { width: 100%; height: 220px; object-fit: cover; border-radius: 8px; margin-bottom: 15px; }
.crab-blog-meta { font-size: 12px; color: #888; margin-bottom: 10px; display: flex; align-items: center; gap: 5px; }
.crab-blog-title { font-size: 16px; font-weight: bold; color: #111; margin-bottom: 15px; line-height: 1.4; }
.crab-blog-link { font-size: 13px; font-weight: bold; color: #111; text-transform: uppercase; border-bottom: 1px solid #111; padding-bottom: 2px; transition: 0.3s; }
.crab-blog-link:hover { color: #e83e8c; border-color: #e83e8c; }

/* 表格与内页 */
.crab-table { width: 100%; border-collapse: collapse; background: #ffffff; border: 1px solid #eeeeee; margin-bottom: 50px; border-radius: 8px; overflow: hidden; }
.crab-table th, .crab-table td { padding: 15px; text-align: left; border-bottom: 1px solid #f9f9f9; font-size: 14px; }
.crab-table th { background: #fdf5f6; color: #111; font-weight: bold; }
.crab-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: bold; }
.crab-badge-auto { background: #fdf5f6; color: #e83e8c; }
.crab-badge-manual { background: #f5f5f5; color: #666; }
.crab-detail-wrap { background: #ffffff; padding: 40px; border: 1px solid #eeeeee; border-radius: 8px; margin-bottom: 50px; }

/* 底部区域 */
.crab-footer { background: #fcfcfc; padding: 60px 0 30px; border-top: 1px solid #eee; }
.crab-footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1.5fr; gap: 30px; margin-bottom: 40px; }
@media (max-width: 992px) { .crab-footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .crab-footer-grid { grid-template-columns: 1fr; text-align: center; } }
.crab-footer h4 { font-size: 16px; font-weight: bold; color: #111; margin-bottom: 20px; }
.crab-footer ul { list-style: none; line-height: 2.2; font-size: 14px; color: #666; }
.crab-footer ul a:hover { color: #e83e8c; }
.crab-footer-social { display: flex; gap: 15px; margin-top: 20px; }
@media (max-width: 768px) { .crab-footer-social { justify-content: center; } }
.crab-copyright { text-align: center; padding-top: 20px; border-top: 1px solid #eee; color: #999; font-size: 13px; }

/* 通用防溢出与移动端自适应 */
[style*="nowrap"], div[class*="title"], p[class*="title"], a[class*="title"], .crab-text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 768px) {
    .crab-header-wrap { flex-direction: column; gap: 15px; }
    .crab-search-form { width: 100%; }
    .crab-nav { flex-wrap: wrap; justify-content: center; }
}
