/* 쿠팡 상품 카드 스타일 */
.post-content .coupang-product-card {
    border: 2px solid #ffe0c2 !important;
    border-radius: 15px !important;
    padding: 20px !important;
    margin: 30px 0 !important;
    background: #fff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.post-content .coupang-product-image {
    text-align: center !important;
    margin-bottom: 20px !important;
    background: #fdf8f2 !important;
    padding: 20px !important;
    border-radius: 10px !important;
}

.post-content .coupang-product-image img {
    max-width: 100% !important;
    height: auto !important;
    max-height: 300px !important;
    object-fit: contain !important;
}

.post-content .coupang-product-info {
    text-align: center !important;
    margin-bottom: 20px !important;
}

.post-content .coupang-product-name {
    font-size: 1.3em !important;
    color: #333 !important;
    margin-bottom: 15px !important;
    line-height: 1.5 !important;
    font-weight: bold !important;
}

.post-content .coupang-buy-button {
    display: block !important;
    width: 100% !important;
    padding: 18px !important;
    background: #e8730c !important;
    color: white !important;
    text-align: center !important;
    text-decoration: none !important;
    border-radius: 10px !important;
    font-size: 1.2em !important;
    font-weight: bold !important;
    transition: all 0.3s !important;
}

.post-content .coupang-buy-button:hover {
    background: #cf6400 !important;
    transform: scale(1.02) !important;
    box-shadow: 0 5px 15px rgba(232, 115, 12, 0.3) !important;
}

@media (max-width: 768px) {
    .post-content .coupang-product-card {
        padding: 15px !important;
    }
    
    .post-content .coupang-product-name {
        font-size: 1.1em !important;
    }
    
    .post-content .coupang-buy-button {
        padding: 15px !important;
        font-size: 1.1em !important;
    }
}

/* 격자형 쿠팡 상품 컨테이너 */
.post-content .coupang-grid-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
    gap: 12px !important;
    margin: 20px 0 !important;
}

.post-content .coupang-grid-item {
    background: white !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    transition: all 0.3s !important;
    text-decoration: none !important;
    color: inherit !important;
}


.post-content .coupang-grid-image-wrapper {
    position: relative !important;
    width: 100% !important;
    padding-top: 100% !important;
    background: #f8f9fa !important;
    overflow: hidden !important;
}

.post-content .coupang-grid-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 10px !important;
}

.post-content .coupang-grid-badges {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

.post-content .coupang-grid-badge {
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 0.75em !important;
    font-weight: bold !important;
    color: white !important;
}

.post-content .coupang-grid-badge-rocket {
    background: #e8730c !important;
}

.post-content .coupang-grid-badge-free {
    background: #27ae60 !important;
}

.post-content .coupang-grid-title {
    padding: 12px !important;
    font-size: 0.9em !important;
    color: #333 !important;
    line-height: 1.4 !important;
    height: 3.6em !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    text-overflow: ellipsis !important;
}

@media (max-width: 768px) {
    .post-content .coupang-grid-container {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 5px !important;
    }
    .post-content .coupang-grid-badge {
        padding: 2px 4px !important;
        font-size: 0.55em !important;
    }
    
    .post-content .coupang-grid-badges {
        top: 4px !important;
        left: 4px !important;
        gap: 2px !important;
    }

    .post-content .coupang-grid-title {
        font-size: 0.7em !important;
        padding: 8px !important;
    }
}


/* ===================================
   쿠팡 검색창 스타일
=================================== */
.coupang-search-section {
    background: white;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 1px;
    overflow: hidden;
}

.coupang-search-section .sidebar-header {
    background: #ff6b35;
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.coupang-search-section .sidebar-title {
    color: white;
    font-weight: bold;
    font-size: 1.1em;
    text-align: center;
}

.coupang-search-section .sidebar-content {
    padding: 15px;
}

.coupang-search-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coupang-search-form input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ffe0c2;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    outline: none;
    transition: all 0.3s;
}

.coupang-search-form input[type="text"]:focus {
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.coupang-search-form button {
    width: 100%;
    padding: 12px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.coupang-search-form button:hover {
    background: #e85a28;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .coupang-search-section {
        margin-bottom: 1px;
    }
    
    .coupang-search-form input[type="text"],
    .coupang-search-form button {
        padding: 10px;
        font-size: 13px;
    }
}


/* Sliding Banner */
.customBannerArea {
    position: relative;
    overflow: hidden;
    margin: 20px auto;
    padding: 0 20px;
    text-align: center;
}

.customBox {
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
}

.customBox iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.customBox .backward {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    object-fit: cover;
}

.customBanner {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.customBanner img.cover {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    opacity: 0.93;
}

.customBanner.active img {
    box-shadow: none !important;
}

.customBanner.active a {
    height: 100% !important;
}

/* 화살표 - 파란 원 + 화살표 합친 디자인 */
.customBanner .arrow {
    position: absolute;
    top: calc(50% - 15px);
    background-color: #2196f3;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.customBanner .arrow::after {
    content: "";
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 8px solid white;
    margin-right: 2px;
}

.customBanner .arrow img {
    display: none !important;
}

/* 오른쪽 방향 화살표 (sliding-banner-280용) */
.sliding-banner-280 .customBanner .arrow::after {
    border-right: none;
    border-left: 8px solid white;
    margin-right: 0;
    margin-left: 2px;
}

.banner-bubble {
    position: absolute;
    top: 10px;
    background-color: #bd0000;
    height: 24px;
    width: 77px;
    color: white !important;
    font-size: 0.75em !important;
    border-radius: 5px;
    padding-top: 2px;
    line-height: 1.2rem !important;
}

.sliding-banner-300 .banner-bubble:after, 
.sliding-banner-150 .banner-bubble:after, 
.sliding-banner-250 .banner-bubble:after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-top-color: #bd0000;
    border-bottom: 0;
    border-left: 0;
    margin-left: -2.5px;
    margin-bottom: -5px;
}

.sliding-banner-280 .banner-bubble:after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-top-color: #bd0000;
    border-bottom: 0;
    border-right: 0;
    margin-left: -45.5px;
    margin-bottom: -5px;
}

.customBanner.active {
    animation: customMv1 1.2s ease-out infinite;
}

@keyframes customMv1 {
    0% {
        transform: translate3d(-12%, 0, 0);
    }
    20% {
        transform: translate3d(-15%, 0, 0);
    }
    40% {
        transform: translate3d(-10%, 0, 0);
    }
    60% {
        transform: translate3d(-15%, 0, 0);
    }
    80% {
        transform: translate3d(-10%, 0, 0);
    }
    100% {
        transform: translate3d(-12%, 0, 0);
    }
}

@media (min-width: 1200px) {
    .customBannerArea {
        background-color: #ffffffc9;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        padding: 0px;
        z-index: 1000;
        text-align: center;
    }
}

/* 슬라이딩 배너 덮개 이미지 - 컨테이너 완전 덮기 */
.sliding-banner-300,
.sliding-banner-150,
.sliding-banner-250,
.sliding-banner-280 {
    width: 300px !important;
    height: 320px !important;
    margin: 20px auto !important;
    overflow: hidden !important;
}
.sliding-banner-300 .customBannerArea,
.sliding-banner-150 .customBannerArea,
.sliding-banner-250 .customBannerArea,
.sliding-banner-280 .customBannerArea {
    width: 300px !important;
    height: 320px !important;
    padding: 0 !important;
    overflow: hidden !important;
}
.sliding-banner-300 .customBox,
.sliding-banner-150 .customBox,
.sliding-banner-250 .customBox,
.sliding-banner-280 .customBox {
    width: 300px !important;
    height: 330px !important;
    overflow: hidden !important;
}
.sliding-banner-300 .customBanner,
.sliding-banner-150 .customBanner,
.sliding-banner-250 .customBanner,
.sliding-banner-280 .customBanner {
    width: 340px !important;
    height: 300px !important;
    left: -10px !important;
}
.sliding-banner-300 .customBanner img.cover,
.sliding-banner-150 .customBanner img.cover,
.sliding-banner-250 .customBanner img.cover,
.sliding-banner-280 .customBanner img.cover {
    width: 340px !important;
    height: 300px !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center center !important;
}
.sliding-banner-300 .customBox .backward,
.sliding-banner-150 .customBox .backward,
.sliding-banner-250 .customBox .backward,
.sliding-banner-280 .customBox .backward {
    width: 300px !important;
    height: 300px !important;
}

@media (max-width: 768px) {
    .sliding-banner-300,
    .sliding-banner-150,
    .sliding-banner-250,
    .sliding-banner-280 {
        height: 340px !important;
        border-bottom: 1px solid #999 !important;
        
    }
    .sliding-banner-300 .customBannerArea,
    .sliding-banner-150 .customBannerArea,
    .sliding-banner-250 .customBannerArea,
    .sliding-banner-280 .customBannerArea {
        height: 340px !important;
    }
    .sliding-banner-300 .customBox,
    .sliding-banner-150 .customBox,
    .sliding-banner-250 .customBox,
    .sliding-banner-280 .customBox {
        height: 340px !important;
    }
    .sliding-banner-300 .customBox .backward,
    .sliding-banner-150 .customBox .backward,
    .sliding-banner-250 .customBox .backward,
    .sliding-banner-280 .customBox .backward {
        height: 340px !important;
    }
}

@media (max-width: 768px) {
    .ad-inner-wrapper {
        min-height: auto !important;
    }
}

/* ❤ 서리 후원 버튼 — index.php 와 동일(공용UI라 두 곳에 복붙). 클릭 시 후원 모달, 별은 wish_fx 가 뿌림 */
    .category-nav-donate{background:linear-gradient(160deg,#ffd0da,#ffb0c4);border:2px solid #ef92a8;color:#c0405f;font-weight:800;box-shadow:0 3px 0 #e58ba0;position:relative;top:-1px;overflow:visible}
    .category-nav-donate:hover{border-color:#ef92a8;color:#c0405f;transform:translateY(-2px);box-shadow:0 3px 0 #e58ba0}

.mobile-coupang-search {
            display: none;
        }
        @media (max-width: 768px) {
            .mobile-coupang-search {
                display: block;
                margin: 250px 15px 0 15px;
            }
            .mobile-coupang-search .sidebar-widget.coupang-search-section {
                background: transparent !important;
                border-radius: 12px !important;
                border: 1px solid #ff6b35 !important;
                box-shadow: none !important;
                padding: 0 !important;
                overflow: hidden;
            }
            .mobile-coupang-search .sidebar-widget.coupang-search-section .widget-header {
                padding: 0 !important;
                background: transparent !important;
                border: none !important;
            }
            .mobile-coupang-search .sidebar-widget.coupang-search-section .widget-title {
                margin: 0 !important;
            }
            .mobile-coupang-search .sidebar-widget.coupang-search-section .widget-content {
                padding: 0 !important;
                background: white;
            }
            aside.sidebar .reco-widget {
                display: none;
            }
        }

/* 법적 문서 모달 내부 스타일 격리 */
.legal-modal-content {
    all: initial;
    display: block;
    padding: 30px;
    line-height: 1.8;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.legal-modal-content * {
    max-width: 100%;
    box-sizing: border-box;
}

.legal-modal-content h4 {
    font-size: 18px;
    font-weight: bold;
    color: #222;
    margin: 20px 0 10px 0;
}

.legal-modal-content p {
    margin: 10px 0;
    line-height: 1.8;
}

.legal-modal-content ul, .legal-modal-content ol {
    margin: 10px 0 10px 20px;
    padding-left: 20px;
}

.legal-modal-content li {
    margin: 5px 0;
}

.legal-modal-content a {
    color: #007bff;
    text-decoration: underline;
}

.legal-modal-content strong {
    font-weight: bold;
}

.legal-modal-content br {
    display: block;
    content: "";
    margin: 5px 0;
}

