/* リセットCSS + パフォーマンス最適化 */

/* モバイルボトムメニュー完全削除 */
@media (max-width: 768px) {
    /* すべてのボトムナビゲーション要素を強制非表示 */
    [class*="bottom-nav"],
    [class*="mobile-bottom"],
    [class*="tab-bar"],
    [class*="bottom-menu"],
    [id*="bottom-nav"],
    [id*="mobile-nav"],
    .mobile-tab-navigation,
    .bottom-navigation,
    div[style*="position:fixed"][style*="bottom:0"],
    div[style*="position: fixed"][style*="bottom: 0"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        z-index: -9999 !important;
        pointer-events: none !important;
    }
    
    /* Android Chrome特化対策 */
    /* 任意の要素で下部固定されているものを完全削除 */
    * {
        animation: none !important;
        -webkit-animation: none !important;
    }
    
    *:not(body):not(html)[style*="position:fixed"] {
        position: relative !important;
        bottom: auto !important;
    }
    
    *[style*="bottom"][style*="fixed"],
    *[style*="z-index: 999"],
    *[style*="z-index:999"],
    *[style*="z-index: 1000"],
    *[style*="z-index:1000"] {
        display: none !important;
        position: absolute !important;
        left: -10000px !important;
        top: -10000px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        visibility: hidden !important;
        opacity: 0 !important;
        z-index: -9999 !important;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* パフォーマンス最適化 */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* 画像最適化 */
img {
    max-width: 100%;
    height: auto;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.animation-element {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* フォント読み込み最適化 */
@font-face {
    font-family: 'NotoSansJP';
    font-display: swap;
    src: local('Noto Sans JP Regular'), local('NotoSansJP-Regular');
}

:root {
    --primary-color: #16a34a;
    --secondary-color: #059669;
    --accent-color: #047857;
    --text-dark: #0f172a;
    --text-light: #475569;
    --background-light: #f0fdf4;
    --border-color: #d1d5db;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #16a34a 0%, #059669 100%);
    --gradient-secondary: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
}

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

/* ヘッダー */
.header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-logo .tagline {
    font-size: 0.8rem;
    color: var(--text-light);
    display: block;
    margin-top: -5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: var(--background-light);
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
}

/* メインコンテンツ */
.main {
    margin-top: 80px;
}

/* ヒーローセクション */
.hero {
    background: var(--gradient-primary);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="rgba(255,255,255,.1)"/><stop offset="100%" stop-color="rgba(255,255,255,0)"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>');
    opacity: 0.1;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto !important;
    padding: 0 20px;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    position: relative;
    z-index: 2;
}

.hero-content {
    width: 100%;
    text-align: center !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-align: center !important;
    width: 100%;
}

.hero-title .accent {
    color: #fbbf24;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #fbbf24;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: #047857;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: #065f46;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.hero-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero-card i {
    font-size: 3rem;
    color: #fbbf24;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.hero-card p {
    margin-bottom: 1rem;
    opacity: 0.9;
}

.rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.stars {
    color: #fbbf24;
    font-size: 1.2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* セクション共通 */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
}

/* カテゴリセクション */
.categories {
    padding: 5rem 0;
    background: var(--background-light);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.category-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.category-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.product-count,
.review-count {
    color: var(--text-light);
}

/* 人気商品セクション */
.featured-products {
    padding: 5rem 0;
}

.product-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-card.featured {
    border: 2px solid var(--secondary-color);
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
}

.product-image {
    height: 200px;
    background: var(--background-light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.placeholder-image {
    font-size: 4rem !important;
    opacity: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1 !important;
    color: var(--primary-color) !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)) !important;
    width: 100% !important;
    height: 100% !important;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.rating-text {
    color: var(--text-light);
    font-size: 0.9rem;
}

.product-price {
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #047857;
}

.original-price {
    text-decoration: line-through;
    color: var(--text-light);
    margin-left: 0.5rem;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.feature {
    background: var(--background-light);
    color: var(--text-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
    min-width: 100px;
}

.affiliate-link {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* 最新記事セクション */
.latest-articles {
    padding: 5rem 0;
    background: var(--background-light);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.article-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.article-image {
    height: 200px;
    background: var(--background-light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.article-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.article-content {
    padding: 1.5rem;
}

.article-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.article-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-light);
}

.more-articles {
    text-align: center;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.baby-focused {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    border: 2px solid #16a34a !important;
    position: relative;
}

.baby-focused::after {
    content: '👶';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .more-articles {
        flex-direction: column;
        align-items: center;
    }
    
    .more-articles .btn {
        min-width: 200px;
    }
}

/* 選ばれる理由セクション */
.why-choose-us {
    padding: 5rem 0;
}

.reason-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.reason-card {
    text-align: center;
    padding: 2rem;
}

.reason-icon {
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2.5rem;
}

.reason-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.reason-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* フッター */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.newsletter {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    placeholder-color: #d1d5db;
}

.newsletter-input::placeholder {
    color: #d1d5db;
}

.newsletter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.newsletter-btn:hover {
    background: #1d4ed8;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    color: #d1d5db;
    font-size: 0.9rem;
}

/* 検索バーのスタイル */
.search-form {
    width: 100%;
}

.search-box {
    display: flex;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-input {
    flex: 1;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    outline: none;
    background: transparent;
}

.search-btn {
    background: var(--primary-color);
    border: none;
    padding: 0.75rem 1.5rem;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: var(--secondary-color);
}

/* デスクトップで検索バーを非表示（デフォルト） */
.mobile-search {
    display: none;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
        position: relative;
    }
    
    .nav-logo {
        order: 1;
        width: 100%;
        text-align: center;
    }
    
    .nav-logo h1 {
        font-size: 1.5rem;
        line-height: 1.2;
        margin-bottom: 0.25rem;
        font-weight: 700;
    }
    
    .nav-logo .tagline {
        font-size: 0.75rem;
        margin-top: 0;
        display: block;
        opacity: 0.8;
        line-height: 1.3;
    }
    
    .hamburger {
        display: flex;
        order: 2;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
    }
    
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 1.5rem 1rem;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        box-shadow: var(--shadow-lg);
        opacity: 0;
        visibility: hidden;
        order: 3;
        gap: 1rem;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        margin: 0;
        width: 100%;
    }
    
    .mobile-search {
        display: none !important;
    }
    
    .nav-link {
        justify-content: center;
        padding: 0.75rem 1rem;
        border-radius: 6px;
        background: var(--background-light);
        margin: 0.25rem 0;
        font-weight: 600;
        text-align: center;
    }
    
    .nav-link:hover {
        background: var(--primary-color);
        color: white;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(16, 163, 74, 0.1);
        margin: 0.5rem 0 0 0;
        border-radius: 6px;
        display: none;
        width: 100%;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-menu a {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        border-radius: 4px;
        margin: 0.25rem;
        text-align: center;
    }
    
    .dropdown-menu a:hover {
        background-color: var(--primary-color);
        color: white;
    }
    
    .hero-container {
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .category-grid,
    .product-slider,
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .newsletter {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-logo h1 {
        font-size: 1.3rem;
        line-height: 1.1;
    }
    
    .nav-logo .tagline {
        font-size: 0.7rem;
    }
    
    .hamburger span {
        width: 20px;
        height: 2px;
    }
    
    .nav-menu {
        padding: 1rem;
    }
    
    .nav-link {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .search-box {
        border-radius: 20px;
    }
    
    .search-input {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .search-btn {
        padding: 0.6rem 1.2rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .categories,
    .featured-products,
    .latest-articles,
    .why-choose-us {
        padding: 3rem 0;
    }
}