/* Product Detail Page Styles */

/* Page Title Glitch Effect - Products用の画像（デフォルトのまま） */
.page-title::before,
.page-title::after {
    background-image: url('../img/common/footer_menu02.svg?v=20251030');
}

/* Product Detail Section - 全体の枠線 */
.product-detail-section {
    padding: 10px 0;
}

.product-detail-section .container {
    border: 1px solid #909090;
    padding: 40px;
    background-color: rgba(0, 0, 0, 0.3);
}

/* Search & Filter Section */
.search-filter-section {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.search-box-wrapper {
    display: flex;
    max-width: 280px;
    width: 100%;
    margin: 0;
    background-color: rgba(60, 60, 60, 0.8);
    border: none;
    border-radius: 30px;
    overflow: hidden;
}

.search-box-wrapper .search-input {
    flex: 1;
    padding: 12px 25px;
    background: transparent;
    border: none;
    color: var(--text-white);
    font-size: 14px;
    outline: none;
}

.search-box-wrapper .search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-box-wrapper .search-btn {
    padding: 12px 20px;
    background-color: transparent;
    border: none;
    color: var(--primary-orange);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-box-wrapper .search-btn:hover {
    color: #ff6a33;
}

/* Filter Dropdown Wrapper */
.filter-dropdown-wrapper {
    position: relative;
}

.filter-dropdown-btn {
    padding: 12px 25px;
    background-color: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(255, 69, 0, 0.3);
    color: var(--text-white);
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-dropdown-btn:hover {
    background-color: rgba(60, 60, 60, 0.9);
    border-color: var(--primary-orange);
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.filter-dropdown-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Filter Dropdown Content */
.filter-dropdown-content {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background-color: rgba(20, 20, 20, 0.98);
    border: 1px solid var(--primary-orange);
    border-radius: 10px;
    padding: 20px;
    display: none;
    z-index: 100;
    min-width: 300px;
    max-width: 600px;
}

.filter-dropdown-content.active {
    display: block;
}

/* Selected Tags Area */
.selected-tags-area {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 69, 0, 0.2);
}

/* All Tags Area */
.all-tags-area {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-tag {
    padding: 8px 18px;
    background-color: transparent;
    border: 1px solid var(--primary-orange);
    color: var(--primary-orange);
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-tag:hover,
.filter-tag.active {
    background-color: var(--primary-orange);
    color: white;
}

/* Filter Clear Button */
.btn-filter-clear {
    padding: 10px 20px;
    background-color: transparent;
    border: none;
    color: #ff3333;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.btn-filter-clear:hover {
    color: #ff5555;
}

/* Model and Year Options */
.model-option,
.year-option {
    padding: 10px 15px;
    background-color: transparent;
    border: none;
    color: var(--text-white);
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    border-radius: 5px;
    display: inline-block;
    margin: 5px;
}

.model-option:hover,
.year-option:hover {
    background-color: var(--primary-orange);
}

/* Product Detail */
.product-detail {
    /* background-color: rgba(20, 20, 20, 0.8); */
    /* border: 2px solid rgba(255, 69, 0, 0.3); */
    /* border-radius: 10px; */
    padding: 60px;
}

/* Product Images */
.product-images {
    margin-bottom: 60px;
}

.main-image {
    width: 100%;
    height: 400px;
    background-color: #171717;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.4s ease-in-out;
}

.main-image img.fade-out {
    opacity: 0;
}

/* サムネイルコンテナ（矢印ボタン付き） */
.thumbnails-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.thumbnail-scroll-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 69, 0, 0.8);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.thumbnail-scroll-btn:hover {
    background-color: var(--primary-orange);
    transform: scale(1.1);
}

.thumbnail-scroll-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

.image-thumbnails-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.image-thumbnails {
    display: flex;
    gap: 15px;
    justify-content: center;
    overflow-x: auto;
    overflow-y: visible;
    padding-top: 10px;
    padding-bottom: 10px;
    scroll-behavior: smooth;
    /* スクロールバーを非表示 */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.image-thumbnails::-webkit-scrollbar {
    display: none;
}

.thumbnail {
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    background-color: #171717;
    border: 2px solid rgba(255, 69, 0, 0.3);
    border-radius: 8px;
    /* padding: 10px; */
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary-orange);
    transform: translateY(-5px);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Swipe Hint Animation (SP only) */
.swipe-hint {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 15px;
    pointer-events: none;
    z-index: 10;
    background: rgba(0, 0, 0, 0.75);
    animation: swipeHintFade 3s ease-in-out;
    animation-fill-mode: forwards;
}

.swipe-hand {
    font-size: 36px;
    color: var(--primary-orange);
    animation: swipeHandMove 2s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255, 69, 0, 0.6));
}

.swipe-arrow-left,
.swipe-arrow-right {
    font-size: 28px;
    color: var(--primary-orange);
    filter: drop-shadow(0 0 6px rgba(255, 69, 0, 0.5));
}

.swipe-arrow-left {
    animation: arrowPulseLeft 2s ease-in-out infinite;
}

.swipe-arrow-right {
    animation: arrowPulseRight 2s ease-in-out infinite;
}

@keyframes swipeHandMove {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-12px);
    }
    75% {
        transform: translateX(12px);
    }
}

@keyframes arrowPulseLeft {
    0%, 100% {
        transform: translateX(0);
        opacity: 0.5;
    }
    25% {
        transform: translateX(-6px);
        opacity: 1;
    }
}

@keyframes arrowPulseRight {
    0%, 100% {
        transform: translateX(0);
        opacity: 0.5;
    }
    75% {
        transform: translateX(6px);
        opacity: 1;
    }
}

@keyframes swipeHintFade {
    0% {
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Product Info Section */
.product-info-section {
    margin-bottom: 60px;
}

.product-name {
    font-size: 24px;
    color: var(--primary-orange);
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 69, 0, 0.3);
}

.product-detail-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 30px;
    padding: 25px 0;
    border-bottom: 1px solid rgba(255, 69, 0, 0.1);
}

.detail-label {
    font-size: 14px;
    color: var(--primary-orange);
    font-weight: 500;
}

.detail-text {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.8;
}

.detail-text.price {
    font-size: 16px;
    color: var(--text-white);
    font-weight: 500;
}

/* Product Gallery */
.product-gallery {
    margin-bottom: 60px;
}

.gallery-slider {
    position: relative;
    margin-bottom: 30px;
}

.gallery-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-image {
    width: 100%;
    height: 250px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 8px;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: var(--primary-orange);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-arrow:hover {
    background-color: #ff6a33;
    transform: translateY(-50%) scale(1.1);
}

.prev-arrow {
    left: -25px;
}

.next-arrow {
    right: -25px;
}

.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 69, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-dot:hover,
.gallery-dot.active {
    background-color: var(--primary-orange);
    transform: scale(1.2);
}

/* Product Gallery Grid (PC4列 SP2列) */
.product-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.gallery-grid-item {
    width: 100%;
    aspect-ratio: 1;
    background-color: #171717;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-grid-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

.gallery-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
}

.modal-close::before,
.modal-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 30px;
    background-color: var(--primary-orange);
    transition: all 0.3s ease;
}

.modal-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.modal-close:hover::before,
.modal-close:hover::after {
    background-color: #ff6a33;
}

.modal-nav {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    pointer-events: none;
}

.modal-prev,
.modal-next {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    pointer-events: all;
    position: relative;
    transition: all 0.3s ease;
}

.modal-prev::before,
.modal-next::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    border-left: 2px solid var(--primary-orange);
    border-top: 2px solid var(--primary-orange);
    transition: all 0.3s ease;
}

.modal-prev::before {
    transform: translate(-30%, -50%) rotate(-45deg);
}

.modal-next::before {
    transform: translate(-70%, -50%) rotate(135deg);
}

.modal-prev:hover::before,
.modal-next:hover::before {
    border-color: #ff6a33;
    transform: translate(-30%, -50%) rotate(-45deg) scale(1.2);
}

.modal-next:hover::before {
    transform: translate(-70%, -50%) rotate(135deg) scale(1.2);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

/* Product Videos */
.product-videos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.video-embed {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
}

.video-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-gray);
}

/* Product Contact */
.product-contact {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 69, 0, 0.3);
}

.btn-contact {
    font-size: 18px;
    padding: 25px 60px;
    line-height: 1.8;
}

/* Contact CTA */
.contact-cta {
    padding: 60px 0;
    text-align: center;
}

.btn-large {
    font-size: 18px;
    padding: 30px 80px;
    line-height: 1.8;
}

.btn-large span {
    font-size: 14px;
    font-weight: normal;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-images {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-arrow {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .product-detail-section {
        padding: 1rem;
    }

    .product-detail-section .container {
        background-color: #000;
        padding: 1rem;
    }

    .search-filter-section {
        margin: 1rem 1rem 0;
    }

    .filter-dropdown-wrapper {
        width: 100%;
    }

    .filter-dropdown-btn {
        width: 100%;
    }

    .filter-tag {
        font-size: 11px;
        padding: 8px 15px;
    }

    .product-detail {
        padding: 30px 20px;
    }

    .main-image {
        height: 250px;
        padding: 20px;
    }

    .thumbnails-container {
        gap: 0;
    }

    .thumbnail-scroll-btn {
        display: none;
    }

    .image-thumbnails-wrapper {
        width: 100%;
        position: relative;
    }

    .image-thumbnails {
        gap: 8px;
        justify-content: flex-start;
    }

    .thumbnail {
        flex: 0 0 calc((100% - 24px) / 4);
        width: calc((100% - 24px) / 4);
        height: auto;
        aspect-ratio: 1;
        padding: 5px;
    }

    .product-name {
        font-size: 20px;
    }

    .product-detail-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .product-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin: 0 -1rem 3rem;
    }

    .gallery-grid-item {
        padding: 10px;
    }

    .gallery-images {
        grid-template-columns: 1fr;
    }

    .gallery-arrow {
        display: none;
    }

    .product-videos {
        grid-template-columns: 1fr;
    }

    .btn-contact,
    .btn-large {
        font-size: 16px;
        padding: 20px 40px;
    }

    /* モーダルUI調整 (SP) */
    .modal-content-wrapper {
        max-width: 95%;
        max-height: 80vh;
    }

    .modal-content {
        max-height: 80vh;
    }

    .modal-close {
        width: 24px;
        height: 24px;
        top: 5px;
        right: 5px;
    }

    .modal-close::before,
    .modal-close::after {
        width: 1.5px;
        height: 24px;
    }

    .modal-nav {
        padding: 0 10px;
    }

    .modal-prev,
    .modal-next {
        width: 30px;
        height: 30px;
    }

    .modal-prev::before,
    .modal-next::before {
        width: 10px;
        height: 10px;
        border-width: 1.5px;
    }
}
