/* リセットスタイルと基本設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

a {
    text-decoration: none;
    color: #0066cc;
}

a:hover {
    text-decoration: underline;
}

/* ヘッダー */
.header-top {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

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

.header-logo h1 {
    font-size: 24px;
}

.header-search {
    display: flex;
    align-items: center;
}

.header-search input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    width: 300px;
}

.header-search button {
    padding: 8px 15px;
    border: none;
    background-color: #0066cc;
    color: #fff;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.header-nav ul,
.main-menu ul {
    list-style: none;
    display: flex;
    gap: 15px;
}

.header-nav a {
    color: #555;
}

.header-bottom {
    background-color: #0066cc;
    padding: 10px 0;
}

.main-menu a {
    color: #fff;
    font-weight: 700;
}

/* メインコンテンツ */
.main-content .container {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.sidebar {
    width: 250px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.sidebar h2 {
    font-size: 1.2em;
    margin-bottom: 15px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

.sidebar ul {
    list-style: none;
    margin-bottom: 20px;
}

.sidebar ul li {
    padding: 5px 0;
}

.sidebar a {
    color: #333;
    display: block;
}

.search-filters h3 {
    font-size: 1em;
    margin-top: 15px;
    margin-bottom: 10px;
}

.filter-item input[type="text"] {
    width: calc(50% - 5px);
    padding: 5px;
    border: 1px solid #ccc;
}

.filter-item label {
    display: block;
    margin-bottom: 5px;
}

.content {
    flex-grow: 1;
}

/* ヒーローセクションのスタイルを更新 */
.hero-section {
    display: flex;
    gap: 15px; /* Adjust gap for better spacing */
    margin-bottom: 25px;
}

.hero-main {
    flex: 2; /* Main image takes up more space */
}

.hero-sub {
    flex: 1; /* Sub images take up less space */
    display: flex;
    flex-direction: column;
    gap: 15px; /* Adjust gap between sub-items */
}

.sub-item {
    position: relative;
    overflow: hidden; /* Ensures text doesn't spill out */
    border-radius: 8px;
    transition: transform 0.3s ease-in-out;
    display: block; /* Make the whole item a clickable link */
}

.sub-item:hover {
    transform: scale(1.05); /* Slight zoom effect on hover */
}

.sub-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images fill the container without distortion */
}

.sub-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black background */
    color: #fff;
    padding: 10px;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

.sub-item:hover .sub-text {
    transform: translateY(0); /* Slide text up on hover */
}

.sub-text h3 {
    font-size: 1.1em;
    margin-bottom: 5px;
    font-weight: 700;
}

.sub-text p {
    font-size: 0.9em;
    margin: 0;
}

/* バナーセクション */
.banner-section {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.banner-item {
    flex: 1;
}

/* 商品セクション */
.products-section,
.featured-products,
.ranking-products {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.products-section h2,
.featured-products h2,
.ranking-products h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    border-left: 5px solid #0066cc;
    padding-left: 10px;
}

.product-categories,
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.product-category-item,
.product-card {
    text-align: center;
}

.product-card {
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.product-card h3 {
    font-size: 1.1em;
    margin: 10px 0;
}

.product-card .price {
    font-size: 1.2em;
    font-weight: 700;
    color: #d9534f;
}

/* フッター */
.footer {
    background-color: #4a4a4a;
    color: #fff;
    padding: 40px 0;
    margin-top: 30px;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.footer-links {
    display: flex;
    flex-grow: 1;
}

.footer-col {
    flex: 1;
}

.footer-col h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    color: #ccc;
}

.copyright {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9em;
    border-top: 1px solid #555;
    padding-top: 20px;
}

@media (max-width: 768px) {
    .header-top .container {
        flex-direction: column;
        gap: 10px;
    }
    .main-content .container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
    .hero-section {
        flex-direction: column;
    }
    .banner-section {
        flex-direction: column;
        gap: 10px;
    }
    .footer .container {
        flex-direction: column;
    }
}