/* style.css */

/* Global Resets & Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    color: #007BFF; /* Tech Blue */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    color: #0A2A4E; /* Dark Blue */
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header */
header {
    background-color: #0A2A4E; /* Dark Blue */
    color: #fff;
    padding: 1em 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo a {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
}

header .logo img {
    height: 40px; /* Adjust as needed */
    margin-right: 10px;
}

header .logo h1 {
    font-size: 1.8em;
    margin: 0;
    color: #fff;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

header nav ul li {
    margin-left: 20px;
}

header nav ul li a {
    color: #fff;
    font-weight: 500;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

header nav ul li a.active,
header nav ul li a:hover {
    border-bottom-color: #FF8C00; /* Orange Accent */
    color: #FF8C00;
}

.menu-toggle {
    display: none; /* Hidden by default, shown on mobile */
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* Main Content Area */
main {
    padding: 20px 0;
}

/* Page Title Banner (common for subpages) */
.page-title-banner {
    background-color: #1C3A5E; /* Slightly Lighter Dark Blue */
    color: #fff;
    padding: 40px 0;
    text-align: center;
    margin-bottom: 30px;
}

.page-title-banner h1 {
    font-size: 2.5em;
    margin-top: 0;
    margin-bottom: 10px;
    color: #fff;
}

.page-title-banner p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: 500;
    text-align: center;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: #007BFF; /* Tech Blue */
    color: #fff;
    border-color: #007BFF;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: #fff;
    text-decoration: none;
}

.btn-secondary {
    background-color: #6c757d; /* Gray */
    color: #fff;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #545b62;
    border-color: #545b62;
    color: #fff;
    text-decoration: none;
}

.btn-outline {
    background-color: transparent;
    color: #0A2A4E; /* Dark Blue */
    border: 1px solid #0A2A4E;
}

.btn-outline:hover {
    background-color: #0A2A4E;
    color: #fff;
    text-decoration: none;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.9em;
}

/* Hero Banner (Homepage) */
.hero-banner {
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 80px 20px;
    min-height: 400px; /* Adjust as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.hero-banner::before {
    content: 
    "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 42, 78, 0.6); /* Dark Blue overlay */
}

.hero-banner .container {
    position: relative; /* To ensure content is above overlay */
    z-index: 1;
}

.hero-banner h1 {
    font-size: 3em;
    margin-bottom: 20px;
    color: #fff;
}

.hero-banner p {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Featured Products (Homepage) */
.featured-products {
    padding: 40px 0;
    text-align: center;
}

.product-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.category-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.category-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.category-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-item img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
}

.category-item h3 {
    padding: 15px;
    margin: 0;
    font-size: 1.2em;
    background-color: #f8f9fa;
}

.all-products-link {
    margin-top: 20px;
}

/* Company Intro Summary (Homepage) */
.company-intro-summary {
    background-color: #e9ecef;
    padding: 40px 0;
    text-align: center;
}

/* Why Choose Us (Homepage) */
.why-choose-us {
    padding: 40px 0;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.feature-item {
    padding: 20px;
}

.feature-item img {
    height: 60px; /* Adjust icon size */
    margin-bottom: 15px;
    margin-left: auto;
    margin-right: auto;
}

.feature-item h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
}

/* Company Details (About Page) */
.company-details-content article h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 2px solid #007BFF;
    padding-bottom: 5px;
    display: inline-block;
}

.company-details-content article ul {
    list-style: disc;
    margin-left: 20px;
    padding-left: 0;
}

.company-details-content article li {
    margin-bottom: 8px;
}

/* Product Listing Area (Products Page) */
.product-listing-area .container {
    display: flex;
    gap: 30px;
}

.product-sidebar {
    flex: 0 0 250px; /* Fixed width for sidebar */
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    height: fit-content;
}

.product-sidebar h3 {
    margin-top: 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.product-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-sidebar ul li a {
    display: block;
    padding: 8px 0;
    color: #333;
    border-bottom: 1px dashed #eee;
}

.product-sidebar ul li a:hover,
.product-sidebar ul li a.active {
    color: #007BFF;
    font-weight: bold;
    text-decoration: none;
}

.products-grid-container {
    flex: 1;
}

.product-category-section h2 {
    border-bottom: 2px solid #007BFF;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.category-description {
    margin-bottom: 20px;
    font-style: italic;
    color: #555;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.product-item {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.product-item img {
    height: 150px; /* Fixed height */
    object-fit: contain; /* Use contain to show full image */
    margin-bottom: 15px;
}

.product-item h3 {
    font-size: 1.1em;
    margin-bottom: 5px;
}

.product-item p {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

/* Product Detail Page */
.product-detail-layout {
    display: flex;
    gap: 30px;
}

.product-image-gallery {
    flex: 1;
    max-width: 450px;
}

.main-product-image {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
}

.product-info {
    flex: 2;
}

.product-info h2 {
    margin-top: 0;
}

.product-info h3 {
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.product-info ul {
    list-style: disc;
    margin-left: 20px;
}

.product-actions {
    margin-top: 30px;
}

.product-actions .btn {
    margin-right: 10px;
}

/* Contact Page */
.contact-layout {
    display: flex;
    gap: 30px;
}

.contact-info-details {
    flex: 1;
}

.contact-info-details h3 {
    margin-top: 0;
}

.contact-info-details p {
    margin-bottom: 10px;
}

.contact-info-details i {
    margin-right: 8px;
    color: #007BFF;
}

.map-placeholder {
    margin-top: 20px;
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    background-color: #f0f0f0;
}

.contact-form-section {
    flex: 1.5;
}

.contact-form-section h3 {
    margin-top: 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group .required {
    color: red;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Important for width 100% */
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-error {
    color: red;
    background-color: #ffebee;
    border: 1px solid red;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.form-success {
    color: green;
    background-color: #e8f5e9;
    border: 1px solid green;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Footer */
footer {
    background-color: #343a40; /* Dark Gray */
    color: #f8f9fa;
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
}

footer p {
    margin: 5px 0;
}

footer a {
    color: #adb5bd;
}

footer a:hover {
    color: #fff;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .product-listing-area .container,
    .product-detail-layout,
    .contact-layout {
        flex-direction: column;
    }
    .product-sidebar {
        flex: 0 0 auto; /* Reset flex basis */
        width: 100%;
        margin-bottom: 20px;
    }
    .product-image-gallery {
        max-width: 100%;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    header nav {
        width: 100%;
        display: none; /* Hidden by default, toggled by JS */
        margin-top: 10px;
    }
    header nav.active {
        display: block;
    }
    header nav ul {
        flex-direction: column;
    }
    header nav ul li {
        margin-left: 0;
        margin-bottom: 10px;
        width: 100%;
    }
    header nav ul li a {
        display: block;
        padding: 10px;
        background-color: rgba(255,255,255,0.1);
        border-radius: 4px;
    }
    .menu-toggle {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
    }
    .hero-banner h1 {
        font-size: 2.2em;
    }
    .hero-banner p {
        font-size: 1em;
    }
    .page-title-banner h1 {
        font-size: 2em;
    }
}

/* Basic Admin Styles (can be in a separate file admin_style.css) */
.admin-container {
    width: 90%;
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.admin-login-form {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.admin-login-form h2 {
    text-align: center;
    margin-bottom: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th, .admin-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.admin-table th {
    background-color: #f2f2f2;
}

.admin-actions a {
    margin-right: 5px;
}

.admin-form .form-group {
    margin-bottom: 15px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.admin-header h1 {
    margin: 0;
}

.admin-nav ul {
    list-style: none; padding: 0; margin: 0; display: flex; gap: 15px;
}
.admin-nav a {
    text-decoration: none; color: #007BFF;
}
.admin-nav a:hover {
    text-decoration: underline;
}

/* Utility Classes */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}
.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.two-column-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 创建两列，每列宽度相等 */
    grid-gap: 20px;
}

.two-column-gallery img {
    width: 100%; /* 图片宽度填满列 */
    height: auto; /* 保持图片比例 */

}
