/* Page Styles */
.page-header {
    background: var(--secondary-color) url('https://img.foxmoe.top/i/2026/01/10/bhdi4.png') no-repeat right bottom;
    background-size: auto 60%;
    padding: 100px 0;
    text-align: center;
    margin-bottom: 60px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Decorative accent line */
.page-header::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 30px auto 0;
}

.page-title {
    font-size: 3.5em;
    color: #fff;
    margin: 0;
    font-weight: bold;
    position: relative;
    z-index: 1;
}

.page-content {
    font-size: 1.1em;
    line-height: 1.8;
    color: #000;
    margin-bottom: 80px;
    padding: 0 10px;
}

/* Content Typography Enhancements */
.page-content h2 {
    font-size: 24px;
    color: var(--secondary-color);
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
    margin: 40px 0 20px;
    line-height: 1.4;
    background: linear-gradient(to right, #f9f9f9, transparent);
    padding-top: 10px;
    padding-bottom: 10px;
}

.page-content h3 {
    font-size: 20px;
    color: #444;
    margin: 30px 0 15px;
    font-weight: bold;
    position: relative;
    padding-bottom: 10px;
}

.page-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    background: var(--primary-color);
}

.page-content blockquote {
    background: #fcfcfc;
    border-left: 5px solid var(--primary-color);
    margin: 30px 0;
    padding: 20px 30px;
    font-style: italic;
    color: #666;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.page-content ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.page-content ul li {
    list-style: none;
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
}

.page-content ul li::before {
    content: '•';
    color: var(--primary-color);
    font-size: 20px;
    position: absolute;
    left: 0;
    top: -2px;
}

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

.page-content img {
    margin: 30px 0;
    border-radius: 4px;
}

/* Article Detail */
.article-header {
    margin-bottom: 40px;
    text-align: center;
}

.article-title {
    font-size: 2.5em;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.article-meta {
    color: #999;
    font-size: 14px;
}

.article-meta span {
    margin: 0 10px;
}

.article-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}

/* Product List Page */
.product-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
    background: #fff;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.product-categories {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.product-categories .btn-outline {
    padding: 10px 25px;
    font-size: 15px;
    border-radius: 0;
    transition: all 0.3s;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
}

.product-categories .btn-outline:hover,
.product-categories .btn-outline.active {
    background: var(--primary-color);
    color: #fff !important;
    border-color: var(--primary-color) !important;
}

.product-search {
    position: relative;
    width: 350px;
    max-width: 100%;
}

.product-search input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 1px solid #ddd;
    border-radius: 0;
    outline: none;
    transition: border-color 0.3s;
    font-size: 15px;
    box-sizing: border-box;
}

.product-search input:focus {
    border-color: var(--primary-color);
}

.product-search button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 5px;
    font-size: 18px;
}

.product-search button:hover {
    color: var(--primary-color);
}

/* Enhanced Product Grid (Corporate Style) */
#product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 columns for large screens */
    gap: 15px;
}

#product-grid .product-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block; /* Use block layout to avoid flex issues */
    position: relative;
    box-sizing: border-box;
}

#product-grid .product-item * {
    box-sizing: border-box;
}

#product-grid .product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: transparent;
}

#product-grid .product-img {
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 0;
}

#product-grid .product-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
    margin: 0;
}

#product-grid .product-item:hover .product-img img {
    transform: scale(1.08);
}

#product-grid .product-title {
    padding: 10px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0;
    line-height: 1.4;
    text-align: center;
    border-top: 1px solid #f9f9f9;
    display: block; /* Ensure block display */
    width: auto; /* Reset any width constraints */
}

#product-grid .product-item::after {
    content: '';
    display: block;
    height: 3px;
    width: 0;
    background: var(--primary-color);
    transition: width 0.3s;
    margin: 0 auto;
}

#product-grid .product-item:hover::after {
    width: 100%;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    #product-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 columns on medium screens */
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .product-list-header {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        gap: 15px;
    }

    .product-categories {
        justify-content: flex-start;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
        display: block;
    }
    
    .product-categories .btn-outline {
        display: inline-block;
        margin-right: 10px;
        padding: 8px 15px;
        font-size: 14px;
    }

    .product-search {
        width: 100%;
        margin-top: 10px;
    }
    
    .product-search input {
        width: 100%;
    }

    #product-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        gap: 15px;
    }
    
    #product-grid .product-title {
        font-size: 16px;
        padding: 15px;
    }
}



/* Product Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px;
    border-radius: 4px;
    transform: translateY(20px);
    transition: all 0.3s;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.modal-body {
    display: flex;
    gap: 40px;
}

.modal-img {
    flex: 1;
}

.modal-info {
    flex: 1;
}

.modal-title {
    font-size: 2em;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.modal-desc {
    color: #666;
    line-height: 1.8;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
    }
}

/* Page Grid */
.page-grid {
    display: flex;
    gap: 40px;
}

.page-sidebar-col {
    flex: 0 0 250px;
}

.page-content-col {
    flex: 1;
}

/* Sidebar Widget */
.widget {
    margin-bottom: 40px;
    background: #fff;
    border: 1px solid #eee;
    padding: 20px;
}

.widget-title {
    font-size: 18px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.widget-list li {
    border-bottom: 1px solid #f5f5f5;
}

.widget-list li:last-child {
    border-bottom: none;
}

.widget-list a {
    display: block;
    padding: 12px 0;
    color: #666;
    transition: all 0.3s;
}

.widget-list a:hover,
.widget-list li.current a {
    color: var(--primary-color);
    padding-left: 10px;
}

.contact-mini p {
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-mini i {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .page-grid {
        flex-direction: column;
    }
    
    .page-sidebar-col {
        flex: auto;
        order: 2; 
    }
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-item-large {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.contact-item-large i {
    font-size: 24px;
    color: var(--primary-color);
    margin-right: 20px;
    margin-top: 5px;
}

.contact-item-large h3 {
    margin: 0 0 5px;
    font-size: 18px;
    color: var(--secondary-color);
}

.contact-item-large p {
    margin: 0;
    color: #666;
}

/* Cooperation Page */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

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

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--primary-color);
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #8a1515;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}
