body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f3f4f6;
    color: #222;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    background: #111827;
    color: #fff;
    padding: 18px 0;
    border-bottom: 4px solid #dc2626;
}

.container {
    width: 1280px;
    max-width: calc(100% - 32px);
    margin: 0 auto;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-logo {
    font-size: 34px;
    font-weight: bold;
    letter-spacing: 2px;
}

.search-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.search-form input,
.search-form select {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
}

.search-form button {
    height: 40px;
    padding: 0 18px;
    border: none;
    background: #dc2626;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    margin-top: 24px;
    align-items: start;
}

.sidebar {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    position: sticky;
    top: 20px;
}

.sidebar h3 {
    margin-top: 0;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar li {
    margin-bottom: 10px;
}

.main-content {
    min-width: 0;
}

.page-title {
    font-size: 30px;
    margin: 0 0 18px;
    text-align: center;
}

.result-count {
    margin-bottom: 16px;
    color: #555;
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: stretch;
}

.product-card {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.08);
    transition: transform 0.15s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-2px);
}

.product-image-wrap {
    width: 100%;
    height: 320px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-name {
    font-size: 15px;
    font-weight: bold;
    margin: 12px 0 8px;
    min-height: 44px;
    line-height: 1.4;
}

.product-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.product-price {
    font-size: 22px;
    font-weight: bold;
    color: #dc2626;
    margin: 10px 0 8px;
}

.stock-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    margin-top: auto;
}

.stock-in {
    background: #dcfce7;
    color: #166534;
}

.stock-out {
    background: #fee2e2;
    color: #991b1b;
}

.detail-wrap {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 30px;
    background: #fff;
    padding: 24px;
    border-radius: 10px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.08);
}

.detail-image {
    width: 100%;
    height: 560px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
    overflow: hidden;
}

.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.detail-title {
    font-size: 30px;
    margin-top: 0;
    margin-bottom: 20px;
}

.detail-info p {
    margin: 8px 0;
}

.detail-price {
    font-size: 30px;
    color: #dc2626;
    font-weight: bold;
    margin: 20px 0;
}

.back-link {
    display: inline-block;
    margin-top: 24px;
}

.section-box {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.08);
}

.form-table {
    width: 100%;
    max-width: 700px;
}

.form-table th,
.form-table td {
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

.form-table input,
.form-table textarea,
.form-table select {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

.main-btn {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.sub-nav {
    margin-top: 10px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sub-nav a {
    color: #fff;
    font-size: 14px;
}

@media (max-width: 980px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-wrap {
        grid-template-columns: 1fr;
    }

    .header-row {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 640px) {
    .site-logo {
        font-size: 28px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-image-wrap {
        height: 280px;
    }

    .detail-image {
        height: 420px;
    }
}
.global-nav {
    margin-top: 14px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.global-nav a {
    color: #fff;
    font-size: 14px;
    background: rgba(255,255,255,0.08);
    padding: 8px 12px;
    border-radius: 6px;
}

.site-footer {
    margin-top: 40px;
    padding: 24px 0;
    background: #111827;
    color: #fff;
    text-align: center;
}

@media (max-width: 980px) {
    .global-nav {
        justify-content: center;
    }
}