/* --- Grid Section & Product Grid (from products.css) --- */
.grid-section h3 {
    font-size: 22px;
    margin: 8px 0 22px;
    font-weight: 700;
    line-height: 1.15;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
    gap: 24px;
    padding-bottom: 32px;
}

.product-card {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e7e2d8;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}
.product-image-wrap {
    position: relative;
}
.product-image-wrap img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    display: block;
}
.product-code {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e63a3a;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 8px 14px;
}
.product-name {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    padding: 14px 12px 18px;
}
#productGrid .product-image-wrap a {
    display: block;
    cursor: zoom-in;
}


.category-detail-page {
    display: flex;
    gap: 32px;
    max-width: 1240px;
    margin: 32px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.10);
    padding: 32px 24px;
}

.category-sidebar {
    min-width: 220px;
    background: #fafafa;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.category-sidebar h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 18px;
    color: #e63a3a;
}
.sub-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}
.sub-category-list li {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    padding: 10px 0;
    cursor: pointer;
    border-bottom: 1px solid #ececec;
    transition: color 0.2s;
}
.sub-category-list li.active,
.sub-category-list li:hover {
    color: #e63a3a;
}

.category-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.category-image-content {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 36px;
}
.category-image-wrap {
    width: 340px;
    min-width: 220px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    background: #fff;
}
.category-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
}
.category-content {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    padding: 24px 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.category-content h2 {
    font-size: 24px;
    color: #e63a3a;
    font-weight: 900;
    margin-bottom: 12px;
}
.category-content p {
    font-size: 16px;
    color: #333;
    margin: 0;
}
.related-products-section {
    margin-top: 24px;
}
.related-products-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 18px;
}
.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}
.product-card {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e7e2d8;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.16);
}
.product-image-wrap {
    position: relative;
}
.product-image-wrap img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    display: block;
}
.product-code {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e63a3a;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 6px;
}
.product-name {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    padding: 14px 12px 18px;
}
@media (max-width: 991px) {
    .category-detail-page {
        flex-direction: column;
        gap: 18px;
        padding: 18px 8px;
    }
    .category-image-content {
        flex-direction: column;
        gap: 18px;
    }
    .category-image-wrap {
        width: 100%;
        min-width: 0;
    }
}
@media (max-width: 767px) {
    .related-products-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .category-sidebar {
        min-width: 0;
        padding: 12px 8px;
    }
    .category-content {
        padding: 12px 8px;
    }
}
