/* ============================================
   手机端专用样式 (<= 767px)
   ============================================ */

/* 导航栏 */
.nav-container {
    padding: 0 1rem;
    position: relative;
    max-width: 100%;
}

.menu-toggle {
    display: block;
}

.nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #34495e;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: none;
    gap: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links.active {
    display: flex;
}

.nav-links li {
    width: 100%;
}

.nav-links a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    color: #bdc3c7;
}

.nav-links a:hover {
    background-color: rgba(93, 173, 226, 0.2);
    color: #5dade2;
}

.nav-links a.active {
    background-color: rgba(93, 173, 226, 0.2);
    color: #5dade2;
}

/* 主容器 */
.container {
    padding: 0rem;
    max-width: 100%;
}

/* 轮播图 */
.carousel-wrapper {
    margin-bottom: 2rem;
}

.carousel {
    height: 250px;
    font-size: 1.4rem;
}

.carousel-indicators {
    bottom: 15px;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
}

/* 标题 */
.section-title {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

/* 分类列表 */
.category-list {
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.category-item {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
}

/* 网格布局 */
.grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.grid-item-image {
    height: 150px;
}

.grid-item-content {
    padding: 1rem;
}

.grid-item-title {
    font-size: 1rem;
}

.grid-item-desc {
    font-size: 0.85rem;
}

/* 分页 */
.pagination {
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* 关于我们 */
.about-content {
    padding: 1.5rem;
    margin: 0 1rem;
    max-width: 100%;
    width: calc(100% - 2rem);
}

.about-title {
    font-size: 1.8rem;
}

.about-subtitle {
    font-size: 1rem;
}

.section-heading {
    font-size: 1.3rem;
}

.quality-item {
    padding: 1rem;
}

.quality-number {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
}

.quality-content h3 {
    font-size: 1.1rem;
}

/* 后台管理 */
.admin-container {
    padding: 1rem;
    max-width: 100%;
}

.admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.admin-title {
    font-size: 1.4rem;
}

.admin-actions {
    flex-wrap: wrap;
    width: 100%;
}

.admin-actions .btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
}

/* 表格响应式 */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    min-width: 600px;
    font-size: 0.85rem;
}

table th,
table td {
    padding: 0.6rem 0.5rem;
    white-space: nowrap;
}

/* 表单 */
.form-group input,
.form-group textarea,
.form-group select {
    font-size: 16px; /* 防止 iOS 自动缩放 */
}

/* 模态框 */
.modal-content {
    width: 95%;
    padding: 1.5rem;
    max-height: 95vh;
}

.modal-header h3 {
    font-size: 1.2rem;
}

/* 登录框 */
.login-box {
    padding: 2rem 1.5rem;
    margin: 1rem;
}

/* 页脚 - 手机端优化 */
.footer {
    padding: 2rem 0 1rem;
    font-size: 0.9rem;
}

.footer-container {
    padding: 0 1rem;
}

.footer-content {
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-section {
    text-align: left;
    padding: 0;
}

.footer-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
}

.footer-text {
    font-size: 0.85rem;
    line-height: 1.6;
    text-align: justify;
}

.footer-contact {
    font-size: 0.85rem;
    line-height: 1.8;
}

.footer-contact p {
    margin: 0.75rem 0;
    word-break: break-all;
}

.footer-contact-link {
    color: #5dade2;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    margin: -0.25rem -0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
    display: inline-block;
}

.footer-contact-link:active {
    background-color: rgba(93, 173, 226, 0.2);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
    color: #bdc3c7;
    font-size: 0.9rem;
}

.footer-links a:active {
    background-color: rgba(93, 173, 226, 0.2);
    color: #5dade2;
}

.footer-bottom {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-copyright {
    font-size: 0.8rem;
    line-height: 1.6;
    margin: 0.5rem 0;
    word-break: break-all;
}

.footer-copyright a {
    color: #95a5a6;
    text-decoration: underline;
    padding: 0.25rem 0;
}

.footer-report {
    font-size: 0.75rem;
    line-height: 1.8;
    margin: 0.75rem 0 0;
    word-break: break-all;
}

.footer-report a {
    color: #7f8c8d;
    text-decoration: underline;
    padding: 0.25rem 0;
    display: inline-block;
}

.footer-report a:active {
    color: #5dade2;
}

/* 小屏手机 (<= 480px) */
.logo {
    font-size: 1.2rem;
}

.container {
    padding: 0.75rem;
}

.nav-container {
    padding: 0 0.75rem;
}

.carousel-wrapper {
    margin-bottom: 1.5rem;
}

.carousel {
    height: 200px;
    font-size: 1.2rem;
}

.carousel-indicators {
    bottom: 10px;
    gap: 8px;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
}

.section-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.category-list {
    gap: 0.5rem;
}

.category-item {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.grid {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.grid-item-image {
    height: 180px;
}

.pagination button {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
}

.about-content {
    padding: 1rem;
    width: calc(100% - 2rem);
}

.about-content h2 {
    font-size: 1.2rem;
}

.admin-title {
    font-size: 1.2rem;
}

.admin-actions .btn {
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
}

table {
    font-size: 0.8rem;
}

.modal-content {
    padding: 1rem;
}

.login-box {
    padding: 1.5rem 1rem;
}

/* 小屏手机底部进一步优化 */
.footer {
    padding: 1.5rem 0 0.75rem;
}

.footer-container {
    padding: 0 0.75rem;
}

.footer-content {
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.footer-title {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.footer-text {
    font-size: 0.8rem;
    line-height: 1.5;
}

.footer-contact {
    font-size: 0.8rem;
    line-height: 1.6;
}

.footer-contact p {
    margin: 0.5rem 0;
}

.footer-links a {
    padding: 0.6rem 0.875rem;
    font-size: 0.85rem;
}

.footer-copyright {
    font-size: 0.75rem;
    line-height: 1.5;
}

.footer-report {
    font-size: 0.7rem;
    line-height: 1.6;
}

/* 首页：隐藏左侧分类，只显示精选内容 */
.home-content-section .home-sidebar {
    display: none;
}

/* 首页：手机端隐藏首页产品模块的左侧产品分类，仅保留右侧产品列表 */
.home-content-section .product-sidebar {
    display: none;
}

.home-content-section .content-main,
.home-content-section .product-main {
    width: 100%;
    order: 0;
}

/* 横屏手机和平板 */
.carousel-wrapper {
    margin-bottom: 2rem;
}

.carousel {
    height: 200px;
}

.nav-links {
    max-height: 60vh;
    overflow-y: auto;
}

