/**
 * 홈페이지 전용 CSS
 * 작성일자: 2025-07-14
 */

/* 홈페이지 섹션 간격 통일 */
.categories {
    margin: 3rem 0;
}

.featured-products {
    margin: 3rem 0;
}

.new-arrivals {
    margin: 3rem 0;
}

/* 모바일에서 섹션 간격 조정 */
@media (max-width: 768px) {
    .categories {
        margin: 2rem 0;
    }
    
    .featured-products {
        margin: 2rem 0;
    }
    
    .new-arrivals {
        margin: 2rem 0;
    }
}

/* 카테고리 섹션 스타일 */
.categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 0 2rem;
}

/* 카테고리 카드 스타일 */
.category-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
}

.category-card:hover {
    transform: translateY(-5px);
}

/* 홈페이지 카테고리 섹션 전용 이미지 스타일 */
.category-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.category-content {
    padding: 2rem;
    text-align: center;
}

.category-content h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.category-content p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* 기존 category-info 클래스 호환성을 위한 스타일 */
.category-info {
    padding: 2rem;
    text-align: center;
}

.category-info h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .categories {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .categories {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0 0.5rem;
        margin: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .category-card {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin: 0;
        border-radius: 16px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.08);
        background: #fff;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        overflow: hidden;
    }
    
    /* 홈페이지 모바일 카테고리 이미지 스타일 */
    .category-image {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        border-radius: 16px 16px 0 0;
        display: block;
        margin: 0;
        padding: 0;
        object-position: center center;
        object-fit: cover;
    }
    
    .category-content {
        padding: 0.3rem 0;
        height: auto;
        min-height: unset;
        display: block;
        text-align: center;
    }
    
    .category-content h2 {
        font-size: 0.9rem;
        margin: 0;
        padding: 0;
        line-height: 1.2;
    }
    
    .category-content p {
        display: none;
    }
}

/* 히어로 섹션 반응형 스타일 */
.hero-section {
    background: none;
    color: white;
    padding: 0;
    margin: 0 0 3rem 0;
    text-align: center;
    width: 100vw;
    height: calc(100vh - 160px); /* 80px header + 80px category-nav */
    min-height: 500px;
    max-height: 800px;
    position: relative;
}

.main-banner-wrapper {
    width: 100vw;
    height: 100%;
    position: relative;
    overflow: hidden;
    left: 0;
}

.main-banner-wrapper img,
.main-banner-wrapper .banner-slide {
    width: 100vw;
    height: 100%;
    object-fit: cover;
    position: absolute;
    left: 0;
    top: 0;
    transition: opacity 1s ease-in-out;
}

@media (max-width: 1200px) {
    .hero-section {
        min-height: 400px;
        max-height: 600px;
    }
}

/* 히어로 섹션 모바일 최적화 */
@media (max-width: 768px) {
    .hero-section {
        height: 400px !important;
        min-height: unset;
        max-height: unset;
        margin-top: 0 !important;
        margin-bottom: 2rem !important;
        width: 100vw !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    .main-banner-wrapper {
        width: 100vw !important;
        max-width: 100vw !important;
        border-radius: 12px;
        margin: 0;
        overflow: hidden;
    }
    
    .main-banner-wrapper img,
    .main-banner-wrapper .banner-slide {
        width: 100vw !important;
        max-width: 100vw !important;
        border-radius: 12px;
    }
    
    /* 슬라이드 인디케이터 */
    .banner-indicators {
        position: absolute;
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 0.5rem;
        z-index: 10;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.5);
        cursor: pointer;
        transition: background-color 0.3s;
    }
    
    .indicator.active {
        background: rgba(255, 255, 255, 0.9);
    }
} 

/* 배너 텍스트 스타일 */
.banner-text {
    position: absolute;
    left: 4rem;
    top: 40%; /* 배너 높이의 2/5 지점 */
    transform: translateY(-50%);
    z-index: 2;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    max-width: 1200px;
    text-align: left;
}

/* 배너 제목 스타일 */
.banner-title {
    font-size: 3rem; /* 4rem에서 3rem으로 줄임 */
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    word-break: keep-all;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 배너 설명 스타일 */
.banner-desc {
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1.4;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    opacity: 0.9;
    word-break: keep-all;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* PC 최적화 (1200px 이하) */
@media (max-width: 1200px) {
    .banner-text {
        left: 3rem;
        top: 40%;
        max-width: 100%;
    }
    
    .banner-title {
        font-size: 2.5rem; /* 3.5rem에서 2.5rem으로 줄임 */
    }
    
    .banner-desc {
        font-size: 1.6rem;
    }
}

/* 태블릿 최적화 (992px 이하) */
@media (max-width: 992px) {
    .banner-title {
        font-size: 2.2rem; /* 3rem에서 2.2rem으로 줄임 */
    }
    
    .banner-desc {
        font-size: 1.4rem;
    }
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .banner-text {
        left: 1rem;
        top: 40%;
        max-width: 50%;
    }
    
    .banner-title {
        font-size: 1.8rem; /* 2rem에서 1.8rem으로 줄임 */
        margin-bottom: 0.5rem;
    }
    
    .banner-desc {
        font-size: 1rem;
    }
}

/* 작은 모바일 최적화 (480px 이하) */
@media (max-width: 480px) {
    .banner-title {
        font-size: 1.4rem; /* 1.5rem에서 1.4rem으로 줄임 */
    }
    
    .banner-desc {
        font-size: 0.9rem;
    }
} 