/* 기본 아이콘 및 이미지 스타일 */
.icon-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    color: #666;
    font-weight: bold;
    border-radius: 4px;
}

.product-placeholder {
    background-color: #f5f5f5;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    text-align: center;
}

/* 전체 콘텐츠 너비 고정 */
.main-content.full-width {
    width: 100%;
    max-width: 100%;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 모든 섹션 공통 폭 조정 */
.banner-section,
.category-shortcuts-section,
.discount-section,
.popular-section,
.holiday-section {
    width: 100%;
    max-width: 1000px;
    margin-bottom: 15px;
}

/* 광고 섹션 스타일 */
.ad-section {
    width: 100%;
    background-color: #f5f5f5;
    padding: 20px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.ad-container {
    width: 100%;
    max-width: 1000px;
    min-width: 300px;
    margin: 0 auto;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-sizing: border-box;
}

/* 배너 슬라이더 스타일 */
.banner-slider {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
}

/* 배너 로딩 스타일 */
.loading-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background-color: #f5f5f5;
    border-radius: 12px;
    color: #666;
    font-size: 16px;
    text-align: center;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.banner {
    display: none;
    padding: 30px;
    border-radius: 12px;
    background-color: #f5f5f5;
    position: relative;
    color: white;
    text-align: center;
    min-height: 200px;
    overflow: hidden;
    transition: opacity 0.2s ease;
    will-change: opacity, transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* 배너 색상 7개 */
.banner-red {
    background-image: linear-gradient(to right, rgba(231, 76, 60, 0.9), rgba(243, 156, 18, 0.7));
}

.banner-blue {
    background-image: linear-gradient(to right, rgba(52, 152, 219, 0.9), rgba(41, 128, 185, 0.7));
}

.banner-green {
    background-image: linear-gradient(to right, rgba(46, 204, 113, 0.9), rgba(39, 174, 96, 0.7));
}

.banner-purple {
    background-image: linear-gradient(to right, rgba(155, 89, 182, 0.9), rgba(142, 68, 173, 0.7));
}

.banner-orange {
    background-image: linear-gradient(to right, rgba(243, 156, 18, 0.9), rgba(230, 126, 34, 0.7));
}

.banner.changing {
    opacity: 0.8;
}

.banner.active {
    display: block;
}

.banner-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    transform: translateZ(0);
}

.banner-subtitle {
    font-size: 14px;
    margin-bottom: 20px;
    opacity: 0.9;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.banner-button {
    background-color: white;
    color: #e74c3c;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s;
    width: fit-content;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.banner-button:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

.pagination {
    display: flex;
    gap: 5px;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.selected, .dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

/* 할인정보 개선 스타일 */
.product-card.highlight {
    border: 2px solid #e74c3c;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.15);
}

.deadline-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 2;
}

.discount-badge.highlight {
    background: #f39c12;
    margin-left: 5px;
}

/* 카테고리 바로가기 */
.category-shortcuts {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin: 10px 0;
    width: 100%;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.category-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.category-name {
    font-size: 16px;
    color: #333;
    font-weight: 500;
    margin-bottom: 5px;
}

.product-count {
    font-size: 14px;
    color: #666;
}

/* 인기 상품 그리드 */
.popular-product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    padding: 10px;
    width: 100%;
}

.product-card {
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    will-change: transform;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #e74c3c;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
}

.discount-badge.new {
    background-color: #3498db;
}

.ranking-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #f39c12;
    color: white;
    font-size: 16px;
    font-weight: 700;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.ranking-badge.rank-1-3 {
    background-color: #e74c3c;
    width: 28px;
    height: 28px;
    font-size: 17px;
}

.ranking-badge.rank-4-5 {
    background-color: #f39c12;
}

.product-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.category-tag {
    display: inline-block;
    font-size: 12px;
    color: #777;
    background-color: #f3f3f3;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

/* product card 날짜 정보 스타일 */
.date-info {
    font-size: 12px;
    color: #666;
    background-color: #f9f9f9;
    padding: 3px 6px;
    border-radius: 3px;
    width: fit-content;
    margin-top: 3px;
    text-align: left;
    align-self: flex-start;
}

/* 휴무일 정보 스타일 */
.holiday-section {
    margin-top: 15px;
    margin-bottom: 20px;
}

.next-holiday {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    width: 100%;
}

.holiday-icon {
    margin-right: 25px;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 50%;
}

.holiday-icon img {
    width: 36px;
    height: 36px;
}

.holiday-info-summary {
    flex: 1;
}

.next-holiday-title {
    font-size: 17px;
    margin-bottom: 8px;
    color: #666;
    font-weight: 500;
}

.next-holiday-date {
    font-size: 26px;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.holiday-description {
    font-size: 16px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
}

.holiday-button {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.3);
}

.holiday-button:hover {
    background-color: #d44333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.4);
}

/* 반응형 스타일 */
@media (max-width: 1024px) {
    .main-content.full-width {
        padding: 0 15px;
    }
    
    .banner-section,
    .category-shortcuts-section,
    .discount-section,
    .popular-section,
    .holiday-section {
        max-width: 100%;
    }
    
    .banner {
        min-height: 180px;
        padding: 25px;
    }
    
    .category-shortcuts {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .banner-title {
        font-size: 20px;
        max-width: 90%;
    }
    
    .banner-subtitle {
        font-size: 13px;
        max-width: 90%;
    }
    
    .category-shortcuts {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .popular-product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .product-card {
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transition: transform 0.2s, box-shadow 0.2s;
        overflow: hidden;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        position: relative;
    }
    
    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    }
    
    .next-holiday {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .holiday-icon {
        margin: 0 0 15px 0;
    }
}

@media (max-width: 576px) {
    .main-content.full-width {
        padding: 0 0px;
    }
    
    .banner {
        min-height: 160px;
        padding: 20px;
    }
    
    .banner-title {
        font-size: 18px;
    }
    
    .banner-subtitle {
        font-size: 12px;
        margin-bottom: 15px;
    }
    
    .category-shortcuts {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .category-icon {
        width: 40px;
        height: 40px;
    }
    
    .category-name {
        font-size: 13px;
    }
    
    .product-count {
        font-size: 11px;
    }
    
    .popular-product-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 8px;
        padding: 0;
    }
    
    .next-holiday-title {
        font-size: 16px;
    }
    
    .next-holiday-date {
        font-size: 18px;
    }
    
    .holiday-description {
        font-size: 13px;
    }
    
    /* 상품 카드 레이아웃 추가 */
    .product-card {
        display: flex;
        flex-direction: row;
        align-items: center;
        margin-bottom: 8px;
        padding: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
        overflow: hidden !important;
    }
    
    .product-card .product-image {
        width: 100px;
        height: 100px;
        min-width: 100px;
        padding-bottom: 0;
        margin-right: 12px;
        border-radius: 6px;
        position: relative;
        overflow: hidden;
    }
    
    .product-card .product-image img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
        top: 0;
        left: 0;
        transform: none;
    }
    
    .product-card .product-info {
        flex: 1;
        padding: 8px 8px 8px 0;
        display: flex;
        flex-direction: column;
        gap: 3px;
        max-width: calc(100% - 120px) !important;
        overflow: hidden !important;
    }
    
    .product-card .product-name {
        font-size: 14px;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
        max-width: 100% !important;
        height: auto !important;
        margin-bottom: 0;
    }
    
    .product-card .category-tag {
        display: none;
    }
    
    .product-card .price-container {
        margin: 2px 0;
    }
    
    .banner-section,
    .category-shortcuts-section,
    .discount-section,
    .popular-section,
    .holiday-section {
        margin-bottom: 10px;
    }
    
    .category-shortcuts {
        margin: 5px 0;
    }
    
    .holiday-section {
        margin-top: 10px;
        margin-bottom: 15px;
    }
}