/* File Name   : product_grid.css
   File Location : /views/site/themes/8/theme_default/blocks/product_grid.css
   File Explain  : 상품 그리드 블록 스타일 */

.product-grid-block {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 80px 20px;
}

.product-grid-header {
    text-align: center;
    margin-bottom: 48px;
}

.product-grid-title {
    font-size: 42px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.product-grid-subtitle {
    font-size: 18px;
    font-weight: 400;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.product-grid-container {
    display: grid;
    grid-template-columns: repeat(var(--columns, 4), 1fr);
    gap: 24px;
    width: 100%;
}

.product-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.product-card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 70%; /* 이미지 비율에 맞게 조정 */
    overflow: hidden;
    background: #f3f4f6;
}

.product-card-image-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.product-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

.product-card-carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
}

.carousel-dot.active {
    background: rgba(255, 255, 255, 1);
    width: 8px;
    height: 8px;
}

.product-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.product-card-description {
    font-size: 14px;
    font-weight: 400;
    color: #6b7280;
    margin: 0 0 16px 0;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.product-card-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.price-amount {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.price-note {
    font-size: 10px;
    font-weight: 400;
    color: #9ca3af;
    line-height: 1.2;
    margin-top: 2px;
}

.product-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating-star {
    font-size: 18px;
    color: #fbbf24;
    line-height: 1;
    font-weight: 400;
}

.rating-value {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .product-grid-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .product-grid-block {
        padding: 60px 16px;
    }

    .product-grid-title {
        font-size: 32px;
        margin-bottom: 12px;
    }

    .product-grid-subtitle {
        font-size: 16px;
    }

    .product-grid-header {
        margin-bottom: 32px;
    }

    .product-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .product-card-content {
        padding: 16px;
    }

    .product-card-title {
        font-size: 16px;
    }

    .product-card-description {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .price-amount {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .product-grid-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-grid-title {
        font-size: 28px;
    }

    .product-grid-subtitle {
        font-size: 14px;
    }
}
