/* 商品動画カードのスタイル */
.product-card {
    max-width: 400px;
    margin: 20px auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/*
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
} */

.product-video {
    position: relative;
/*    aspect-ratio: 16/9; */
    background: #000;
/*    cursor: pointer; */
    overflow: hidden;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.turntable-preview {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    pointer-events: none;
    z-index: 2;
    line-height: 1.4;
}
.product-image1 {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url('../images/main/Product_01_recycle.png');
    height: 100%;
}
.product-image2 {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url('../images/main/Product_02_kaitori.png');
    height: 100%;
}
.product-image3 {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url('../images/main/Product_03_hv.png');
    height: 100%;
}
.product-image4 {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url('../images/main/Product_04_chemi.png');
    height: 100%;
}
.product-image5 {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url('../images/main/Product_05_HR.png');
    height: 100%;
}
.product-image6 {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url('../images/main/Product_06_sanpai.png');
    height: 100%;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    transition: opacity 0.3s ease;
    z-index: 3;
}

.play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-button {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.play-button:hover {
    background: white;
    transform: scale(1.1);
}

.play-button:focus {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.video-controls {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    border-radius: 6px;
    padding: 8px 12px;
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 4;
    backdrop-filter: blur(4px);
}

.video-controls.show {
    display: none;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
}

.control-btn:hover {
    background: rgba(255,255,255,0.2);
}

.control-btn:focus {
    outline: 2px solid rgba(255,255,255,0.5);
    outline-offset: 2px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.progress-bar:hover {
    height: 8px;
}

.progress {
    height: 100%;
    background: #007bff;
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 3px;
}

.progress-bar:hover .progress {
    background: #0056b3;
}

.time-display {
    color: white;
    font-size: 12px;
    min-width: 80px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* 複数カード用のグリッドレイアウト */
.video-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ローディング状態 */
.product-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.product-card.loading .video-player {
    background: #f0f0f0;
}

/* エラー状態 */
.product-card.error .turntable-preview {
    color: #ff6b6b;
}

.product-card.error .play-button {
    background: rgba(255, 107, 107, 0.9);
    color: white;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .product-card {
        margin: 10px;
        max-width: none;
    }
    
    .video-cards-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 10px;
    }
    
    .turntable-preview {
        font-size: 16px;
    }
    
    .play-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .video-controls {
        bottom: 5px;
        left: 5px;
        right: 5px;
        padding: 6px 8px;
        gap: 8px;
    }
    
    .time-display {
        font-size: 11px;
        min-width: 70px;
    }
    
    .product-content {
        padding: 15px;
    }
    
    .product-title {
        font-size: 18px;
    }
    
    .product-description {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .product-features {
        gap: 6px;
    }
    
    .feature-tag {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* アクセシビリティ */
@media (prefers-reduced-motion: reduce) {
    .product-card,
    .play-button,
    .feature-tag,
    .play-overlay,
    .progress {
        transition: none;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .product-card {
        background: #2d2d2d;
        color: #ffffff;
    }
    
    .product-title {
        color: #ffffff;
    }
    
    .product-description {
        color: #cccccc;
    }
    
    .feature-tag {
        background: #1e3a8a;
        color: #93c5fd;
        border-color: rgba(147, 197, 253, 0.2);
    }
}