/* ========================================
   Products Section 스타일
   Products Section Styles for Sulwhasoo Holiday Festa
   ======================================== */

/* Products Section 기본 스타일 */
.products {
    background: transparent;
    position: relative;
    margin: 0;
    padding: 0;
    min-height: 300px; /* 최소 높이 보장 */
}

/* Products 컨테이너 */
.products-container {
    max-width: 480px; /* 프로젝트 규칙: 480px 고정 너비 */
    margin: 0 auto; /* 중앙 정렬 */
    padding: 0;
}

/* Products 콘텐츠 */
.products-content {
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column; /* 세로 배치 */
    gap: 0; /* 이미지 간 간격 없음 */
}

/* Products 이미지 컨테이너 */
.products .product-image-container {
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
    min-height: auto; /* 최소 높이 제거 - 흰 공간 방지 */
}

/* 최상단 이미지 */
.product-top {
    width: 100%;
    margin: 0;
    padding: 0;
}


/* 세 번째 이미지 */
.product-third {
    width: 100%;
    margin: 0;
    padding: 0;
    /* product_02_sg.webp의 하단부에 별도 공간 없이 바로 연결 */
}

/* 오버레이 관련 CSS 제거 - 단순한 3개 이미지 구조로 변경 */

/* Products 이미지 */
.products .product-image {
    width: 100%;
    height: auto;
    min-height: auto; /* 최소 높이 제거 - 흰 공간 방지 */
    display: block;
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    transition: none;
}

/* 이미지 호버 효과 제거 */
.products .product-image:hover {
    transform: none;
    box-shadow: none;
}

/* 이미지 로딩 실패 시 스타일 */
.products .product-image:not([src]),
.products .product-image[src=""],
.products .product-image[src*="data:"] {
    min-height: 200px;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 이미지 로딩 성공 시 높이 자동 조정 */
.products .product-image[src*=".jpg"],
.products .product-image[src*=".jpeg"],
.products .product-image[src*=".png"],
.products .product-image[src*=".webp"] {
    min-height: auto; /* 로딩 성공 시 최소 높이 제거 */
}

.products .product-image:not([src])::after,
.products .product-image[src=""]::after,
.products .product-image[src*="data:"]::after {
    content: "이미지 로딩 실패";
    color: #666;
    font-size: 14px;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .products-container {
        padding: 0;
    }
    
    .products-content {
        padding: 0;
    }
    
    .products .product-image-container {
        margin: 0;
        padding: 0;
        min-height: auto; /* 모바일에서도 최소 높이 제거 */
    }
    
    .products .product-image {
        width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
        min-height: auto; /* 모바일에서도 최소 높이 제거 */
    }
    
    /* 오버레이 관련 스타일 제거 - 단순한 3개 이미지 구조 */
}

/* 태블릿 최적화 */
@media (min-width: 769px) and (max-width: 1024px) {
    .products-container {
        padding: 0;
    }
    
    .products-content {
        padding: 0;
    }
    
    .products .product-image {
        width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
    }
}

/* 데스크톱 최적화 */
@media (min-width: 1025px) {
    .products-container {
        padding: 0;
    }
    
    .products-content {
        padding: 0;
    }
    
    .products .product-image {
        width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
    }
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
    .products .product-image {
        transition: none;
    }
}

/* 키보드 네비게이션 */
.products .product-image:focus {
    outline: none;
}

/* 스크린 리더 지원 */
.products .product-image {
    text-decoration: none;
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .products {
        background: var(--sulwhasoo-white);
        border: 1px solid var(--sulwhasoo-dark-brown);
    }
    
    .products .product-image {
        border: 1px solid var(--sulwhasoo-dark-brown);
    }
}
