* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

.product-detail-container {
    margin: 2rem auto;
    padding: 0 15%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 3rem;
}

/* 이미지 섹션 */
.product-gallery {
    flex: 1 1 42%;
    max-width: 42%;
}

.main-image-wrapper {
    width: 100%;
    padding-top: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
}

.main-image-wrapper img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main-image-wrapper:hover img {
    transform: scale(1.05);
}

.thumbnail-list {
    margin-top: 1rem;
    display: flex;
    gap: 0.7rem;
}

.thumbnail-list img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.thumbnail-list img:hover,
.thumbnail-list img.active {
    border-color: #000;
}

/* 상세 정보 섹션 */
.product-details {
    flex: 1 1 50%;
    max-width: 50%;
    display: flex;
    flex-direction: column;
}

.product-details .compare-at-price {
    font-size: 1.2rem;
    color: #888;
}

.product-details .product-select {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 5% 0;
}

.product-details .product-select select {
    width: 100%;
    padding: 10px 12px;
}

.product-title {
    font-weight: 700;
    font-size: 2rem;
    margin: 0 0 1rem 0;
}

.product-price {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #111;
}

.product-description {
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    margin-bottom: 1.8rem;
}

.product-description:lang(ko) {
    text-align: center;
}

.product-description p {
    margin: 0 0 1rem 0;
}

.product-description p:lang(ko) {
    white-space: pre-line;
    line-height: 2;
}

/* 수량 선택 및 버튼 */
.purchase-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-input {
    width: 60px;
    padding: 0.4rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    text-align: center;
}

.add-to-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #111;
    color: white;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 160px;
    height: 100%;
    width: 40%;
}

.add-to-cart-btn:hover {
    background-color: #444;
}

/* 재고 상태 */
.product-availability {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: #666;
}

.product-availability.out-of-stock {
    color: #b12704;
}


@media (max-width:1024px) {

    .product-detail-container {
        justify-content: center;
    }

    /* 이미지 섹션 */
    .product-gallery {
        flex: 1 1 90%;
        max-width: 90%;
    }

    /* 상세 정보 섹션 */
    .product-details {
        flex: 1 1 90%;
        max-width: 90%;
    }

    /* 모바일에서 variant가 1개일 때 product-select 숨기기 */
    .mobile-hide-single-variant {
        display: none !important;
    }
}

@media (max-width: 767px) {

    .product-title {
        color: var(--text-color);
    }

    .product-price {
        color: var(--text-color);
    }

    .product-description {
        color: var(--text-color);
    }

    .product-availability {
        color: var(--product-available-color);
    }

}

/* 로딩 스피너 스타일 */
.btn-loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-left: 6px; /* 텍스트와 간격 */
}


/* 스피너 회전 애니메이션 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

