/*공통 레이아웃 구조*/

html {
    font-size: 62.5%; /* 1rem = 10px로 계산하기 편하게 설정 */
}

/*전역 레이아웃*/
body{
    /* layout context */
    display: flex;
    /* alignment */
    flex-direction: column;
    min-height: 100vh; /*푸터를 바닥으로*/
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-family: var(--font-base);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--container-padding);
    width: 100%;
    box-sizing: border-box;
}

header {
    background-color: var(--color-bg-primary);
    border-bottom: 1px solid var(--color-bg-secondary);
    box-shadow: 0 0.4rem 0.5rem rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /*요소 분산*/
}

/* 로고 & 검색 */
.logo img {
    width: 12.4rem;
    height: 3.8rem;
    display: block;
}

.logo-search-group {
    display: flex;
    align-items: center;
    gap: 3.0rem;
}

.search-form {
    display: flex;
    align-items: center;
    width: 40.0rem;
    height: 4.6rem;
    padding: 0 2.2rem;
    box-sizing: border-box;
}

.search-form input {
    flex: 1;
    width: 100%; 
    border: none;
    outline: none;
    font-size: var(--fs-sm);
}

.btn-search {
    background: none;
    border: none;
    padding: 0;
}

/*돋보기 크기*/
.btn-search img {
    width: var(--icon-lg);
    height: var(--icon-lg);
}

/* user menu */
.user-menu ul {
    display: flex;
    gap: var(--space-md);
}

/*아이콘 텍스트 사이 간격*/
.user-menu a {
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--icon-gap-sm);
}

/*상단 아이콘 크기*/
.user-menu .icon {
    width: var(--icon-lg);
    height: var(--icon-lg);
}

.main-content {
    flex: 1; 
    padding-top: 0;
    padding-bottom: 0;
}

.promotion {
    width: 100%;
    max-width: var(--banner-max-width);
    margin: 0 auto;
    position: relative; 
    overflow: hidden;
}

.slider-list{
    display: flex; /* 내부 요소(article)들을 가로로 배치 */
    transition: transform 0.5s ease-in-out; /* 이동할 때 부드럽게 애니메이션 효과 */
    width: 100%;
    max-width: 100%;
}

/*배너*/
.main-visual {
    flex: 0 0 100%;
    position: relative;
    width: 100%;
    max-width: 100%;
    height:auto;
    background-color: var(--color-bg-secondary);
    overflow: hidden;
}

.main-visual a {
    display: block;
    width: 100%;
}

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

.btn-prev, .btn-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 6.0rem;
    height: 12.4rem;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    z-index: 10;
}

.btn-prev {
    left: 0;
    background-image: var(--icon-swiper-prev);
}

.btn-prev:hover{
    background-image: var(--icon-swiper-1_hover);
}

.btn-prev:active{
    background-image: var(--icon-swiper-1_active);
}

.btn-next {
    right: 0;
    background-image: var(--icon-swiper-next);
}

.btn-next:hover{
    background-image: var(--icon-swiper-2_hover);
}

.btn-next:active{
    background-image: var(--icon-swiper-2_active);
}

/* slider pagination*/
.pagination {
    position: absolute;
    bottom: var(--radius-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--icon-gap-md);
    z-index: 10;
}

.pagination li {
    width: 0.6rem;
    height: 0.6rem;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /*3 열 구조*/
    gap: var(--space-xl);
    padding: var(--space-lg) 0;
}

.product-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.product-img {
    width: 100%;
    aspect-ratio: 1 / 1; /* 정사각형 유지 */
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer {
    width: 100%;
    background-color: var(--color-bg-secondary);
    padding: 3.0rem 0;
}

.ir {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
}
