/* 특가 상품 컨테이너 - 반응형 그리드 */
.special-deals-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
}

/* 울트라와이드 화면 - 7개 열 */
@media (min-width: 1921px) {
    .special-deals-container {
        grid-template-columns: repeat(7, 1fr);
    }
    .special-deals-container:not(.popular-places-container) .deal-card:nth-child(n+8) {
        display: none;
    }
}

/* 와이드 화면 - 6개 열 */
@media (min-width: 1600px) and (max-width: 1920px) {
    .special-deals-container {
        grid-template-columns: repeat(6, 1fr);
    }
    .special-deals-container:not(.popular-places-container) .deal-card:nth-child(n+7) {
        display: none;
    }
}

/* 데스크탑 화면 - 5개 열 */
@media (min-width: 1200px) and (max-width: 1599px) {
    .special-deals-container {
        grid-template-columns: repeat(5, 1fr);
    }
    .special-deals-container:not(.popular-places-container) .deal-card:nth-child(n+6) {
        display: none;
    }
}

/* 태블릿 - 1줄 가로 스크롤 */
@media (max-width: 1199px) and (min-width: 768px) {
    .special-deals-container {
        display: flex;
        overflow-x: auto;
        gap: 20px;
        padding-right: 0px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    .special-deals-container::-webkit-scrollbar {
        display: none;
    }

    .special-deals-container .deal-card {
        width: 240px;
        min-width: 240px;
        flex: 0 0 auto;
        scroll-snap-align: start;
    }
}

/* 모바일 - 1줄 가로 스크롤 */
@media (max-width: 767px) {
    .special-deals-container {
        display: flex;
        overflow-x: auto;
        gap: 16px;
        padding-right: 16px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    .special-deals-container::-webkit-scrollbar {
        display: none;
    }

    .special-deals-container .deal-card {
        width: 180px;
        min-width: 180px;
        flex: 0 0 auto;
        scroll-snap-align: start;
    }
}

/* 인기 스페이스 - 태블릿/모바일도 그리드 레이아웃 적용 */
@media (max-width: 1199px) and (min-width: 768px) {
    .popular-places-container {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        overflow-x: visible !important;
        gap: 16px;
        padding-right: 0;
    }

    .popular-places-container .deal-card {
        width: 100% !important;
        min-width: 0 !important;
        flex: none !important;
        scroll-snap-align: none !important;
    }
}

@media (max-width: 767px) {
    .popular-places-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        overflow-x: visible !important;
        gap: 12px;
        padding-right: 0;
    }

    .popular-places-container .deal-card {
        width: 100% !important;
        min-width: 0 !important;
        flex: none !important;
        scroll-snap-align: none !important;
    }
}

/* ========================================
   상품 카드 Skeleton 로딩 UI
   ======================================== */
@keyframes productShimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.skeleton-product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-product-card .skeleton-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(
        90deg,
        #e0e0e0 0%,
        #f0f0f0 20%,
        #e0e0e0 40%,
        #e0e0e0 100%
    ) !important;
    background-size: 468px 100% !important;
    animation: productShimmer 1.5s ease-in-out infinite !important;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

/* Skeleton 이미지 ::before 제거 */
.skeleton-product-card .skeleton-image::before {
    display: none !important;
    content: none !important;
}

.skeleton-product-card .deal-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
}

.skeleton-product-card .skeleton-text {
    height: 12px;
    background: linear-gradient(
        90deg,
        #e0e0e0 0%,
        #f0f0f0 20%,
        #e0e0e0 40%,
        #e0e0e0 100%
    );
    background-size: 468px 100%;
    animation: productShimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-product-card .skeleton-title {
    width: 80%;
    height: 16px;
}

.skeleton-product-card .skeleton-subtitle {
    width: 60%;
    height: 14px;
}

.skeleton-product-card .skeleton-price {
    width: 50%;
    height: 18px;
    margin-top: 4px;
}

/* 상품 에러 상태 UI */
.product-error-state {
    text-align: center;
    padding: 60px 20px;
    background: #fef2f2;
    border-radius: 16px;
    width: 100%;
    grid-column: 1 / -1;
}

.product-error-state .error-icon {
    font-size: 48px;
    color: #ef4444;
    margin-bottom: 16px;
}

.product-error-state .error-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.product-error-state .error-message {
    margin: 0 0 20px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

.product-error-state .retry-button {
    padding: 10px 20px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.product-error-state .retry-button:hover {
    background: #dc2626;
}

.product-error-state .retry-button:active {
    transform: scale(0.98);
}

/* 상품 카드 스타일 */
.deal-card {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.deal-card-image {
    width: 100%;
    aspect-ratio: 1/1;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-color: #F7F7F7;
}

.deal-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(0, 0, 0, 0) 32%, rgba(0, 0, 0, 0.04) 100%), #F7F7F7;
    background-size: cover;
    background-position: center;
    background-image: inherit;
    transition: transform 0.3s ease;
}

.deal-card:hover .deal-card-image::before {
    transform: scale(1.05);
}

.deal-heart-icon {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.deal-heart-icon svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.deal-heart-icon svg path {
    fill: none;
    stroke: white;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.deal-heart-icon:hover svg path {
    fill: #FE6769;
    stroke: #FE6769;
}

.deal-heart-icon.active svg path {
    fill: #FE6769;
    stroke: #FE6769;
}

.deal-card-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0px 12px 12px 0px;
}

.deal-text-info {
    display: flex;
    flex-direction: column;
}

.deal-title {
    color: black;
    font-size: 14px;
    font-family: Pretendard;
    font-weight: 500;
    margin-bottom: 3px;
    /* 2줄 제한 및 말줄임표 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.deal-location {
    color: #555555;
    font-size: 14px;
    font-family: Pretendard;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 2px;
}

.deal-location svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0;
}

.deal-price-section {
    display: flex;
    flex-direction: column;
}

.deal-current-price {
    color: #363636;
    font-size: 16px;
    font-family: Pretendard;
    font-weight: 600;
    line-height: 24px;
}

/* 가격 단위 (/월, /시간) 스타일 */
.deal-current-price span {
    font-size: 16px;
    color: #555555;
    font-weight: 400;
    margin-left: 0;
}

.deal-original-price {
    color: #555555;
    font-size: 14px;
    font-family: Pretendard;
    font-weight: 400;
    text-decoration: line-through;
    line-height: 20px;
}

/* 기본가 단위 (/월, /시간) 스타일 */
.deal-original-price span {
    font-size: 14px;
    color: #555555;
    font-weight: 400;
    margin-left: 0;
}

.deal-discount {
    color: #FF4D4F;
    font-size: 14px;
    font-family: Pretendard;
    font-weight: 600;
}

/* 더보기 버튼 스타일 */
.load-more-button {
    width: 100%;
    max-width: 200px;
    margin: 32px auto 0;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    font-family: Pretendard;
}

.load-more-button:hover {
    border-color: #333;
    background: #F9FAFB;
}

.load-more-button:active {
    transform: scale(0.98);
}

.load-more-button svg {
    flex-shrink: 0;
}

/* 카드 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.deal-card {
    animation: fadeIn 0.3s ease;
}

/* ========================================
   프로모션 뱃지 - 반려동물 뱃지와 통일된 스타일
   ======================================== */
.promotion-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-family: Pretendard;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border: 1px solid #FF8A65;
    max-width: fit-content;
    white-space: nowrap;
    transition: all 0.2s ease;
}

/* 불꽃 아이콘 */
.promotion-badge .fire-icon {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    line-height: 1;
}

/* "특가" 텍스트 */
.promotion-badge .promo-text {
    color: #E65100;
    font-weight: 600;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

/* 호버 효과 */
.promotion-badge:hover {
    transform: translateY(-0.5px);
    filter: drop-shadow(0 2px 4px rgba(255, 107, 107, 0.3));
    background: linear-gradient(135deg, #FFE0B2 0%, #FFCC80 100%);
}

/* 모바일 최적화 */
@media (max-width: 767px) {
    .promotion-badge {
        font-size: 10px;
        padding: 2px 6px;
        border-radius: 6px;
    }

    .promotion-badge .fire-icon {
        font-size: 10px;
    }
}

/* ===== 카드 뱃지 공통 스타일 ===== */
.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

/* 뱃지 크기 고정 - card-badges 컨테이너 내 모든 뱃지 통일 */
.card-badges .promotion-badge,
.card-badges .pet-friendly-badge {
    padding: 0 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    height: 22px;
    line-height: 20px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===== 반려동물 동반 가능 뱃지 스타일 ===== */
.pet-friendly-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-family: Pretendard;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border: 1px solid #81C784;
    max-width: fit-content;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.pet-friendly-badge .pet-icon {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    line-height: 1;
}

.pet-friendly-badge .pet-text {
    color: #2E7D32;
    font-weight: 600;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.pet-friendly-badge:hover {
    transform: translateY(-0.5px);
    filter: drop-shadow(0 2px 4px rgba(46, 125, 50, 0.3));
    background: linear-gradient(135deg, #C8E6C9 0%, #A5D6A7 100%);
}

/* 카드 뱃지 모바일 최적화 */
@media (max-width: 767px) {
    .card-badges {
        gap: 4px;
        margin-top: 3px;
    }

    /* 모바일에서도 뱃지 크기 통일 */
    .card-badges .promotion-badge,
    .card-badges .pet-friendly-badge {
        font-size: 10px;
        padding: 0 6px;
        border-radius: 6px;
        height: 18px;
        line-height: 16px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .pet-friendly-badge .pet-icon,
    .promotion-badge .fire-icon {
        font-size: 10px;
        line-height: 1;
        display: inline-flex;
        align-items: center;
    }

    .pet-friendly-badge .pet-text,
    .promotion-badge .promo-text {
        line-height: 1;
        display: inline-flex;
        align-items: center;
    }
}

