/* スペシャルバンドル詳細ページ */
.bundle-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 30px 0;
}

.bundle-images {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.bundle-main-image {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.bundle-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.bundle-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bundle-thumbnails img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.bundle-thumbnails img:hover,
.bundle-thumbnails img.active {
    border-color: #9c27b0;
}

.bundle-info {
    padding: 0;
}

.bundle-badge {
    display: inline-block;
    background: #9c27b0;
    color: #fff;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    margin-bottom: 10px;
}

.bundle-badge-limited {
    display: inline-block;
    background: #ff9800;
    color: #fff;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    margin-bottom: 10px;
    margin-left: 10px;
}

.bundle-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.4;
}

.bundle-description {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 25px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.bundle-price-box {
    background: linear-gradient(135deg, #9c27b0 0%, #673ab7 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.bundle-price {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
}

.bundle-period {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.bundle-form {
    margin-bottom: 30px;
}

.bonus-section {
    background: #fff;
    border: 2px solid #9c27b0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.bonus-title {
    margin-bottom: 15px;
}

.bonus-title p:first-child {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.bonus-price-note {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.bonus-price-note span {
    color: #9c27b0;
    font-weight: bold;
}

.bonus-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bonus-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.bonus-item:hover {
    border-color: #9c27b0;
    background: #faf5fc;
}

.bonus-item.selected {
    border-color: #9c27b0;
    background: #f3e5f5;
}

.bonus-item input[type="radio"] {
    display: none;
}

.bonus-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.bonus-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.bonus-item-info {
    flex: 1;
}

.bonus-item-name {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
}

.bonus-item-stock {
    font-size: 12px;
    color: #666;
}

.bonus-item-price {
    font-size: 13px;
    color: #999;
    margin-top: 5px;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(135deg, #9c27b0 0%, #673ab7 100%);
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(156, 39, 176, 0.4);
}

.stock-warning {
    background: #ffebee;
    color: #c62828;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 25px;
}

.main-item-info {
    margin-top: 30px;
    border-top: 1px solid #e0e0e0;
    padding-top: 25px;
}

.main-item-info h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.set-item-row {
    margin-bottom: 15px;
}

.main-item-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.3s;
}

.main-item-link:hover {
    background: #f0f0f0;
}

.main-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.main-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* モーダル */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-dialog {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

.modal-product {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.modal-product-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.modal-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.modal-product-info {
    flex: 1;
}

.modal-product-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.modal-bonus {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.modal-bonus-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.modal-bonus-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-bonus-image {
    width: 60px;
    height: 60px;
}

.modal-bonus-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.modal-bonus-name {
    font-size: 14px;
    font-weight: bold;
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
}

.btn-cancel {
    flex: 1;
    padding: 12px 20px;
    background: #e0e0e0;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.btn-confirm {
    flex: 2;
    padding: 12px 20px;
    background: linear-gradient(135deg, #9c27b0 0%, #673ab7 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

/* エラーモーダル */
.modal-error {
    max-width: 400px;
}

.modal-header-error {
    background: #ffebee;
    border-bottom: 1px solid #ffcdd2;
}

.modal-header-error h3 {
    color: #c62828;
}

.modal-error .modal-body {
    text-align: center;
    padding: 30px 20px;
}

.modal-error .modal-body p {
    margin: 0;
    font-size: 15px;
    color: #333;
    line-height: 1.6;
}

.btn-error-ok {
    width: 100%;
    padding: 12px 20px;
    background: #c62828;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-error-ok:hover {
    background: #b71c1c;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .bundle-detail {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px 0;
    }

    .bundle-images {
        position: static;
    }

    .bundle-title {
        font-size: 20px;
    }

    .bundle-price {
        font-size: 20px;
    }

    .bonus-item-image {
        width: 60px;
        height: 60px;
    }

    .main-item-image {
        width: 60px;
        height: 60px;
    }

    .submit-btn {
        padding: 15px;
        font-size: 16px;
    }
}
